This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
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?
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.