Use to register an action forward or an action include 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.
In some exceptional scenarios, you do not need an action to execute, but you do want to redirect to a new JSP page. In these exceptional scenarios, you have two options:
Option | Description |
---|---|
Forward Action |
Specifies a bridge from the JSP page to another JSP page or an action. |
Include Action |
Specifies the same as a forwardaction, except that the JSP page or action is going to be included by another JSP page or action. |
Note: When you use the Add Forward/Include Action dialog box, the forward or include is an attribute, rather than an element. The attribute makes the mapping functionally equivalent to the element, however, the tag is shorter.
In the Add Forward/Include Action dialog box, you set the following properties:
Element | Description |
---|---|
Action Path |
Specifies the application context-relative path to the action. |
Action Type |
Sets the type of action. |
Forward Action |
Specifies a bridge from the JSP page to another JSP page or an action. |
Include Action |
Specifies the same as a forwardaction, except that the JSP page or action is going to be included by another JSP page or action. |
Call |
Sets the call made. |
Resource File |
Specifies the path to the JSP page that handles the action. |
Action |
Specifies the action that handles the forwardaction or includeaction. |
Note: If you want to change a registered forwardaction or includeaction, 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,
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0. |