Struts程序显示错误404

时间:2016-05-05 17:00:39

标签: struts2

我正在处理我的项目而无法加载index.html(我项目的第一个文件)。 现在首先检查web.xml是否要加载哪个文件,并且我检查了很多次,所以仍然为什么我无法获得第一页? enter image description here

  //web.xml

http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<display-name>Assignment5</display-name>

<filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

<welcome-file-list>

<welcome-file>index.html</welcome-file>

</welcome-file-list>

//由于某些原因,我的struts.xml没有上传为代码,因此我上传了//作为图片

enter image description here

1 个答案:

答案 0 :(得分:0)

您将index.html与WEB-INF

并行