title: Tomcat recompiling old version of JSP even after deleting work directory
body: <p>In the last few days I noticed a weird Tomcat behavior: </p>
  
  <p>when I update a JAR file in the relevant webapp folder in my remote Tomcat server directory, the corresponding .class and .java files of the embedded JSP files compiled by Tomcat in the work directory are not updated.</p>
  
  <p>Thus I tried to stop the Tomcat, delete the whole work directory and then start it again, but it still recompiles an old version of the jsp files. </p>
  
  <p>This is weird as it seems as if the Tomcat is keeping a cache of the old jar or jsp stored somewhere and it uses that cache to recompile the jsp instead of using the up-to-date versions in the jar contained in the webapp folder.</p>
  
  <p>The only way I found to make it work is to manually replace the compiled version in the work directory with the one generated locally in my machine, but this is a sort of hack, I need to understand how it works and where does it keep references to the old version of the files. Do you have any clues?</p>
  
  <p>UPDATE: We tried to delete both the work and webapp folder contents and redeploy the whole .WAR file, but the Tomcat still deploys to the work directory the old version of the compiled .JSP file, even if in the webapp folder has been deployed the correct version of the JSP. It seems as if the Tomcat is keeping a cache somewhere else apart from the work directory...</p>