⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.jsp

📁 jive Study
💻 JSP
字号:
<%
/**
 *	$RCSfile: index.jsp,v $
 *	$Revision: 1.1.1.1 $
 *	$Date: 2002/09/09 13:50:28 $
 */
%>

<%@ page import="java.io.*,
                 java.lang.reflect.*,
                 java.util.*"
%>
		
<%	// Jive installation check. Load the Jive classes by reflection because
    // the Jive classes may or may not be installed.
	
	boolean doSetup = false;
    boolean configurationError = 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;
    }
    catch (Throwable t) {
        // catch run time errors, like class loader issues (usually happens
        // if the jiveHome path is configured incorrectly, etc)
        configurationError = true;
    }
	
	// If we need to run the Jive setup tool, give the user a link to the setup
    // tool.
	if (doSetup || configurationError) { %>
		<html>
		<head>
		<title>Jive Forums 2 Admin</title>
		</head>
		<body>
        <font face="arial,helvetica,sans-serif" color="#333333">
        <b>Jive Forums 2 Admin</b>
        </font>
        <ul>
            <font size="-1" face="arial,helvetica,sans-serif">
        <%  if (doSetup) { %>
		    Jive is not properly configured or is being run for the first time. 
            <p>
            <a href="setup/setup.jsp">Proceed to the setup tool</a>
        <%  } %>
        
        <%  if (configurationError) { %>
		    A general exception occurred. This could be because Jive is not
            setup correctly, specifically, Jive might not be able to find
            your <font color="#336600">jiveHome</font> directory as indicated in the
            <font color="#336600">jive_init.properties</font> file. Please consult the installation
            documentation before you try to correct the
            problem. Remember, you will need to restart your appserver if you
            make changes to the <font color="#336600">jive_init.properties</font> file.
        <%  } %>
            </font>
        </ul>
		</body>
		</html>
<%		// for some reason, we have to call flush.. some app servers won't
		// display the above html w/o flushing the stream
		out.flush();
		return;
	}
    
    // Check to see if we've already logged into this tool.
	com.jivesoftware.forum.Authorization authToken = (com.jivesoftware.forum.Authorization)session.getAttribute("jive.admin.authorization");
	if (authToken == null) {
		response.sendRedirect("login.jsp");
		return;
	}
    
    // logout if requested:
	if ("true".equals(request.getParameter("logout"))) {
		try {
			session.removeAttribute("jive.admin.authorization");
		}
		catch (IllegalStateException ignored) { // if session is already invalid
		}
		finally {
			response.sendRedirect("index.jsp");
			return;
		}
	}
%>

<html>
<head>
<title>Jive Forums 2 Admin</title>
</head>

<frameset rows="90,*" bordercolor="#0099cc" border="0" frameborder="0" framespacing="0" style="background-color:#0099cc">
	<frame src="header.jsp" name="header" scrolling="no" marginheight="0" marginwidth="0" noresize>
	<frameset cols="175,*" bordercolor="#0099cc" border="0" frameborder="0" style="background-color:#0099cc">
		<frame src="sidebar.jsp" name="sidebar" scrolling="auto" marginheight="0" marginwidth="0" noresize>	   
		<frameset rows="*" bordercolor="#0099cc" border="0" frameborder="0" style="background-color:#0099cc">   
			<frame src="main.jsp" name="main" scrolling="auto" noresize>
		</frameset>
		
	</frameset>
	
</frameset>

</html>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -