Saturday, February 5, 2011

Tomcat 6 Hot Deploy issue

Hi

I am using Java 6 64-bit and STANDALONE Tomcat 6.0.18 on Vista 64-bit. I am working on a web application with struts 1.3.10 and tiles. Now when I make changes to my java or jsp files, they are not visible when I reload the page. I have to manually reload the web application in Tomcat Manager to see the changes. My web app configuration is as follows:

$CATALINA_BASE/conf/Catalina/localhost/dashboard.xml

<Context docBase="D:/mydata/projects/PatchworkSystems/development/Dashboard/webapp"
         path="/dashboard"
        reloadable="true" antiJARLocking="true" antiResourceLocking="true" debug="1" />

Any help is greatly appreciated.

Thanks Quadir

  • Ah, this old chestnut.

    I hit this snag on a project back last summer.

    It's because of a side effect with having antiResourceLocking="true" set on your context. If you read the documentation on Tomcat here:

    http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

    "Please note that setting this to true has some side effects, including the disabling of JSP reloading in a running server: see Bugzilla 37668."

    which is here:

    https://issues.apache.org/bugzilla/show_bug.cgi?id=37668

    There is no workaround as far as I know, if you remove the attribute it will allow you automatic loading of yor JSP's again. We set a deploy time subtitution to put the attribute back in for production. Boo, hiss! Anyways if you remove the antiResourceLocking attribute it will solve the problem you're experiencing.

    Provide a workaround Apache !!!

    Quadir : Thanks Jon, your answer was right on.
    Quadir : Sorry I cannot increase your reputation because I am a new user.
    Jon : No problem, glad it worked fir you. It's an annoying issue to deal with.
    From Jon

0 comments:

Post a Comment