Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt
hiddentrue

Struts Actions


It's the action's job to take biz objects from the service and convert them (if necessary) for display on the screen, and take data from the jsp and convert it to biz objects to send to the service. An action should do only one thing, i.e. we aren't doing actions the "multiple method" way.

In Struts 1.2 projects, actions are defined as singletons which means that they should not have instance variables unless the instance variables are static variables whose values are meant to be shared across users.

For apps that use SAP, all your actions should be subclasses of SAPBaseAction which is, in turn, a subclass of IDDAction which is a subclass of Strut's Action. (org.apache.struts.action is the core of the struts framework, providing the "Controller" aspect of a MVC model. Action is one of the classes in this core code.)

...