火星文 技术研习社

Noname Cat, Keep Thinking
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Jive 身份验证 JSP 部分及 Proxy 模式应用

Posted on 2006-04-10 22:04  剑廿三  阅读(312)  评论(0编辑  收藏  举报
Jive 的 admin/users.jsp ( 用户概览页面 )
 
<%@ include file="global.jsp" %>
 
Jive 的 admin/global.jsp
 
<% // Security check
 Authorization authToken = (Authorization)session.getAttribute("jive.admin.authorization");
 if (authToken == null) {
  response.sendRedirect("login.jsp");
  return;
 }
 else {

 // check for an anonymous user token

   if (authToken.isAnonymous()) {
      response.sendRedirect("login.jsp");
      return;
    }
 }
   
    // Get the forum factory object.
    ForumFactory forumFactory = ForumFactory.getInstance(authToken);
    // Get the user of this page
    User pageUser = null;
    try {
        forumFactory.getUserManager().getUser(authToken.getUserID());
    }
    catch (Exception e) {
       response.sendRedirect("login.jsp");
       return;
    }
   
    String onload = "";
%>