Adding Global and Local Forwards to a Struts Configuration

Struts allows forwards to be added to a Struts configuration as aliases for your JSP pages and other presentation elements. Forwards can be added to the global Struts configuration or locally to an action element within the Struts configuration.

Inserting a forward using the Struts configuration form editor

  1. Open a Struts Configuration file using the Project Explorer.
  2. In the Struts Config view of the Struts configuration form editor, you will see the list of Struts artifacts including the current list of Global Forwards. You can expand this list by clicking the plus sign (+) if it is collapsed.
  3. Right-click the Global Forwards node and select New Forward.
  4. Enter forward properties and the forward path through the resulting Forward Tag dialog.
  5. Click OK to insert the forward into the opened Struts configuration file. The new forward will appear under the list of Global Forwards and can be modified by selecting the specific forward and updating the forward properties.
  6. Note: Using this technique will insert a global forward by default. A local forward will only be inserted by right-clicking an action under the list of Action Mappings and selecting New Forward.

Inserting a forward from the Struts outline view

  1. To insert a global forward from the Struts outline view

  2. To insert a local forward from the Struts outline view

Inserting a forward from the Struts navigation editor

  1. To insert a local forward from the Navigation pane


Still need help? Post a question on the Workshop newsgroup.