powered by Jive Software

How to connect to a server which host doesn''t match the jabber domain

Hi there…

I’'m trying to connect to a server that has a domain like webserver1.mydomain.com - but the jabber domain (used in the communication between client/server) is mydomain.com - all JIDs are foo@mydomain.com as well. Is it possible to connect the socket to one hostname and specify a different one for the protocol/jabber api? How?

Maybe I even don’‘t need it - I’'m currently planning to build an applet to access my jabber server from any browser - but the applet is located on several mirrored web servers while the jabber server runs on a different host.

Since applets (afaik) are not allowed to connect to different hosts than the ones they are delivered from, I’'d like to set up a forwarding… Allowing the applets to connect to the web servers (at least they think so) and using the FQDN of my jabber server in the protocol.

Is this a bad idea? Any better approaches? Can it be done at all?

Thanks in advance,



Smack will use the domain that is sent back by the XMPP server. So, if you connect to “” and the server replies back that it’‘s real name is “example.com”, that’'s what Smack will use.

I’'m not quite sure what a good solution is on the applet. You could certainly have a servlet on each server acting as a proxy for the XMPP server. We do something similar with the pure-HTML clients we write.