Hi,
In my application actions are distributed into several namespaces using
Conventions plugin.
When a request come for an action in a namespace (other than default one,
say, myapp/admin/action-name), and when there is no user session found, I m
returning 'login', which is configured as global-result in the default
namespace. But I m getting exception saying 'No result found with name...'.
Result config:
<global-results> <result name="login" type="redirectAction">login</result>
</global-results>
Intercept() of interceptor:
public String intercept(ActionInvocation invocation) throws Exception {
Map<String, Object> session =
invocation.getInvocationContext().getSession();
User user = (User) session.get(Constants.USER_HANDLE);
if(user == null) {
return "login";
}else{
invocation.invoke();
}
}
Action is in other namespace (package) and so jsp. But the result is
configured in default namespace, as login result should be accessible from
any namespace.
I m not getting what is the mistake I m doing. Is there any this kind of
problem with conventions plugin?
Some one please help.
Regards,
ManiKanta G
twitter.com/manikantag