| re: Connecting to a socket using javascript
Lans Redmond wrote:[color=blue]
> its a web app..built with struts/jsp/spring/javascript....and i need to do
> some work on the client side first gathering information from another server
> before passing it to my web server...[/color]
In such case nothing can be done client-side withing the default
security settings. No matter what solution would you choose,
cross-domain communication is blocked.
If you cannot / don't want to change security settings for each
involved machine, then the only way is to be a hacker on your own
server.
Take any of existing content grabbers (Perl, PHP, ASP - whatever you
like) and install it on your server. Now to communicate over Ajax with
your own server you are using direct addressing as before. To
communicate with another server you are calling your content grabber,
grabber gets the data from other server and forwards it to the client
so formally it stays withing the same domain.
Very stupid and security-wise useless, but IXMLHTTPRequest /
XMLHttpRequest designers wanted it this way.
By the way: for Ajax I recommend <http://www.ajaxtoolbox.com> |