Server. xml and content. xml are automatically restored when Tomcat is configured. tomcat configures server. xml

Source: Internet
Author: User

Server. xml and content. xml are automatically restored when Tomcat is configured. tomcat configures server. xml

When processing Chinese garbled characters or configuring data sources, we need to modify the server. xml and content. xml files under Tomcat.

However, when we restart the Tomcat server after modification, we find that the xml file has been restored, and the modification is ineffective.

Why is it restored?

When the Tomcat server is started in Eclipse, the project deployed in Eclipse will be automatically released, but my project is manually deployed outside, and Eclipse only recognizes the project deployed in it, therefore, it creates a new server. the xml file overwrites the original file, which contains only the projects deployed in Eclipse.

Solution 1:

Set Ecplise to cancel the auto release function.

Select Window-Preferences-Server-Launching, cancel Automatically publish wen starting servers, and click OK.

Solution 2:

The Ecplise project has a Server project and a Tomcat v7.0 Server at localhost-config,

There are also server. xml and content. xml, which are replaced with the modified file. When Tomcat is re-released, the configuration file here will be used to overwrite the files under conf in Tomcat.

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.