struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Williams <>
Subject Namespace URL confusion
Date Sat, 24 May 2014 14:03:22 GMT
I have been using struts 2.1.8 for a while and last night noticed an issue with mapping actions
working with any url.

For instance in the struts.xml file:
- I have a package with a namespace of "/employee".
- Within the package, I have an action mapping "search"

- The webapp name is "TestWeb".

So to access this page, I can go to: http://localhost:8080/TestWeb/employee/search.action
and this works.
However, if anything is added to the URL after the namespace such as: http://localhost:8080/TestWeb/employee/someExtraText/search.action
the page still loads.

Why does this happen? 

Reading the struts documentation (
would make me assume that it should search the "/employee/someExtraText" namespace...not find
it, so then it should fall back to the default "" namespace...not find it...then display no
action mapping found.

Any insight? Thanks!
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message