<%-- - $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="org.jivesoftware.openfire.filetransfer.proxy.FileTransferProxy" %> <%@ page import="java.util.HashMap" %> <%@ page import="java.util.Map" %> <%@ page import="org.jivesoftware.openfire.XMPPServer"%> <%@ 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); %> <% Map errors = new HashMap(); FileTransferProxy transferProxy = XMPPServer.getInstance().getFileTransferProxy(); boolean isUpdated = request.getParameter("update") != null; boolean isProxyEnabled = ParamUtils.getBooleanParameter(request, "proxyEnabled"); int port = ParamUtils.getIntParameter(request, "port", 0); if (isUpdated) { if (isProxyEnabled) { if (port <= 0) { errors.put("port", ""); } } if (errors.isEmpty()) { if (isProxyEnabled) { transferProxy.setProxyPort(port); } transferProxy.enableFileTransferProxy(isProxyEnabled); } } if (errors.isEmpty()) { isProxyEnabled = transferProxy.isProxyEnabled(); port = transferProxy.getProxyPort(); } else { if (port == 0) { port = transferProxy.getProxyPort(); } } %> <fmt:message key="filetransferproxy.settings.title"/>

<% if (!errors.isEmpty()) { %>
error <% if (errors.get("port") != null) { %> <% } %>

<% } else if (isUpdated) { %>
Success

<% } else { %>
<% } %>
>
>
">