can't use slashes in action name, they are always use for namespace
-------------------------------------------------------------------
Key: APF-1157
URL:
http://issues.appfuse.org/browse/APF-1157 Project: AppFuse
Issue Type: Bug
Environment: Struts2
Reporter: Frédéric Pillonel
Assignee: Matt Raible
Priority: Trivial
Hey,
Bug described and solved from Jun 2007 here :
http://www.mail-archive.com/users@.../msg05705.htmlWith Struts2, you can't use slashes in your action name even when <constant name="struts.enable.SlashesInActionNames" value="true"/> is defined by default with appfuse archetype (top of struts.xml). Anything before the last slash in your URL will be used for namespace.
Simply add <constant name="struts.mapper.alwaysSelectFullNamespace" value="false"/> in struts.xml and everything will be OK.
With that line added, the following configuration and an URL like "
http://localhost:8081/strutsTest-1.0-SNAPSHOT/gen/other/list.html " ...
Struts.xml config :
<package name="gen" extends="default" namespace="/gen">
<action name="*/*" class="{1}Action" method="{2}">
<result>/WEB-INF/pages/anything.jsp</result>
</action>
</package>
... will get map to the action called 'otherAction' and its method 'list', as the .html is my struts.action.extension, thus removed before wildcards are evaluated.
With the 'bug', struts was trying to map the url to a namespace of 'gen/other' instead of the expected 'gen', and an action name of 'list' instead of 'other/list'.
Is it possible to add <constant name="struts.mapper.alwaysSelectFullNamespace" value="false"/> in struts.xml by default ?
Thanks,
Fred.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.appfuse.org/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira---------------------------------------------------------------------
To unsubscribe, e-mail:
[hidden email]
For additional commands, e-mail:
[hidden email]