Files
struts/plugins
Lukasz Lenart cf85c23204 WW-5688 fix(rest): resolve id-bearing URIs into the root namespace when declared (#1862)
RestActionMapper mapped a URI carrying an id into the default namespace while
mapping the same action without an id into "/". Since the configuration only
fails over from "/" to "" and never the other way round, an action declared in
a package with namespace="/" resolved for index but 404'd for show, update and
destroy.

DefaultActionMapper already handles this: WW-2461 added a rootAvailable check
in June 2008, three months before WW-2820 reported the REST symptom, but the
fix was never ported to the mapper the REST plugin had forked earlier. Port it,
keeping the ordering that computes the action name while the namespace is still
empty, since the name is relative to it.

The promotion only fires when a package explicitly declares namespace="/" and
nothing more specific matched. Convention derives "" or "/sub" and never "/",
so applications that do not opt in are unaffected, and because a "/" lookup
already falls back to "", the set of resolvable actions is a superset of the
previous one.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 11:19:20 +02:00
..

Struts 2 Plugins

A set of officially supported plugins which are provided with the framework, you can read more about them in the documentation.