Struts2跳转报404(没有进入Action)
1.在Eclipse中建立一个Web Project,并且向web-inf/lib中加入所需struts2的五个jar包。(可从apache的官方网站上下载)
struts2-core.jar
xwork.jar
ognl.jar
freemarker.jar
commons-logging.jar
2.配置web.xml
<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>*.action</url-pattern>
</filter-mapping>
3. 确认Struts.xml和presentationContext.xml对应的Action名称正确
4.确认struts.properties文件配置正确