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 create method?
What is a j2ee container?
What are the most important topics in java?
Who is java developer?
What is mean by connection pooling?
What is digest authentication?
Is java part of oracle?
Explain j2ee architecture.
Is java safe to download?
What is java netbeans?
What is java ee server?
What is the ear file?
What is B2B?
What is business method?
What is devops in java?