From 4f269a01cfd8ec85a97918302ad969ecea836f78 Mon Sep 17 00:00:00 2001 From: remm Date: Mon, 16 Apr 2007 23:30:24 +0000 Subject: [PATCH] =?utf8?q?-=20Add=20session=20browser=20capabilities=20in?= =?utf8?q?=20the=20manager.=20Let=20me=20know=20if=20it=20creates=20proble?= =?utf8?q?ms=20(I=20checked=20XSS=20to=20some=20extent=20to,=20=20=20but?= =?utf8?q?=20please=20double=20check=20if=20you=20can).=20-=20Submitted=20?= =?utf8?q?by=20C=C3=A9drik=20Lime.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@529443 13f79535-47bb-0310-9956-ffa450edef68 --- webapps/manager/sessionsList.jsp | 122 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 webapps/manager/sessionsList.jsp diff --git a/webapps/manager/sessionsList.jsp b/webapps/manager/sessionsList.jsp new file mode 100644 index 000000000..c7a926197 --- /dev/null +++ b/webapps/manager/sessionsList.jsp @@ -0,0 +1,122 @@ + +<%@page session="false" contentType="text/html; charset=ISO-8859-1" %> +<%@page import="java.util.Collection" %> +<%@page import="java.util.Iterator" %> +<%@page import="org.apache.catalina.manager.JspHelper" %> +<%@page import="org.apache.catalina.Session" %> + + + +<% String path = (String) request.getAttribute("path"); + String submitUrl = ((HttpServletRequest)pageContext.getRequest()).getRequestURL().append("?path=").append(path).toString(); + Collection activeSessions = (Collection) request.getAttribute("activeSessions"); +%> + + + + + + + + + + Sessions Administration for <%= path %> + + +

Sessions Administration for <%= path %>

+ +

Tips:

+ + +
<%= JspHelper.escapeXml(request.getAttribute("error")) %>
+
<%= JspHelper.escapeXml(request.getAttribute("message")) %>
+ +
+
Active HttpSessions informations + + "/> + <% String order = (String) request.getAttribute("order"); + if (order == null || "".equals(order)) { + order = "ASC"; + } + %> + + + <%= JspHelper.formatNumber(activeSessions.size()) %> active Sessions
+ + + + + + + + + + + + + + <% if (activeSessions.size() > 10) { %> + <%-- is the same as --%> + + + + + + + + + + + + <% } // end if %> + +<% Iterator iter = activeSessions.iterator(); + while (iter.hasNext()) { + Session currentSession = (Session) iter.next(); + String currentSessionId = currentSession.getId(); +%> + + + + + + + + + + +<% } // end while %> + +
Session IdGuessed LocaleGuessed User nameCreation TimeLast Accessed TimeUsed TimeInactive TimeTTL
Session IdGuessed LocaleGuessed User nameCreation TimeLast Accessed TimeUsed TimeInactive TimeTTL
+<%= JspHelper.escapeXml(currentSessionId) %> + <%= JspHelper.guessDisplayLocaleFromSession(currentSession) %><%= JspHelper.guessDisplayUserFromSession(currentSession) %><%= JspHelper.getDisplayCreationTimeForSession(currentSession) %><%= JspHelper.getDisplayLastAccessedTimeForSession(currentSession) %><%= JspHelper.getDisplayUsedTimeForSession(currentSession) %><%= JspHelper.getDisplayInactiveTimeForSession(currentSession) %><%= JspHelper.getDisplayTTLForSession(currentSession) %>
+

+ +

+
+
+ +

+ +<%--div style="display: none;"> +

+ Valid HTML 4.01! + Valid XHTML 1.0! + Valid XHTML 1.1! +

+ + + + \ No newline at end of file -- 2.11.0