What is the use of RequestDispatcher in servlet?

Answer Posted / gani kumar

In creating the web componets we find a requirement to reuse the components in different combinations avoiding the code duplication and have a proper reponsibility divison.
To meet this requirement in servlet envirnoment that is support a servlet acess another web resource like another servlet in the application,java servlet intrduces request dispatcher

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by scope object and what are its types?

804


What is the need of session tracking in web application?

794


What is the procedure for initializing a servlet?

765


Which exception is thrown if the servlet is not initialized properly?

800


What do you mean by the servlet chaining?

797


What is the main purpose of java servlets?

803


Why do we use sendredirect() method?

755


When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?

792


Why HttpServlet class is declared abstract?

888


What do you mean by session tracking and also explain its techniques?

698


What is a web application and what is it’s directory structure?

832


what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?

789


What are the phases of a servlet life cycle?

855


What are the different methods involved in the process of session management in servlets?

923


Why the container loads server at the application startup and how?

808