You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dale Newfield <Da...@Newfield.org> on 2007/11/15 19:04:30 UTC
Re: [struts] action and method separator using something
other than action!method
> Amit Rana wrote:
>> I have a url for login
>> <s:url id="loginurlid" namespace="/" action="login"
>> method="input"></s:url>
>>
>> This generates a url like http://localhost:8080/myapp/login!input.action
>>
>> Is there a way to tell s:url to use _ or / as separator and not !
In struts.xml you can define any name you want for your action, which is
really just an alias for an action class/method combination:
<action name="loginBecauseISaidSo" class="loginAction" method="input">
then the url can be generted by
<s:url id="loginurlid" namespace="" action="loginBecauseISaidSo"/>
with the resulting url (relative to your app) of /loginBecauseISaidSo.action
Basically, if you're specifying the method in s:url, then in my opinion
you're missing an action mapping in struts.xml.
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org