Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop Eclipse restarting my web app on file save

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?

like image 656
harto Avatar asked Apr 03 '09 01:04

harto


People also ask

What is Eclipse restart?

The restart option allows users to restart eclipse. To restart eclipse, click on the File menu and select the Restart menu item. After a plug-in is installed, users will be prompted to restart eclipse. If they choose not to restart at that point they can restart eclipse later by using the restart option.

How do I save all in eclipse?

Under preferences General->Workspace, there's an "Save automatically before build" option.

How do I restart a program in eclipse?

You can restart running application by right clicking it in debug window and selecting "Terminate and relaunch". If you really want you can also add custom shortcut for terminating and relaunching by Window -> Preferences -> General -> Keys -> Find "Terminate and Relaunch" and choose your favorite key combination!


1 Answers

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.

like image 131
Romain Linsolas Avatar answered Sep 28 '22 09:09

Romain Linsolas