You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Aidan Monroe <km...@yahoo.com> on 2003/03/08 00:42:01 UTC

[newbie] Is This A Bad Approach?

Hello Everyone,

I am very new to Struts and wanted to get some
understanding of the <forward> tag in my struts-config
file.

Does anyone see any problem setting up my action
forwards like so:

<action path="Main" name="MainForm" type="MainAction"
scope="session">
    <forward name="success" path="Main.do">
</action>

as opposed to:

<action path="Main" name="MainForm" type="MainAction"
scope="session">
    <forward name="success" path="Main.jsp">
</action>


Notice that the only difference is the value of the
path attribute in the forward element.

What I have found is that if I set the path value to
the jsp then when I am forwarded there Struts will not
call the associated Action class. But if I change the
value to the action name, my Action class does get
invoked, which is what I want. I want my Action to get
invoked when I am forwarded there from another page.

I've been running with this setup all day and have had
no adverse affects that I can see, but all the
examples I've found have used the jsp as the value for
the forward's path. So I was wondering if what I am
doing is a bad idea.

Looking forward to your replies.

Thanks.

Aidan.

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org