Loading
Struts Action Class

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  What is the Action Class ?


Ans)

An Action class in the struts application extends Struts 'org.apache.struts.action.Action" Class.
Action class acts as wrapper around the business logic and provides an inteface to the application's
Model layer.
It acts as glue between the View and Model layer. It also transfers the data from the
view layer to the specific business process layer and finally returns the procssed data from business
layer to the view layer.

Few Facts about Action Class
i) Single instance per application (not thread safe)
ii) Instantiated as needed, like servlets

Sample Action Class :

public class TestYourAction extends Action
{
  public ActionForward execute(
  ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) throws Exception{
  return mapping.findForward("testAction");
  }
}

 

 

 



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Struts Action Class


Struts Action Class

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free