• 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

How to remove a page from cache

 
Ranch Hand
Posts: 638
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess this is a very numpty question, my browser is loading a page from the cache rather than the page I have updated. I guess this is because of an error in the updated page. What I want to know is how to I force Tomcat to pick up and display the modified page or the error that is generated.

eg Page outputs version 1.3 change pafe to version 1.4 still picking up version 1.3

Thanks for any help

Tony
 
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
so is it your browser that retrieves the old page?
or Tomcat is serving an old page?

If it's browser, then do the normal "browser cache emptying" commands.


Tomcat is a bit more wiley. Most Tomcat developers will *insist* that tomcat will reload a changed JSP. But I've had the unpleasant experience of having Tomcat refusing to recognize a changed page. This is even *after* emptying tomcat's cached (compiled) files.

What can sometimes work (though I'm not sure why tomcat gets stuck in this situation in the first place) is to empty the $CATALINA_HOME/work/ directory for your webapp. This blows away Tomcat's cached JSP source/JSP class files, and will force it to recompile.

If that still doesn't work, then repeat the cleansing of the work directory and restart tomcat.
 
Tony Evans
Ranch Hand
Posts: 638
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mike, I have cleaned out the \work\Standalone\localhost directory and it has cleared the problem.

Tony
 
Are you okay? You look a little big. Maybe this tiny ad will help:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic