1 Reply Latest reply on Feb 1, 2007 11:55 PM by jaikiran

    Where to place common JARs?

    kingcu

      Hi everyone,

      I am trouble shooting my JBoss AS 4.0.1sp1 deployment, but before asking help, I'd like to gain some knowledge on deployment and try it myself first.

      So, here is what I'd like to find out: let's say I need to deploy two web applications under the same server, and both web apps are created with Struts, so they share a common set of Struts JARs. So, where should I place those JARs? Under %SERVER%/lib? Or under each web app's WEB-INF/lib?

      To make things more complicated, what if the two web apps use different versions of Struts, one uses 1.3.5, the other 1.2.9?

      Yet another question I had is that: do I need to pack the WAR into an EAR, or I can directly drop the WAR into the deploy folder? What is the difference of the two?

      Thanks,
      Tong

        • 1. Re: Where to place common JARs?
          jaikiran

           

          let's say I need to deploy two web applications under the same server, and both web apps are created with Struts, so they share a common set of Struts JARs. So, where should I place those JARs? Under %SERVER%/lib? Or under each web app's WEB-INF/lib?


          You should place them in each of the web application's lib folder instead of %SERVER%/lib.

          To make things more complicated, what if the two web apps use different versions of Struts, one uses 1.3.5, the other 1.2.9?


          This wont work if you would place the jars in the %SERVER%/lib. This is exactly one of the reasons why you should place the jars separately in the individual web applications.


          or I can directly drop the WAR into the deploy folder?


          Yes, you can directly place them in the deploy folder.

          You would also be interested in reading these:

          http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

          http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases