当前位置: 代码迷 >> Web前端 >> web.xml中的welcome-file-list有关问题解决
  详细解决方案

web.xml中的welcome-file-list有关问题解决

热度:155   发布时间:2012-08-28 12:37:01.0
web.xml中的welcome-file-list问题解决
我用structs2时候web.xml配置如下
<welcome-file-list>
  <welcome-file>index.htm</welcome-file>
</welcome-file-list>
启动服务器,终是报404错误,但我在地址栏手工加入index.htm时,页面正常显示.
解决:
tomcat 会去检查有没有index.htm这个文件.
先读取 welcome list,然后取得第一个index,然后到web中的路径中查找有没有这个文件,没有继续第二个.依次下去。在WebRoot下建立一个index.htm空文件就可以正常访问.
  相关解决方案