Tomcat sets to automatically detect and load changed classes. tomcat Loads

Source: Internet
Author: User

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 ......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.