<%-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You 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 session="false" contentType="text/html; charset=ISO-8859-1" %> <%@page import="java.util.Enumeration" %> <%@page import="javax.servlet.http.HttpSession" %> <%@page import="org.apache.catalina.Session" %> <%@page import="org.apache.catalina.manager.JspHelper" %> <%@page import="org.apache.catalina.util.ContextName" %> <%--!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"--%> <% String path = (String) request.getAttribute("path"); String version = (String) request.getAttribute("version"); ContextName cn = new ContextName(path, version); Session currentSession = (Session)request.getAttribute("currentSession"); String currentSessionId = null; HttpSession currentHttpSession = null; if (currentSession != null) { currentHttpSession = currentSession.getSession(); currentSessionId = JspHelper.escapeXml(currentSession.getId()); } else { currentSessionId = "Session invalidated"; } String submitUrl = JspHelper.escapeXml(response.encodeURL( ((HttpServletRequest) pageContext.getRequest()).getRequestURI() + "?path=" + path + "&version=" + version)); %> Sessions Administration: details for <%= currentSessionId %> <% if (currentHttpSession == null) { %>

<%=currentSessionId%>

<% } else { %>

Details for Session <%= currentSessionId %>

Session Id <%= currentSessionId %>
Guessed Locale <%= JspHelper.guessDisplayLocaleFromSession(currentSession) %>
Guessed User <%= JspHelper.guessDisplayUserFromSession(currentSession) %>
Creation Time <%= JspHelper.getDisplayCreationTimeForSession(currentSession) %>
Last Accessed Time <%= JspHelper.getDisplayLastAccessedTimeForSession(currentSession) %>
Session Max Inactive Interval <%= JspHelper.secondsToTimeString(currentSession.getMaxInactiveInterval()) %>
Used Time <%= JspHelper.getDisplayUsedTimeForSession(currentSession) %>
Inactive Time <%= JspHelper.getDisplayInactiveTimeForSession(currentSession) %>
TTL <%= JspHelper.getDisplayTTLForSession(currentSession) %>
<% if ("Primary".equals(request.getParameter("sessionType"))) { %> <% } %>
<%= JspHelper.escapeXml(request.getAttribute("error")) %>
<%= JspHelper.escapeXml(request.getAttribute("message")) %>
<% int nAttributes = 0; Enumeration attributeNamesEnumeration = currentHttpSession.getAttributeNames(); while (attributeNamesEnumeration.hasMoreElements()) { attributeNamesEnumeration.nextElement(); ++nAttributes; } %> <%--tfoot> <% attributeNamesEnumeration = currentHttpSession.getAttributeNames(); while (attributeNamesEnumeration.hasMoreElements()) { String attributeName = (String) attributeNamesEnumeration.nextElement(); %> <% } // end while %>
<%= JspHelper.formatNumber(nAttributes) %> attributes
Remove Attribute Attribute name Attribute value
TODO: set Max Inactive Interval on sessions
<% if ("Primary".equals(request.getParameter("sessionType"))) { %> <% } else { out.print("Primary sessions only"); } %>
<%= JspHelper.escapeXml(attributeName) %> <% Object attributeValue = currentHttpSession.getAttribute(attributeName); %>"><%= JspHelper.escapeXml(attributeValue) %>
<% } // endif%>

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

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