<%-- - $Revision$ - $Date$ - - Copyright (C) 2004-2005 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. --%> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <%@ page import="org.jivesoftware.util.*, org.jivesoftware.openfire.*, java.util.HashMap, java.util.Map" errorPage="error.jsp" %> <% webManager.init(request, response, session, application, out ); %> <fmt:message key="session.conflict.title"/> <% // Get parameters boolean update = request.getParameter("update") != null; int kickPolicy = ParamUtils.getIntParameter(request,"kickPolicy",Integer.MAX_VALUE); int kickValue = ParamUtils.getIntParameter(request,"kickValue",-2); if (kickPolicy == -2) { kickPolicy = webManager.getSessionManager().getConflictKickLimit(); } // Update the session kick policy if requested Map errors = new HashMap(); if (update) { // Validate params if (kickPolicy != 0 && kickPolicy != 1 && kickPolicy != SessionManager.NEVER_KICK) { if (kickValue <= 1) { errors.put("kickValue",""); } } // If no errors, continue: if (errors.size() == 0) { if (kickPolicy != 0 && kickPolicy != 1 && kickPolicy != SessionManager.NEVER_KICK) { webManager.getSessionManager().setConflictKickLimit(kickValue); } else { webManager.getSessionManager().setConflictKickLimit(kickPolicy); } %>

<% } } // Update variable values kickPolicy = webManager.getSessionManager().getConflictKickLimit(); %>

<% // Figure out if the kick policy is neither 0 nor SessionManager.NEVER_KICK: boolean assignedKickPolicy = false; if (kickPolicy != 0 && kickPolicy != 1 && kickPolicy != SessionManager.NEVER_KICK) { assignedKickPolicy = true; } %>
> -
> -
> -
> -
  <% if (errors.get("kickValue") != null) { %>
<% } %> " size="5" maxlength="10" onclick="this.form.kickPolicy[3].checked=true;">
">