You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mark Menard <ma...@mjm.net> on 2006/12/01 00:31:06 UTC
Re: struts 2 newbie question
On 11/30/06 4:40 PM, "walidito" <wa...@sgcib.com> wrote:
Quick caveat, I haven't used the methodology, but I might start now.
> and I don't understand this stuff :
> in struts.xml
> <action name="Login_*" method="{1}" class="tutorial.Login">
> the tutorial says :
> The "method={1}" attribute is replaced with "method=input".
> Why ? Can someone explain me why it is replaced by this particular method,
> and give me another simple example if possible.
Right above that notice that the <s:url> tag changed from:
<s:url action="Login"/>
To:
<s:url action="Login_input"/>
I think that this taken together with the action mapping:
<action name="Login_*" method="{1}" class="tutorial.Login">
Will result in the "input" being stripped off the end of "Login_input" and
being put into {1}. I think that's what the "Login_*" basically says in the
action mapping, "Login_" is the base, and everything that matches "*"
becomes {1}.
That's pretty slick. I didn't know about this. I think I might start using
it.
Take care,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org