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
How to get the actual path of servlet in server?
What do you mean by session tracking and also explain its techniques?
What is the servlet?
How will you pass values from HTML page to the servlet?
What are life cycle methods of a servlet?
How to create war file?
Explain the different ways for servlet authentication?
Which application server is best for java?
Can you explain in detail 'javax.servlet' package?
What do you mean by scope object and what are its types?
What is difference between get and post method?
What is difference between GenericServlet and HttpServlet?
What is the major difference between context parameter and context attribute?
What's the difference between servlets and applets?
What is the difference between Server and Container?