Discussions

Web tier: servlets, JSP, Web frameworks: Problems sharing .JSP between WebApplications on WLS8.1SP2

  1. Hi all...

    I am porting an application from iPlanet to WebLogic 8.1, and it seems that iPlanet would allow the sharing of .jsp files between Web Apps and Contexts, while WebLogic doesn't.

    Example:
    .....application_dir/
             WebApp1/
                  testme.jsp
             WebApp2/
                  includeme.jsp

    If WebApp1 has:
    <%@ include page="../WebApp2/includeme.jsp" %>
    it will not work.

    I've read the specification, and it doesn't specify clearly. I guess my question is how is anyone else out there sharing .jsp files between WebApps? Is there a way that is cleaner than multiple copies, and simpler than a custom tag library?

      Tim
  2. This is the first time I have every heard of any server supporting cross-webapp includes for JSP. It is definitely not a common behavior.

    I am afraid your best bet is to copy the files. You can reduce the pain by making this copy operation part of the build process for the web apps. In other words, set up a "common-jsp" directory, and in the shell script, batch file or ant build.xml file that you use to build the web application, copy files from "common-jsp".