You need “Automatically publish” to Tomcat because modified .class files are not copied to the temporary folder where Tomcat has the application deployed to.
For example, in my local instance, the temporary deployment folder is Tomcat [WORKSPACE_FOLDER]\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps . In this folder, my Eclipse web application resources (classes and other files) are copied, and this is where Tomcat collects them for deployment. Although my Eclipse web application has its own .class files compiled in [WORKSPACE_FOLDER]\[MY_WEB_APP_FOLDER]\target , when I change one class source code, the class is recompiled and its .class file is placed in the target folder. Using the Auto Publish function, the .class files from the target folder above ARE are copied to the wtpwebapps folder, while copying is disabled when the option is disabled.
"Automatic publishing" also does not mean that the application is redistributed to Tomcat, its updated .class files and other files are also updated in the wtpwebapps folder.
However, you need to disable it in Tomcat, this is the "Auto-reboot" option for your web module. Double-click on the Tomcat server created in Eclipse, go to the "Modules" tab, click the web application web module, then click "Change ..." and uncheck "Automatically restart enabled". Save and restart Tomcat.
Andrei Stefan
source share