struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <>
Subject Re: Action path prefix rules?
Date Fri, 14 Aug 2020 15:27:36 GMT
pt., 14 sie 2020 o 10:48 Heikki Hyyrö <> napisał(a):
> I am a bit confused about the rules concerning mapping URL paths to
> actions. Let's say that I have a Struts application running at
> with the app name "myApp". Then the usual path to access a
> Struts action named "foo" would presumably be
> Now, it seems to be also possible to access the foo-action even by
> adding a more or less arbitrary path prefix before the app name. E.g.
> also both
> seem to access foo. I am wondering where the rules that allow this are
> defined? What would be the relevant documentation to look into?
> As a specifid question, I wonder about links. If the foo-page contains
> e.g. a link created with the url-tag, such as
> <s:url action="bar" var="barUrl">
>    <s:param name="par" value="#something" />
> </s:url>
> <s:a href="%{viewCourseUrl}">
>    Link to bar-action
> </s:a>
> the link does not include any "extra" path prefix and always points to
> I am wondering why this happens? And what
> if I actually would want the link to reflect the actual access URL,
> including any "extra" path prefix (e.g. the link might point to
> Is this possible?

I think here [1] is a piece of the code you are looking for, if an
action cannot be found in the provided namespace, fallback to the root
namespace is done (if available). I'm not sure if this is documented
or not, feel free to create a ticket in JIRA. Maybe we should also add
a logging statement there.


+ 48 606 323 122

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message