Reputation: 6547
we got a problem with our Tomcat that non of my colleagues can really explain. We have a tomcat (version 7.0.26) on a linux computer. The deployment is done with an exploded war - our classes are jar packaged, the rest goes directly into WEB-INF and META-INF).
Plus there is a CMS server that generates JSP files wich are deployed periodically into the tomcat web app.
After some time of hot swapping, creating and deleting JSP files, the tomcat does some weird stuff. Randomly giving out 404 errors or publishing old versions, sometimes the latest versions and so on.
To solve that, we have to clear the $CATALINA_HOME/work from time to time. The tomcat runs in development mode, which means it looks for JSP file modifications frequently, afaik. But that doesn't seem to work pretty well here. After deleting the work directory, everything if fine, immediately.
Does anyone know, how to get rid of this behavior? Are there any flags that need to be set to avoid that thing to happen?
Upvotes: 1
Views: 24731
Reputation: 3171
FYI I had the same problem, posted my answer here Severe exception on servlet with java.lang.NoClassDefFoundError
In your case just write a script that removes the work directory every time you hot swap new files. In the tomcat configuration reference it's written black on white tomcat8 configuration reference
Upvotes: 0
Reputation: 164
As a workaround I would use Cronjob to clear that for me, and post a bug to apache
Upvotes: 0
Reputation: 7945
Look at development
setting and other related settings on Jasper JSP Howto
Upvotes: 0