Difference between forward and sendRedirect methods

Showing Answers 1 - 5 of 5 Answers

tramakrishna

  • Mar 3rd, 2006
 

forward will forward the request without saving the client information where as sendRedirect will save the previous information and send to another requested page.

  Was this answer useful?  Yes

Nithya

  • Mar 14th, 2006
 

forward will forward the request and response to the next page within the same context .

sendredirect will forward the request and response to the page in another application. But the previous req and res will die.

  Was this answer useful?  Yes

jhansi012

  • Mar 16th, 2006
 

The forward operation happens in the same request itself. Once if you forward a request, you cannot add any more response content after the forward command. Becuase, the servlet ignores the remaining things and forwards the request to another servlet.

The send redirect is the one, which redirects you to some other servlet or page. The redirection is not within the same request, but it is a new request. Using send redirect, you can access a page available on another context / server.

  Was this answer useful?  Yes

Akshay

  • May 19th, 2006
 

hi there,

this is in reference to ur answer u posted on geekinterview .com.

i think u need to check ur posting once again so that the ppl who are comletely new to this technology are not misguided.

i dont intend to offend u by any means, but just check it once again.

and if et al i am mistaken, sorry in advance.

Regards,

Akshay

  Was this answer useful?  Yes

subba reddy

  • Oct 12th, 2006
 

hai ,

 if  u sent the answer with that suggestion,it may be usefull for viewers. 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions