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 a generic servlet?
What is meant by session? Tell me something about httpsession class?
can i modify the data which are generated by the servlet
What are the drawbacks of cgi?
What is difference between GenericServlet and HttpServlet?
Where do you define dispatcherservlet?
If a servlet is not properly initialized, what exception may be thrown?
java.lang.IllegalArgumentException: The path of an ForwardConfig cannot be null while working with struts it displayed pls very ungent
How can you run a servlet program?
What are the uses of servlets?
What is http servlet in java?
When to use doget() and when dopost()?