From: markt Date: Thu, 29 Jul 2010 18:17:15 +0000 (+0000) Subject: Enable the HTML Manager application to differentiate between primary & backup sessions. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d2a684a37ef489589998181f31ae9f833cc8b312;p=tomcat7.0 Enable the HTML Manager application to differentiate between primary & backup sessions. Both can be invalidated Attributes can be viewed in both Attributes can only be removed from primary sessions git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@980532 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/webapps/manager/WEB-INF/jsp/sessionDetail.jsp b/webapps/manager/WEB-INF/jsp/sessionDetail.jsp index 5f6894819..19edd10c6 100644 --- a/webapps/manager/WEB-INF/jsp/sessionDetail.jsp +++ b/webapps/manager/WEB-INF/jsp/sessionDetail.jsp @@ -135,7 +135,15 @@ - + <% + if ("Primary".equals(request.getAttribute("sessionType"))) { + %> + + <% + } else { + out.print("Primary sessions only"); + } + %> diff --git a/webapps/manager/WEB-INF/jsp/sessionsList.jsp b/webapps/manager/WEB-INF/jsp/sessionsList.jsp index 2f2d78b62..5c994a454 100644 --- a/webapps/manager/WEB-INF/jsp/sessionsList.jsp +++ b/webapps/manager/WEB-INF/jsp/sessionsList.jsp @@ -20,6 +20,7 @@ <%@page import="java.util.Iterator" %> <%@page import="org.apache.catalina.manager.JspHelper" %> <%@page import="org.apache.catalina.Session" %> +<%@page import="org.apache.catalina.ha.session.DeltaSession" %> @@ -69,6 +70,7 @@ Session Id + Type Guessed Locale Guessed User name Creation Time @@ -82,6 +84,7 @@ <%-- is the same as --%> Session Id + Type Guessed Locale Guessed User name Creation Time @@ -97,11 +100,22 @@ while (iter.hasNext()) { Session currentSession = (Session) iter.next(); String currentSessionId = currentSession.getId(); + String type; + if (currentSession instanceof DeltaSession) { + if (((DeltaSession) currentSession).isPrimarySession()) { + type = "Primary"; + } else { + type = "Backup"; + } + } else { + type = "Primary"; + } %> - -<%= JspHelper.escapeXml(currentSessionId) %> + + <%= JspHelper.escapeXml(currentSessionId) %> + <%= type %> <%= JspHelper.guessDisplayLocaleFromSession(currentSession) %> <%= JspHelper.guessDisplayUserFromSession(currentSession) %> <%= JspHelper.getDisplayCreationTimeForSession(currentSession) %>