Results 1 to 2 of 2
  1. #1
    toby is offline Member
    Join Date
    Jul 2007
    Posts
    40
    Rep Power
    0

    Default using Java to access a secure webpage, Exception occurred: Connection timed out

    Hi, I am using Java to access a secure web page (https://...) that requires a userid and password. I am using the following Java code:
    Java Code:
    String urlAddr = "https://webaddress?userid=USERID&password=PASSWORD";
    URL url = new URL(urlAddr);
    URLConnection con = url.openConnection();
    InputStream in = con.getInputStream();
    BufferedReader result = new BufferedReader( new InputStreamReader( in ) );
    
    String Info = result.readLine();
    The above code gives the following timeout exception:

    Java Code:
    Exception occurred: Connection timed out: connect Stack Trace:[Ljava.lang.StackTraceElement;@d6c16c
    I am behind a firewall that requires authentication (userid and password) before I can gain access to the Internet. Therefore, there are two levels of authentication. I am only addressing one above. Can someone please advise to what options are available?
    Thanks.

  2. #2
    fernando is offline Member
    Join Date
    Jul 2007
    Posts
    40
    Rep Power
    0

    Default

    Write some code to get out of the firewall, manually deactivate the firewall

    both of those would work. try looking at the java.net APIs

    one thing I would try first though, is when writing the method, after the arguments, add throws TimeoutException, or whatever the name of the specific exception, and just see what the program does w/ the firewall
    Greetings.

Similar Threads

  1. Secure Webpage for Logins
    By chandpuri in forum Advanced Java
    Replies: 3
    Last Post: 09-22-2009, 05:42 PM
  2. A Servlet Exception Has Occurred
    By gabriel in forum JDBC
    Replies: 1
    Last Post: 08-07-2007, 02:28 AM
  3. Replies: 1
    Last Post: 07-27-2007, 10:59 PM
  4. Replies: 0
    Last Post: 07-10-2007, 09:13 PM
  5. Replies: 2
    Last Post: 07-04-2007, 05:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •