Action Methods into struts
Previous | Home | Next |
An Action is class that mediator between an incoming request and the corresponding business logic.The controller will create an instance for each request (if necessary), and call the execute method.
org.apache.struts.action.Action class have many method :-
1.execute() :- If The response has been completed then forward to which control should be transferred.This method throws an Exception if the application business logic throws an exception.public ActionForward execute(ActionMapping mapping, ActionForm form,ServletRequest request, ServletResponse response)throws Exception public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request, HttpServletResponse response)throws Exception
2. addErrors() :-This method is used to adds the specified errors keys into the appropriate request attributeprotected void addErrors(HttpServletRequest request, ActionMessages errors)3.addMessages() :-This method is used to adds the specified messages keys into the appropriate request attribute.protected void addMessages(HttpServletRequest request,ActionMessages messages)
Previous | Home | Next |