Thanks, Don!

Is this documented anywhere, because I couldn't find anything...

Back to work!

EC

On 1/24/07, Don Brown <[EMAIL PROTECTED]> wrote:

The wildcard character will optionally swallow the previous character
so login_* will be matched by login and login_app.  This change from
Struts 1 was done in order to better align with the "action!method"
notation of WebWork 2/Struts 2.

Don

On 1/24/07, Elie Ciment <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am following along the tutorials online getting started with Struts2.
I am
> loving it, but I noticed something bazaar and was wondering what anyone
has
> to say about it.
>
> When you have an action
>
> <action name="Login" ....>
>
> and you add an underscore or ! followed by an asterisk (*), to make it
>
> <action name="Login_*" ...> or <action name="Login!*" ...>
>
> then when you reference the url http://localhost:8080/myapp/Login.action-
> why does the action Login_* get called? I would think that the
underscore is
> now needed in order to call this action!
>
> Basically, now LoginXyz.action does not work, yet Login.action does - as
> does Login_xyz.action (which is the only one that makes sense to me).
So,
> does the special character have any special teatment? If so, which
> characters are teated specially aside from the ! and _ characters, and
is
> this documented anywhere?
>
> Thanks for your help,
> EC
>
>
> -- The particular case was first brought to attention in the validation
> section of the tutorial (
> http://struts.apache.org/2.x/docs/validating-input.html). It was
suggested
> that if you do not wish to validate before there was any user input, add
a
> wildcard (*) after a special character to the action ("_" in the
article,
> but in my downloaded source for the blank struts2 app it was the "!").
That
> would make it Login_* (or Login!*).
>
> Whether I go to the Login.action or the Login_any-
action-but-input.action it
> works and validates, returning back to the page with the validation
comment
> (xyz is required etc). The question struck me: why does it work for
> Login.action!!?? Thanks, again.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to