Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell Eclipse 3.4 WTP to not restart tomcat on JSP save?

Whenever I save a JSP file in my WTP project, Eclipse restarts its Tomcat instance. This is sorta driving me nuts. I don't want to disable auto reload completely, I just don't want it to happen when I save a file that doesn't require a restart.

I'm not sure how Eclipse WTP works in this regard. Could it be my project structure? The JSP files are in WEB-INF/jsp.

(this SO question is similar to mine, but doesn't have a sufficient answer)

EDIT: I want auto-reloading to happen, but not for file saves that do not require it. When I save a JSP there is no reason to have Tomcat restart. Thus what I'm looking for, if possible, is a smarter way for reloading to happen.

like image 396
Boden Avatar asked May 28 '09 16:05

Boden


2 Answers

Open server.xml (use the Ctrl + Shift + R shortcut if you don't know where it is). Find the appropriate context tag and set reloadable to false. That way, Tomcat can do hot code replace without Eclipse restarting it.

like image 88
Mwanji Ezana Avatar answered Nov 11 '22 03:11

Mwanji Ezana


I've submitted a patch to Eclipse to allow you to specify for each server whether or not you'd like it to add new modules with "auto reload" enabled or disabled by default. They're considering the patch for the next version of Eclipse.

You can help by voting for this patch here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=363892

like image 45
Grant Avatar answered Nov 11 '22 05:11

Grant