I have a REST application based on Struts2 REST plugin. I have a resource which has multiple operations linked to it. I want to use a single action class that handles each of these operations on the resource. The operations are not typical CRUD operations, but GET operations that fetch different kinds of data for the given resource.
/app/resource/list
/app/resource/track
/app/resource/categories
How do I map multiple URIs to a single REST action class using an xml configuration? I want to avoid doing this programmatically using if/else blocks inside the action class.
<package name="restControllers" namespace="/app" >
...
...
<action name="resource" class="ResourceController">
...
...
</action>
</package>