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/10/28 08:09:57 UTC
[jira] Commented: (WW-1383) Support action names with slashes
[ 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