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
What is comment?
What is java servlet container?
What is urn?
What is archiving?
What is java api for xml registries (jaxr)?
What is j2ee server?
What is instance in java?
What is commit?
What is the container?
What is considered as a web component?
What software is needed for java programming?
What does java ee stand for?
Enlist the technologies embraced in j2ee?
What are the four components of j2ee application?
What is the mvc on struts?