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

11,446

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.

Share:
11,446
mox601
Author by

mox601

I earned my M. Sc. degree in Computer Engineering, and I have several years of extensive experience of in software architecture, design and development. I mainly develop software in Java, but I am skilled in several other languages, like Javascript, Ruby, PHP, and Clojure. I am particularly interested in projects based on open source technologies, oriented to NLP and Big Data management and analysis for business value creation. Occasionally I am invited as a speaker at technical conferences and university lectures. Currently, I'm responsible of software architecture and software development, and project manager in several European and National funded R&D ICT projects. I'm also a drummer at late night and a rookie bicycle commuter. With my band we held shows in several italian venues, clubs and festivals, including a 7 venues/10 days/1500 Km tour in Southern Italy. Skills: information retrieval, artificial intelligence, knowledge representation and semantic web Specialities: project management, natural language processing, network analysis, artificial intelligence, knowledge representation and semantic web Problem-solving skills, excellent organizational abilities, able to work in team and independently. Fast learner.

Updated on June 05, 2022

Comments

  • mox601
    mox601 about 2 years

    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="*" />
        <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.