difference between forward and sendredirect

Answer Posted / neeraj_passion2001

FORWARD-->
1. THE REQUEST AND RESPONSE OBJECT REMAIN SAME.
2. CONTROL DIRECTLY GOES TO REQUESTED PAGE AT THE POINT
WHERE FORWARD IS CALLED.
3. REQUEST DISPATCHER IS NEEDED.

SEND REDIRECT:--->
1.NEW REQUEST AND RESPONSE IS GENERATED IN CASE THIS CASE.
2.IN THIS CASE FIRST CONTROL GOES TO CLIENT(BROWSER) AND
THEN TO REQUESTED PAGE.
3.JUST RESPONSE OBJECT IS NEEDED.

Is This Answer Correct ?    33 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When jsessionid is created?

609


What are the difference between session and cookies in servlet? Explain

566


What are the different methods involved in generic servlet?

558


What are the kinds of http requests?

611


How can the session in servlet be destroyed?

646






Should I override the service() method?

670


What is servlet and its life cycle?

572


Explain the features are in servlet 3?

603


How can the session in servlet can be destroyed?

715


What do you mean by cgi in servlet?

633


What is Request Dispatcher?

807


What are its drawbacks of cgi?

572


Explain the lifecycle of a servlet?

511


What is servlet attributes and their scope?

596


What do you mean by default initialization in java servlet?

606