Stop Eclipse restarting my web app on file save
Asked Answered
M

4

7

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?

Marxismleninism answered 3/4, 2009 at 1:19 Comment(0)
D
9

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.

Dextrad answered 3/4, 2009 at 6:1 Comment(2)
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 anywayMarxismleninism
"In the modules tab, for each modules deployed, check that Auto Reload is enabled." is the option you want to disable.Rosenbaum
T
0

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?

Tricuspid answered 3/4, 2009 at 8:13 Comment(0)
H
-1

Turn off "Build Automatically"

Hilel answered 3/4, 2009 at 2:36 Comment(1)
where/how? I still want the project to build automatically when I save certain types of files (eg .java)Marxismleninism
K
-1

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

Kyles answered 7/4, 2009 at 11:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.