What is the difference between sendRedirect() and forward()?
in what situations do we have to use send redirect()
instead of forward().
Answer Posted / bindhu solomon
When we use forward, then servlet container forwards all
request to the target page. but in the case sendRedirect,
container makes a new request to the target Page.
So in forward , url link doesn't change but in sendRedirect
url line change . Because container makes a new request,
sendRedirect is much slower than forward.
If a target page has no relation with current
page , then we can use sendRedirect(I think so....)
Is This Answer Correct ? | 35 Yes | 9 No |
Post New Answer View All Answers
Is java gui dead?
Why java is a platform?
What is j2ee server?
What is javamail?
What is the preferred size of a component in java?
How do I become a java developer?
What are the different types of events in java?
Hi Friends. I want complete technical flow of j2ee project with following technologies. jsp , servlet , Struts , Hibernate , (should follow mvc-2 design pattern) . with DAO ,DTO SERVICE layers .
How java is reliable?
What is document root?
Difference between load and get method?
Differentiate between .ear, .jar and .war files.
What is build tool in java?
What is a java developer?
What is meant by j2ee?