Boden
Boden

Reputation: 4167

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.

Upvotes: 11

Views: 6736

Answers (4)

Grant
Grant

Reputation: 1134

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

Upvotes: 3

Mwanji Ezana
Mwanji Ezana

Reputation: 924

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.

Upvotes: 11

user12384512
user12384512

Reputation: 3401

Faced same problem, setting reloadable to false disable reloading of java classes as well. I have solved this problem moving web-inf/lib folder of my eclipse project to another folder. It's wtp bug.

wtp

Upvotes: 2

Peter Štibraný
Peter Štibraný

Reputation: 32893

Disable Auto Reload of your application. It is mentioned in the answer for question you link to. (Guy says to enable it, but that causes behaviour you observe. Disable it instead!)

Upvotes: 0

Related Questions