求助,Struts2报404错
本人刚刚接触Struts2,今天在做网上教的一个小项目时,总是报404错,不知道是为什么
项目情况如下:
工具:MyEclipse6.5 Tomcat5.0
JDK1.6
Struts2版本2.2
web.xml配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
</web-app>
struts.xml配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="bixy" namespace="/" extends="struts-default">
<action name="hello" class="org.bixy.struts2.demo.HelloStruts">
<result name="suc">/hello.jsp</result>
<result name="err">/err.jsp</result>
</action>
</package>
</struts>
在web.xml中配置Struts2 的Filter之前,可以访问到index.jsp页面,配完Filter之后,就报404错了,望前辈指教