Java Reference
In-Depth Information
you an instant message you need to add the application to your friend list in
Google Talk. In the web interface for Google Talk, which is nested inside the Gmail
interface, we've added as illustrated in Figure 8-10.
Figure 8-10. Application ID added to Google Talk
You can see that the application appears to be online. You can send it messages, but
it will not respond. You're just going to be looking at sending XMPP messages. If
you'd like to enable your application to receive XMPP messages, reference the
online documentation at Create a servlet called in the same Eclipse project that you've been using throughout
this chapter. Copy the code from Listing 8-13 into the new servlet.
Listing 8-13.
package com.kyleroche.xmpp;
import javax.servlet.http.*;
public class XMPPServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
JID jid = new JID("put your gmail account here");
Search WWH ::

Custom Search