通过修改Tomcat5/conf/server.xml的如下部分:
<
Host
>
<!-- ...... -->
<!-- ...... -->
<!-- docBase是要设置的虚拟目录绝对路径. -->
< Context path ="" docBase ="D:/Tomcat5/webapps/Test"
< Context path ="" docBase ="D:/Tomcat5/webapps/Test"
crossContext
="true"
debug
="0"
reloadable
="true"
trusted
="false"
>
</ Context >
</ Host >
</ Context >
</ Host >
<
welcome-file-list
>
< welcome-file > index.htm </ welcome-file >
< welcome-file > index.jsp </ welcome-file >
<!-- 如果要添加自己的默认起始页,如:main.jsp -->
< welcome-file > main.jsp </ welcome-file >
<!-- 添加的内容是有优先顺序的.如果首先执行main.jsp则把这条添加在最顶端. -->
</ welcome-file-list >
< welcome-file > index.htm </ welcome-file >
< welcome-file > index.jsp </ welcome-file >
<!-- 如果要添加自己的默认起始页,如:main.jsp -->
< welcome-file > main.jsp </ welcome-file >
<!-- 添加的内容是有优先顺序的.如果首先执行main.jsp则把这条添加在最顶端. -->
</ welcome-file-list >