【发布时间】:2014-08-29 12:25:28
【问题描述】:
我有一个带有 webcontext 根名称“testProject”的 web 应用程序。我尝试使用web.xml 并配置欢迎文件:
<welcome-file-list>
<welcome-file>/jspFiles/index.html</welcome-file>
</welcome-file-list>
这适用于tomcat,但不适用于码头:
Tomcat 7.0:
- 如果我浏览到
localhost:8080/testProject/,则正确显示 index.html - 如果我浏览到
localhost:8080/testProject/jspFiles/index.html,则正确显示 index.html
码头 9.0:
-
如果我浏览到
localhost:8080/testProject/,则会出现 404 错误 - 如果我浏览到
localhost:8080/testProject/jspFiles/index.html,则正确显示 index.html
我的 webcontent 文件夹如下所示;
Webcontent
|
+ jspFiles/index.html
|
+ META-INF
|
+ WEBINF
|
+ web.xml
我是否需要配置一些额外的东西才能在码头上进行这项工作?
【问题讨论】: