1.改端口
在conf/server.xml裏改
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
conf/server.xml
虛擬目錄的根路徑下必須包含webapps/ROOT/WEB-INF文件夾
<Context path="/zhe" docBase="D:/Java/web">
3.目錄列表顯示功能
conf/web.xml
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
false ->true
4.改主頁conf/web.xml
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
建議不要改這個公共的,可以改虛擬目錄下的WEB-INF/web.xml文件。
添加以上需要修改的內容