We have a big application having 13 modules. Depending on the customer requirement, we should able to deploy core module+customer specific modules. We are planning to break the
Good question. You'll be happy to hear that the answer is "yes", although it's highly dependent on how your servlet container is configured.
It's done using the JSTL <c:import>
tag, which has an optional context
attribute which is defined as:
Name of the context (beginning with a /) of some other local web application to import the resource from.
So say you have webapp A deployed under context root /A
, and webapp B deployed under /B
, then a JSP in A can include x.jsp
from B using:
<c:import context="/B" url="x.jsp"/>
This is all very nice and rosy, but this has to pass through the servlet container's security mechanism, and it may not permit the operation. For example, in Tomcat the crossContext attribute must be set to true.