samira
samira

Reputation: 1295

Tomcat doesn't update until I restarted Eclipse

i have problem with tomcat. when i change something in my xhtml file, tomcat can not show the changes. it shows the page before changing. i restart the tomcat,i clean tomcat work directory, right click on server and select clean, but i have to restart the eclipse to see the result. i search in google but i could not find which setting i should do in tomcat to solve the problem.in publish tab i selected "automatically publish when resource changes" . please help me. i have to restart eclipse for each changing.

Upvotes: 5

Views: 6995

Answers (2)

Agustin Lopez
Agustin Lopez

Reputation: 1365

Like @Sam said, make sure that your files are not being cached by your browser. On Mac (Command + R) Firefox and Chrome (Shift + F5).

If this does not work, double click the server on Eclipse and go to the Publishing tab. Make sure that it is set to Automatically publish when resources change.

Upvotes: 0

Sam
Sam

Reputation: 121

Please be sure your XHTML file is not being cached by your browser. Try a forced refresh (on Firefox, press Shift+Refresh Button or Command+Refresh on Mac).

You might also try to configure Tomcat context to disable caching for static resources as documented in the Apache Tomcat Configuration Reference. Set the cachingAllowed property to false (default is true).

Check HTTP headers using Firebug. See what you is in the HTTP response: HTTP response code, Cache-Control and Expires headers.

Upvotes: 2

Related Questions