How to remove cached classes/JSP pages from Tomcat

I have some web apps running on my Tomcat server, and once in a while I deploy a new version of them. However, this operation is not always successful, it sometimes occurs to me that although a new version of a war file is deployed, the old version is available through the browser.

My Tomcat server is running behind an Apache proxy. The server.xml section for the app I am trying to deploy is:
<Host name="" appBase="webapp-folder">
<Context path="" docBase="webapp-name.war" />
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="uobrazki_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />

Does anyone have a clue what might be going on?
graham on 23-01-2013 16:46
Finally I have managed to resolve the issue. Somehow (I don't know how), a ROOT folder has been created in my webapp-folder directory, so it looked like this:
-- webapp-folder
-- webapp-name.war
-- webapp-name
-- resources

I have made two changes. First of all, I manually deleted the ROOT folder and put a command in my start-up script that removes it every time Tomcat restarts. Secondly, I changed the docBase attribute for my app from webapp-name.war to webapp-name. Now my configuration is:
<Host name="" appBase="webapp-folder">
<Context path="" docBase="webapp-name" />
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="uobrazki_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />

and it works fine.
graham on 23-01-2013 16:51

Post an answer

Do you have a solution to this problem, or want to comment on it? Other users will appreciate your help!
Your answer or comment:
Show formatting hints
HTML is disallowed, but in your text you can use the following markup
  • [code][/code] for a block of code
  • [tt][/tt] for inline code
  • [link]link href|link anchor[/link] for links
  • [b][/b] for bold text
+ Ask a question
If you have a technical question related to programming and computers, ask it here. Other users will help you solve it!
Unanswered questions
Share your knowledge by helping others solve their problems