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 is the use of request dispatcher interface?
Which httpsession object is used to view and manipulate information about a session?
Which event is fired at the time of session creation and destroy?
Is servlet a controller?
How is a servlet implemented in code?
Tell the new features added in servletrequest interface i.e. Servlet 2.4
How native code can be used in a servlet?
Explain the features are in servlet 3?
Explain the servlet filter.
What are the life-cycle methods for a servlet?
Why is servlet used?
What is webservlet?
What is war file?
What do you mean by servlet?
How the typical servlet code look like ?