用户登陆 : /roller-ui/login-redirect.rol
<action name="login-redirect">
<result>/roller-ui/login-redirect.jsp</result>
</action>
登陆成功后(登陆的过程由acegi控制),跳转到login-redirect.jsp;
login-redirect.jsp中,如果用户只有一个blog/website,就跳到用户第一个blog,
连接到: /roller-ui/authoring/entryAdd.rol?weblog=blog的拥有者(website.getHandle())
否则跳到(用户)主菜单页面
login-redirect.jsp 相关源码:
<%
User user = RollerSession.getRollerSession(request).getAuthenticatedUser();
List websites = WebloggerFactory.getWeblogger().getUserManager().getWebsites(user, Boolean.TRUE, null, null, null, 0, Integer.MAX_VALUE);
if (websites.size() == 1) {
Weblog website = (Weblog) websites.get(0);
response.sendRedirect(request.getContextPath()+"/roller-ui/authoring/entryAdd.rol?weblog="+website.getHandle());
} else {
response.sendRedirect(request.getContextPath()+"/roller-ui/menu.rol");
}
%>