[JDEV] Message sent is blank
Cunningham, Steven
Steven.Cunningham at LibertyMutual.com
Mon Aug 18 08:12:28 CDT 2003
I've been trying to get a jabber message to accept xhtml formatting, but
without much luck.
The message is sent all right, but it shows nothing in the message
(Shows who sent it, but then the message itself is blank.)
Here's the code that sends it (java)
String message = "<span style='font-size:large'>OMG, i'm </span><span
style='color:green'>green</span> with <em>envy</em>!";
JabberChatMessage msg = new
JabberChatMessage(JabberChatMessage.TYPE_CHAT);
msg.setTo(jabTo);
msg.setHTMLBody(message);
msg.setSynchronized(false);
jabberSession.sendMessage(msg);
System.out.println("--- Jabber messages sent successfully!\n");
When I included the <html> and <body> tags, I got the
SendMessageFailedException popped up.
SendMessageFailedException.getLocalizedMessage() returns this: The
element "html" could not be added as a child of "message": The element
already has an existing parent (the document root)
Steven Cunningham
Aspiring J-Developer
More information about the JDev
mailing list