tomcat /conf /server.xml 的host里面加上如下配置
<Context path="/dl" docBase="/home/jackray/soft/webapps/dl" crossContext="true" debug="0" reloadable="true" trusted="false"/>
path指的是 ip:port /dl
docBase 项目所在绝对路径
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="/dl" docBase="/home/jackray/soft/webapps/dl" crossContext="true" debug="0" reloadable="true" trusted="false"/>