When I add tomcat to eclipse some options appear: Start
be Publish
.
How do these relate to hotdeploy
?
When I add tomcat to eclipse some options appear: Start
be Publish
.
How do these relate to hotdeploy
?
Start
and Debug
The Start
option will initialize the server and, as a consequence, the applications that are associated with it. It is the equivalent of Run
for JavaSE. If you want to debug the application, use Debug
.
Publish
The Publish
option will copy the changed files in your project to the folder configured in your Tomcat, making them available for new requests. But note that this does not imply restarting the server, so if tomcat is set to cache it may not take effect immediately.
In addition, by default Tomcat is set to auto-%% when you change a file in the project. This setting can be changed by clicking the Publish
option in the menu that appears in the question.
Sometimes Eclipse loses the synchronization between project and Tomcat for some reason. You can then open the Tomcat item by clicking the arrow, right-clicking on a specific application, and selecting the Properties
option, which will force the full copy of the application to the Tomcat folder.
It is the ability to update the system without restarting Tomcat or the Application.
However, there are several things to consider:
Finally, every technology has its nuances.
However, the biggest problem of restarting the application (if it is not too slow) is that the session will be lost and you will need to log in again and restart the tests. So it's interesting to implement a login that redirects the user to the last page he was accessing.