Reputation: 21
I designed an Client/Server application allowing to download PDF files from the server. I tried to convert my application to an Applet. Everything works when I launch the applet with the Eclipse Applet viewer.
However, when I try to launch my application with a browser(any browser), the browser sends to the server the following http request and waits for an answer :
GET /crossdomain.xml HTTP/1.1
User-Agent: Mozilla/4.0 (Windows 7 6.1) Java/1.6.0_24
Host: 127.0.0.1
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Cookie: __utmz=96992031.1301339630.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=96992031.1102947305.1301339630.1301339630.1301339630.1
What am I supposed to do?
Any help is appreciated
Upvotes: 1
Views: 401
Reputation: 74750
Unsigned applets normally are only allowed to access the same server they were loaded from. Your applet tried to access another server. In earlier Java versions, this was simply forbidden, but with newer versions, the VM asks the target's server if this should be allowed (by looking in its crossdomain.xml
file).
Read the Cross-domain policy file specification for how such a file should look like, or arrange your applet to be loaded from the same server it wants to access later.
Upvotes: 1