Abtool Kabash
Abtool Kabash

Reputation: 93

Can I violate the same-origin policy with a Java applet

I need to request things and get information from other domains. I know javascript can not do this due to the same origin policy. My other option is to make proxy requests through my server. I do not want the requests coming from my server's IP nor do I want to create additional load for my server and would prefer the client do it.

Is it possible to use a Java applet to do this? Manually configuring security settings is not an issue.

Upvotes: 3

Views: 1313

Answers (1)

Ray Nicholus
Ray Nicholus

Reputation: 19890

Java applets do implement the same origin policy, much the same way as Flash. Java will prevent applet-based cross-origin calls if the target server does not have a properly defined publicly accessible crossdomain.xml.

A simple crossdomain.xml would look like this:

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

Upvotes: 2

Related Questions