I'm having a problem with Tomcat and Vista - it appears that files are getting cached, so that if I edit a file in place (under Tomcat webapps), and then refresh in the browser, I still get the old version of the page. Related, I can't get a directory listing even though I set listings to true in Tomcat's conf/web.xml (which I tried when it occurred to me that I could save as, change the file name, and view under the new name to at least get a start at resolving this - which BTW gave me a 404 until I restarted the server).
I suspect that this is a Vista issue more than a Tomcat problem, but has anyone encountered this and come up with a solution?
If you change something on your web-app (e.g. class files), you need to republish them. The container does that automatically when you restart.
As for caching, CTRL+R refreshes without using the cache.
JDBCSupport - An easy to use, light-weight JDBC framework -
Joined: Dec 04, 2008
Actually, I misspoke (miswrote?). I don't see the new file, or my revised content in the browser, even after restarting Tomcat (and trying various tricks like appending ?junk=1 to the URL to force a unique URL). It seems that Tomcat is locked into using the files that were in place when I first copied the whole shebang into webapps.
And, since it is an obvious question, I have more than triple-checked that I am indeed editing the correct files.
This issue pure Tomcat. The pages stuck in the servlet container and are not refreshed there. Try clearing out the compiled files or all of the files from under the //work/... directory. I do not exactly remember where under work but there is also a directory by the name of localhost and "_"... you should go all the way down the tree till you find your files. Just clear the files you know belong to you and no need to restart Tomcat.
I started learning creating web-apps on notepad and tomcat, and experienced this problem a lot often.
In addition to clearing the work directory are you *sure* you're editing the correct files? I've never had this problem on Vista.
Joined: Jul 05, 2009
Here is the path:
You would see your application folder under localhost. Else under the folder "_".
Joined: Dec 04, 2008
OK, problem resolved, more or less.
Apparently the problem is indeed with Vista, something called User Access Control (aka UAC). It seems to stifle changes to files under Program Files, so that the state of the Tomcat installation was locked in as it had been when first created (although that doesn't explain why I was able to create the webapp the first time). As mentioned earlier, even a change to Tomcat's web.xml did not "take".
So, we used Tomcat from the zip distribution (as opposed to the service installer), unzipped to a location outside of Program Files, and now everything works as expected.