📄 global.jsp
字号:
<%! // global sidebar variables
// red, yellow, green lights
static final String RED = "<img src=\"images/red.gif\" width=\"20\" height=\"20\" border=\"0\">";
static final String YELLOW = "<img src=\"images/yellow.gif\" width=\"20\" height=\"20\" border=\"0\">";
static final String GREEN = "<img src=\"images/green.gif\" width=\"20\" height=\"20\" border=\"0\">";
private static boolean getSessionBoolean(HttpSession session, String name) {
Boolean temp = (Boolean)session.getAttribute(name);
boolean value = false;
if (temp != null) {
value = temp.booleanValue();
}
return value;
}
private static int getSessionInt(HttpSession session, String name) {
Integer temp = (Integer)session.getAttribute(name);
int value = -1;
if (temp != null) {
value = temp.intValue();
}
return value;
}
private static String getSessionString(HttpSession session, String name) {
String temp = (String)session.getAttribute(name);
String value = null;
if (temp != null && !temp.equals("")) {
value = temp;
}
return value;
}
%>
<% // check for <setup>true</setup> in the jive config file. If setup does
// equal true, inactivate this setup tool
boolean doSetup = false;
// Try loading a Jive class:
try {
Class jiveGlobals = Class.forName("com.jivesoftware.forum.JiveGlobals");
// authorization class used below
Class authorization = Class.forName("com.jivesoftware.forum.Authorization");
Class[] params = new Class[1];
params[0] = "".getClass();
Method getJiveProperty = jiveGlobals.getMethod("getJiveProperty", params);
if (getJiveProperty == null) {
doSetup = true;
}
else {
// Call JiveGlobals.getJiveProperty("setup")
String[] args = {"setup"};
Object setupVal = getJiveProperty.invoke(null, args);
if (setupVal == null) {
doSetup = true;
}
else {
String setup = (String)setupVal;
if (!"true".equals(setup)) {
doSetup = true;
}
}
}
}
catch (Exception e) {
doSetup = true;
}
if (!doSetup) {
response.sendRedirect("completed.jsp");
return;
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -