Scarab commit: svn commit: r10466 - trunk/src: conf/classes/org/apache conf/classes/org/apache/jcs conf/classes/org/apache/jcs/admin conf/classes/org/apache/jcs/admin/servlet webapp/WEB-INF
| Newsgroups | gmane.comp.java.scarab.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ronvoe122
Date: 2007-10-25 07:07:07-0700
New Revision: 10466
Added:
trunk/src/conf/classes/org/apache/
trunk/src/conf/classes/org/apache/jcs/
trunk/src/conf/classes/org/apache/jcs/admin/
trunk/src/conf/classes/org/apache/jcs/admin/servlet/
trunk/src/conf/classes/org/apache/jcs/admin/servlet/JCSAdminServletDefault.vm
trunk/src/conf/classes/org/apache/jcs/admin/servlet/JCSAdminServletRegionDetail.vm
Modified:
trunk/src/webapp/WEB-INF/web.xml
Log:
[SCB2354] Added the velocity templates required to run the JCSAdminServlet.
Commented out the servlet mapping to disable it by default on production systems.
Just uncomment the mapping to get access to the servlet.
Added: trunk/src/conf/classes/org/apache/jcs/admin/servlet/JCSAdminServletDefault.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/org/apache/jcs/admin/servlet/JCSAdminServletDefault.vm?view=auto&rev=10466
==============================================================================
--- (empty file)
+++ trunk/src/conf/classes/org/apache/jcs/admin/servlet/JCSAdminServletDefault.vm 2007-10-25 07:07:07-0700
@@ -0,0 +1,48 @@
+<html>
+
+<head><title> JCS Admin Servlet </title></head>
+
+<body>
+
+<h1> Cache Regions </h1>
+
+<p>These are the regions which are currently defined in the cache. 'Items' and
+'Bytes' refer to the elements currently in memory (not spooled). You can clear
+all items for a region by selecting 'Remove all' next to the desired region
+below. You can also <a href="?action=clearAllRegions">Clear all regions</a>
+which empties the entire cache.</p>
+
+<table border="1" cellpadding="5" >
+ <tr>
+ <th> Cache Name </th>
+ <th> Items </th>
+ <th> Bytes </th>
+ <th> Status </th>
+ <th> Memory Hits </th>
+ <th> Aux Hits </th>
+ <th> Not Found Misses </th>
+ <th> Expired Misses </th>
+ </tr>
+
+ #foreach ( $record in $cacheInfoRecords )
+ <tr>
+ <td> $record.cache.cacheName </td>
+ <td> $record.cache.size </td>
+ <td> $record.byteCount </td>
+ <td> $record.status </td>
+ <td> $record.cache.hitCountRam </td>
+ <td> $record.cache.hitCountAux </td>
+ <td> $record.cache.missCountNotFound </td>
+ <td> $record.cache.missCountExpired </td>
+ <td>
+ <a href="?action=detail&cacheName=${record.cache.cacheName}"> Detail </a>
+ | <a href="?action=clearRegion&cacheName=${record.cache.cacheName}"> Remove all </a>
+ </td>
+ </tr>
+ #end
+
+</table>
+
+</body>
+
+</html>
\ No newline at end of file
Added: trunk/src/conf/classes/org/apache/jcs/admin/servlet/JCSAdminServletRegionDetail.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/org/apache/jcs/admin/servlet/JCSAdminServletRegionDetail.vm?view=auto&rev=10466
==============================================================================
--- (empty file)
+++ trunk/src/conf/classes/org/apache/jcs/admin/servlet/JCSAdminServletRegionDetail.vm 2007-10-25 07:07:07-0700
@@ -0,0 +1,34 @@
+<html>
+
+<head><title> JCS Admin Servlet Region Detail </title></head>
+
+<body>
+
+<h1> Keys for region: $cacheName </h1>
+
+<table border="1" cellpadding="5" >
+ <tr>
+ <th> Key </th>
+ <th> Eternal? </th>
+ <th> Create time </th>
+ <th> Max Life (s) </th>
+ <th> Till Expiration (s) </th>
+ </tr>
+
+ #foreach ( $element in $elementInfoRecords )
+
+ <tr>
+ <td> $element.key </td>
+ <td> $element.eternal </td>
+ <td> $element.createTime </td>
+ <td> $element.maxLifeSeconds </td>
+ <td> $element.expiresInSeconds </td>
+ <td> <a href="?action=remove&cacheName=${cacheName}&key=${element.key}"> Remove </a> </td>
+ </tr>
+ #end
+
+</table>
+
+</body>
+
+</html>
\ No newline at end of file
Modified: trunk/src/webapp/WEB-INF/web.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/web.xml?view=diff&rev=10466&p1=trunk/src/webapp/WEB-INF/web.xml&p2=trunk/src/webapp/WEB-INF/web.xml&r1=10465&r2=10466
==============================================================================
--- trunk/src/webapp/WEB-INF/web.xml (original)
+++ trunk/src/webapp/WEB-INF/web.xml 2007-10-25 07:07:07-0700
@@ -118,11 +118,17 @@
<url-pattern>/servlet/AxisServlet</url-pattern>
</servlet-mapping>
+
+<!--
+ be aware that the access to JCSAdminServlet is not restricted if you uncomment this!
+ *Anyone* can then flush the JCS caches of this scarab installation.
+
<servlet-mapping>
<servlet-name>JCSAdminServlet</servlet-name>
<url-pattern>/JCSAdminServlet</url-pattern>
</servlet-mapping>
-
+-->
+
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>*.jws</url-pattern>