public class ReceiveChatMessage extends HttpServlet {
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
XMPPService xmpp = XMPPServiceFactory.getXMPPService();
Message message = xmpp.parseMessage(req);
JID fromJid = message.getFromJid();
String body = message.getBody();
JID jid = new JID("julien.plagnes@gmail.com");
Message msg = new MessageBuilder().withRecipientJids(jid)
.withBody("Vous m'avez dit \"" + body + "\"").build();
boolean messageSent = false;
XMPPService xmpp1 = XMPPServiceFactory.getXMPPService();
if (xmpp1.getPresence(jid).isAvailable()) {