What is the difference between RequestDispatcher and
sendRedirect?-

Answer Posted / hitler

The RequestDispatcher is executed in server side, request will
send to one server side program to another server side
programe.advantage of RequestDispatcher is executed fastly in
server side.,
The response.sendRedirct(..) is executed in browser side means
the request url will send to browser url , advantage of
sendRedirect(..) is can intract with one application to
another application.

depand on situvation we are used ..

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you send an authentication error from a servlet?

527


Can a jsp be called using a servlet?

586


What are all the protocols supported by httpservlet?

652


What is called Session Tracking?

604


How to upload a file to the server using servlet?

533






explain the advantages of servlet life cycle?

562


Explain the working of service() method of a servlet.

508


What is http servlet? Explain with the help of an example.

581


Why is http protocol called as a stateless protocol?

537


Difference between java beans & servlets?

590


What is the difference between Difference between doGet() and doPost()?

759


What do you mean by a filter and how does it work?

543


What is servlet name in web xml?

560


Which event is fired at the time of setting, getting or removing attribute from application scope?

615


Why do we need servlet filter?

573