Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Eclipse automatically refresh Tomcat app?

I use Eclipse Indigo (EE) to build applications in Java framework Vaadin, using Tomcat 7.0 server. After changes in code I wont see result in a browser, so I need to click option "Clean Tomcat Work Directory.." and wait until Tomcat stop and start a server.

Otherwise, when I refresh app page, I don't see any changes. Even when I restart server (and when eclipse automatically restart it when I save changes), without cleaning tomcat directory.

Option "Automatically publish when resources change" is enabled.

Is any faster way to do that? or can I automate that process?

like image 320
mokrzu Avatar asked Jul 24 '11 17:07

mokrzu


People also ask

How do I update Tomcat in Eclipse?

For configuring the tomcat server in eclipse IDE, click on servers tab at the bottom side of the IDE -> right click on blank area -> New -> Servers -> choose tomcat then its version -> next -> click on Browse button -> select the apache tomcat root folder previous to bin -> next -> addAll -> Finish.

How do I know if Tomcat is running in Eclipse?

Go to the project in the Project Explorer, select the web project, right click and select "Run As", you will see Apache Tomcat, create runtime configuration for the web project by selecting "New" button.

What is Tomcat reload?

On an Apache Tomcat server, to "reload" an application means to call a method of the StandardContext class called StandardContext. reload() on a given Context. This method creates a new classloader and new servlets, drops all references to the old servlets, and then calls the Servlet.


1 Answers

Additionally to the answer of Kowser, it is possible do hot code changes when running tomcat in debug mode.

Otherwise you could investigate in JRebel

like image 134
Omnaest Avatar answered Oct 05 '22 23:10

Omnaest