WW-5416 fix: restore default struts.action.extension in examples#541
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.extensionoverride that removes the.actionextension from the allowed set. The framework default isaction,,(accepts both.actionand 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.actionURL directly.The fix deletes the one overriding
<constant>line, restoring the default. This is strictly additive — extensionless URLs keep working, and.actionURLs now resolve.Changes
Removed the
struts.action.extensionoverride 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.actionrequests silently fell through to the index action viadefault-action-ref)Intentionally left untouched:
rest-angular(,,xml,json,action) andmailreader2(do) — those overrides are part of what each example demonstrates.Verification
./mvnw clean package(with tests) → BUILD SUCCESS.mvn jetty:run+ curl:.actionURLs return 200 post-fix, and extensionless URLs still return 200. For sitemesh3, confirmedhello.actionnow routes toHelloAction(not the index fallback) with SiteMesh decoration intact.🤖 Generated with Claude Code