URLConnection problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: URLConnection problem

  1. #1
    Nir Guest

    URLConnection problem


    Hi all,
    I've been trying to open a url connection using the follwing code :

    .....
    .....

    URL url = new URL("http://www.yahoo.com");
    java.net.URLConnection connection = url.openConnection();
    connection.connect();

    .....

    and I always get the following exception :
    {com.ms.security.SecurityExceptionEx detailMessage="cannot
    access "http://www.yahoo.com" "}
    java.lang.Exception

    And that's happening even when I try connecting 2 any other URLs.

    Any suggestions ?

    best regards,
    Nir.

  2. #2
    Guest

    Re: URLConnection problem


    i ve already met this probleme and it was due to some URL instead of url.Though
    i m not sure and i d' like to have some help.
    i m looking for an ftp serveur and i m also looking for simple multithreading
    applications.
    thanks

    "Nir" <nir@effective-i.com> wrote:
    >
    >Hi all,
    >I've been trying to open a url connection using the follwing code :
    >
    >.....
    >.....
    >
    >URL url = new URL("http://www.yahoo.com");
    >java.net.URLConnection connection = url.openConnection();
    >connection.connect();
    >
    >.....
    >
    >and I always get the following exception :
    >{com.ms.security.SecurityExceptionEx detailMessage="cannot
    > access "http://www.yahoo.com" "}
    >java.lang.Exception
    >
    >And that's happening even when I try connecting 2 any other URLs.
    >
    >Any suggestions ?
    >
    >best regards,
    >Nir.



  3. #3
    Paul Clapham Guest

    Re: URLConnection problem

    Is this happening in an applet? ("com.ms" leads me to suspect that it is.)
    If so, then your problem is that standard applet security prevents an applet
    from connecting to any domain except the one it was loaded from.

    PC2

    <nir@effective-i.com> wrote in message news:3ad30bfe$1@news.devx.com...
    >
    > i ve already met this probleme and it was due to some URL instead of

    url.Though
    > i m not sure and i d' like to have some help.
    > i m looking for an ftp serveur and i m also looking for simple

    multithreading
    > applications.
    > thanks
    >
    > "Nir" <nir@effective-i.com> wrote:
    > >
    > >Hi all,
    > >I've been trying to open a url connection using the follwing code :
    > >
    > >.....
    > >.....
    > >
    > >URL url = new URL("http://www.yahoo.com");
    > >java.net.URLConnection connection = url.openConnection();
    > >connection.connect();
    > >
    > >.....
    > >
    > >and I always get the following exception :
    > >{com.ms.security.SecurityExceptionEx detailMessage="cannot
    > > access "http://www.yahoo.com" "}
    > >java.lang.Exception
    > >
    > >And that's happening even when I try connecting 2 any other URLs.
    > >
    > >Any suggestions ?
    > >
    > >best regards,
    > >Nir.

    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center