Hi thanks for the prompt reply. I have tried it with the following in my
struts.xml file

<constant name="struts.enable.SlashesInActionNames" value="true"/>

but that did not chnage anything I am still getting the same values. Which
way do you recommend using the annotation with the namespace annotation or
only the action annotation. 



Wes Wannemacher wrote:
> 
> Make sure you have slashes in action names enabled -
> 
> <constant name="struts.enable.SlashesInActionNames" value="true"/>
> 
> -Wes
> 
> On Fri, Sep 25, 2009 at 10:22 AM, struts-restful <fshou...@ufi.com> wrote:
>>
>> I am trying to override the restful URI using the action annotation as
>> described in the convention plugin doc
>>
>> http://struts.apache.org/2.x/docs/convention-plugin.html#conventionplugin-apply...@actionand@Actionsattheclasslevel
>>
>> According to the docs I can use the following annotation on my method
>>
>> @Action("abc/test.xml")
>> public String test() {
>> }
>>
>> I have a namespace annotation for the action as such
>>
>> @Namespace("/struts/testing")
>>
>> When I type in the url
>>
>> http://localhost:8080/webContext/struts/testing/abc/test.xml?id=2&test=hello
>>
>> I get a unknown location error. I debugged the RestActionProxyFactory and
>> it
>> has the following values
>>
>> namespace = /struts/testing
>> actionName = abc
>> methodName = show
>>
>> What I am trying to achieve is that this url
>> http://localhost:8080/webContext/struts/testing/abc/test.xml?id=2&test=hello
>> will go to my action method test and will set the parameters id and test
>> on
>> the action before calling the method
>>
>> Can anyone advise on how to do this. I have also tried without using the
>> namespace annotation and only a action annotation as such
>>
>> @Action("/struts/testing/abc/test.xml")
>>
>> In this case when debugging the RestActionProxyFactory after submitting
>> the
>> URL
>> http://localhost:8080/webContext/struts/testing/abc/test.xml?id=2&test=hello
>> I see the following values
>>
>> namespace = /struts/testing/abc
>> actionName = test
>> methodName = index
>>
>> Thanks
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Struts-convention-plugin--action-annotations-tp25613013p25613013.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
> 
> 
> 
> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-convention-plugin--action-annotations-tp25613013p25613239.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to