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 |
What is servlet name in web xml?
what do you understand by url rewriting?
What is servlet?
What is difference between the HTTP Servlet and Generic Servlet? Explain about their methods and parameters?
What is the difference between Get and Post Method?
What are the steps that are required to handle the multi-threading?
Hi guys.. Well can u tell me that why there is need of "init()" , i mean why can not we initialize the servlet object with the help of constructors? Thank you.
Whats the advantages using servlets over using CGI?
Write a simple servlet program to print the contents of html.
How do servlets work?
What is a generic servlet?
What do you mean by httpservlet?