• 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
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Vista caching and Tomcat

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
steve claflin
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marshal
Posts: 25135
64
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to clarify, the "Vista" connection is that Tomcat is running under Vista, right? Not that those browsers are running under Vista?
 
steve claflin
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right - the server is on Vista.

Also, thanks to whoever moved this post - I didn't realize that this forum existed, but it is certainly a better place for it.
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Regards
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition to clearing the work directory are you *sure* you're editing the correct files? I've never had this problem on Vista.
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the path:
${CATALINA_HOME}\work\Catalina\localhost

You would see your application folder under localhost. Else under the folder "_".

Regards
 
steve claflin
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!