What is the difference between sendRedirect() and forward()?
in what situations do we have to use send redirect()
instead of forward().
Answer Posted / bhupathi.vm
1.forward will forward the request without saving the client
information where as sendRedirect will save the previous
information and send to another requested page.
2.The forward operation happens in the same request itself.
Once if you forward a request, you cannot add any more
response content after the forward command. Becuase, the
servlet ignores the remaining things and forwards the
request to another servlet.
The send redirect is the one, which redirects you to some
other servlet or page. The redirection is not within the
same request, but it is a new request. Using send redirect,
you can access a page available on another context / server.
| Is This Answer Correct ? | 11 Yes | 9 No |
Post New Answer View All Answers
What is j2ee product provider?
What is connector?
What should a junior java developer know?
What is j2ee stand for?
What is japplet in java?
What is a web container j2ee?
Who generates bytecode in java?
What is java listener?
Is j2ee and jee same?
What is a j2ee component?
What is java j2ee developer?
What are j2ee concepts?
What is java awt event?
What does the application client module contain?
What does java ee stand for?