<%-- - $RCSfile$ - $Revision: 3195 $ - $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.openfire.Connection, org.jivesoftware.openfire.session.LocalClientSession, org.jivesoftware.util.JiveGlobals" errorPage="error.jsp" %> <%@ page import="org.jivesoftware.util.ParamUtils" %> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <% webManager.init(request, response, session, application, out ); %> <fmt:message key="compression.settings.title"/> <% // Get parameters: boolean update = request.getParameter("update") != null; boolean clientEnabled = ParamUtils.getBooleanParameter(request, "clientEnabled"); boolean serverEnabled = ParamUtils.getBooleanParameter(request, "serverEnabled"); if (update) { // Update c2s compression policy LocalClientSession.setCompressionPolicy( clientEnabled ? Connection.CompressionPolicy.optional : Connection.CompressionPolicy.disabled); // Update s2s compression policy JiveGlobals.setProperty("xmpp.server.compression.policy", serverEnabled ? Connection.CompressionPolicy.optional.toString() : Connection.CompressionPolicy.disabled.toString()); // Log the event webManager.logEvent("set compression policy", "c2s compression = "+clientEnabled+"\ns2s compression = "+serverEnabled); %>

<% } // Set page vars clientEnabled = Connection.CompressionPolicy.optional == LocalClientSession.getCompressionPolicy(); serverEnabled = Connection.CompressionPolicy.optional.toString().equals(JiveGlobals.getProperty("xmpp.server.compression.policy", Connection.CompressionPolicy.disabled.toString())); %>

>
>


>
>
">