A little background:
I have Front-Controller Servlet that fowards all requests to jsp's located outside the application war. So, for example, http://localhost/myapp/test.jsp is actually a jsp located at (on windows) c:/content/client1/pages/test.jsp. I accomplish by doing the following:
ServletConfig currentConfig = getServletConfig(); ServletContext otherContext = currentConfig.getServletContext().getContext("/otherapp"); RequestDispatcher dispatch = otherContext.getRequestDispatcher(page); dispatch.forward(request, response);
... <servlet> <servlet-name>FrontServletController</servlet-name> <servlet-class>com.diginsite.product.webcenter.website.FileController</servlet-class> </servlet> <servlet-mapping> <servlet-name>FrontServletController</servlet-name> <url-pattern>*.jsp</url-pattern> </servlet-mapping> <jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <scripting-invalid>true</scripting-invalid> </jsp-property-group> </jsp-config> ...
<jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <scripting-invalid>true</scripting-invalid> </jsp-property-group> </jsp-config>