On Sunday 26 April 2009 02:22:50 pm Andreas Joseph Krogh wrote:
> Hi.
> I see that https://issues.apache.org/struts/browse/WW-2394 is closed with
> resolution=implemented with a comment referring to the Convention-plugin. I
> cannot se how it's possible with the Convention-plugin to map different
> names to an action using annotations.
>
> Say I have UserAction and want to map it as /mynamespace/showuser *and*
> /mynamespace/anotheralias for some reason, how is this possible using the
> Convention-plugin as the @Action-annotation is not applicable to classes?
The @Action annotation is meant to point to methods, and you can do it like -
@Actions( {
@Action(/mynamespace/showuser),
@Action(/mynamespace/anotheralias)
})
public String execute() {
...
That is what I thought you were looking for, if it's not I'm sorry, go ahead
and re-open, preferably against the Conventions plugin and make a comment
letting us know a bit more about what you're looking for (and remember,
patches are welcomed!).
-Wes
--
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]