Tuesday, June 12, 2012

execute method signature in the Struts1.x , Action class child class

1 . execute method is public
so

 public execute(){
}

2. it should return ActionForward instance 
so

public ActionForward execute(){
}

3. it must have ActionMapping , ActionForm, HttpServletRequest  and HttpServletResponse arguments
so

public ActionForward execute(ActionMapping map, ActionForm form , HttpServletRequest req, HttpServletResponse) throw Exception{
-----
-----
------

return map.findForward("SUCESS");

}

8 comments: