By configuring the server.xml file under E:\Tomcat7.0\conf, the steps are as follows
1. Open the server.xml file under E:\Tomcat7.0\conf.
2、 <Host name="www.hthjx.cn" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- Here is the server address-->
<Alias>csdn.yake.cn</Alias>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
<Context path="" docBase="D:\webRoot\XX" debug="0" reloadable="true"/>
<!--The file path is: D:\XXX\XXXX-->
<!--path="/virtual path"-->
<!--docBase="/true path"-->
<!--Context can have multiple, keep path different -->
<Context path="/dataRoot" docBase="D:\XXX\XXXX" debug="0" reloadable="true"/>
</Host>
3. Configure a variable, which is configured in the properties file here
dataRoot = / dataRoot
Server address + variable ${dataRoot} + file path.