• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doing a URLCOnnection from an Applet

 
Mark Mokris
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to access the text of a web page from a URL connection. Something like:
URL url = new URL("www.yahoo.com");
URLConnection uc = new URLConnection(url);
Well it works fine from a Java standalone application, but not from an applet. Am I running into Applet security? I admit that it doesn't seem to generate an exception in my try/catch block. If I was running into applet security, would I not get an exception? Do I have no hope for this running from an applet?
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should get a security exception if the URL you're attempting to connect to is not the same server as the one from which your applet was downloaded. That sandbox rule applies to any type of network connection you attempt using an unsigned applet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic