setup-ldap-server.jsp 1.14 KB
Newer Older
1
<%@ page import="org.jivesoftware.openfire.XMPPServer" %>
2
<%
3 4
    // Redirect if we've already run setup:
    if (!XMPPServer.getInstance().isSetupMode()) {
5 6 7 8 9 10
        response.sendRedirect("setup-completed.jsp");
        return;
    }
%>

<%
11
    String serverType = null;
12
    if (request.getParameter("save") != null || request.getParameter("test") != null) {
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
        int serverTypeInt = ParamUtils.getIntParameter(request, "servertype", 1);
        switch (serverTypeInt) {
            case 1:
                serverType = "other";
                break;
            case 2:
                serverType = "activedirectory";
                break;
            case 3:
                serverType = "openldap";
                break;
            default:
                serverType = "other";
        }
    }
28

29 30 31 32 33 34 35 36
    boolean initialSetup = true;
    String currentPage = "setup-ldap-server.jsp";
    String testPage = "setup-ldap-server_test.jsp?serverType="+ serverType;
    String nextPage = "setup-ldap-user.jsp?serverType=" + serverType;
    Map<String, String> meta = new HashMap<String, String>();
    meta.put("currentStep", "3");
%>
<%@ include file="ldap-server.jspf" %>