struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <>
Subject Re: Action and ActionForm newbie questions
Date Fri, 26 Sep 2008 20:04:14 GMT
UseTheFork wrote:
> Hi, 
> I am learning about Struts and I am trying to understand the proper usage of
> Actions and ActionForms. Can you tell me if the following is correct?
> i) Actions are implemented as glue between the View (JSP for example) and
> the Model part (Hibernate for example) in MVC. Typically, they should not
> implement business logic, but call EJBs instead.

Call EJBs?? An ActionForm is the data transfer object between the action 
and the view template (JSP usually). Business logic belongs in the 
action, or a service API the action interacts with. Talking to EJBs is 
firmly in the business logic domain and unrelated to ActionForms.

> ii) When the struts controller calls execute(...) on the Action class, an
> ActionForm class may be passed as a parameter (if such has been implemented
> and if struts has been configured properly).
> iii) An ActionForm contains the data entered by the user on a HTML (or JSP
> page) form. Some data validation can be performed.
> iv) Once the Action has finished its job, it returns the next page to
> display via an ActionForward object.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message