|
Have Servlet-to-Servlet interaction |
|
|
For example, you have two servlets (Servlet1 and Servlet2).
In Servlet1, you have a method called getString().
In Servlet2, use
ServletContext context = getServletContext();
to get servlet context of Servlet2. Then use
Servlet1 servlet = (Servlet1)context.getServlet("Servlet1");
to get the Servlet1 servlet object.
Now, you can Call Servlet1 method from Servlet2 with
servlet.getString();
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.