lukaszlenart opened a new pull request, #541:
URL: https://github.com/apache/struts-examples/pull/541

   ## Summary
   
   Fixes [WW-5416](https://issues.apache.org/jira/browse/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](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to