You will find here collection of JAVA, J2EE interview questions and answers. This blog includes topics like Core JAVA, Advanced JAVA, RMI, JDBC, JSP, Servlet, EJB, JMS. It has difference, comparison of java concepts. This blog will help freshers as well as experienced people to prepare for java, j2ee interview questions answers.
Tuesday, April 13, 2010
Servlet Chaining
Servlet Chaining means the output of one servlet given as a input to another servlet. Servlet Aliasing allows us to invoke more than one servlet in sequence when the URL is opened with a common servlet alias. The output from first Servlet is sent as input to other Servlet and so on. The Output from the last Servlet is sent back to the browser. The entire process is called Servlet Chaining.
How to do Servlet Chaining in Servlet Programming?
Using include
RequestDispatcher rd = req.getRequestDispatcher("SecondServlet"); rd.include(request, response);
Using forward RequestDispatcher rd = req.getRequestDispatcher("SecondServlet"); rd.forward(request, response);
Thank u so much for this blog what i expect from my side that i get from your blog .very neat and sweet explanation.And i hope this will be useful for many people.personally its me a lot
ReplyDeletebest java training institute with placement | best java training
Nice article Java Interview Questions and Answers .
ReplyDelete