History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-1046
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: tm_jee
Reporter: Grégory Joseph
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WebWork

DefaultActionMapper ignores the root ("/") namespace

Created: 23/Dec/05 03:54 AM   Updated: 25/Dec/05 03:23 AM
Component/s: Dispatch
Affects Version/s: 2.2
Fix Version/s: 2.2

Issue Links:
Related
This issue relates to:
XW-264 Namespace="/" Major Resolved
 


 Description  « Hide
As discussed on http://forums.opensymphony.com/thread.jspa?threadID=12138 :

I was expecting that configuring a package with namespace="/" would allow me to have actions in the "root" namespace i.e
http://my-host/myApp/foo.action (without having that foo action available in *other* namespaces, as would be the case if i'd use namespace="").

From what I see, my action is correctly set up in DefaultConfiguration's namespaceActionConfigs map, however DefaultActionMapper ignores the leading /




 All   Comments   Change History      Sort Order:
tm_jee - [25/Dec/05 03:16 AM ]
added the following bits into DefaultActionMapper. include DefaultActionMapperTest as well.

void parseNameAndNamespace(String uri, ActionMapping mapping) {
        .....
        if (lastSlash == -1) {
             .....
        } else if (lastSlash == 0) {
                // ww-1046, assume it is the root namespace, it will fallback to default
         // namespace anyway if not found in root namespace.
         namespace = "/";
         name = uri.substring(lastSlash + 1);
        } else {
             ...
        }
       ......
}