开发者

adding crossdomain.xml to tomcat 6.0.24 to access webservices with Flex

I have to deploy a webapp on Tomcat 6.0.24, serving some webservices that should be accessed with REST-style methods (not fully REST, since the used flex class HTTPService can just send GET and POST).

The webservices are deployed at http://localhost:8080/-webappname-/rest/-methodname-

The problem is that the policy of flex sandbox (i think it is called so) requires that the server with the services has to offer a file crossdomain.xml on his root directory.

I created that file with the following contents:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
    <site-control permitted-cross-domain-policies="all"/>
    <allow-access-from domain="*" />
    &l开发者_开发问答t;allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

Now i have to find the right place to put it, since i also have an apache server running on that machine, on port 80:

  1. in the /var/www of apache? Accessible at http://localhost/
  2. in the ROOT of the tomcat default webapp? Accessible at http://localhost:8080/

I am testing it and it does not seem to work. Maybe i am not doing it right. PS: I think Apache is not configured to manage Tomcat-addressed requests, every request is dispatched by port, i think. I can not provide the exact flex error since i am not developing that part. I will try to make a minimal example in the next hours and see if i can reproduce the problem.


It actually doesn't matter where you stick it (physically) as long as the URL request "http://localhost:8080/crossdomain.xml" returns the right file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜