You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eugen Stoianovici <eu...@gmail.com> on 2007/08/16 12:37:41 UTC

action mappings help

I'm using struts 2.0.9.
Where do i read about action mappings and how to configure them?
Is there any detailed documentation? Right now i'm doing something like 
this...but i don't really know why i need the result name="input" tag 
and couldn't find any info about it on my own:
        <action name="prepvendor" class="addPoAction"
            method="prepVendor">
            <result>/popages/selvendor.jsp</result>
            <result name="input">/popages/selvendor.jsp</result>
        </action>


thanks

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


Re: action mappings help

Posted by Eugen Stoianovici <eu...@gmail.com>.
Laurie Harper wrote:
> Eugen Stoianovici wrote:
>> I'm using struts 2.0.9.
>> Where do i read about action mappings and how to configure them?
>
> In the Struts2 documentation of course ;-) These pointers may help:
>
> http://struts.apache.org/2.x/docs/action-configuration.html
> http://struts.apache.org/2.x/docs/result-types.html
>
>> Is there any detailed documentation? Right now i'm doing something 
>> like this...but i don't really know why i need the result 
>> name="input" tag and couldn't find any info about it on my own:
>>        <action name="prepvendor" class="addPoAction"
>>            method="prepVendor">
>>            <result>/popages/selvendor.jsp</result>
>>            <result name="input">/popages/selvendor.jsp</result>
>>        </action>
>
> You need a result named 'input' in at least the following situations:
>
> * you return 'input' as the result from your action method ;-)
>
> * you're using validation and validation fails; Struts will 
> automatically forward to the 'input' result so the user can correct 
> the data they entered and re-submit
>
> * the same may also be true for conversion errors
>
> In general, for an action mapping that is going to retrieve data or 
> just display a page or form, you don't need an input result, and when 
> you do use an input result it should generally be pointing at such a 
> mapping.
>
> L.
Thanks

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


Re: action mappings help

Posted by Laurie Harper <la...@holoweb.net>.
Eugen Stoianovici wrote:
> I'm using struts 2.0.9.
> Where do i read about action mappings and how to configure them?

In the Struts2 documentation of course ;-) These pointers may help:

http://struts.apache.org/2.x/docs/action-configuration.html
http://struts.apache.org/2.x/docs/result-types.html

> Is there any detailed documentation? Right now i'm doing something like 
> this...but i don't really know why i need the result name="input" tag 
> and couldn't find any info about it on my own:
>        <action name="prepvendor" class="addPoAction"
>            method="prepVendor">
>            <result>/popages/selvendor.jsp</result>
>            <result name="input">/popages/selvendor.jsp</result>
>        </action>

You need a result named 'input' in at least the following situations:

* you return 'input' as the result from your action method ;-)

* you're using validation and validation fails; Struts will 
automatically forward to the 'input' result so the user can correct the 
data they entered and re-submit

* the same may also be true for conversion errors

In general, for an action mapping that is going to retrieve data or just 
display a page or form, you don't need an input result, and when you do 
use an input result it should generally be pointing at such a mapping.

L.


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