title: adding crossdomain.xml to tomcat 6.0.24 to access webservices with Flex
body: <p>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). </p>
  
  <p>The webservices are deployed at <code>http://localhost:8080/-webappname-/rest/-methodname-</code></p>
  
  <p>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. </p>
  
  <p>I created that file with the following contents: </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"&gt;
  &lt;cross-domain-policy&gt;
      &lt;site-control permitted-cross-domain-policies="all"/&gt;
      &lt;allow-access-from domain="*" /&gt;
      &lt;allow-http-request-headers-from domain="*" headers="*"/&gt;
  &lt;/cross-domain-policy&gt;
  </code></pre>
  
  <p>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: </p>
  
  <ol>
  <li>in the /var/www of apache?
  Accessible at <code>http://localhost/</code> </li>
  <li>in the ROOT of the tomcat default
  webapp? Accessible at
  <code>http://localhost:8080/</code></li>
  </ol>
  
  <p>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. </p>