<%-- - $Revision: $ - $Date: $ - - Copyright (C) 2005-2008 Jive Software. All rights reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --%> <%@ page import="org.jivesoftware.util.ParamUtils" %> <%@ page import="java.io.File" %> <%@ page import="java.util.Map" %> <%@ page import="java.util.HashMap" %> <%@ page import="org.jivesoftware.util.Log" %> <%@ page import="org.jivesoftware.util.StringUtils" %> <%@ page import="org.jivesoftware.openfire.http.FlashCrossDomainServlet" %> <%@ 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" %> <% webManager.init(request, response, session, application, out ); %> <%! HttpBindManager serverManager = HttpBindManager.getInstance(); Map handleUpdate(HttpServletRequest request) { Map errorMap = new HashMap(); boolean isEnabled = ParamUtils.getBooleanParameter(request, "httpBindEnabled", serverManager.isHttpBindEnabled()); if (isEnabled) { int requestedPort = ParamUtils.getIntParameter(request, "port", serverManager.getHttpBindUnsecurePort()); int requestedSecurePort = ParamUtils.getIntParameter(request, "securePort", serverManager.getHttpBindSecurePort()); 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()); } boolean isScriptSyntaxEnabled = ParamUtils.getBooleanParameter(request, "scriptSyntaxEnabled", serverManager.isScriptSyntaxEnabled()); serverManager.setScriptSyntaxEnabled(isScriptSyntaxEnabled); } if (errorMap.size() <= 0) { serverManager.setHttpBindEnabled(isEnabled); } return errorMap; } %> <% Map errorMap = new HashMap(); if (request.getParameter("update") != null) { errorMap = handleUpdate(request); // Log the event webManager.logEvent("updated HTTP bind settings", null); } boolean isHttpBindEnabled = serverManager.isHttpBindEnabled(); int port = serverManager.getHttpBindUnsecurePort(); int securePort = serverManager.getHttpBindSecurePort(); boolean isScriptSyntaxEnabled = serverManager.isScriptSyntaxEnabled(); %> <%@page import="org.jivesoftware.openfire.http.FlashCrossDomainServlet"%> <fmt:message key="httpbind.settings.title"/>

<% if (errorMap.size() > 0) { for (String key : errorMap.keySet()) { %>
<% if (key.equals("port")) { %> <% } else { %> <% } %>
<% } } %>
>
>
Script Syntax
>
>
Cross-domain policy

">