<%-- - $Revision: $ - $Date: $ - - Copyright (C) 2006 Jive Software. All rights reserved. - - This software is published under the terms of the GNU Public License (GPL), - a copy of which is included in this distribution. --%> <%@ page import="org.jivesoftware.util.ParamUtils" %> <%@ page import="java.util.Map" %> <%@ page import="java.util.HashMap" %> <%@ page import="org.jivesoftware.util.Log" %> <%@ page import="org.jivesoftware.openfire.http.HttpBindManager" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <%! HttpBindManager serverManager = HttpBindManager.getInstance(); Map handleUpdate(HttpServletRequest request) { Map errorMap = new HashMap(); boolean isEnabled = ParamUtils.getBooleanParameter(request, "httpBindEnabled"); if (isEnabled) { int requestedPort = ParamUtils.getIntParameter(request, "port", -1); int requestedSecurePort = ParamUtils.getIntParameter(request, "securePort", -1); try { serverManager.setHttpBindPorts(requestedPort, requestedSecurePort); } catch (Exception e) { Log.error("An error has occured configuring the HTTP binding ports", e); errorMap.put("port", e.getMessage()); } } if (errorMap.size() <= 0) { serverManager.setHttpBindEnabled(isEnabled); } return errorMap; } %> <% Map errorMap = new HashMap(); if (request.getParameter("update") != null) { errorMap = handleUpdate(request); } boolean isHttpBindEnabled = serverManager.isHttpBindEnabled(); int port = serverManager.getHttpBindUnsecurePort(); int securePort = serverManager.getHttpBindSecurePort(); %> <fmt:message key="httpbind.settings.title"/>

<% if (errorMap.size() > 0) { for (String key : errorMap.keySet()) { %>
<% if (key.equals("port")) { %> <% } else { %> <% } %>
<% } } %>
>
>
">