tomcat root directory settings

There are three ways to set the Tomcat root path:

 

1. Method 1:

After Tomcat is installed by default, the home directory of tomcat is the webapps/root directory, so if you want to change the home directory of tomcat, you can do the following, so
the first method is:
open C:/Tomcat/conf/server.xml, in Add code between <host></host>
: <Context docBase="d:/Tomcat 5.5/webapps/medi" path="" debug="0" reloadable="true"/>
This restarts tomcat, our The home directory is set to the dolphin project.

2. Method 2:
Delete all files under ROOT in the tomcat installation directory, and then copy in all the decompressed files of the project.

3. Method 3:

[ For Tomcat 5.0 and below ]

This version will automatically generate a ROOT.Xml in the d:/Tomcat/conf/Catalina/localhost directory,
but this file is no longer generated in versions above 5.0, so you can create a new ROOT.xml and add the following code in it:
<? Xml version='1.0' encoding='utf-8'?>
  <Context crossContext="true" docBase="d:/Tomcat 5.5/webapps/medi" path="" reloadable="true">
</Context>



2 , note that
the default access directory is configured at this time, then do not deploy the project to tomcat, for
example, add the project path specified by the configuration file in conf\Catalina\localhost This file should be removed, otherwise the project will be loaded repeatedly.

-------------------------------------------------- -----
Welcome to scan the code to communicate

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326307596&siteId=291194637