mirror of
https://github.com/apache/struts.git
synced 2026-09-11 00:29:40 +00:00
cf85c23204
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>
Struts 2 Plugins
A set of officially supported plugins which are provided with the framework, you can read more about them in the documentation.