• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TomCat running from Eclipse shows old cached data

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a peculiar problem working with Eclipse 3.6 and TomCat 7.

I'm developing a webapplication in JSF and been doing that for a while now.

But now, all of a sudden, when i choose my project and goes
[right click]-->"Run As" --> "Run on Server"

...the newly edited xhtml data is showing old stuff on the web page.
I've tried to:
* Reinstall Eclipse
* Reinstall TomCat
* "Clean" choice on "Servers" in Eclipse.
* "Clean TomCat work directory" on "Servers" in Eclipse.

Nothing works.

I assume that Eclipse has som cache stored somewhere, that it doesn't matter what I'll do.

Anyone has any idea?
 
Mattias Andersson
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok...

This is nuts!

I totally evaporated/killed/deleted the old project (including all files).
I started a new project with the same name as the one deleted.

I have a new start page which says something like "hello".

And guess what!!!
The same old cached data from the old deleted project is still presented in my browser!!!

I am clueless.

Now... someone here has any idea??
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

One thing I can think of is if, after re-installing Eclipse, you kept using the same workspace. By default, when adding a new tomcat server to Eclipse, it's configured to use the workspace's metadata folder to deploy projects so it doesn't affect your real tomcat installation. The folder it deploys to should look like: <your workspace folder>\.metadata\.plugins\org.eclipse.wst.server.core\tmpX.

When you cleaned the tomcat work folders, maybe it couldn't clean that workspace folder for some reason.

In Eclipse, you can change that deploy folder to something else.
- Remove all the projects assigned to tomcat or you won't be able to change the setting (right-click the server / Add and Remove ...).
- Do a Clean (right-click the server / Clean ... ).
- Double-click the server to open the config page.
- In the server location section, select "use Custom location" and specify a folder of your choice as the server path. You can leave "wtpwebapps" as the deploy folder. I usually set something like "C:\virtualTomcat" as the server path.
- Save the file, do another clean and add your projects back to the server (right-click the server / Add and Remove ...).

The advantage of setting a folder as "c:\virtualTomcat" is that it's easily accessible in windows explorer so you can see exactly what is being deployed to the server or even clean it manually. When you see cached pages, go check out the folder to see what got deployed and when you clean the work folders, make sure everything is cleaned properly.

Hope this helps!

Fred.
 
Mattias Andersson
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Fred for your exquisite answer.
I've tried a few of those and will embrace the TomCat virtual folder idea.

Eventhough I tried a lot of your ideas I think that the solution that finally worked for me was to clean the "temporary internet files" folder.
Obviously I need to implement the "no-cache" in the response.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic