This content has been marked as final. Show 5 replies
If you post a link to an example that shows it not working I may be able to help. The default location is the web document root of the external domain, but often its easier to see what's not working by looking watching what's not working.
Unfortunately it's on an intranet so I can't show you, but it's pretty much just that the XML file is not loading, and it's because of the domain. I know this because in development, we have the servlets and flash running on the server, but have multiple domains to access it. For example, I can access the site as well as the servlets by just going to http://servername or by going to http://servername.main.corp.
Well the calls to the servlets were previously hardcoded in the flash with absolute URLs, as http://servername.main.corp/servlets/DoSomething. When I accessed the site at http://servername.main.corp, the swf worked properly and loaded the data correctly. However, when I accessed the site at http://servername, the swf would hang up on the loading stage. So it's pretty clear that the domain is the issue.
As I said, I'm running tomcat, so there's not really a "web document root", especially since I'm aliasing tomcat in apache webserver via JK_mod. So when I type in http://servername.main.corp/servlets/DoSomething, it makes the request to apache webserver, which then hands off the request to tomcat which has a web.xml file configuring aliases for itself!
However, in production, I will be running websphere, and I have no idea how that folder structure is set up, so maybe it will be easier to figure out where to place my cross domain policy.
Like I said, I'm side chaining tomcat via apache webserver, so I don't know where my "root" would be, if it would be the root of apache (since that's what's taking the request) the root of tomcat (since it's aliasing to that, so it's really passing it off...but where the hell is the root of tomcat?) or the root of the servlet (since web.xml sets up alias folders for each servlet).
Let's turn this around rather than getting into the server details: A quick way to see where flash is looking for the crossdomain.xml is to use Firefox with the Firebug plugin and watch the http requests coming from the browser. You will see where flash is looking for the crossdomain.xml file and not finding it. That's the best way to check quickly.
I actually got it working by placing the crossdomain.xml in the root of apache server, since the request was going there before getting transfered to the tomcat server. However, this is because they're both using the same domain, on production they will be two different domains, so I'm trying to set up an environment that will emulate that. I tried pointing the flash files to the same domain but with the port that goes directly to tomcat, but this worked without ANY crossdomain policies!!
But thanks for your guidance, I think you've helped me in a few binds in the past! I'll check out firebug for sure, it's one of my favourite tools, I'm surprised I didn't think to use it myself. Thanks again!