jive的扩展~采用banq的jf框架编写
源代码在线查看: global.jsp
/**
* $RCSfile: global.jsp,v $
* $Revision: 1.1.1.1 $
* $Date: 2002/09/09 13:50:31 $
*/
%>
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 = "";
%>
static final String tableBorderColor = "#999999";
static final String errorColor = "#ff0000";
static final String messageColor = "#006600";
private String getOneTimeMessage(HttpSession session, String name) {
String message = (String)session.getAttribute("admin."+name);
if (message != null) {
session.removeAttribute("admin."+name);
return message;
}
return null;
}
private void setOneTimeMessage(HttpSession session, String name, String value) {
session.setAttribute("admin."+name, value);
}
%>