git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1342618 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-05-25 13:31:58 +00:00
parent d44513a655
commit a1b235d275
1 changed files with 8 additions and 4 deletions

View File

@ -416,14 +416,18 @@ public class MessageListenerServlet extends MessageServletSupport {
if (message instanceof TextMessage) {
TextMessage textMsg = (TextMessage)message;
String txt = textMsg.getText();
if (txt.startsWith("<?")) {
txt = txt.substring(txt.indexOf("?>") + 2);
if (txt != null) {
if (txt.startsWith("<?")) {
txt = txt.substring(txt.indexOf("?>") + 2);
}
writer.print(txt);
}
writer.print(txt);
} else if (message instanceof ObjectMessage) {
ObjectMessage objectMsg = (ObjectMessage)message;
Object object = objectMsg.getObject();
writer.print(object.toString());
if (object != null) {
writer.print(object.toString());
}
}
writer.println("</response>");
}