0 Replies Latest reply on Jan 23, 2003 12:47 PM by Bruce Wilson

    Retain previously compiled JSP class files

    Bruce Wilson Newbie


      I know this is a FAQ, but I can't seem to make it work...

      I'm trying to get JBoss/Jetty to keep previously compiled JSPs between
      invocations of JBoss server (I'm using JBoss 3.0.4/Jetty 4.1). Nothing I do
      seems to work. I set the value of "java.io.tmpdir" in JAVA_OPTS, I put a
      jetty-web.xml file in the WEB-INF directory (I first put it in a
      "deploy/.war/WEB-INF/" directory, literally as described in the JBoss/Jetty
      FAQ, then put it in the WEB-INF directory of my web app). Each time I start
      the server, the previously compiled JSPs are removed from the tmp directory.
      What am I doing wrong ?

      The JSP class files are not precompiled with JspC - they were compiled on
      the fly in a previous invocation of the server. Does that make a difference ?

      I'm currently working with a test web app, but eventually I want to port a
      large web app (i.e., hundreds of JSPs) from Weblogic to JBoss. Weblogic
      keeps the compiled JSP class files between server invocations; prior to
      using Weblogic, we used Tomcat 3.2, and I don't seem to recall that it
      removed JSP class files at each startup.

      The group I'm working in is going to have some serious objections if all our
      JSPs get compiled each time we start up the server. Granted, with JBoss hot
      deployment, server startup might be less frequent than it currently is, but
      with the number of things we do in the background in our app, server
      restarts are not uncommon.

      How do I make this work ?

      Thanks in advance,

      Bruce

      [localhost:/Applications/jboss-3.0.4/bin] bgwilson% echo $JAVA_OPTS
      -Djava.io.tmpdir=/Applications/jboss-3.0.4/server/default/tmp

      [localhost:jboss-3.0.4/server/default] bgwilson% ls -RL deploy/webapp1.war
      WEB-INF/ index.jsp index.jsp~ logout.jsp page1.jsp page2.jsp

      deploy/webapp1.war/WEB-INF:
      classes/ jboss-web.xml jetty-web.xml web.xml

      deploy/webapp1.war/WEB-INF/classes:
      roles.properties users.properties

      [localhost:jboss-3.0.4/server/default] bgwilson% cat deploy/webapp1.war/WEB-INF/jetty-web.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!-- ...deploy/.war/WEB-INF/jetty-web.xml -->
      <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN"
      "http://jetty.mortbay.org/configure_1_2.dtd">




      jsp

      scratchDir
      /tmp





      [localhost:jboss-3.0.4/server/default] bgwilson% ls -R deploy/.war
      WEB-INF/

      deploy/.war/WEB-INF:
      jetty-web.xml jetty-web.xml~


      [localhost:jboss-3.0.4/server/default] bgwilson% cat deploy/.war/WEB-INF/jetty-web.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!-- ...deploy/.war/WEB-INF/jetty-web.xml -->
      <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN"
      "http://jetty.mortbay.org/configure_1_2.dtd">



      jsp

      scratchDir
      /tmp