我有一个动作类,它有我调用的方法,但我仍然得到以下异常
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)
我真的很困惑为什么我会得到这种例外。
这是我的操作 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>
这是我的动作类方法:
public ActionForward goToHome(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
//call method to verify Pagetoken
forwardRequestTo = "departmentHome";
return mapping.findForward(forwardRequestTo);
}
这就是我在java脚本中调用该方法的方式:
function dataSave(){
document.forms[0].action="DepartmentAction.htm";
document.forms[0].method.value="saveDepartmentDetails";
document.forms[0].target="workFrame";
document.forms[0].submit();
}
可能是什么问题呢?
我用过框架集。