You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mike Campbell <ug...@unixgeek.com> on 2001/02/08 00:21:02 UTC

Re: Forwarding to the same page

>>>>> "MC" == Martin Cooper <ma...@tumbleweed.com> writes:

MC> You can call mapping.getInput() in your Action class. This will
MC> get you the URI that provided your input, and is what Struts uses
MC> to send you back to your input form if the ActionForm validation
MC> fails.

Doesn't getInput() return what struts-config.xml has in the
"...input=..." part of the <action ...> section?  Or have I
misunderstood that?

Re: Forwarding to the same page

Posted by Martin Cooper <ma...@tumbleweed.com>.
Yes, you are correct, that's where it comes from. It's true that there's no
guarantee that this is where you really came from, but it is where you'll go
back to if your validation fails, and in the vast majority of cases, I would
guess, you want to go back to where you came from to show the errors. ;-)

--
Martin Cooper
Tumbleweed Communications


----- Original Message -----
From: "Mike Campbell" <ug...@unixgeek.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, February 07, 2001 3:21 PM
Subject: Re: Forwarding to the same page


> >>>>> "MC" == Martin Cooper <ma...@tumbleweed.com> writes:
>
> MC> You can call mapping.getInput() in your Action class. This will
> MC> get you the URI that provided your input, and is what Struts uses
> MC> to send you back to your input form if the ActionForm validation
> MC> fails.
>
> Doesn't getInput() return what struts-config.xml has in the
> "...input=..." part of the <action ...> section?  Or have I
> misunderstood that?