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

Which protocol will be used by browser and servlet to communicate

580


What are life cycle methods of a servlet?

586


Is dispatcher servlet a singleton?

544


What is the procedure for initializing a servlet?

543


Why is Servlet so popular?

613






Explain in brief the directory structure of a web application?

566


Is it possible to have a constructor inside the servlet?

550


Why filter is used in servlet?

524


What must be implemented by all servlets?

574


What is httpservlet class?

539


Can a jsp be called using a servlet?

580


What is servlet lazy loading?

691


How is a servlet implemented in code?

566


What are the types of an http request?

581


Explain the servlet context.

598