hi,
I would like to know if it is possible to maintain an authentication (like a session with login and password in php) on a website from a java program, and if anyone had any lead on the subject or some reading for me, that would be great.
thanks
hi,
I would like to know if it is possible to maintain an authentication (like a session with login and password in php) on a website from a java program, and if anyone had any lead on the subject or some reading for me, that would be great.
thanks
Here is a simple tutorial on authentication for JSP...http://www.roseindia.net/mysql/loginauthentication.shtml
You can use the HttpClient class. Once you have authenticated with the website the server will send you a cookie that you have to send with each successive request in order for the server to think that you are logged in.
all you need is cookies, and java URLConnection. I use this all the time http://www.rgagnon.com/javadetails/java-0092.html
you use readcookies after you open a new urlconnection and writecookies when creating a new one.