0 Replies Latest reply on Mar 10, 2003 4:09 PM by Andre Fernandes

    JBoss JSP compilation with manifest classpath

    Andre Fernandes Newbie

      Hi there.

      I am using the "Class-Path" entry in the manifest file (MANIFEST.MF) of my war files to point to JAR libraries I need to reuse. This way I can guarantee that these classes are loaded by the application classloader. If I put these JARs in [JBoss]/lib/ext they will indeed be shared, but will also be loaded by the extensions classloader. You see, I need shared libraries that are loaded by *each* application, but I don't want to copy the JARs into every WEB-INF/lib.

      Using absolute file paths at the MANIFEST.MF "Class-Path" entry in each WAR file works well with WebSphere, and also works with JBoss. For an example:

      Manifest-Version: 1.0
      Class-Path: file:/W:/lib/persistencia/atual/persistencia.jar

      When I deploy such a web-app to JBoss I can read at the server log that the "persistencia" library has been loaded. Indeed, the following code in a JSP page compiles and runs ok:


      The class "br.gov.bcb.comum.persistencia.Consulta" exists in a JAR referenced in the manifest file classpath. That means that the class exists and has been found by the application classloader. But the code below doesn't compile:

      br.gov.bcb.comum.persistencia.Consulta c;

      I get an "org.apache.jasper.JasperException: Unable to compile ... Class br.gov.bcb.comum.persistencia.Consulta not found.". *VERY* weird. I can only conclude that the JSP compiler is not the same classpath of the application classloader. Is that possible?

      I am using JBoss 2.4.3 with Tomcat 3.2.3