From b1ed273f83385b2bd1eea7881771d39f3ee63712 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Thu, 26 Oct 2006 15:00:48 +0000 Subject: [PATCH] fixed the web console so it works fine with spring 2.0 along with adding XMPP support so you can chat with the broker using a Jabber client or use the web front end to send / browse messages git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@468029 13f79535-47bb-0310-9956-ffa450edef68 --- activemq-web-console/pom.xml | 7 +++++++ .../web/handler/BindingBeanNameUrlHandlerMapping.java | 10 ++++++++-- .../src/main/resources/log4j.properties | 2 +- .../src/main/webapp/WEB-INF/activemq.xml | 5 +++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/activemq-web-console/pom.xml b/activemq-web-console/pom.xml index 89cfe7185c..8333302b02 100755 --- a/activemq-web-console/pom.xml +++ b/activemq-web-console/pom.xml @@ -98,6 +98,13 @@ activemq-web + + + ${pom.groupId} + activemq-xmpp + ${pom.version} + + ${pom.groupId} diff --git a/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java b/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java index d8080d0e82..0f4d744c45 100644 --- a/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java +++ b/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java @@ -19,6 +19,8 @@ package org.apache.activemq.web.handler; import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import javax.servlet.http.HttpServletRequest; @@ -27,6 +29,7 @@ import javax.servlet.http.HttpServletRequest; * @version $Revision$ */ public class BindingBeanNameUrlHandlerMapping extends BeanNameUrlHandlerMapping { + private static final transient Log log = LogFactory.getLog(BindingBeanNameUrlHandlerMapping.class); protected Object getHandlerInternal(HttpServletRequest request) throws Exception { Object object = super.getHandlerInternal(request); @@ -36,9 +39,12 @@ public class BindingBeanNameUrlHandlerMapping extends BeanNameUrlHandlerMapping object = getApplicationContext().getBean(handlerName); } - ServletRequestDataBinder binder = new ServletRequestDataBinder(object, null); + ServletRequestDataBinder binder = new ServletRequestDataBinder(object, "request"); binder.bind(request); - System.out.println("Bound POJO is now: " + object); + binder.setIgnoreUnknownFields(true); + if (log.isDebugEnabled()) { + log.debug("Bound POJO is now: " + object); + } return object; } diff --git a/activemq-web-console/src/main/resources/log4j.properties b/activemq-web-console/src/main/resources/log4j.properties index 6fceb4ec25..7cc4955f72 100755 --- a/activemq-web-console/src/main/resources/log4j.properties +++ b/activemq-web-console/src/main/resources/log4j.properties @@ -18,7 +18,7 @@ # # The logging properties used during tests.. # -log4j.rootLogger=INFO, stdout +log4j.rootLogger=DEBUG, stdout log4j.logger.org.apache.activemq.spring=WARN log4j.logger.org.springframework=warn diff --git a/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml b/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml index 11cf0e41f1..9b6a00dbdd 100755 --- a/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml +++ b/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml @@ -62,13 +62,14 @@ - + + - +