• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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.
 
Now I am super curious what sports would be like if we allowed drugs and tiny ads.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic