Alfred’s Computing Weblog

Alfred Java-cored Computing Weblog

Posts Tagged ‘ForwardAction

Struts1 | Forward Page

leave a comment »

This is a simple and quick solution to forward / go to a page in struts1.

In normal case, we have to call to a class extending ActionForm before you’re going to the next JSP page. For cases that you do not need any action to perform before you reach that JSP, you can call the class org.apache.struts.actions.ForwardAction. So that, you only have to prepare the JSP file and do the configuration in struts-config.xml as below.

<action-mappings>
    ....
    <action path="/ForwardLogin"
        parameter="/WEB-INF/pages/login/login.jsp"
        type="org.apache.struts.actions.ForwardAction"
        scope="request"
        validate="false"/>
    ....
<action-mappings>
Advertisements

Written by Alfred

June 19, 2009 at 15:28

Posted in Struts1

Tagged with ,