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.

Yes.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to