Solution to the problem of automatic restoration after modifying server.xml and content.xml in Tomcat

Solution to the problem of automatic restoration after modifying server.xml and content.xml in Tomcat

Write configuration files in server.xml and content.xml. After restarting the server, you will find that the xml will restore the default settings and all previous configurations will be gone.

Reason: When you integrate and add Tomcat in Eclipse, Eclipse will automatically store the Tomcat configuration file. It exists as a project in eclipse, which is our common Servers project package. When the Tomcat server is started in Eclipse, it will automatically publish the projects deployed in Eclipse. However, sometimes we configure these two files externally, and Eclipse only recognizes the projects deployed in it, so it will create a new server.xml file to overwrite the files we configured.

Method 1:

Set up Ecplise and cancel the automatic publishing function.

Select Window-Preferences-Server-Launching, uncheck Automatically publish on starting servers, and click OK.

Method 2:

In the Server project in the Ecplise project, there is a Tomcat v7.0 (3) at localhost-config file

There are server.xml and content.xml below, replace them with your modified files. When Tomcat is re-released, the configuration files here will be used to overwrite the files under Tomcat's conf.

This is the end of this article about how to solve the problem of automatic restoration after modifying server.xml and content.xml in Tomcat. For more information about how to automatically restore Tomcat after modifying server.xml and content.xml, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Solve the problem that idea2020.2 encounters an error in the pom.xml file Maven plugin tomcat7
  • Tomcat parses XML and creates objects through reflection
  • Detailed explanation based on tomcat configuration file server.xml
  • Detailed description of the server.xml configuration file example in tomcat
  • Parsing the configuration file server.xml of tomcat7
  • Some instructions on the host node configuration in tomcat's server.xml

<<:  Let's take a look at some powerful operators in JavaScript

>>:  10 Deadly Semantic Mistakes in Web Typography

Recommend

Vue data two-way binding implementation method

Table of contents 1. Introduction 2. Code Impleme...

Specific use of nginx keepalive

The default request header of the http1.1 protoco...

MySQL log settings and viewing methods

MySQL has the following logs: Error log: -log-err...

MySQL Optimization: Cache Optimization (Continued)

There are caches everywhere inside MySQL. When I ...

Vue implements paging function

This article example shares the specific code of ...

Understanding and application scenarios of enumeration types in TypeScript

Table of contents 1. What is 2. Use Numeric Enume...

Build a Scala environment under Linux and write a simple Scala program

It is very simple to install Scala environment in...

An article tells you how to implement Vue front-end paging and back-end paging

Table of contents 1: Front-end handwritten paging...

Bugs encountered when using mybatis-generator with mysql8.0.3 in IDEA

1. Add the plug-in and add the following configur...

uniapp realizes the recording upload function

Table of contents uni-app Introduction HTML part ...

Form submission refresh page does not jump source code design

1. Design source code Copy code The code is as fol...

Basic tutorial on controlling Turtlebot3 mobile robot with ROS

Chinese Tutorial https://www.ncnynl.com/category/...

MySQL database implements MMM high availability cluster architecture

concept MMM (Master-Master replication manager fo...

Summary of commonly used tags in HTML (must read)

Content Detail Tags: <h1>~<h6>Title T...

Web interview Vue custom components and calling methods

Import: Due to project requirements, we will enca...