You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

struts-config.xml (The Struts Configuration File)

Each of your ActionForms must be configured within the form-bean section of the struts-config.xml. In the example below the oas-skeleton has 3 ActionForms.

Each of your Actions must be configured within the action-mappings section of the struts-config.xml and each action path must exactly match a bean name within action-servlet.xml. It is the bean name within the action-servlet.xml that maps the bean name to the actual Action.
The struts-config.xml is also where /EntryAction is configured to chain to one of your Actions.

For each Action that accepts input from the user there should be an ActionForm (e.g., SearchCriteriaForm) attached to its associated action path (e.g., /SearchPeople).  If the input is going to be validated via the Struts Validator Framework a jsp/tile (e.g., oasskeleton.enter_search_criteria) to go back to in case of errors should be specified via the action input attribute.

Your app can have multple entry points. Each of these should be like the EntryAction example provided.

For actions that don't need input (hidden or visible), they should not have a form.

  • No labels