Forums Register Login
talking across war files
I have two servlets deployed in different war files but on the same container.I want to forward the control from first servlet to second servlet.I have got only two ways to do this,that are :

response.sendRedirect("complete url of second servlet")

Earlier i thought,it can be done through RequestDispatcher also but it is not happening through RequestDispatcher.
Can anyone tell me apart from these 2 ways,how can i make those 2 servlets to talk with each other.
Check the API for ServletContext.getContext(String uripath)
For security reasons, some containers shut this capability off by default.
With Tomcat, for instance, you need to set the crossContext attribute to true in your <Context ../> entry.
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter

This thread has been viewed 668 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 20, 2018 00:57:13.