simplest, quickest: set eclipse up to generate a war file when you build; as a post-build step, copy that war file into your tomcat webapps directory. tomcat will recognize the change and refresh the site with no deployment necessary. note that this isn't perfect; users using that webapp may have a less than optimal experience, as tomcat restarts the webapp "under" them; but this does fit your request.


are you open to using jetty for development purposes?

if so, it's pretty simple to use with maven - just run mvn jetty:run


this may not be the best way, but it works for me.

  • $tomcat/conf/catalina/localhost/.xml
  • $contextpath/webapp/web/web-inf/lib/*.jar
  • $contextpath/webapp/web/
  • $eclispeworkbench/project-servlet/src/
  • $eclispeworkbench/project-servlet/servlet.jardesc (should export jar to lib dir in $contextpath)
  • $eclipseworkbench/project-jsp/

i use an rsync command to sync up changes from my jsp project to the $contextpath.

use remote debugging in eclipse for tomcat which will allow limited hot-swapping of code. if you change static fields or add methods, you will need to export the jar and restart the context.


can we use the below option? double click on server in eclipse -> server locations -> use tomcat installation. it takes control of the tomcat installation. you dont need to restart the server for changes in java classes.


i've found a simplest way: use of symbolic links: i think this is the fastest way because there is no synchronization at all: tomcat directory and your project directory will be the same directory all the time.

tomcat will periodically detect the changes and redeploy your application.

there is also a way to debug your application, so i humbly think is a good solution.

i've documented my solution here, for anyone interested.


in case, you're in hurry:

  1. check "never publish automatically" in tomcat(other container) in eclipse.
  2. start tomcat(other container) in debug mode.

voila! :)


in eclipse, click on the project in the top menu and make sure “build automatically” is selected. this fixed my problem. i was running eclipse with tomcat using my workspace metadata. i was also running maven in a dynamic web module project. to verify, add your application to tomcat. start tomcat from within eclipse. make sure your application is deployed and running. open the console tab in eclipse. make a change in your application. after a couple of seconds you should see your change getting automatically built and deployed to tomcat.


in your development environment, just point your tomcat server to look for jsps in whatever directory you're developing them in. as soon as you save the file, you'll be able to see the changes then.


i've managed to get this working on my development environment using the spring loaded jvm agent. while i do develop spring web applications, that project's description does mention that it is

usable on any bytecode that may run on a jvm

using the following setup, i was able to get changes to publish automatically to an attached tomcat instance (the usual eclipse wtp method). i'm using spring tool suite 3.7.3 based off eclipse mars.2 (4.5.2).

  1. download the latest release jar of spring loaded from their github project. this has been tested with springloaded-1.2.5.release.jar.
  2. setup a tomcat server in eclipse as normal (tested with tomcat 8.0.30)
  3. open the tomcat server's configuration page in eclipse (double-click on the server instance within the "servers" tab).
  4. in the "server options" section, uncheck "modules auto reload by default".
    • note: if you have web modules added to the server already, you may need to disable "auto reload" on them individually via the "modules" tab (at bottom of configuration page window).
  5. in the "general information" section, click "open launch configuration"
    • in the "arguments" tab, add the following to the end of the "vm arguments": -javaagent:/path/to/downloaded/springloaded-1.2.5.release.jar -noverify
    • to enable jars to be watched in addition to project's .class files, configure the -dspringloaded=watchjars= vm argument per this issue's comments.

start the server and publish dynamic web application projects to it as usual. again, i was able to test this with spring web applications. for example, modifying code, adding/subtracting methods, etc. in @controller classes were applied nearly instantly after i save the file and eclipse builds and publish the changed class. lastly, the faq section of the spring loaded project did mention a few cases where things won't reload, so those would require a restart of the server/application. but those exceptions are much less frequent.

one more note: this does not work with the embedded pivotal tc server or vmware vfabric tc server that comes with sts. for those servers, there is a "enable java agent-based reloading (experimental)" option, but that uses the older 1.2.0 release of spring loaded, which did not work for me.


why not use an integrated tomcat server from with in eclipse if this is just for development? you can configure servers under window->preferences. once it's configured if you have a jsp called page.jsp you can right click it and select run on server. under preferences->general->web browser you can chose weather to use the built in browser or an external one. make some changes to your jsp, save, and refresh your page from the browser. the changes will be automatically reflected once you save and refresh your browser.


what works for me here is:

context.xml like this:

<context path="/myapp" docbase="myapp" debug="5"
    reloadable="false" antiresourcelocking="false" antijarlocking="true">
<!-- this because i´m using spring 3.1 with tomcat -->
    <loader     loaderclass="org.springframework.instrument.classloading.tomcat.tomcatinstrumentableclassloader" />


then, on servers tab in eclipse, on "modules" tab, i disabled the "auto reload" to all the modules being deployed.

also let the default config to let the auto publishing.

and is using maven with wtp, don´t forget to leave the contents of src/main/resources in, because eclipse insists to exclude the contents of this folder of the final build.

only with all this i got full (vm) classes hot-deploy with resources hot-deploy!!!


change your workspace in eclipse to \tomcat\webapps since it is just for your work, this should work fine. whatever changes you make in eclipse is in the same directory tomcat looks for applications to deploy


in servers view , create a new server , don't add any resource (project) to the server yet. double click on the server in servers location. choose "use tomcat installation". modify "deploy path" to the tomcat deploy directory (ex: c:\server\tomcat 7.0.14\webapps). extend "publishing section". check "automatically publish after a build event". save and close. from the eclipse menu check "project -> build automatically". from the servers view , right click on your server , "add and remove" , publish you project.


disclaimer: i'm just a happy customer, i don't work for zero turnaround and i'm not in any way affiliated with them.

check out jrebel - it allows you to code without web application restarts. it basically works by instrumenting your classes and adapting their changes. it handles many more cases than hot deploy, including:

  • adding/removing methods
  • adding/removing constructors
  • changing interfaces
  • adding/removing implemented interfaces

it's commercial, ( pricing details, $550/year as of june 2018 ) , and it has a lots of plugins for third party frameworks, including:

  • guice
  • spring
  • struts 2

you get a free trial quite painlessly - i suggest you give it a shot.


simply let eclipse write the class files directly to the $tomcat/webapps/mywebapp/web_inf/classes directory. then, configure apache-tomcat to check if the class files have been updated, and reload them if they have.

to configure tomcat to auto-reload a class when it changes, you need to

edit $tomcat/conf/context.xml and set :

<context reloadable="true"> 

you may also have to edit and reload your webapps/$yourwebapp/web.xml file and include :

<web-app reloadable="true">

i can't remember if both changes are needed but that's how i configured my tomcat-6.0.18 to auto-reload.


there are two options.

first, eclipse lets you do this, with a slight change of configuration (see also this detailed post)

  • add tomcat to the server list
  • make the project "dynamic web project" (either through the creation wizard or through the facets section in the settings)
  • add the project to tomcat, and configure its "deployment assembly"
  • double click tomcat from the list to open the configurations
  • change "publishing" to "never publish automatically" (this means the server won't get restarted when you hit ctrl+s)
  • start tomcat in debug mode

this will still reflect code changes but won't restart the server.

second, i've used the filesync plugin for a long time:

  • configure the plugin to send all classes from the bin director to web-inf/classes of your tomcat installation (this is almost the same as configuring the deployment assembly)
  • configure all other resources to go to their respective locations
  • optionally, externalize all absolute paths from the filesync location settings to a single variable, and configure that variable in eclipse (thus you will be able to commit the filesync settings as well, if all members are using eclipse)
  • add tomcat to the servers list in eclipse, configure the "server locations" option to be "use tomcat installation" (the screen opens when you double-click tomcat from the servers list)
  • start tomcat in debug mode

it works perfectly for me that way. every non-structural change is reflected immediately, without redeploy.

you can read more about the methods for hot-deploying here.
i also created a project that easily syncs the workspace with the servlet container.

Related Query

More Query from same tag