Questions about Tomcat setting non-Tomcat path file references

Source of the problem: Some non-source code files deployed to Tomcat are often encountered in the project. Different projects are different, resulting in the problem of manually copying files during the version replacement time. In order to solve this problem, I thought of this method.

 

In the Tomcat    apache-tomcat-7.0.64\conf path server.xml  file:

 

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">

 

        <!-- SingleSignOn valve, share authentication between web applications

             Documentation at: /docs/config/valve.html -->

        <!--

        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />

        -->

 

        <!-- Access log processes all example.

             Documentation at: /docs/config/valve.html

             Note: The pattern used is equivalent to using pattern="common" -->

        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log." suffix=".txt"/>

 

        <Context docBase="D:\develop\hmi" path="/TestProject/pages/hmi/" reloadable="false" source="org.eclipse.jst.jee.server:EMS_Test"/>

 

  </Host>

 

 

When accessing the URL: http://localhost:8080 /TestProject/pages/hmi/, it will access the physical file path: the file under D:\develop\hmi

Guess you like

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