Skip to content

WW-5416 fix: restore default struts.action.extension in examples#541

Merged
lukaszlenart merged 5 commits into
mainfrom
fix/WW-5416-action-extension-404
Jul 23, 2026
Merged

WW-5416 fix: restore default struts.action.extension in examples#541
lukaszlenart merged 5 commits into
mainfrom
fix/WW-5416-action-extension-404

Conversation

@lukaszlenart

Copy link
Copy Markdown
Member

Summary

Fixes WW-5416: the helloworld example returns a 404 when following the documented instructions (http://localhost:8080/helloworld/index.action).

The root cause is a struts.action.extension override that removes the .action extension from the allowed set. The framework default is action,, (accepts both .action and extensionless URLs); overriding it to , (or "") drops .action, so the documented URLs 404. In-app navigation uses Struts URL/form tags that respect the configured extension, which is why the bug is invisible until a user types the documented .action URL directly.

The fix deletes the one overriding <constant> line, restoring the default. This is strictly additive — extensionless URLs keep working, and .action URLs now resolve.

Changes

Removed the struts.action.extension override in three modules that shared this latent bug:

  • helloworld/src/main/resources/struts.xml — was , (the reported ticket)
  • text-provider/src/main/resources/struts.xml — was ,
  • sitemesh3/src/main/resources/struts.xml — was "" (unmapped .action requests silently fell through to the index action via default-action-ref)

Intentionally left untouched: rest-angular (,,xml,json,action) and mailreader2 (do) — those overrides are part of what each example demonstrates.

Verification

  • Full reactor ./mvnw clean package (with tests) → BUILD SUCCESS.
  • Each of the three modules verified via mvn jetty:run + curl: .action URLs return 200 post-fix, and extensionless URLs still return 200. For sitemesh3, confirmed hello.action now routes to HelloAction (not the index fallback) with SiteMesh decoration intact.

🤖 Generated with Claude Code

lukaszlenart and others added 5 commits July 23, 2026 20:30
Design doc for restoring the framework-default struts.action.extension
in helloworld, text-provider, and sitemesh3 so documented .action URLs
no longer return 404.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Task-by-task plan to remove the struts.action.extension override in
helloworld, text-provider, and sitemesh3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Removing the ',' override restores the framework default 'action,,' so
the documented .action URLs return 200 instead of 404.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Removing the ',' override restores the framework default 'action,,' so
.action URLs no longer 404.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Removing the empty-string override restores the framework default
'action,,' so .action URLs no longer 404.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lukaszlenart
lukaszlenart merged commit 49db228 into main Jul 23, 2026
2 checks passed
@lukaszlenart
lukaszlenart deleted the fix/WW-5416-action-extension-404 branch July 23, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant