3. In the web.xml set the mime-mapping tag:
<mime-mapping>
<extension>
xml
</extension>
<mime-type>
text/x-cross-domain-policy
</mime-type>
</mime-mapping>
1. Deploy the
ear
file as usual.
7.5 Calling policies via JavaScript
One exception to the requirement that a master policy file be present is when a document specifies a
policy via JavaScript.
When a master file is not used, the following rules are enforced:
• Acrobat can load policy files from arbitrary locations via the JavaScript method
app.loadPolicyFile(url)
; for example:
app.loadPolicyFile("http://www.example.com/sub/dir/pf.xml")
.
Note
There is a single cross domain file cache, so a call such as
app.loadPolicyFile(url)
will affect
other PDFs opened during that client's session. For details, refer to the
JavaScript™ for Acrobat® API
Reference
.
• SWFs can load policies from other locations via the JavaScript method
Security.loadPolicyFile
. Refer to the Flex documentation for more information.
7.6 Troubleshooting
When cross domain access fails, users will likely see a dialog or the Yellow Message Bar. To troubleshoot
the problem, enable logging and try again. The log error messages should indicate what's wrong.
You can verify the policy file is in the right location by entering the following in a browser to see the file:
http(s):
//m
yserverroot
.
com
/
crossdomain
.
xml
Enhanced Security: Data access dialog (pre 9.3 and 8.2)
Application Security Guide
Section 7 Cross Domain Configuration
Section 7 Cross Domain Configuration
Page 67