Can JSP be used?

I am trying to connect to my server using the JSP shown below… (I changed server and user names for privacy)

<%@ page import=“java.util., org.jivesoftware.smack.” %>

Testing Jabber service…

<%

out.print(“Step 1…
”);

XMPPConnection connection = new

XMPPConnection(“jabber.org”);

out.print(“Step 2…
”);

connection.login(“mtucker”, “password”);

out.print(“Step 3…
”);

connection.createChat("jsmith@jivesoftware.com").sendMessage(“Howdy!”);

out.print(“Step 4…
”);

%>

It stops after step 1, and returns…

Testing Jabber service…

Step 1…

Error!

Connection failed. No response from server.

The server log shows this…

1/30/2003 1:55:57 PM: jsm: N Bouncing packet intended for nonexistant user: <route type=’‘error’’ from=’‘2@c2s.myservername/13682120’’ to=’‘myservername’’/>

1/30/2003 1:55:57 PM: jsm: W dropping a routed packet to myservername from 2@c2s.myservername/13682120: Invalid User

I don’‘t understand why it says “Invalid User” when it isn’'t even reaching the connection.login step.

Thanks,

Chris

Chris,

I’‘d recommend trying this logic in a standalone app first. In that case, you’‘ll be able to turn on the debug tool to trace exactly what’‘s getting sent between the client and server (see docs). Are you actually trying to connect to jabber.org or another server? If another server, perhaps it’‘s sending a response that Smack doesn’'t recognize. In that case, some tweaks will need to be made on one of the ends.

Regards,

Matt