Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Republish Tomcat Server in Eclipse without complete Restart

In my Eclipse I have created a Dynamic Web Project, which runs on a Tomcat7. If I modify and save any file in the project, eclipse automatically republishes the project on the Tomcat (copies files in a temporary Tomcat directory) and restarts the Tomcat. This means I loose all sessions.

Is there a way to tell eclipse to automatically copy modified files in the Tomcat directory but only restart the Tomcat when manually restarting Tomcat?

Even better would be: Copy any modified files in Tomcat directoy but restart Tomcat only when I modified a file with extention *.java

Thanks for your help!

like image 579
schokosocke Avatar asked Mar 30 '16 13:03

schokosocke


People also ask

How do I update Tomcat in eclipse?

High level steps: Project Properties / Target Runtime / select the Target runtime. Project Properties / Java Build Paths / Edit Apache Tomcat entry and select the run time to add to classpath. Project Properties / Project Facets / Select Dynamic Web Module and change the version.


1 Answers

You should start Tomcat in hot deploy mode (supported only in debug mode). There is a good guide for this here.

like image 117
Matteo Baldi Avatar answered Nov 02 '22 03:11

Matteo Baldi