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
Tell us something about servletconfig interface.
What is servlet in simple terms?
why we should override only no-agrs init() method.
How can we include static files in the jsp page?
What is the default http method in the servlet?
How do we call one servlet from another servlet?
What do you mean by filter in servlet?
What do you mean by httpservlet?
When jsessionid is created?
Why doesn’t a servlet include main()? How does it work?
What is http servlet? Explain with the help of an example.
What is called Session Tracking?
What is java servlet session?
What is MIME Type?
What are the life cycle methods of the servlet?