![]() |
Small Applet Problem
I'm trying to create an applet which retrieves information from a foreign url. I'm not entirely sure that this is even allowable however, because my code generates the following exception:
:
exception: java.lang.RuntimeException: java.security.AccessControlException: access denied (java.net.SocketPermission cache.pando.com:80 connect,resolve).:
import java.awt.*; |
There was a similar "can't do this in Java" thread a short time back, and andro posted a nice link in response. See post #5 in this thread.
The short answer: you can't open a socket connection to a foreign site from the applet. If you're able to implement server-side code, you can always have the server do it (and if possible, cache results to reduce overhead). [edit] Regarding your other post, it seems server-side code isn't viable, either. Hate to say it, but it sounds like you're screwed. Have you considered switching your web hosting? [/edit] |
yeah seems to be that switching web hosting is the only way to go. I was thinking Flash to work with XML, but flash has the same limitation. It can only read XML files on the domain. I may just have to get users to paste the actual content of the URL as opposed to trying to get my script to do all the work for them. I could use the javascript api, but I don't like to use javascript at all since I usually surf with javascript disabled.
|
| All times are GMT -5. The time now is 2:45 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC