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


Please Help Members By Posting Answers For Below Questions

How to retrieve warnings?

687


What is the use of jstl?

650


What are the life-cycle methods for a jsp?

679


What are the features of jsp?

681


How to forward a request to another source?

716


How does a jsp engine work?

664


What is server side programming language?

661


What do cookies mean?

653


Explain the action?

779


Is there a way to reference the "this" variable within a jsp page?

728


What is c tag in jsp?

643


What is an api with example?

773


What is pagecontext?

706


How is jsp include directive different from jsp include action. ?

711


What is jsp taglib?

646