Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-31-2007, 04:55 AM
Member
 
Join Date: Jul 2007
Posts: 40
toby is on a distinguished road
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:
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:

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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-07-2007, 08:03 AM
Member
 
Join Date: Jul 2007
Posts: 40
fernando is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Secure Webpage for Logins chandpuri Advanced Java 1 03-08-2008 08:05 PM
A Servlet Exception Has Occurred gabriel Database 1 08-07-2007 04:28 AM
Exception in thread "main" java.net.ConnectException: Connection timed out osval Advanced Java 1 07-28-2007 12:59 AM
Help needed with certificate used to access webpage karl Advanced Java 0 07-10-2007 11:13 PM
JBoss and Java 6:Exception occurred during event dispatching Ed Advanced Java 2 07-04-2007 07:23 AM


All times are GMT +3. The time now is 02:09 PM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org