dain 2003/10/22 11:06:24
Modified:
modules/console-web/src/java/org/apache/geronimo/console/web/taglib
ClearFilterTag.java MBeanAttributesTag.java
MBeanServerContentsTag.java
MBeanServerContextSupport.java
modules/console-web/src/webapp faq.jsp index.jsp
leftNavigation.jsp mbeanInfo.jsp
modules/console-web/src/webapp/WEB-INF
geronimo_jmx-console_v0-1.tld web.xml
Added: modules/console-web/src/java/org/apache/geronimo/console/web/util
ObjectInstanceComparator.java
Log:
Applied patch from issue geronimo-105.
This patch contains trivial alterations to the code in the JSP tag library,
clean up some of my comments and change the pointer for the web console
(instead of http://127.0.0.1:8080/jmx-console it points at /console).
Revision Changes Path
1.3 +0 -1
incubator-geronimo/modules/console-web/src/java/org/apache/geronimo/console/web/taglib/ClearFilterTag.java
Index: ClearFilterTag.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/console-web/src/java/org/apache/geronimo/console/web/taglib/ClearFilterTag.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ClearFilterTag.java 18 Sep 2003 16:43:23 -0000 1.2
+++ ClearFilterTag.java 22 Oct 2003 18:06:23 -0000 1.3
@@ -95,5 +95,4 @@
private boolean filtered() {
return (!ctx.getObjectNameFilter().equals("*:*"));
}
-
}
1.4 +2 -13
incubator-geronimo/modules/console-web/src/java/org/apache/geronimo/console/web/taglib/MBeanAttributesTag.java
Index: MBeanAttributesTag.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/console-web/src/java/org/apache/geronimo/console/web/taglib/MBeanAttributesTag.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MBeanAttributesTag.java 27 Sep 2003 20:37:50 -0000 1.3
+++ MBeanAttributesTag.java 22 Oct 2003 18:06:23 -0000 1.4
@@ -103,7 +103,7 @@
return EVAL_BODY_INCLUDE;
}
- /*
+ /**
* This seems like a very backwards way to do this. I don't know
* that creating an ObjectName, using it to get an ObjectInstance
* then creating another ObjectName is necessarily the way to go.
@@ -124,7 +124,7 @@
}
}
- /*
+ /**
* This gets the value of the MBeanName request parameter. If it
* Doesn't find anything, it returns null.
*/
@@ -139,7 +139,6 @@
private void printMBeanProperties(JspWriter out) {
try {
-
//String mbeanName;
//out.println("<strong>MBean Name </strong>" + getMBeanName());
out.println("<table cellpadding=\"0\" cellspacing=\"0\">");
@@ -191,15 +190,6 @@
out.println("\t</tr>");
}
-
- /*
- out.println("\t<tr class=\"one\">");
- out.println("\t\t<td class=\"name\">About</td>");
- out.println("\t\t<td class=\"center\">=</td>");
- out.println("\t\t<td class=\"value\">Now</td>");
- out.println("\t</tr>");
- */
-
} catch (IOException e) {
e.printStackTrace();
}
@@ -263,7 +253,6 @@
} else if (i % 2 == 1) {
trClass = "two";
}
-
out.println("\t<tr class=\"" + trClass + "\">");
out.println("\t\t<td class=\"name\">" + attributeName +
"</td>");
out.println("\t\t<td class=\"center\">=</td>");
1.3 +2 -2
incubator-geronimo/modules/console-web/src/java/org/apache/geronimo/console/web/taglib/MBeanServerContentsTag.java
Index: MBeanServerContentsTag.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/console-web/src/java/org/apache/geronimo/console/web/taglib/MBeanServerContentsTag.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MBeanServerContentsTag.java 18 Sep 2003 16:43:23 -0000 1.2
+++ MBeanServerContentsTag.java 22 Oct 2003 18:06:24 -0000 1.3
@@ -70,7 +70,7 @@
import javax.management.QueryExp;
import javax.servlet.jsp.JspWriter;
-import org.apache.geronimo.console.web.util.MBeanComparator;
+import org.apache.geronimo.console.web.util.ObjectInstanceComparator;
/**
* This class displays the contents of the MBeanServer, arranged in groups,
in
@@ -164,7 +164,7 @@
private List toList(Set set) {
List list = new ArrayList();
list.addAll(set);
- MBeanComparator comparator = new MBeanComparator();
+ ObjectInstanceComparator comparator = new ObjectInstanceComparator();
Collections.sort(list, comparator);
return list;
}
1.3 +0 -1
incubator-geronimo/modules/console-web/src/java/org/apache/geronimo/console/web/taglib/MBeanServerContextSupport.java
Index: MBeanServerContextSupport.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/console-web/src/java/org/apache/geronimo/console/web/taglib/MBeanServerContextSupport.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MBeanServerContextSupport.java 18 Sep 2003 16:43:23 -0000 1.2
+++ MBeanServerContextSupport.java 22 Oct 2003 18:06:24 -0000 1.3
@@ -63,7 +63,6 @@
* MBeanServerContextTag and its contents, as well as for accessing
* the BodyTagSupport class required for JSP tag libraries.
*/
-
public class MBeanServerContextSupport extends BodyTagSupport {
protected MBeanServerContextTag getMBeanServerContext() {
1.1
incubator-geronimo/modules/console-web/src/java/org/apache/geronimo/console/web/util/ObjectInstanceComparator.java
Index: ObjectInstanceComparator.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Geronimo" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Geronimo", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* ====================================================================
*/
package org.apache.geronimo.console.web.util;
import java.util.Comparator;
import java.util.StringTokenizer;
import javax.management.ObjectInstance;
import javax.management.ObjectName;
/**
* This class sort ObjectNames by canonical name. Unfortunately, it
* will not place single token domains before multiple token domains of
* the same type (foo.bar > foo at the moment).
*
* @version $Revision: 1.1 $ $Date: 2003/10/22 18:06:24 $
*/
public class ObjectInstanceComparator implements Comparator {
private static final int LEFT_GREATER = 1;
private static final int RIGHT_GREATER = -1;
private static final int EQUAL = 0;
public int compare(Object o1, Object o2) {
ObjectName left = ((ObjectInstance) o1).getObjectName();
ObjectName right = ((ObjectInstance) o2).getObjectName();
String leftName = left.getCanonicalName();
String rightName = right.getCanonicalName();
StringTokenizer leftDomainTokenizer =
new StringTokenizer(leftName, ".");
StringTokenizer rightDomainTokenizer =
new StringTokenizer(rightName, ".");
while (leftDomainTokenizer.hasMoreTokens()) {
if (!rightDomainTokenizer.hasMoreTokens()) {
return RIGHT_GREATER;
}
String leftToken = leftDomainTokenizer.nextToken();
String rightToken = rightDomainTokenizer.nextToken();
int comparison = leftToken.compareToIgnoreCase(rightToken);
if (comparison != 0) {
return comparison;
}
}
// left has no more tokens
if (rightDomainTokenizer.hasMoreTokens()) {
return LEFT_GREATER;
}
// both ran out of tokens so they are equal
return EQUAL;
}
}
1.2 +2 -2 incubator-geronimo/modules/console-web/src/webapp/faq.jsp
Index: faq.jsp
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/console-web/src/webapp/faq.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- faq.jsp 18 Sep 2003 04:45:26 -0000 1.1
+++ faq.jsp 22 Oct 2003 18:06:24 -0000 1.2
@@ -4,11 +4,11 @@
<html>
<head>
<title>Geronimo Management Console -- Frequently Asked Questions</title>
- <link rel="stylesheet" href="/jmx-console/style.css"/>
+ <link rel="stylesheet" href="/console/style.css"/>
</head>
<body>
-<img src="images/geronimo_logo_console.gif" border="0" alt="geronimo jmx
console"/>
+<img src="images/geronimo_logo_console.gif" border="0" alt="geronimo
management console"/>
<div id="topNavBar"><div class="topNav">JMX Agent View</div></div>
<jsp:include page="leftNavigation.jsp"/>
1.2 +3 -3
incubator-geronimo/modules/console-web/src/webapp/index.jsp
Index: index.jsp
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/console-web/src/webapp/index.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.jsp 18 Sep 2003 04:45:26 -0000 1.1
+++ index.jsp 22 Oct 2003 18:06:24 -0000 1.2
@@ -4,12 +4,12 @@
<html>
<head>
<title>Geronimo Management Console</title>
- <link rel="stylesheet" href="/jmx-console/style.css"/>
+ <link rel="stylesheet" href="/console/style.css"/>
</head>
<body>
<jmx:MBeanServerContext>
-<img src="images/geronimo_logo_console.gif" border="0" alt="geronimo jmx
console"/>
+<img src="images/geronimo_logo_console.gif" border="0" alt="geronimo
managment console"/>
<div id="topNavBar"><div class="topNav">JMX Agent View</div></div>
<jsp:include page="leftNavigation.jsp"/>
@@ -21,7 +21,7 @@
<input class="textInput" type="text" size="30" name="ObjectNameFilter"
value="<jmx:MBeanServerContextValue type='ObjectNameFilter'/>"/>
<input class="submit" type="submit" tabindex="1" value="Filter Output"/>
<jmx:ClearFilter/>
-(<a href="/jmx-console/faq.jsp#objectName"/>help</a>)
+(<a href="/console/faq.jsp#objectName"/>help</a>)
</form>
<jmx:MBeanServerContents/>
1.2 +2 -2
incubator-geronimo/modules/console-web/src/webapp/leftNavigation.jsp
Index: leftNavigation.jsp
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/console-web/src/webapp/leftNavigation.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- leftNavigation.jsp 18 Sep 2003 04:45:26 -0000 1.1
+++ leftNavigation.jsp 22 Oct 2003 18:06:24 -0000 1.2
@@ -4,7 +4,7 @@
<div class="leftNav">
<h2>Managed Resources</h2>
<div class="links">
- <a href="/jmx-console/index.jsp">MBean Stack</a>
+ <a href="/console/index.jsp">MBean Stack</a>
<br/>Relationships
<br/>Dependencies
<br/>Deployments
@@ -21,7 +21,7 @@
<h2> Help </h2>
<div class="links">
Managing Geronimo
- <br/><a href="/jmx-console/faq.jsp">JMX-Console FAQ</a>
+ <br/><a href="/console/faq.jsp">JMX-Console FAQ</a>
<br/>Contact us
</div>
</div>
1.2 +2 -2
incubator-geronimo/modules/console-web/src/webapp/mbeanInfo.jsp
Index: mbeanInfo.jsp
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/console-web/src/webapp/mbeanInfo.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mbeanInfo.jsp 18 Sep 2003 04:45:26 -0000 1.1
+++ mbeanInfo.jsp 22 Oct 2003 18:06:24 -0000 1.2
@@ -4,12 +4,12 @@
<html>
<head>
<title>Geronimo Management Console</title>
- <link rel="stylesheet" href="/jmx-console/style.css"/>
+ <link rel="stylesheet" href="/console/style.css"/>
</head>
<body>
<jmx:MBeanServerContext>
-<img src="images/geronimo_logo_console.gif" border="0" alt="geronimo jmx
console"/>
+<img src="images/geronimo_logo_console.gif" border="0" alt="geronimo
management console"/>
<div id="topNavBar"><div class="topNav">JMX Web Console</div></div>
<jsp:include page="leftNavigation.jsp"/>
1.2 +1 -1
incubator-geronimo/modules/console-web/src/webapp/WEB-INF/geronimo_jmx-console_v0-1.tld
Index: geronimo_jmx-console_v0-1.tld
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/console-web/src/webapp/WEB-INF/geronimo_jmx-console_v0-1.tld,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- geronimo_jmx-console_v0-1.tld 18 Sep 2003 04:45:26 -0000 1.1
+++ geronimo_jmx-console_v0-1.tld 22 Oct 2003 18:06:24 -0000 1.2
@@ -4,7 +4,7 @@
<taglib>
<tlibversion>0.1</tlibversion>
<jspversion>1.2</jspversion>
- <shortname>geronimo_jmx-console</shortname>
+ <shortname>console-web</shortname>
<uri>http://geronimo.apache.org/tlds/geronimo_jmx-console_v0-1.tld</uri>
<tag>
1.2 +1 -1
incubator-geronimo/modules/console-web/src/webapp/WEB-INF/web.xml
Index: web.xml
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/console-web/src/webapp/WEB-INF/web.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- web.xml 18 Sep 2003 04:45:26 -0000 1.1
+++ web.xml 22 Oct 2003 18:06:24 -0000 1.2
@@ -9,7 +9,7 @@
</welcome-file-list>
<taglib>
- <taglib-uri>jmx-console</taglib-uri>
+ <taglib-uri>console-web</taglib-uri>
<taglib-location>/WEB-INF/lib/jmx-console-servlet.jar</taglib-location>
</taglib>