Wednesday assumptions
I guess:
target/classes is the destination folder for compiled classessrc/main/webapp - web application content folderProject > Build Automatically checked option
Deployment Directory
Eclipse uses a deployed WAR deployment — that is, a deployed application is deployed as a folder, not a single file archive. Application files are hosted and downloaded from ${workspace}/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ .
Publishing house
Publishing is the central process that is responsible for building and deploying a web application. When it comes to local Tomcat, it means copying "web content, compiled classes, libraries ..." to the deployment directory (one in .metadata ).
Eclipse can do partial publishing — that is, when a single resource changes (for example, some JSP), Eclipse will only publish this single file.
By default, a process is published automatically when a resource changes. This can be changed in the server settings (double-click the server name in the Servers view).

Static Resource Change
If you change, say src/main/webapp/resources/myApp/css/main.css :
- after publication, the file is copied to the deployment folder Resource
- instantly available for server clients
JSP file change
If you changed the JSP file:
- after publishing, the file is copied to the deployment folder
- Tomcat notices that the JSP file has changed and recompiles it.
- modified JSP is ready to render content
Modify Java File
If you change the java source file:
You can enable the automatic reboot function in the server settings on the "Modules" tab. Without automatic rebooting, you can use the hot swap function , which can replace the code in the JVM startup. This is only possible when the method signatures are not changed.

If you need a more advanced solution (i.e., not limited to replacing only the method body), when it comes to reloading java changes, you should check projects, for example JRebel (not free).
Cleaning
A deployed application may be corrupted. It is worth noting that when you want to clear fully compiled and published resources, you must:
- Clear compiled classes (
Project > Clean... - removes target/classes ) - Cleaning deployed files (
Server > Clean... - deleting the deployment folder) - Clear Tomcat working directory (
Server > Clean Tomcat Work Directory... - removes compiled JSPs)
Pavel horal
source share