diff --git a/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java b/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java index 23f9311b00..7d3b58ba8c 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java @@ -305,7 +305,9 @@ public abstract class MessageServletSupport extends HttpServlet { } else { isTopic = isTopic(request); } - destinationName = destinationName.substring(destinationName.indexOf("://") + 3); + if (destinationName.indexOf("://") != -1) { + destinationName = destinationName.substring(destinationName.indexOf("://") + 3); + } if (destinationOptions != null) { destinationName += "?" + destinationOptions;