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 :
<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 :
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.