Tomcat sets to automatically detect and load changed classes. tomcat Loads
Modify Tomcat/conf/context. xml and <Context reloadable = "true">Add reloadable = "true"
<Context reloadable = "true">
<! -- Default set of monitored resources -->
<WatchedResource> WEB-INF/web. xml </WatchedResource>
<! -- Uncomment this to disable session persistence resume SS Tomcat restarts -->
<! --
<Manager pathname = ""/>
-->
<! -- Uncomment this to enable Comet connection tacking (provides events
On session expiration as well as webapp lifecycle) -->
<! --
<Valve className = "org. apache. catalina. valves. CometConnectionManagerValve"/>
-->
</Context>
How to load a class at tomcat startup
The servlet cannot be started.
The listener is enabled.
Generally, servletContentListener is used.
Then configure the web. xml file <listener>
In java, tomcat must be restarted to load changes in action or object classes?
If you use the tomcat server that comes with MyEclipse 8.5, you can find context in the directory of MyEclipse's working directory. xml file: Workspaces \ MyEclipse 8.5 \. metadata \. me_tcat \ conf \ context. xml
You only need to add a reloadable = "true" in the <Context> label.
For example, change to <Context reloadable = "true">
Save and restart tomcat. Next time you do not need to restart tomcat for the struts action or entity class.
Hope to help you ......