You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jim Crossley <jc...@ifleet.com> on 2001/04/18 21:56:04 UTC
Actions forwarding to Actions
I think I found a bug or, as Larry Wall might say, it would be difficult
to interpret it as a feature. :-)
I have an Action that occasionally needs to forward its request to
another Action. So the <forward> element in its corresponding <action>
element has a path with a suffix of "do" instead of "jsp". The
associated form bean classes for each action's form have a "name"
property, though this is purely coincidental. They have no real
relationship.
Oddly enough, when Action X forwards to Action Y, the name property for
Y's form bean is initialized to the name from X's form bean! Is this a
bug?
Thanks.
Re: Actions forwarding to Actions
Posted by Jim Crossley <jc...@ifleet.com>.
Forgive me for replying to myself, but I think I may have figured out
what's going on: the second bean is not populated from the first bean
as I mistakenly assumed -- it's populated from the request! So, just as
the first bean got its name from the request parameter, the second get
its name from there, too.
Jim Crossley wrote:
>
> I think I found a bug or, as Larry Wall might say, it would be difficult
> to interpret it as a feature. :-)
>
> I have an Action that occasionally needs to forward its request to
> another Action. So the <forward> element in its corresponding <action>
> element has a path with a suffix of "do" instead of "jsp". The
> associated form bean classes for each action's form have a "name"
> property, though this is purely coincidental. They have no real
> relationship.
>
> Oddly enough, when Action X forwards to Action Y, the name property for
> Y's form bean is initialized to the name from X's form bean! Is this a
> bug?
>
> Thanks.
Re: Actions forwarding to Actions
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Wed, 18 Apr 2001, Jim Crossley wrote:
> I think I found a bug or, as Larry Wall might say, it would be difficult
> to interpret it as a feature. :-)
>
> I have an Action that occasionally needs to forward its request to
> another Action. So the <forward> element in its corresponding <action>
> element has a path with a suffix of "do" instead of "jsp". The
> associated form bean classes for each action's form have a "name"
> property, though this is purely coincidental. They have no real
> relationship.
>
> Oddly enough, when Action X forwards to Action Y, the name property for
> Y's form bean is initialized to the name from X's form bean! Is this a
> bug?
>
Or maybe an "unintended coincidence?" :-)
If you could create a small test case that demonstrates this, it would
make a very useful attachment to a bug report, which you would submit to:
http://nagoya.apache.org/bugzilla/
under product category "Struts".
> Thanks.
>
Craig