在tomcat目录下的conf文件夹下的server.xml 在</host>前一句写上: <Context docBase="实际路径" path="/虚拟路径" reloadable="true"/> 如图