2 Replies Latest reply on Sep 15, 2002 8:58 PM by Julian Gosnell

    Is it possible to share a WAR betwen several applications??

    Torsten Terp Newbie


      I was wondering if it is somehow possible to share the JSPs and beans in a war between several applications. Each EAR would the map the WAR to its own context root?

      Is that possible or am i dreaming here?

      Thanks in advance..


        • 1. Re: Is it possible to share a WAR betwen several application
          Ben Valentine Newbie

          I wonder if this mutually exclusive partitioning of web apps isn't a result of some rule in the j2ee standard. The wall that I could not get over in trying to accomplish what you are suggesting is that each web app has its own unique and independent http session. So if you include a jsp from another web app, it won't have access to the data that you might expect.

          What you are suggesting would be extremely useful since it would allow reuse of commone jsps throughout the system. The closest that I have been able to get to what your asking for is to include copies of the common jsps in all of my war files. Obviously this falls short of what we are looking for though.
          It offers the benefit of a buffer between your web apps and change to the common jsps. This buffer, however, forces the update of who knows how many web apps whenever you want to share common web app changes.

          • 2. Re: Is it possible to share a WAR betwen several application
            Julian Gosnell Expert

            I haven't tried it, but I don't see why (if you are not file-system-challenged) you couldn't simply deploy your two ears unpacked and use a symbolic link in the second to point to the war in the first.

            Let me know how it goes,