Use to register an action forward in the struts-config.xml
file.
A Struts action responds to a request. Writing an action means subclassing one of the Action classes and then overriding the class's execute method. Use the New Struts Action wizard for this purpose.
An action forward is an output view. For example, an action forward can forward to an output view called success. In the struts-config.xml
file, you specify this name, together with the action or the path to the resource file that provides the view.
In the Add Forward dialog box, you set the following properties:
Element | Description |
---|---|
Forward Name |
Specifies the name of the forward. |
Forward To |
Sets the action and the JSP page. |
Resource File |
Specifies the path to the JSP page that handles the action. |
Action |
Specifies the action that handles the forwardaction or includeaction. |
Redirect |
Prevents a page reload which, in turn, prevents form values from being resubmitted to an application. |
Location |
Sets the action and whether the forward is applicable to all. |
Global |
Specifies that the forward applies to all actions. |
Action |
Specifies the specific action to which the forward applies. |
Note: If you want to change a registered forward, you can do so by manually editing the XML tags in the struts-config.xml
file.
Related Topics
Developing Applications with NetBeans IDE,
Developing Applications with NetBeans IDE,
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |