开发者

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 fol开发者_如何学Pythonder 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


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜