日期:2014-05-19 浏览次数:20795 次
<action name="Register" class="WU.WEBTutor.Action.StudentRegister" method="register"> <result name="input">studentRegister.jsp</result> <result name="success">success.jsp</result> </action> <action name="Login" class="WU.WEBTutor.Action.StudentLogin" method="login"> <result name="input">studentLogin.jsp</result> <result name="success">success.jsp</result> </action> <action name="FindAllStudents" class="WU.WEBTutor.Action.FindAllStudents" method="findAllStudents"> <result name="success">showAllStudents.jsp</result> <result name="input">studentLogin.jsp</result> </action>
<action name="Register" class="WU.WEBTutor.Action.StudentAction" method="register"> <result name="input">studentRegister.jsp</result> <result name="success">success.jsp</result> </action> <action name="Login" class="WU.WEBTutor.Action.StudentAction" method="login"> <result name="input">studentLogin.jsp</result> <result name="success">success.jsp</result> </action> <action name="FindAllStudents" class="WU.WEBTutor.Action.StudentAction" method="findAllStudents"> <result name="success">showAllStudents.jsp</result> <result name="input">studentLogin.jsp</result> </action>
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd"> <struts> <constant name="struts.devMode" value="true" /> <constant name="struts.i18n.encoding" value="UTF-8" /> <package name="cus" namespace="/" extends="struts-default"> <!-- action name="customerAction" class="com.zuxiang.action.Login" method="findAll" > <result name="success">/list.jsp</result> </action --> <action name="customerAction2" class="com.zuxiang.action.Login" method="login"> <result name="success">/index.jsp</result> </action> </package> </struts>
------解决方案--------------------
你的form中有没有指定 method=""? 超链接就你的action!方法名,还有我有点奇怪,你为什么不用*号通配符?就写一个就行了比如
<action name="*" class="WU.WEBTutor.Action.StudentAction"
method="{1}"&