如何更改JSP空间的默认页

时间:2009-11-18 15:08:25  来源:JSP空间网  作者:www.jspkj.net

JSP空间网提供的JSP虚拟主机默认主页为index.jsp,但您可能希望改成其它的页面为默认页面,例如您希望更改为default.jsp为默认页面。
原来JSP的默认页面设置集成在了自己的应用的配制中,记得有个web.xml嘛,在最后加上这么一段

<welcome-file-list>
<welcome-file>default.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

位于<web-aap>内,当然您需要注意的是webcome-file_list标签在web-aap内放在顺序,一定要放在最后,因为web.xml对标签顺序是有要求的.

<web-app >
<display-name>photo525</display-name>

.................


<welcome-file-list>
<welcome-file>default.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

上一篇文章:APACHE和TOMCAT整合编码问题
下一篇文章:下面没有链接了