Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat caching web apps

 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
shashikant nagavarapu
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic