java.lang.NoSuchMethodException:在struts 1.3。*中
16lz
2021-01-22
i have a action class which has the method i call but still i get the following exception
我有一个动作类,它具有我调用的方法但仍然得到以下异常
SEVERE: Action[/common/DepartmentAction] does not contain method named ''
java.lang.NoSuchMethodException: com.secureyes.eswastha.struts.action.DepartmentAction.(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
I am really confused why i get this kind of exception.
我真的很困惑为什么我得到这种例外。
this is my action struts-config.xml :
这是我的动作struts-config.xml:
<action path="/common/DepartmentAction" name="SecurEyesForm" type="com.secureyes.eswastha.struts.action.DepartmentAction" scope="request" parameter="method" validate="false">
<forward name="departmentHome" path="/WEB-INF/Masters/DepartmentMaster.jsp"></forward>
</action>
and this is my action class method :
这是我的动作类方法:
public ActionForward goToHome(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
//call method to verify Pagetoken
forwardRequestTo = "departmentHome";
return mapping.findForward(forwardRequestTo);
}
and this is how i call the method in java script :
这就是我在java脚本中调用方法的方法:
function dataSave(){
document.forms[0].action="DepartmentAction.htm";
document.forms[0].method.value="saveDepartmentDetails";
document.forms[0].target="workFrame";
document.forms[0].submit();
}
what could be the problem?
可能是什么问题呢?
i have used frameset.
我用过frameset。
1 个解决方案
#1
0
In action tag parameter should be wrapped with goToHome ie., parameter="goToHome"
在动作标签参数应该用goToHome包装,即。,参数=“goToHome”
更多相关文章
- 当只使用get()和set()方法时,用原始类型替换AtomicBoolean?
- java中循环遍历删除List和Set集合中元素的方法
- 80端口占用异常解决方法java.net.BindException: Address alread
- java写入文件的几种方法小结
- OOP面向对象编程(一)-------方法的重载
- Java之美[从菜鸟到高手演变]之Java学习方法
- Java反射---getGenericSuperclass和ParameterizedType参数化类型
- vue、react等单页面项目部署到服务器的方法及vue和react的区别
- javascript获得客户端IP的又一方法