Professional Documents
Culture Documents
Here in this example you will learn more about Struts Forward Action that will help you
in grasping the concept better.
Create seperate action-mapping , for each page you want to link.. Note that the "type"
attribute always take "org.apache.struts.actions.ForwardAction" value. Here
"parameter" attribute specifies the URL to which the request is forwarded .
<action
path="/success"
type="org.apache.struts.actions.ForwardAction"
parameter="/pages/Success.jsp"
input="/pages/ForwardAction.jsp"
scope="request"
validate="false">
</action>
<li>
<html:link page="/pages/ForwardAction.jsp">Struts Forward Action</html:link>
<br>
Example shows you how to use forward class to forward request to another JSP page.
</li>
To build and deploy the application go to Struts\Strutstutorial directory and type ant on
the command prompt. This will deploy the application. Open the browser and navigate to
the ForwardAction.jsp page. Your browser will display the following ForwardAction
page.
Selecting Call the Success page displays the following Success.jsp page