You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Drew Kutcharian (JIRA)" <ji...@apache.org> on 2007/04/19 05:46:43 UTC

[jira] Commented: (WW-1706) Restful2ActionMapper does not set parameters/ActionName correctly

    [ https://issues.apache.org/struts/browse/WW-1706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40843 ] 

Drew Kutcharian commented on WW-1706:
-------------------------------------

I dont think this is a bug. I think it's working right. According to REST, the last part of the the URI should be the resource.
So this works to spec:

http://domain.com/param1/value1/param2/value2/action

for example:

http://domain.com/products/books/category/novels/book/LearnJava

That's more like how Ruby + Rails works.

Just my 2 cents.

> Restful2ActionMapper does not set parameters/ActionName correctly
> -----------------------------------------------------------------
>
>                 Key: WW-1706
>                 URL: https://issues.apache.org/struts/browse/WW-1706
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Dispatch
>    Affects Versions: 2.0.6
>            Reporter: Philip Lorenz
>             Fix For: 2.0.8
>
>
> Restful2ActionMapper does not seem to treat REST URLs correctly.
> Replacing
> String params = actionName.substring(0, actionSlashPos);
> at line 146 (Restful2ActionMapper.java) with
> String params = actionName.substring(actionSlashPos + 1);
> and
> mapping.setName(actionName.substring(actionSlashPos+1));
> at line 177 with
> mapping.setName(actionName.substring(0, actionSlashPos));
> will perform the expected behaviour of setting the ActionName to view and setting the parameter uploadId to 5 for the following URL (view/uploadId/5).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.