Mike
Mike

Reputation: 21

Why can't I access crossdomain.xml file from tomcat server

I am running tomcat6. I know i need to place my crossdomain.xml file in the webApps folder of tomcat. When I try to access the crossdomain.xml file via http://domainname.com/crossdomain.xml I get a 400 Bad Request error.

If I create a folder called xml in the webApps folder and place my crossdomain file in that folder I am successful at getting the crossdomain file with the following: domainname.com/xml/crossdomain.xml . Problem is I need the crossdomain.xml file to be at the root directory for Flash application to work properly.

Also, I cannot access an index.html file with domainname.com/index.html . But I can access the index.html file if I place it in a folder like so: domainname.com/html/index.html

This seems like a configuration setting in one of tomcat's config files. Can anyone please help me resolve this issue so I can access the crossdomain.xml file with: http://my_real_domain_name.tld/crossdomain.xml

Upvotes: 2

Views: 5347

Answers (1)

Axel Knauf
Axel Knauf

Reputation: 1683

Tomcat's webapps directory is not what you see at the root URL in your browser, so putting a file into webapps will not make it available at http://example.org/file. Instead put your cross-domain policy into the webapps/ROOT/ folder - which is Tomcat's default webapp. This should allow requesting it as you are trying to.

Upvotes: 5

Related Questions