views:

815

answers:

4

I'm creating a JSF/Facelets web app in Eclipse. I've configured my project to use a Tomcat (6.0) server that is started/stopped by Eclipse.

Whenever I save a file (eg .xhtml) Eclipse restarts the app, trashing my HTTP session. This is annoying, because I'm frequently updating my .xhtml files, and the app doesn't need restarting to detect the changes.

Is there a way to stop Eclipse restarting the app? Specifically, can I configure Eclipse to only restart the app when I save files of a certain type?

A: 

Turn of "Build Automatically"

jasonnerothin
where/how? I still want the project to build automatically when I save certain types of files (eg .java)
harto
A: 

In the server View, double click on your Tomcat instance. This will open the properties of your Tomcat server. As I am not sure of which parameter will help you to solve your problem, check the following options in the latter view:

  • Automatic Publishing, option "Override default settings" selected, 1 second for the publishing interval.
  • In server options, uncheck options "Server modules without publishing" and "publish module contexts to separate XML files".
  • In the modules tab, for each modules deployed, check that Auto Reload is enabled.

Hope this will help you.

romaintaz
Thanks for the info. The behaviour seems to have stopped - I don't think I did anything, just restarted Eclipse(?). I'm accepting this as my answer as it gave me some useful information anyway
harto
"In the modules tab, for each modules deployed, check that Auto Reload is enabled." is the option you want to disable.
Peter Štibraný
A: 

I have always used this and it works fine for me. The context is reloaded only when you change classes or the web descriptor.

In your project structure where you keep .xhtml files which makes eclipse reload the context on changing?

Bhushan
A: 

This can happen if you have a builder in Eclipse set to deploy on save. Right click on your project -> properties -> builders

Damo