Java – Tomcat doesn’t update until I restarted Eclipse

eclipsejakarta-eejavatomcattomcat7

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.

Best Answer

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.