1 Reply Latest reply on Oct 24, 2002 6:04 AM by jules

    Compiling JSPs located outside the JBoss directory structure

    steveb

      I am receiving package not found errors compiling JSPs when I locate them outside the JBoss directory structure:

      Package javax.servlet.http not found in import. import javax.servlet.http.*;

      Package org.apache.jasper.runtime not found in import. import org.apache.jasper.runtime.*;

      Superclass org.apache.jsp.HttpJspBase of class org.apache.jsp.cpds_0005fhome_0005fframe$jsp not found.

      Some background; I am running JBoss (v3.0.2) with Jetty on my own development machine (Win2K, JDK 1.4). For ease of back-up etc. I like to keep all my code in a separate area from installed packages such as JBoss. Since this is being used for development I want to avoid time-consuming compile-WAR-deploy type cycles. My aim is to edit a JSP hit refresh on my browser and immediately see the results.

      The Jetty documentation suggests I can achieve this by inserting the following lines into /server/default/deploy/jbossweb.sar/META-INF/jboss-service.xml:


      /cpds/
      C:/LocalDat/CPDS/web/cpds/


      Clearly the basic concept is working because if I request a static HTML file then it is displayed without a problem in the browser. However requesting a JSP file produces the above-listed compilation errors.

      If I copy my entire web-app into a directory called cpds.war under /server/default/deploy/ then everything works fine. The separate file areas concept also worked without a problem under TomCat 4.0.4.

      I note the various discussions in this forum about Jasper wanting a classpath but JBoss only supplying a class-loader. Is that what is causing the errors? Is there any solution / work-around which does not involve a deployment cycle (pre-compiling JSPs counts as a deployment cycle)?

      thanks, steve

        • 1. Re: Compiling JSPs located outside the JBoss directory struc

          The ConfigurationElement embeds Jetty's proprietary configuration file into JBoss jboss-service.xml dd.

          Webapps deployed via Jetty's config will not benefit from the JBoss integration, as they bypass it.

          To take advantage of all the integration features e.g. ENV, JBoss aware JSP classpath etc, you MUST deploy webapps in the JBoss way.

          If you want to maintain the tree outside the deploy dir, you should be able to set up a path to it using one of the deployer MBeans - I haven't tried this for a while.

          Report back with your findings and I will put them in my FAQ.

          Jules