What is the difference between <jsp:forward> and
sendRedirect?

Answers were Sorted based on User's Feedback



What is the difference between <jsp:forward> and sendRedirect?..

Answer / mahmood alam siddiqui

Forwrd :: when we invoke forward the request is sent to the
another resource on the server without the client being
inform that difference resource is going to process that
request.

SendRedirect :: when we invoke sendRedirect, It causes the
web container to return to the brouser that means new URL
should be requested.

SendRedirecr takes extra round trip
Forward is fater than sendRedirect

Is This Answer Correct ?    8 Yes 0 No

What is the difference between <jsp:forward> and sendRedirect?..

Answer / harish

Using <jsp:forward> you can forward the request and
response object to the concern URL. Where as in
sendRedirect, it will not carry the request and response
object details.

Is This Answer Correct ?    7 Yes 1 No

What is the difference between <jsp:forward> and sendRedirect?..

Answer / manas banerjee

<jsp:forward>--a request object containing to the client
request is send to the destination page which may be
servlet/jsphtml page.
in case of sendRedirect http sends a temporary response to
the browser and browser creates a new request and it sends
to the targeted page.it destroys the session object

Is This Answer Correct ?    5 Yes 1 No

What is the difference between <jsp:forward> and sendRedirect?..

Answer / raghu

Send redirect will happen on client side & request, response
will be newly created, for forward action it is server side
action & request and response is passesd & not modified or
destoyed

Is This Answer Correct ?    4 Yes 0 No

What is the difference between <jsp:forward> and sendRedirect?..

Answer / 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

What is the difference between <jsp:forward> and sendRedirect?..

Answer / jahir hussain.s

When you invoke a forward request, the request is sent to another resource on the server, without the client being informed that a different resource is going to process the request. This process invoke a forward request, the request is sent to another resource on the server, without the client being informed that a different resource is going to process the request. This process occurs completly

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More JSP Interview Questions

What are JSP scripting elements?

8 Answers  


When does a container initialize multiple jsp / servlet objects?

0 Answers  


How to make a “new line in html” in jsp?

0 Answers  


How jsp is executed?

0 Answers  


When i am useing useBean tag of JSP in weblogic server It show compiletion error..Like bad class file: C:\bea\user_projects\domains\Mahesh\applications\UseBean\WEB-INF\classes\user\UserData.class class file has wrong version 49.0, should be 48.0 Please remove or make sure it appears in the correct subdirectory of the classpath. user.UserData user1 = null; //[ /SaveName.jsp; Line: 4]

0 Answers  






Give a sample jsp configuration in the deployment descriptor.

0 Answers  


What is jsp language?

0 Answers  


How can I override the jspinit() method within a jsp page?

0 Answers  


How we can configure init params in jsp?

0 Answers  


Why we use jsp instead of html?

0 Answers  


What is the use of Application Object and Session Object in JSP?

4 Answers   HCL, Symphony,


How clear chache and buffer of opera browser.

0 Answers  


Categories