Jabber Applet newbie

Hi,

I’‘m working on a java jabber applet for one of my classes and I’'m having problems.

I tested some code using an application and it worked perfectly, but when i used an applet it always freezes here:

con = new XMPPConnection(“192.168.0.15”);

my web server and jabber server are on the same machine ( i have also tried using localhost ).

I don’'t have much understanding of the problem so any help is greatly appreciated!

Have you tried to make a debug on the function you are calling?

He freezes when you create a connection, but in what part of the process of creating a connection frezzes?

It may help!

batal,

Java applets are only able to open socket connections to the same server that they were served from. I’'d recommend checking out:

http://java.sun.com/docs/books/tutorial/applet/practical/server.html

Regards,

Matt

hi Wizbang,

I know i should but i don’'t know how to do a debug! All I know is that this issue is only appearing in applets, i used the exact same code with an application and everything worked perfectly.

Has anyone tried working the smack library with applets?

thanks,

thanks matt,

i did read about this also on the web and for that reason i have my web server and jabber server on the same machine, so basically I’'m attempting to make a socket connection with the same machine that served the applet.

But still i can’'t establish the connection! Is there anyway i can test if the connection is refused or could it be something else? (am not getting any exception).