回 帖 发 新 帖 刷新版面

主题:Tomcat为什么不执行index.jsp

以前我的首页都是index.html,但现在我将index.jsp作为首页为什么老是跑到Tomcat的欢迎页面上?为什么?难道首页必须是html文件吗?
应该怎么办?

回复列表 (共4个回复)

沙发



我也遇到了这个问题

目前我的解决办法是换个别的名字,呵呵。还没想到好的办法,请高手指点……

板凳

在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 楼

你把配置文件改一下就OK了.在一个你用的什么框架要是WEBWORK2还是STRUTS呢把里面的中转页改一下就好了.

4 楼

把你当前的WEB应用下的web.xml改下
增加
  <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

我来回复

您尚未登录,请登录后再回复。点此登录或注册