on Wednesday, July 23, 2008 3:22 AM, Lyallex [mailto:[EMAIL PROTECTED]
wrote:
> <package name="estab" extends="struts-default">
>
<snip/>
>
> <a href="<s:url
> action="some/random/path/passThroughToNewEstablishment"/>">Create New
> Establishment</a>
> (absolutely no idea why this works)


I seem to remember that there is a difference between
<package name="estab" extends="struts-default">

and 

<package name="estab" extends="struts-default" namespace="/">

If the namespace is omitted, S2 puts it in the "default namespace" [1]
which basically allows any url to match the actions defined there, so
long as the action names. So
/passThroughToNewEstablishment.action
would work, but so would
/some/random/path/passThroughToNewEstablishment.action

Explicitly adding the namespace="/" defines an explicit namespace. So
/some/random/path/passThroughToNewEstablishment.action
would fail, but 
/passThroughToNewEstablishment.action
would work.

[1] see
http://struts.apache.org/2.0.11.2/docs/namespace-configuration.html#Name
spaceConfiguration-DefaultNamespace
or "Struts 2 in Action", page 49, about half way down (the paragraph
under the NOTE).

Brad Cupit
Louisiana State University - UIS

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

Reply via email to