aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Ajax cross domain problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Ajax cross domain problem" Watch "Ajax cross domain problem" New topic
Author

Ajax cross domain problem

Li Xin
Ranch Hand

Joined: Feb 06, 2004
Posts: 37
Does any one know if Ajax request can be sent to another server in the same machine? I have Tomcat and IIS on the same pc, I tried to send Ajax request from JSP in Tomcat to a PHP in IIS, it seems does not work.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Machine does not matter. The domain has to be the same.

Eric
Wyatt Matthews
Greenhorn

Joined: Aug 31, 2006
Posts: 3
You could consider submitting a request to the IIS server from the Tomcat server, and then when the Tomcat server recieves the response from IIS, return the response from the Tomcat instance. In doing this, you are not asking the client/browser to make the cross domain connection (which is not possible for good reason), you are allowing the server to handle the cross domain issues for you.

Good luck.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ajax cross domain problem