I really like the @Action annotation to map urls to the methods.
Excellent. I'm not 100% on them myself yet, but the fact that you like
them helps convince me some more. ;)
But its not clear to me how the results are choosen.
If there are 2 methods in the class UserAction:
@Action("login")
public String login() {
return SUCCESS;
}
and
@Action("register")
public String register() {
return SUCCESS;
}
The results should be the same as smarturls, codebehind, etc. In your
case they should be login-success.jsp or login.jsp and
register-success.jsp or register.jsp. If you turn on some fine or finest
logging in the convention package it should print out the results it is
mapping in the configuration provider and in the unknown handler.
is the result user-success.ftl or ist it user-login-success.ftl or
login-success.ftl? After trying around it seems to be neither one. But to
define alle the @Result for every method seems to be a bit noisy.
Yeah, I find that noisy as well. No more noisy than before, just noise
in different places. You can always put "global" results for the class
at the class level, but it should definitely be finding most of your
results for you during the configuration process and then the unknown
handler should find the rest.
One other thing I realized is that "location=" of @Result does not use the
namespace path, you have to write the whole path (/auth/login.ftl) instead of
just "login.ftl".
Hmmmmm.. That is definitely a bug because the dispatcher, freemarker and
velocity results are "relative" results so that you don't have to use
the namespace path.
Can someone with JIRA admin privs. setup a component under the struts2
project for the convention plugin? Then we can start adding all of this
stuff to JIRA.
-bp
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]