What is the difference between <jsp:forward> and
sendRedirect?
Answer Posted / prasanth setty
When you want to preserve the current request/response
objects and transfer them to another resource WITHIN the
context, you must use <jsp:forword>
If you want to dispatch to resources OUTSIDE the context,
then you must use sendRedirect. In this case you won't be
sending the original request/response objects, but you will
be sending a header asking to the browser to issue a
request to the new URL.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Why are jsp pages the preferred api for creating a web-based client program?
How to forward a request to another source?
What are the elements of jsp?
How session is achieved in JSP?(once user logs out,if he press back button of browser he should not be allowed to same page)
How many tags are there in jsp?
What is the advantage of using getProperty action, as compared to the accessor method?
What are the benefits of pagecontext implicit object?
What is full api?
Why is it not recommended to use script elements in jsp?
What is response sendredirect?
What is client scripting?
Is jsp page extensible true false?
How to include static files in a JSP page?
How to include a jsp file in another jsp file?
What is an implicit object?