posted 19 years ago
I am getting this error when i try to implement the DispatchAction class "DispatchMapping[/login] does not define a handler property".
public class LoginAction extends DispatchAction {
public ActionForward add(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Exception
{
return mapping.findForward("login1");
}
public ActionForward update(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Exception
{
return mapping.findForward("login2");
}
public ActionForward delete(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Exception
{
return mapping.findForward("login3");
}
}
I have imported the necessary classes for the same.
My action mapping looks like following
<action name="LoginForm"
path="/login"
scope="request"
type="net.tennet.loginstruts1.actions.LoginAction"
input="/jsp/Login.jsp">
<forward name="login1" path="/jsp/success1.jsp"/>
<forward name="login2" path="/jsp/success2.jsp"/>
<forward name="login3" path="/jsp/success3.jsp"/>
</action>
Now i try to use this code to call the individual methods.
<html:link target="_self" page="/login.do?function=add">Link1</html:link>
and so i get the above error. Any ideas as to why this is happening?