Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cache problem with pages in tomcat

 
rudolf hitler
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ppl,
I have this problem with tomcat everytime i make a change to my servlet tomcat doesnt reflect the change until i dont shut it down and start up.Is there any way i can get around this problem and not have to shut and start up the sever everytime i make a change the servlet.
 
Dave Jochim
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a 'reloadable' attribute for your context in server.xml, or have you already set that?
 
rudolf hitler
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
david,
thts already set is there any other way out.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is another way. Tomcat has a manager web interface where you can go in and reload a specific context at any given time.
The reloadable attribute will work, but unless I am mistaken, it is not an immediate reload because Tomcat polls in a round robin kind of way to see if anything has changed. I don't know what the time criteria is though.
As far as the whole reloadabe issue goes, I hope you know that you should only use the reloadable attribute in testing cases rather than production, because it is a huge overhead for Tomcat and will degrade performance quite a bit.
BTW - Depending on what tomcat version you may be running, the manager app is located as a link on the default index.jsp page that Tomcat ships with.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've also found that Tomcat is sometimes *very* slow to recognize changes.

Check here: http://www.coderanch.com/t/81662/Tomcat/servlet-not-reloading-Tomcat
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic