Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

cache problem with pages in tomcat

 
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.
 
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.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • 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.
 
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: https://coderanch.com/t/81662/Tomcat/servlet-not-reloading-Tomcat
 
Remember to always leap before you look. But always take the time to smell the tiny ads:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!