早教吧 育儿知识 作业答案 考试题库 百科 知识分享

HTTPStatus404-ThereisnoActionmappedfornamespace/andactionnamesaveUserInfo.我的web.xml<filter-mapping><filter-name>struts2</filter-name><url-pattern>/*</url-pattern></filter-mapping>struts-use

题目详情
HTTP Status 404 - There is no Action mapped for namespace / and action name saveUserInfo.我的web.xml <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> struts-userinfo.xml <package name="userinfo" extends="default"> <action name="saveUserInfo" class="UserInfoAction" method="save"> <result name="error">/index.jsp</result> <result>/success.jsp</result> <result name="input">/Login.jsp</result> </action> </package> action-service.xml <bean id="actionTemplate" abstract="true" scope="prototype" lazy-init="true"> <property name="commonService" ref="commonService"></property> </bean> <bean id="UserInfoAction" class="com.gzbugu.action.UserInfoAction" parent="actionTemplate" scope="prototype"> </bean> struts-config.xml <struts> <include file="struts-userinfo.xml"></include> </struts> 页面提交 <form name="form1" action="saveUserInfo" method="post">
▼优质解答
答案和解析
你用的struts2还是1啊?filter里写的struts2,配置文件又是struts1的命名,也看不出来你web.xml里是不是配了自定义的xml