From: kkolinko Date: Mon, 1 Mar 2010 17:16:42 +0000 (+0000) Subject: Move sessionDetail.jsp sessionsList.jsp of Manager webapp into WEB-INF/jsp/ X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=eb5b1a60428e9b89d2b030cd64e5a02e19a72e73;p=tomcat7.0 Move sessionDetail.jsp sessionsList.jsp of Manager webapp into WEB-INF/jsp/ Those are not supposed to be callable directly. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@917598 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/manager/HTMLManagerServlet.java b/java/org/apache/catalina/manager/HTMLManagerServlet.java index 93de53d81..53eb7f7e5 100644 --- a/java/org/apache/catalina/manager/HTMLManagerServlet.java +++ b/java/org/apache/catalina/manager/HTMLManagerServlet.java @@ -87,8 +87,8 @@ public final class HTMLManagerServlet extends ManagerServlet { "org.apache.catalina.manager.NONCE"; protected static final String NONCE_REQUEST = "nonce"; - protected static final String sessionsListJspPath = "/sessionsList.jsp"; - protected static final String sessionDetailJspPath = "/sessionDetail.jsp"; + protected static final String sessionsListJspPath = "/WEB-INF/jsp/sessionsList.jsp"; + protected static final String sessionDetailJspPath = "/WEB-INF/jsp/sessionDetail.jsp"; static { URL_ENCODER = new URLEncoder(); diff --git a/webapps/manager/WEB-INF/jsp/sessionDetail.jsp b/webapps/manager/WEB-INF/jsp/sessionDetail.jsp new file mode 100644 index 000000000..654c5cbe3 --- /dev/null +++ b/webapps/manager/WEB-INF/jsp/sessionDetail.jsp @@ -0,0 +1,148 @@ + +<%-- + 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" %> + +<%--!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"--%> + + +<% String path = (String) request.getAttribute("path"); + Session currentSession = (Session)request.getAttribute("currentSession"); + HttpSession currentHttpSession = currentSession.getSession(); + String currentSessionId = currentSession.getId(); + String submitUrl = ((HttpServletRequest)pageContext.getRequest()).getRequestURL().toString(); +%> + + + + + + + + + + Sessions Administration: details for <%= currentSessionId %> + + +

Details for Session <%= JspHelper.escapeXml(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) %>
+ +

+ +
<%= 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 AttributeAttribute nameAttribute value
+ TODO: set Max Inactive Interval on sessions +
<%= JspHelper.escapeXml(attributeName) %><% Object attributeValue = currentHttpSession.getAttribute(attributeName); %>"><%= JspHelper.escapeXml(attributeValue) %>
+ +

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

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

+ + + + diff --git a/webapps/manager/WEB-INF/jsp/sessionsList.jsp b/webapps/manager/WEB-INF/jsp/sessionsList.jsp new file mode 100644 index 000000000..857b6279c --- /dev/null +++ b/webapps/manager/WEB-INF/jsp/sessionsList.jsp @@ -0,0 +1,138 @@ + +<%-- + 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.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()).getRequestURI() + "?path=" + path; + 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! +

+ + + + diff --git a/webapps/manager/sessionDetail.jsp b/webapps/manager/sessionDetail.jsp deleted file mode 100644 index 654c5cbe3..000000000 --- a/webapps/manager/sessionDetail.jsp +++ /dev/null @@ -1,148 +0,0 @@ - -<%-- - 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" %> - -<%--!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"--%> - - -<% String path = (String) request.getAttribute("path"); - Session currentSession = (Session)request.getAttribute("currentSession"); - HttpSession currentHttpSession = currentSession.getSession(); - String currentSessionId = currentSession.getId(); - String submitUrl = ((HttpServletRequest)pageContext.getRequest()).getRequestURL().toString(); -%> - - - - - - - - - - Sessions Administration: details for <%= currentSessionId %> - - -

Details for Session <%= JspHelper.escapeXml(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) %>
- -

- -
<%= 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 AttributeAttribute nameAttribute value
- TODO: set Max Inactive Interval on sessions -
<%= JspHelper.escapeXml(attributeName) %><% Object attributeValue = currentHttpSession.getAttribute(attributeName); %>"><%= JspHelper.escapeXml(attributeValue) %>
- -

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

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

- - - - diff --git a/webapps/manager/sessionsList.jsp b/webapps/manager/sessionsList.jsp deleted file mode 100644 index 857b6279c..000000000 --- a/webapps/manager/sessionsList.jsp +++ /dev/null @@ -1,138 +0,0 @@ - -<%-- - 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.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()).getRequestURI() + "?path=" + path; - 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! -

- - - -