What is the difference between sendRedirect() and forward()?
in what situations do we have to use send redirect()
instead of forward().
Answer Posted / fateh
the main difference is that forward() do not save the
information while sending to the client but on the other
hand sendRedirect() saves the information while redirecting
to the other page.
Basically, sendRedirect() is used to redirect ot the error
page and forward() is a request dispatcher method to forward
request to the new page. So, if we are talking in this
context sendRedirect() is faster than forward(). According
to he above mentioned concept, forward() is faster than
sendRedirect() but if we are using sendRedirect() to send to
the error page it is faster.
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
How does javac compiler work?
Is java 100 percent pure object oriented?
What is callback methods Component methods called by the container to notify the component of important events in its life cycle?
What is java 2 platform, enterprise edition (j2ee)?
What is initialization parameter?
What is deployment descriptor?
What is group?
What are the most important topics in java?
How does j2ee application work?
Why is java used?
What is java developer job description?
What is j2ee stand for?
What is java developer?
What do you mean by the deployment descriptor?
What are the types of j2ee clients?