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
How can we invoke another servlet in a different application?
Why do we need servlet filter?
How to notify an object in session when session is invalidated or timed-out?
What is http servlet?
Explain the difference between generic servlet and http servlet?
How can you start a jta transaction from a servlet deployed on jboss?
What mechanisms are used by a Servlet Container to maintain session information?
Why do we need a constructor in a servlet if we use the init method?
How can we create deadlock situation in servlet?
Which is the methods of generated servlet?
What is the default http method in the servlet?
What is java servlet session?
What is the procedure for initializing a servlet?
What is the web server used for running the Servlets?
Can we override destroy method in servlet?