When we develop the Server.xml and content.xml files that are sometimes required to be modified under Tomcat, the file is often restored.
The reason is that when you integrate add Tomcat in Eclipse, Eclipse automatically stores the Tomcat profile, and
when the Tomcat server starts in eclipse, it overwrites its own stored Tomcat profile from the original Tomcat configuration file.
The two solutions are as follows:
Mode one:
Set Ecplise, cancel out of automatic publishing function
ecplise select window-preferences-server-launching
Cancel automatically publish Wen starting Servers
Click OK to complete
Mode two
One of the server projects in the Ecplise project
has a Tomcat v7.0 server at Localhost-config, which
also has server.xml and content.xml directly modifying the files
inside it. When Tomcat is republished, it will overwrite the files under Tomcat with the configuration file.
Note: I am a tomcat 7.0 , everyone's probably a different version, the same way