File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat caching web apps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat caching web apps" Watch "Tomcat caching web apps" New topic
Author

Tomcat caching web apps

Daniel Rhoades
Ranch Hand

Joined: Jun 30, 2004
Posts: 186
After about the tenth time of uploading a new WAR for an application tomcat seems to cache servlet classes, such that I cannot replace the current running class with the new one from the war.

The only way I've found of clearing this is to restart tomcat, Im guessing its a class loader issue - any fixes?


Drinking more tea is the key...
shashikant nagavarapu
Greenhorn

Joined: Jul 08, 2005
Posts: 26
One of the other ways to solve this problem may manually deleting the cached webapp work folder .
Eg
C:\Tomcat\work\Catalina\localhost\myapp

deleting this myapp and reloading would solve the problem for you.
Hope this work!
Daniel Rhoades
Ranch Hand

Joined: Jun 30, 2004
Posts: 186
Believe it or not it actually has not effect - ok the app becomes unavailable, but when the WAR is unpacked again (or a new WAR unpacked) it still has the old servlet data... jsp's arn't effected btw
James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
I know this is a very old post, but I am having exactly the same problem as Daniel was experiencing. Any suggestions (except restarting Tomcat)?
James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
I've found the problem: Along with my main servlet context, I also have a test servlet context that contains the older classes and it seems this is where Tomcat was loading from...
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by shashikant nagavarapu:
One of the other ways to solve this problem may manually deleting the cached webapp work folder .
Eg
C:\Tomcat\work\Catalina\localhost\myapp

deleting this myapp and reloading would solve the problem for you.
Hope this work!


do this and clear browser cache ... and run .. cool
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat caching web apps