1.在server.xml中找到
<Host name="localhost" appBase="/root/webfile/webapps" unpackWARs="true" autoDeploy="true">
2.在下面加一句
<!-- 设置默认项目名称 -->
<Context path="" docBase="/root/webfile/testweb" reloadable="true"/>
其中testweb就是你访问 127.0.0.1:8080的时候默认访问的项目