1

I don't know how to set correct title.

I would like to do like this:

/api/users/{user_id}/ <-> UsersController

users is an action and {user_id} is parameter

/api/users/{user_id}/list

/list -> list is method.

But I would like to use /list is another action in users action

=> I can use

/api/users/{user_id}/list/{list_id}/myMethod

Can I do it with struts2 restful?

Micha
  • 5,117
  • 8
  • 34
  • 47
Luc
  • 2,800
  • 2
  • 25
  • 46

1 Answers1

1

Yes you can. You have two options to achieve this:

Lukasz Lenart
  • 987
  • 7
  • 14
  • Thanks! I've tried it. But I just call execute method, I can't use method index, create, editNew, ... Can you help me? – Luc Jul 04 '13 at 09:58
  • Why can not you use index, create, ... methods? You can always redefine methods used for each type of request: http://struts.apache.org/development/2.x/docs/rest-plugin.html#RESTPlugin-RESTfulURLMappingLogic – Lukasz Lenart Jul 04 '13 at 15:19
  • Hi Lukasz Lenart, please view this question & I hope you can help me. Thanks. http://stackoverflow.com/questions/17484179/struts2-restful-mapping-configuration – Luc Jul 08 '13 at 03:47