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 java transaction api (jta)?
What is build tool in java?
What is j2ee and j2se?
What is application assembler?
What are web technologies in java?
What is api in j2ee?
Is java 100 percent pure object oriented?
What is setbounds in java?
I am newbie in J2EE & looking for strong basic behind each concept as, Why do we use private access specifier before each variable of type property bcoz ultimately to access it outside the class we use public method as getter & setter ? If we use getter & setter to access it outside the class so better we make variable as public so that it is easily available outside of the class... Please guide me why do we use as private ????
What is java 2 platform, enterprise edition (j2ee)?
What is external entity?
What is actionerrors?
What is ejb jar file?
Define thin client?
How does j2ee application work?