struts2 的action动态调用时 报错
2012-04-09 07:49
260 查看
struts2 的action动态调用时 报错No result defined for action com.beijing.action.DataAction
and result findById
检查struts-config.xml
<?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>
<package name="test" extends="struts-default">
<action name="data" class="com.beijing.action.DataAction">
<result name="save">/save.jsp</result>
<result name="delete">/delete.jsp</result>
<result name="update">/update.jsp</result>
<result name="find">/find.jsp</result>
<result name="findById">/update.jsp</result>
</action>
</package>
</struts>
com.beijing.action.DataAction类有的,findById方法也有的,检查后报名可能有问题
解决方法:把报名action换成其它的名字,我换成了ac,即com.beijing.ac.DataAction
and result findById
检查struts-config.xml
<?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>
<package name="test" extends="struts-default">
<action name="data" class="com.beijing.action.DataAction">
<result name="save">/save.jsp</result>
<result name="delete">/delete.jsp</result>
<result name="update">/update.jsp</result>
<result name="find">/find.jsp</result>
<result name="findById">/update.jsp</result>
</action>
</package>
</struts>
com.beijing.action.DataAction类有的,findById方法也有的,检查后报名可能有问题
解决方法:把报名action换成其它的名字,我换成了ac,即com.beijing.ac.DataAction
相关文章推荐
- struts2配置及ActionMethod_DMI_动态方法调用
- Struts2的动态调用action方法
- struts2-10动态方法调用和使用通配符定义action
- struts2动态方法调用和使用通配符定义action
- struts2 2.5动态方法调用(DMI) dynamic method invoke 出现不被允许的方法时 Method add for action dynamic is not allowed! - [unknown location]
- struts2 DMI用感叹号动态调用方法时提示there is no action mapped for
- Struts2动态方法调用和使用通配符定义action
- struts2动态方法调用和使用通配符定义action
- Struts2动态方法调用,找不到Action
- struts2 type="redirectAction"重定向 与动态调用方法
- struts2动态方法调用 ActionName!methodName.action
- Struts2中Action中动态调用,为什么出错了???
- Struts2中Action的动态调用方法
- struts2中使用DMI(动态调用方法)方式配置action
- Struts2学习---基本配置,action,动态方法调用,action接收参数
- Struts2中Action方法的动态调用(一个Actiong有两个方法)
- Struts2基础之四:动态方法调用(DMI)和action通配符
- Struts2_动态方法调用和使用通配符定义action
- Struts2-动态调用action中的方法
- struts2中使用DMI(动态调用方法)方式配置action