java - Cross Domain in Tomcat using crossdomain.xml -


i'm trying add page in web pages. first choice iframe, target websites didn't allow iframe. after tried using cross domain. i'm using tomcat 7.0.27

i place crossdomain.xml in webapps/root/crossdomain.xml

my crossdomain.xml code:

<?xml version="1.0" ?> <cross-domain-policy> <allow-access-from domain="*" /> </cross-domain-policy> 

my jsp code:

<html> <head><script src="http://code.jquery.com/jquery-2.0.3.min.js"></script></head> <body> <script> $(document).ready(function() {   jquery('#result').load('http://www.facebook.com', function() {       alert('load performed.');   });   }); </script> <div id="result"/> </body> </html> 

the problem still doesn't work. got error says

**xmlhttprequest cannot load http://www.facebook.com/. origin http://localhost:8080 not allowed access-control-allow-origin.**  

what miss?


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -