Alfred’s Computing Weblog

Alfred Java-cored Computing Weblog

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>

Written by Alfred

June 19, 2009 at 15:28

Posted in Struts1

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: