connecting to url using applet

Hi,

I made a console program that uses the httpURLConnection class to determine if a site is up.

Now I converted that program into an applet. It no longer works. I get the following exception when trying to connect to google:

java.security.AccessControlException: access denied (java.net.SocketPermission www.google.ca resolve)

Does this have to do with signed applets? Is there anyway, I can connect to the site to determine if it's up?

My code:

URL url = new URL (u);

HttpURLConnection con = null;

if (url.getProtocol().equals("https"))

con=(javax.net.ssl.HttpsURLConnection)url.openConnection();

else

con = (HttpURLConnection)url.openConnection();

if (con.getResponseCode() != 200)

{

throw new Exception(u + " is " + con.getResponseMessage() + " " + con.getResponseCode());

}

else

{ //do stuff }

Any help would be appreciated.

Thanks

AJ

[972 byte] By [ajcoloursa] at [2007-9-29 15:19:18]
# 1
You have to properly sign your applet, and the end user has to grant the request for extra privileges.Another way is to edit the policy file on a particular machine.No way to do it otherwise in the conventional way.
SevaK02a at 2007-7-15 6:25:53 > top of Java-index,Security,Signed Applets...