What is difference between Forward() and sendRedirect()
methode?
Answer Posted / n.muthukumar
sendRedirect() sends a redirect response back to the
client's browser.
forward() does not involve the client's browser.
The forward( ) is faster than Sendredirect( ).
RequestDispatcher.forward( ) works on the Server.
when you use send redirect it will rediredct the url to new
url and It will be displayed in browser.
response.sendRedirect(http://162.1.1.0/error.html);
When you use forward it will forward to particular page but
in browser forwarded url won't dispaly
<jsp:forward page http://162.1.1.0/error.html) />
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the different methods of session management in servlets?
What are the new features added to servlet 2.5?
Can we fetch the attributes related to a servlet on a different servlet?
What do you mean by default initialization in java servlet?
Explain request dispatcher and its methods.
How to create war file?
Given the request path below, which are context path, servlet path and path info?
How to read request headers from servlets?
Explain the concept of ssi ?
What do you mean by request dispatcher in servlet?
What are different Authentication options available in Servlets.
What is servlet and its advantages?
How to get the server information in a servlet?
What is cookie? Why is cookie used?
What is the use of request dispatcher interface?