HttpsURLConnection to WebPage

Hi,

I just want a simple connection to a secure web page. When I access https://... by a browser I need to enter my username and the password. So I hoped that I can do the same with HttpURLConnection, but I did not find any information how it can be done very simple. I expected something like this:

HttpsURLConnection con = new HttpsURLConnection("https://...");

con.setUser(...);

con.setPass(...);

con.openConnection();

Is there anything like this? Or what is the most simple way to do this?

[537 byte] By [kudia] at [2007-10-2 22:45:28]
# 1
Please help me if you know it, also if it is possibly a stupid question, but I never found anything concrete. It is a bit urgent. (I hope there is something in Java which enables this, I mean it is essential, but it seems not to be when I search on the web...)
kudia at 2007-7-14 5:59:51 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 2
You can usually stick them in the URL:https://username:password@host:port/directory/...Otherwise see java.net.Authenticator
ejpa at 2007-7-14 5:59:51 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 3

Hi ejp,

I am curious to know how to properly use the HttpsURLConnection API to make

a connection into a secure (SSL) web site and be able to pass in post

variables (username and password) to log-in to my account(i have an account). Also, is it possible that once after

making the logged-in connection to do another post-action to a form on a

page that is in a username/password secured website? For example, I want to

make a URL connection to a page by logging-in, and then using that same

connection object, navigate to do another post action on a page that would

otherwise only be accessible if I was only logged into the web site...'is this

possible?

Thanks

v.i.p

v.i.pa at 2007-7-14 5:59:51 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 4
> I am curious to know ...I am curious to know whether you read this thread before you hijacked it.
ejpa at 2007-7-14 5:59:51 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...