What is the difference between sendRedirect() and forward()?
in what situations do we have to use send redirect()
instead of forward().
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sateesh.b
sendRedirect() can be used to send a request with in the
server or in other server.
forward() can be used to send request in the same server.
| Is This Answer Correct ? | 8 Yes | 14 No |
What is java actionlistener?
Is java a high level language?
What is j2ee and j2se?
What is the best java course?
Who is java developer?
What is jetty in java?
How does j2ee application work?
What are the main components of the j2ee application?
can someone tell me how does preparedstatement works? its an interface and where is the implementation?
What is the ear file?
What does java awt stand for?
What is Document Object Model?