• 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

cache problem with pages in tomcat

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic