You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Benedict, Paul C" <pa...@merck.com> on 2005/05/11 19:06:24 UTC

Input Page Enhancement?

>From all this discussion, something occurred to me:

I think someone should submit an enhancement for Struts 1.2.8/1.3, so that
we can define the input page as an action forward/redirect:

    <action path="/test" type="com.company.someClass">
        <forward name="input" path="/letsGoHere.do" redirect="true" />
        <forward name="success" path="page.success" />
    </action>

After talking with Michael, this solution would solve one of the
input/output problems that need to be addressed: greater control over the
error page. By having the "input" be a reserved forward, developers could
also say it is a redirect.

Can someone investigate the impact of modifying the getInputForward method?

Thanks,
Paul



------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message.  If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
------------------------------------------------------------------------------

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


Re: Input Page Enhancement?

Posted by Michael Jouravlev <jm...@gmail.com>.
Actually, you can make it redirect, but this affects the whole
application, since you need to make change in <controller> element:
<controller inputForward="true"/> Then you will need to refer a
<forward> element in your "input" property:
    <action ... input = "itemError">
       ...
       <forward name="itemError" path="/displayError.do" redirect="true"/>
    </action>

Because this involves a regular <forward> element anyway, I think that
"input" in its current state does not make much sense. We can simply
have a designated <forward> for input errors, with predefened mapping
name, like ERROR_INPUT:

    <action>
       ...
       <forward name="ERROR_INPUT" path="/displayError.do" redirect="true"/>
    </action>

This will also allow to have several error handlers, with names
starting on "ERROR_" or something. Just a thought.

Michael.

On 5/11/05, Benedict, Paul C <pa...@merck.com> wrote:
> From all this discussion, something occurred to me:
> 
> I think someone should submit an enhancement for Struts 1.2.8/1.3, so that
> we can define the input page as an action forward/redirect:
> 
>     <action path="/test" type="com.company.someClass">
>         <forward name="input" path="/letsGoHere.do" redirect="true" />
>         <forward name="success" path="page.success" />
>     </action>
> 
> After talking with Michael, this solution would solve one of the
> input/output problems that need to be addressed: greater control over the
> error page. By having the "input" be a reserved forward, developers could
> also say it is a redirect.
> 
> Can someone investigate the impact of modifying the getInputForward method?
> 
> Thanks,
> Paul

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