difference between forward and sendredirect
Answer Posted / dsr
FORWARD-->
1. THE REQUEST AND RESPONSE OBJECT REMAIN SAME.
2. CONTROL DIRECTLY GOES TO REQUESTED PAGE AT THE POINT
WHERE FORWARD IS CALLED.
3. REQUEST DISPATCHER IS NEEDED.
4.forward() is used to transfer the request within the web
application
SEND REDIRECT:--->
1.NEW REQUEST AND RESPONSE IS GENERATED IN CASE THIS CASE.
2.IN THIS CASE FIRST CONTROL GOES TO CLIENT(BROWSER) AND
THEN TO REQUESTED PAGE.
3.JUST RESPONSE OBJECT IS NEEDED.
4.sendRedirect() is used to transfer the request from same
webapplication or different webapplication.
| Is This Answer Correct ? | 13 Yes | 5 No |
Post New Answer View All Answers
What are the various ways of session supervision in servlets?
What is called Scriptlet?
What is servlet and its life cycle?
Can we refresh servlet in client and server side automatically?
What is the inter-servlet communication?
How do I support both get and post from the same servlet?
What are the key methods that are involved in processing of http servlets?
How the JSP file will be executed on the Server side?
What is meant by servlet? What are the parameters of the service method?
Why is servlet used?
How to generate the server side programming and the advantages of it over the other languages?
Whether thread can be used in servlets?
What is servlet lazy loading?
request parameter how to find whether a parameter exists in the request object?
What is the difference between 2 types of servlets?