What is the difference between sendRedirect() and forward()?
in what situations do we have to use send redirect()
instead of forward().
Answer Posted / aravind
forward() is a action element in jsp. it is used to pass
ctrl from current page to another jsp page and it is a
method in jsp.
send redirect() is a method in servlet.
there are two methods used. as
HttpServletResponse.encodeReDirctURL().which takes String
represents a redirction url.next sendredirect() method.
which takes the String returned from the
encoderedirectString() and send it back to the client for
redirection
| Is This Answer Correct ? | 8 Yes | 10 No |
Post New Answer View All Answers
Why java is interpreted language?
Why is java used?
What is the description for expression element?
What are the main components of the j2ee application?
What do you mean by the component contract?
What is credentials?
What is application client?
Is java more difficult than c++?
What is element?
What should a junior java developer know?
What is the use of method save()?
What is java api for xml processing (jaxp)?
What is ejb container provider?
What is the build file?
What is japplet in java?