What do I need to do to make @Result annotations on my action methods
work? I'm using the code-behind and zero-config plugins, and tried to
add the annotation like this:
@Result(value = "users", type = ServletActionRedirectResult.class)
public String save() {
userService.saveUser(user);
return SUCCESS;
}
I've tried a few different variations, with and without a surrounding
@Results annotation, and none of them have any effect. Do I need to
configure an additional interceptor, or otherwise configure something
specially?
I'm working with 2.0.4-SNAPSHOT at the moment, and have the following
artifacts in my classpath:
struts-annotations-1.0-SNAPSHOT.jar
struts2-codebehind-plugin-2.0.3-SNAPSHOT.jar
struts2-spring-plugin-2.0.3-SNAPSHOT.jar
struts2-api-2.0.3-SNAPSHOT.jar
struts2-core-2.0.3-SNAPSHOT.jar
Did I miss anything?
Secondary question: shouldn't the 'value' be optional when using the
code-behind plugin? Since the plugin will automatically find
users-success.jsp / users.jsp, it seems like I should be able to just
say things like:
@Results(
@Result(ServletActionRedirectResult.class)
@Result(name="oops", ServletRedirectResult.class)
)
public String execute() {
if (something)
return SUCCESS;
return "oops";
}
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]