You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Don Brown (JIRA)" <ji...@apache.org> on 2006/07/18 06:56:22 UTC

[jira] Created: (WW-1383) Support action names with slashes

Support action names with slashes
---------------------------------

                 Key: WW-1383
                 URL: http://issues.apache.org/struts/browse/WW-1383
             Project: Struts 2
          Issue Type: Improvement
          Components: Configuration
            Reporter: Don Brown
         Assigned To: Don Brown
             Fix For: 2.0.0


To better support ReST-style wildcard schemes ("/article/123/view"), the default action mapper should support action names that contain slashes.  To do this, instead of assuming everything before the last slash is the namespace, the configured namespaces should be iterated over and explicitly matched.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1383) Support action names with slashes

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1383?page=comments#action_38515 ] 
            
Don Brown commented on WW-1383:
-------------------------------

Yeah, I think that deserves more thought.  If you come up with something, put out a proposal on dev@  Even if we don't change anything, it is worthwhile, IMO, to raise the issue and start the discussion.

> Support action names with slashes
> ---------------------------------
>
>                 Key: WW-1383
>                 URL: http://issues.apache.org/struts/browse/WW-1383
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Configuration
>            Reporter: Don Brown
>         Assigned To: Don Brown
>             Fix For: 2.0.0
>
>
> To better support ReST-style wildcard schemes ("/article/123/view"), the default action mapper should support action names that contain slashes.  To do this, instead of assuming everything before the last slash is the namespace, the configured namespaces should be iterated over and explicitly matched.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1383) Support action names with slashes

Posted by "tm_jee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1383?page=comments#action_38510 ] 
            
tm_jee commented on WW-1383:
----------------------------

Hi Don,

What do you think about having a different action mapper that allows slashes as action name, and allow switching by switching action mapper? This way we could avoid having the struts.properties.

rgds

> Support action names with slashes
> ---------------------------------
>
>                 Key: WW-1383
>                 URL: http://issues.apache.org/struts/browse/WW-1383
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Configuration
>            Reporter: Don Brown
>         Assigned To: Don Brown
>             Fix For: 2.0.0
>
>
> To better support ReST-style wildcard schemes ("/article/123/view"), the default action mapper should support action names that contain slashes.  To do this, instead of assuming everything before the last slash is the namespace, the configured namespaces should be iterated over and explicitly matched.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1383) Support action names with slashes

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1383?page=comments#action_38511 ] 
            
Don Brown commented on WW-1383:
-------------------------------

Well, you'd still need to modify struts.properties to switch over to the new action mapper.  Besides, I'm not sure how I feel about a ton of different ActionMappers, each with small features that separate them.  We did that with ActionForms in Struts and that didn't turn out too well.

> Support action names with slashes
> ---------------------------------
>
>                 Key: WW-1383
>                 URL: http://issues.apache.org/struts/browse/WW-1383
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Configuration
>            Reporter: Don Brown
>         Assigned To: Don Brown
>             Fix For: 2.0.0
>
>
> To better support ReST-style wildcard schemes ("/article/123/view"), the default action mapper should support action names that contain slashes.  To do this, instead of assuming everything before the last slash is the namespace, the configured namespaces should be iterated over and explicitly matched.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1383) Support action names with slashes

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1383?page=comments#action_38504 ] 
            
Don Brown commented on WW-1383:
-------------------------------

This fix broke the expected behavior of actions in the default namespace being allowed to be called from any path prefix.  For example, in our showcase, we have an action name of "AjaxRemoteForm" in the default namespace (""), and it needs to be called, among other places, from "/ajax/remoteforms/AjaxRemoteForm".  This capability of calling actions from any path prefix in the default namespace stretches back to WebWork 1 and is a somewhat frequently-used feature.

Therefore, I added a new struts.properties setting, struts.enable.SlashesInActionNames, which, well, enables slashes in action names, but by doing so, you lose the ability to call actions in the default namespace from any path prefix.  Therefore, the default value will be "false".  If you want to enable slashes in the action names, it is probably because you use wildcards frequently, in which case, you can simulate this feature by putting "**/" in the start of your action name.  Therefore, to fix the above, the action name would be "**/AjaxRemoteForm", so now, that action could be called from anywhere.

I think we should make the default setting to "false" to make WebWork 2 migrations easier, but perhaps for Struts 2.1 we'll default to "true".

> Support action names with slashes
> ---------------------------------
>
>                 Key: WW-1383
>                 URL: http://issues.apache.org/struts/browse/WW-1383
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Configuration
>            Reporter: Don Brown
>         Assigned To: Don Brown
>             Fix For: 2.0.0
>
>
> To better support ReST-style wildcard schemes ("/article/123/view"), the default action mapper should support action names that contain slashes.  To do this, instead of assuming everything before the last slash is the namespace, the configured namespaces should be iterated over and explicitly matched.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1383) Support action names with slashes

Posted by "tm_jee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1383?page=comments#action_38513 ] 
            
tm_jee commented on WW-1383:
----------------------------

I see. I guess if it didn't work out in Struts1, we probably shouldn't try it with Struts2 then.

> Support action names with slashes
> ---------------------------------
>
>                 Key: WW-1383
>                 URL: http://issues.apache.org/struts/browse/WW-1383
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Configuration
>            Reporter: Don Brown
>         Assigned To: Don Brown
>             Fix For: 2.0.0
>
>
> To better support ReST-style wildcard schemes ("/article/123/view"), the default action mapper should support action names that contain slashes.  To do this, instead of assuming everything before the last slash is the namespace, the configured namespaces should be iterated over and explicitly matched.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (WW-1383) Support action names with slashes

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/WW-1383?page=all ]

Don Brown resolved WW-1383.
---------------------------

    Resolution: Fixed

Fixed in svn.  The fix involved modifying the ActionMapper interface to support the passing in of Configuration instances.

> Support action names with slashes
> ---------------------------------
>
>                 Key: WW-1383
>                 URL: http://issues.apache.org/struts/browse/WW-1383
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Configuration
>            Reporter: Don Brown
>         Assigned To: Don Brown
>             Fix For: 2.0.0
>
>
> To better support ReST-style wildcard schemes ("/article/123/view"), the default action mapper should support action names that contain slashes.  To do this, instead of assuming everything before the last slash is the namespace, the configured namespaces should be iterated over and explicitly matched.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1383) Support action names with slashes

Posted by "tm_jee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1383?page=comments#action_38514 ] 
            
tm_jee commented on WW-1383:
----------------------------

Got another random thought Don, 

What do you think about the concept of a Composite action mapper, that would somehow allows multiple action mapper, and somehow selecting one

Form first thought, it would complicate the action mapper configuration, not sure if this is a good sign.

> Support action names with slashes
> ---------------------------------
>
>                 Key: WW-1383
>                 URL: http://issues.apache.org/struts/browse/WW-1383
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Configuration
>            Reporter: Don Brown
>         Assigned To: Don Brown
>             Fix For: 2.0.0
>
>
> To better support ReST-style wildcard schemes ("/article/123/view"), the default action mapper should support action names that contain slashes.  To do this, instead of assuming everything before the last slash is the namespace, the configured namespaces should be iterated over and explicitly matched.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira