struts2 的action动态调用时 报错

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

你可能感兴趣的:(struts,Class,action,encoding)