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 Collings <jl...@gmail.com> on 2009/07/24 16:48:30 UTC

Is this how convention plugin mapping works?

User loads up a URL that calls an action named SomethingAction which
is an mostly empty action. It just sends em to the something.jsp page
by returning "success".  What if there is a something-success page?
Will the behavior change?

On the something.jsp page, the user submits a form that calls another
action. This one is called SomethingElseAction. It's not in a
different package so the url is simply "http://server/something-else".
 SomethingElseAction returns "input" which routes the user to a page
called something-else-input.

This sound right?

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


Re: Is this how convention plugin mapping works?

Posted by Dave Newton <ne...@yahoo.com>.
Jim Collings wrote:
> OK, so what you are saying then, is that if the my-action-success.jsp
> file exists, it will be the one selected and if it does not, then the
> myaction.jsp will be the one selected. So that if they both exist,
> then expect my-action-success.jsp to be the result.

Yes--it will default to using a view file with the result value 
appended, if one exists.

Dave

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


Re: Is this how convention plugin mapping works?

Posted by Jim Collings <jl...@gmail.com>.
Musachy Barroso wrote:
> yes, off the top of my head, which is *very* unreliable(specially on
> Fridays when I can only think of happy hour) :)

Indeed. ;-)


Jim C.


Re: Is this how convention plugin mapping works?

Posted by Musachy Barroso <mu...@gmail.com>.
yes, off the top of my head, which is *very* unreliable(specially on
Fridays when I can only think of happy hour) :)

musachy

On Fri, Jul 24, 2009 at 9:47 AM, Jim Collings<jl...@gmail.com> wrote:
> OK, so what you are saying then, is that if the my-action-success.jsp
> file exists, it will be the one selected and if it does not, then the
> myaction.jsp will be the one selected. So that if they both exist,
> then expect my-action-success.jsp to be the result.
>
>
> Jim C.
>
> On Fri, Jul 24, 2009 at 12:08 PM, Musachy Barroso<mu...@gmail.com> wrote:
>> yes that's how it works. for any action "MyAction", the "success"
>> result can be "my-action-success.jsp" or "my-action.jsp". For any
>> other result "x", the result is "my-action-x.jsp". (jsp is just an
>> example, it could be ftl or vm, etc)
>>
>> musachy
>>
>> On Fri, Jul 24, 2009 at 7:48 AM, Jim Collings<jl...@gmail.com> wrote:
>>> User loads up a URL that calls an action named SomethingAction which
>>> is an mostly empty action. It just sends em to the something.jsp page
>>> by returning "success".  What if there is a something-success page?
>>> Will the behavior change?
>>>
>>> On the something.jsp page, the user submits a form that calls another
>>> action. This one is called SomethingElseAction. It's not in a
>>> different package so the url is simply "http://server/something-else".
>>>  SomethingElseAction returns "input" which routes the user to a page
>>> called something-else-input.
>>>
>>> This sound right?
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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


Re: Is this how convention plugin mapping works?

Posted by Jim Collings <jl...@gmail.com>.
OK, so what you are saying then, is that if the my-action-success.jsp
file exists, it will be the one selected and if it does not, then the
myaction.jsp will be the one selected. So that if they both exist,
then expect my-action-success.jsp to be the result.


Jim C.

On Fri, Jul 24, 2009 at 12:08 PM, Musachy Barroso<mu...@gmail.com> wrote:
> yes that's how it works. for any action "MyAction", the "success"
> result can be "my-action-success.jsp" or "my-action.jsp". For any
> other result "x", the result is "my-action-x.jsp". (jsp is just an
> example, it could be ftl or vm, etc)
>
> musachy
>
> On Fri, Jul 24, 2009 at 7:48 AM, Jim Collings<jl...@gmail.com> wrote:
>> User loads up a URL that calls an action named SomethingAction which
>> is an mostly empty action. It just sends em to the something.jsp page
>> by returning "success".  What if there is a something-success page?
>> Will the behavior change?
>>
>> On the something.jsp page, the user submits a form that calls another
>> action. This one is called SomethingElseAction. It's not in a
>> different package so the url is simply "http://server/something-else".
>>  SomethingElseAction returns "input" which routes the user to a page
>> called something-else-input.
>>
>> This sound right?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: Is this how convention plugin mapping works?

Posted by Musachy Barroso <mu...@gmail.com>.
yes that's how it works. for any action "MyAction", the "success"
result can be "my-action-success.jsp" or "my-action.jsp". For any
other result "x", the result is "my-action-x.jsp". (jsp is just an
example, it could be ftl or vm, etc)

musachy

On Fri, Jul 24, 2009 at 7:48 AM, Jim Collings<jl...@gmail.com> wrote:
> User loads up a URL that calls an action named SomethingAction which
> is an mostly empty action. It just sends em to the something.jsp page
> by returning "success".  What if there is a something-success page?
> Will the behavior change?
>
> On the something.jsp page, the user submits a form that calls another
> action. This one is called SomethingElseAction. It's not in a
> different package so the url is simply "http://server/something-else".
>  SomethingElseAction returns "input" which routes the user to a page
> called something-else-input.
>
> This sound right?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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