What is the difference between sendRedirect() and forward()?
in what situations do we have to use send redirect()
instead of forward().

Answer Posted / vinit sharma

Hello i am vinit and according to me,

Both methods are use to transfer form one web component to
another web component.

In case of forward () the same request (that have client
information) is passed from server side to the another page
(this another page should be in the same container (Web
Server)), due to URL remains same.

While in sendRedirect () a new request (due to
loss the previous request information) is generated from
client side to another page (this another page can be in
the same OR in different container (Web Server)), due to
URL becomes change.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is empty tag?

527


What is a plugin in java?

484


What is basic authentication?

555


What is single tier architecture in java?

491


What are java front end tools?

513






What is java ee sdk?

487


What does enterprise javabeans module contain?

527


Is java a tool?

487


How many types of component events are in java?

483


What is Connector architecture?

515


What is application client module?

542


what is direct link to download swing ebook,applet,ejb,core java

2077


What is api in j2ee?

479


What is j2ee api?

528


What is mean by j2ee?

482