Results 1 to 2 of 2
- 07-31-2007, 02:55 AM #1
Member
- Join Date
- Jul 2007
- Posts
- 40
- Rep Power
- 0
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:
The above code gives the following timeout exception: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();
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?Java Code:Exception occurred: Connection timed out: connect Stack Trace:[Ljava.lang.StackTraceElement;@d6c16c
Thanks.
- 08-07-2007, 06:03 AM #2
Member
- Join Date
- Jul 2007
- Posts
- 40
- Rep Power
- 0
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
-
Secure Webpage for Logins
By chandpuri in forum Advanced JavaReplies: 3Last Post: 09-22-2009, 05:42 PM -
A Servlet Exception Has Occurred
By gabriel in forum JDBCReplies: 1Last Post: 08-07-2007, 02:28 AM -
Exception in thread "main" java.net.ConnectException: Connection timed out
By osval in forum Advanced JavaReplies: 1Last Post: 07-27-2007, 10:59 PM -
Help needed with certificate used to access webpage
By karl in forum Advanced JavaReplies: 0Last Post: 07-10-2007, 09:13 PM -
JBoss and Java 6:Exception occurred during event dispatching
By Ed in forum Advanced JavaReplies: 2Last Post: 07-04-2007, 05:23 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks