• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat caching web apps

 
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic