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

Answer Posted / bindhu solomon

When we use forward, then servlet container forwards all
request to the target page. but in the case sendRedirect,
container makes a new request to the target Page.
So in forward , url link doesn't change but in sendRedirect
url line change . Because container makes a new request,
sendRedirect is much slower than forward.

If a target page has no relation with current
page , then we can use sendRedirect(I think so....)

Is This Answer Correct ?    35 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java developer job description?

630


What is java listener?

680


What is included in j2ee?

669


What is data?

722


What is the difference between java and core java?

690


What is the J2EE module?

785


What is caller principal?

718


How do you compile java?

673


how to run servlet program between two computer through internet ?

2718


What does application client module contain?

738


What is the best java course?

709


What is sandbox in java?

686


I’m new to WebLogic Does anyone knows how to Deploy Application using

1945


Difference between load and get method?

722


Why java is called robust and secure?

675