source: nutchez-0.1/tomcat/webapps/manager/sessionsList.jsp @ 81

Last change on this file since 81 was 66, checked in by waue, 15 years ago

NutchEz - an easy way to nutch

File size: 8.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!--
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
9
10      http://www.apache.org/licenses/LICENSE-2.0
11
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.
17-->
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" %>
23<!DOCTYPE html
24     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
25     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
26
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()).getRequestURL().append("?path=").append(path).toString();
30   Collection activeSessions = (Collection) request.getAttribute("activeSessions");
31%>
32<head>
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-2007 the Apache Software Foundation"/>
40  <meta name="robots" content="noindex,nofollow,noarchive"/>
41  <title>Sessions Administration for <%= path %></title>
42</head>
43<body>
44<h1>Sessions Administration for <%= path %></h1>
45
46<p>Tips:</p>
47<ul>
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>
50</ul>
51
52<div class="error"><%= JspHelper.escapeXml(request.getAttribute("error")) %></div>
53<div class="message"><%= JspHelper.escapeXml(request.getAttribute("message")) %></div>
54
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)) {
61        order = "ASC";
62       }
63    %>
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%">
68      <thead>
69        <tr>
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>
78        </tr>
79      </thead>
80      <% if (activeSessions.size() > 10) { %>
81      <tfoot><%-- <tfoot> is the same as <thead> --%>
82        <tr>
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>
91        </tr>
92      </tfoot>
93      <% } // end if %>
94      <tbody>
95<% Iterator iter = activeSessions.iterator();
96   while (iter.hasNext()) {
97    Session currentSession = (Session) iter.next();
98    String currentSessionId = currentSession.getId();
99%>
100        <tr>
101          <td>
102<input type="checkbox" name="sessionIds" value="<%= currentSessionId %>" /><a href="<%= submitUrl %>&amp;action=sessionDetail&amp;sessionId=<%= currentSessionId %>" target="_new"><%= JspHelper.escapeXml(currentSessionId) %></a>
103          </td>
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>
111        </tr>
112<% } // end while %>
113      </tbody>
114    </table>
115    <p style="text-align: center;">
116      <input type="submit" name="invalidate" value="Invalidate selected Sessions" onclick="document.getElementById('sessionsFormAction').value='invalidateSessions'; return true;"/>
117    </p>
118  </fieldset>
119</form>
120
121<p style="text-align: center;"><button type="button" onclick="window.close()">Close window</button></p>
122
123<%--div style="display: none;">
124<p>
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>
134</p>
135</div--%>
136
137</body>
138</html>
Note: See TracBrowser for help on using the repository browser.