How two servlets communicate with each other?
Answers were Sorted based on User's Feedback
Servlets communicate with each other with the help of
RequestDispatcher objects.
RequestDispatcher rd=getServletConfig().getNamedDispatcher
(...);
... name used to identify a servlet i.e. name given in the
web.xml in the url-pattern
| Is This Answer Correct ? | 17 Yes | 1 No |
Answer / devendra
Servlets can communiceate with the help of RequestDispacher.
RequestDispacher rd = getRequestDispacher("passing the 2nd servlet url");
rd.forward(rquest,response);
| Is This Answer Correct ? | 6 Yes | 1 No |
Why do we have servlet listeners?
How to run a servlet program?
What are the ways to handle multi-threading in servlets?
How does java thread pool work?
What is difference between jsp and servlet?
What is the GenericServlet class?
What is servlet configuration?
Explain the working of service() method of a servlet.
What is difference between Forward() and sendRedirect() methode?
What is the servlet?
Whats the advantages using servlets over using CGI?
What are the phases of the servlet life cycle?