tomcat configuration mapping path

Learn from others blog, effective pro-test:

https://blog.csdn.net/a5552157/article/details/81203312

 

Open the tomcat configuration file server.xml, add in a host label

<Context docBase="D:\apache-tomcat-8.5.15\images" path="/image" reloadable="true"/>

DocBase which is our true path, the virtual path is mapped path, which means that if we use Tomcat to load resources encountered "/ image", it will automatically replace the path docBase

 

 

Guess you like

Origin www.cnblogs.com/tank073/p/11810265.html