Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

path attribute of forward tag in struts-config.xml file

Tags:

struts

<action-mappings>
        <action name="loginAction" path="/loginAction"
            type="com.xx.yy.actions.LoginAction" scope="request"
            validate="false">
            <forward name="landingPage" path="landingpage" />
            <forward name="error" path="errorpage" />
        </action>

        <action name="admin" path="/adminAction"
            type="com.xx.yy.actions.AdminHome" scope="request"
            validate="true" input="/jsp/login.jsp">
            <forward name="success" path="/jsp/admin/admin.jsp" />
            <forward name="failure" path="/jsp/admin/admin.jsp" />
        </action>
</action-mappings>

In the above code path attribute of forward tag is landingpage for action loginAction . So in this case control takes to which page or action?In this context what is landingpage?Is it a jsp or another action?

In admin action path attribute of forward tags are jsps so its clear that control will be directed to jsp depending on logic in action class.

like image 681
hasha Avatar asked Nov 11 '22 18:11

hasha


1 Answers

In that line...

<forward name="landingPage" path="landingpage" /> 

...the path attribute may be an Apache Tiles configuration name.

like image 144
Aaron Kurtzhals Avatar answered Jan 03 '23 09:01

Aaron Kurtzhals