1
<?xml version="1.0" encoding="ISO-8859-1"?>
3
Licensed to the Apache Software Foundation (ASF) under one or more
4
contributor license agreements. See the NOTICE file distributed with
5
this work for additional information regarding copyright ownership.
6
The ASF licenses this file to You under the Apache License, Version 2.0
7
(the "License"); you may not use this file except in compliance with
8
the License. You may obtain a copy of the License at
10
http://www.apache.org/licenses/LICENSE-2.0
12
Unless required by applicable law or agreed to in writing, software
13
distributed under the License is distributed on an "AS IS" BASIS,
14
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
See the License for the specific language governing permissions and
16
limitations under the License.
18
<%@page session="false" contentType="text/html; charset=ISO-8859-1" %>
19
<%@page import="java.util.Collection" %>
20
<%@page import="java.util.Iterator" %>
21
<%@page import="org.apache.catalina.manager.JspHelper" %>
22
<%@page import="org.apache.catalina.Session" %>
24
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
25
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
27
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
28
<% String path = (String) request.getAttribute("path");
29
String submitUrl = ((HttpServletRequest)pageContext.getRequest()).getRequestURI() + "?path=" + path;
30
Collection activeSessions = (Collection) request.getAttribute("activeSessions");
33
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
34
<meta http-equiv="pragma" content="no-cache"/><!-- HTTP 1.0 -->
35
<meta http-equiv="cache-control" content="no-cache,must-revalidate"/><!-- HTTP 1.1 -->
36
<meta http-equiv="expires" content="0"/><!-- 0 is an invalid value and should be treated as 'now' -->
37
<meta http-equiv="content-language" content="en"/>
38
<meta name="author" content="Cedrik LIME"/>
39
<meta name="copyright" content="copyright 2005-2010 the Apache Software Foundation"/>
40
<meta name="robots" content="noindex,nofollow,noarchive"/>
41
<title>Sessions Administration for <%= path %></title>
44
<h1>Sessions Administration for <%= path %></h1>
48
<li>Click on a column to sort.</li>
49
<li>To view a session details and/or remove a session attributes, click on its id.</li>
52
<div class="error"><%= JspHelper.escapeXml(request.getAttribute("error")) %></div>
53
<div class="message"><%= JspHelper.escapeXml(request.getAttribute("message")) %></div>
55
<form action="<%= submitUrl %>" method="post" id="sessionsForm">
56
<fieldset><legend>Active HttpSessions informations</legend>
57
<input type="hidden" name="action" id="sessionsFormAction" value="injectSessions"/>
58
<input type="hidden" name="sort" id="sessionsFormSort" value="<%= (String) request.getAttribute("sort") %>"/>
59
<% String order = (String) request.getAttribute("order");
60
if (order == null || "".equals(order)) {
64
<input type="hidden" name="order" id="sessionsFormSortOrder" value="<%= order %>"/>
65
<input type="submit" name="refresh" id="refreshButton" value="Refresh Sessions list" onclick="document.getElementById('sessionsFormAction').value='refreshSessions'; return true;"/>
66
<%= JspHelper.formatNumber(activeSessions.size()) %> active Sessions<br/>
67
<table border="1" cellpadding="2" cellspacing="2" width="100%">
70
<th><a onclick="document.getElementById('sessionsFormSort').value='id'; document.getElementById('refreshButton').click(); return true;">Session Id</a></th>
71
<th><a onclick="document.getElementById('sessionsFormSort').value='locale'; document.getElementById('refreshButton').click(); return true;">Guessed Locale</a></th>
72
<th><a onclick="document.getElementById('sessionsFormSort').value='user'; document.getElementById('refreshButton').click(); return true;">Guessed User name</a></th>
73
<th><a onclick="document.getElementById('sessionsFormSort').value='CreationTime'; document.getElementById('refreshButton').click(); return true;">Creation Time</a></th>
74
<th><a onclick="document.getElementById('sessionsFormSort').value='LastAccessedTime'; document.getElementById('refreshButton').click(); return true;">Last Accessed Time</a></th>
75
<th><a onclick="document.getElementById('sessionsFormSort').value='UsedTime'; document.getElementById('refreshButton').click(); return true;">Used Time</a></th>
76
<th><a onclick="document.getElementById('sessionsFormSort').value='InactiveTime'; document.getElementById('refreshButton').click(); return true;">Inactive Time</a></th>
77
<th><a onclick="document.getElementById('sessionsFormSort').value='TTL'; document.getElementById('refreshButton').click(); return true;"><span title="Time To Live">TTL</span></a></th>
80
<% if (activeSessions.size() > 10) { %>
81
<tfoot><%-- <tfoot> is the same as <thead> --%>
83
<th><a onclick="document.getElementById('sessionsFormSort').value='id'; document.getElementById('refreshButton').click(); return true;">Session Id</a></th>
84
<th><a onclick="document.getElementById('sessionsFormSort').value='locale'; document.getElementById('refreshButton').click(); return true;">Guessed Locale</a></th>
85
<th><a onclick="document.getElementById('sessionsFormSort').value='user'; document.getElementById('refreshButton').click(); return true;">Guessed User name</a></th>
86
<th><a onclick="document.getElementById('sessionsFormSort').value='CreationTime'; document.getElementById('refreshButton').click(); return true;">Creation Time</a></th>
87
<th><a onclick="document.getElementById('sessionsFormSort').value='LastAccessedTime'; document.getElementById('refreshButton').click(); return true;">Last Accessed Time</a></th>
88
<th><a onclick="document.getElementById('sessionsFormSort').value='UsedTime'; document.getElementById('refreshButton').click(); return true;">Used Time</a></th>
89
<th><a onclick="document.getElementById('sessionsFormSort').value='InactiveTime'; document.getElementById('refreshButton').click(); return true;">Inactive Time</a></th>
90
<th><a onclick="document.getElementById('sessionsFormSort').value='TTL'; document.getElementById('refreshButton').click(); return true;"><span title="Time To Live">TTL</span></a></th>
95
<% Iterator iter = activeSessions.iterator();
96
while (iter.hasNext()) {
97
Session currentSession = (Session) iter.next();
98
String currentSessionId = currentSession.getId();
102
<input type="checkbox" name="sessionIds" value="<%= currentSessionId %>" /><a href="<%= submitUrl %>&action=sessionDetail&sessionId=<%= currentSessionId %>" target="_blank"><%= JspHelper.escapeXml(currentSessionId) %></a>
104
<td style="text-align: center;"><%= JspHelper.guessDisplayLocaleFromSession(currentSession) %></td>
105
<td style="text-align: center;"><%= JspHelper.guessDisplayUserFromSession(currentSession) %></td>
106
<td style="text-align: center;"><%= JspHelper.getDisplayCreationTimeForSession(currentSession) %></td>
107
<td style="text-align: center;"><%= JspHelper.getDisplayLastAccessedTimeForSession(currentSession) %></td>
108
<td style="text-align: center;"><%= JspHelper.getDisplayUsedTimeForSession(currentSession) %></td>
109
<td style="text-align: center;"><%= JspHelper.getDisplayInactiveTimeForSession(currentSession) %></td>
110
<td style="text-align: center;"><%= JspHelper.getDisplayTTLForSession(currentSession) %></td>
115
<p style="text-align: center;">
116
<input type="submit" name="invalidate" value="Invalidate selected Sessions" onclick="document.getElementById('sessionsFormAction').value='invalidateSessions'; return true;"/>
121
<p style="text-align: center;"><button type="button" onclick="window.close()">Close window</button></p>
123
<%--div style="display: none;">
125
<a href="http://validator.w3.org/check?uri=referer"><img
126
src="http://www.w3.org/Icons/valid-html401"
127
alt="Valid HTML 4.01!" height="31" width="88"></a>
128
<a href="http://validator.w3.org/check?uri=referer"><img
129
src="http://www.w3.org/Icons/valid-xhtml10"
130
alt="Valid XHTML 1.0!" height="31" width="88" /></a>
131
<a href="http://validator.w3.org/check?uri=referer"><img
132
src="http://www.w3.org/Icons/valid-xhtml11"
133
alt="Valid XHTML 1.1!" height="31" width="88" /></a>