0
我有有我的呼喚,但仍然我得到下面的異常java.lang.NoSuchMethodException:在Struts 1.3 *
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();
}
可能是什麼問題?
我已經使用了frameset。
功能dataSave()是該有效方法?如果你使用的是Struts 1.2,你的動作類方法不應該是行動嗎? – kosa
這是一個查找調度操作嗎? –
import org.apache.struts.actions.DispatchAction; –