主题:Tomcat为什么不执行index.jsp
明月天山
[专家分:0] 发布于 2006-04-05 16:06:00
以前我的首页都是index.html,但现在我将index.jsp作为首页为什么老是跑到Tomcat的欢迎页面上?为什么?难道首页必须是html文件吗?
应该怎么办?
回复列表 (共4个回复)
沙发
wdhsl520 [专家分:0] 发布于 2006-04-05 23:11:00
我也遇到了这个问题
目前我的解决办法是换个别的名字,呵呵。还没想到好的办法,请高手指点……
板凳
e418 [专家分:80] 发布于 2006-04-06 10:53:00
在web.xml中这样设置试试看
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
3 楼
永生 [专家分:370] 发布于 2006-04-08 22:40:00
你把配置文件改一下就OK了.在一个你用的什么框架要是WEBWORK2还是STRUTS呢把里面的中转页改一下就好了.
4 楼
linwenjunid [专家分:0] 发布于 2006-04-09 08:07:00
把你当前的WEB应用下的web.xml改下
增加
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
我来回复