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 |
Can a servlet be called by passing its name as a parameter in the URL?
What are the supporting protocol by HttpServlet ?
What's the servlet interface?
Why do we use sendredirect() method?
Is there any differance b/w getting servlet context from servlet config and session? if yes then what is that?
Is JSP Thread Safe ???? How To make JSP thrad safe ?????
What is servlet? Explain
How do I know if java is running on linux?
What are different ways for authentication of servlet?
What is servlet used for?
What is forward() and include() of servlets RequestDispatcher interface?
What is getservletcontext?