tomcat virtual path configuration

When developing a web project, it is best to separate the data from the code and save the files in a non-project directory. At this time, the simple solution to access files in the page is to configure the Tomcat virtual path, as follows:
Find the conf directory in the installation directory of Tomcat7, and there is a server.xml file in this directory. The task of this file is to configure the entire server. information. For example, modify the port number, add a virtual host... Open this file, find the HOST tag,
and insert the following code in this tag:
<Context path="/yang" docBase="f:\mysite1\xxx.war" debug="0" reloadable="true" crossContext="true" />


Guess you like

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