File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat doesn't completly update the new WebApp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat doesn Watch "Tomcat doesn New topic

Tomcat doesn't completly update the new WebApp

Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
Today I was updating a webapp in Apache Tomcat and to my surprise I discovered that a part of my webapp was not updated. So first I thought my web browser shows me the old pages so I removed the pages. Now I saw some parts of my webapp using the new code and some part the old code. I did a new install. The same problem. Inside my war I saw the good source code. After the six attempt it worked, but the question keeps haunting me.

What could be wrong, because it's for me the first time that an update is partly done? Did you encounter this?

Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

I always perform an uninstall before deploying a new copy of a war file.
Otherwise, it's like unzipping one directory structure on top of another.

If that happens again, try deleting the TOMCAT_INSTALL/work directory.
This is where the generated servlet code lives.
Tomcat will re-create that folder as soon as a JSP is hit.
Doing this will insure that none of the servlet code from a prior installation is hanging around.

One cause of this is moving files from one machine to another when the two machines have different system times.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893

Thanks for your answer. It finally worked, but when it occurs I couldn't believe it.

I'll try the different system times if it's repeatable.
I agree. Here's the link:
subject: Tomcat doesn't completly update the new WebApp
It's not a secret anymore!