4 Replies Latest reply on Jul 19, 2004 8:13 AM by zeron

    Why compiled JSPs get deleted after restart?

    zeron

      Hello all!

      I'm porting an existing application to JBoss.

      I noticed that when JBoss is shut down, all the generated class files for my JSP files are DELETED. On production environments this is really BAD. JSPs are supposed to be compiled only once. Of course JBoss shoud not be shut down regularly, but in case we needed a shutdown, the next time ALL the JSP's need to be recompiled. This is slow.

      Is there a setting somewhere?? Is this the normal way JBoss does JSPs??

      I'm deploying my war as deflated folder under:

      JBOSS_HOME/server/default/deploy/my-web-app.war

      Thanks in advance.

      Zeron

        • 1. Re: Why compiled JSPs get deleted after restart?
          mikefinn

          Assuming JBoss 3.2.x - in the Tomcat jboss-service.xml (jbossweb-tomcat41.sar/META-INF), add this entry (outside the TC 'Config'/ server.xml block):

          <attribute name="DeleteWorkDirs">false</attribute>


          Just be aware that it will likely cause strange behavior WRT JSP hot (re)deployment.

          mike

          • 2. Re: Why compiled JSPs get deleted after restart?
            mauro3

            Mike,

            We have used your sugestion with JBoss 3.2.3 and it works fine.
            But in JBoss 3.2.5 (with Tomcat 5) we get the following at start time:

            15:34:06,534 INFO [ServiceConfigurator] Problem configuring service jboss.web:service=WebServer
            org.jboss.deployment.DeploymentException: No Attribute found with name: DeleteWorkDirs

            Any idea ?

            Thanks
            Mauro.

            • 3. Re: Why compiled JSPs get deleted after restart?
              mikefinn

              Mauro,

              I (selfishly) was thinking TC4. Sorry. Sure enough, it's not in the TC5 wrapper MBean. Seems it got left out, but it should be there.

              I'd try posting a bug for it. If Remy & co don't think it should be there, they'll explain why.

              mike

              • 4. Re: Why compiled JSPs get deleted after restart?
                zeron

                Great!

                How is one supposed to know this ;)
                Anyway, is it a bug in TC5 or maybe they named the attrib to someting else?

                Many thanx in any case

                Zeron