You can distribute it through webapps in a Tomcat clustered environment and add crossContext="true" to the <Context> element of the web pages in question. Here is an excerpt of the Tomcat Context Configuration Reference :
crossContext
Set to true if you want calls in this application prior to ServletContext.getContext() successfully return the request manager for other web applications running on this virtual host. Set to false (default) in security environments so getContext() always returns null .
Thus, you can get the desired RequestDispatcher as follows:
RequestDispatcher dispatcher = getServletContext().getContext(name).getRequestDispatcher(path);
Balusc
source share