[Java] how to modify the Java file without restarting the Tomcat Service

Source: Internet
Author: User

 

How to modify the Java file without restarting the Tomcat Service

This is often the case when you use eclipse + Tomcat to develop Java projects. If you have modified the Java file, Tomcat will be automatically restarted. The next step is to wait for the service to restart. In fact, most Java file modifications do not need to restart the service. Only some specific java files, such as the Java code called only when the service is restarted, need to restart the service.

There are two ways to modify the Java code to prevent service restart:

1. Modify the tomcat configuration file (under the tomcat-5.5.20/CONF/Catalina/localhost directory)

Add reloadable = "false" to the configuration"

<Context Path = "/"

Reloadable = "false"

Docbase = "F:/workspace/shpm3/shpm3-web"

Workdir = "F:/workspace/shpm3/Work"/>

2. You can also modify the above configuration file through setting on Eclipse.

Right-click eclipse Project name: properties-> tomcat-> General-> make this context as reloadable (reloadable = "true") do not select

Right-click the eclipse Project name: Tomcat project-> Update context Definition

How to modify the Java file without restarting the Tomcat Service

This is often the case when you use eclipse + Tomcat to develop Java projects. If you have modified the Java file, Tomcat will be automatically restarted. The next step is to wait for the service to restart. In fact, most Java file modifications do not need to restart the service. Only some specific java files, such as the Java code called only when the service is restarted, need to restart the service.

There are two ways to modify the Java code to prevent service restart:

1. Modify the tomcat configuration file (under the tomcat-5.5.20/CONF/Catalina/localhost directory)

Add reloadable = "false" to the configuration"

<Context Path = "/"

Reloadable = "false"

Docbase = "F:/workspace/shpm3/shpm3-web"

Workdir = "F:/workspace/shpm3/Work"/>

2. You can also modify the above configuration file through setting on Eclipse.

Right-click eclipse Project name: properties-> tomcat-> General-> make this context as reloadable (reloadable = "true") do not select

Right-click the eclipse Project name: Tomcat project-> Update context Definition

Related Article

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.