Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to automate the login process?  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In my application,I am parsing the web page for the specifyied data and process it. I need to automate the login process by passing user and password parameters to other webserver through https.
So that it can automatically log in and generate the page which will be parsed by my application, process it.
How can I achive this?
Any iead?

Regard,
Gajanan
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are several ways to achieve this.

The easiest is if you authenticate using Basic authentication, then HTTP (and HTTPS) support authentication through the URL in the form http://username:password@www.domain.com

Another option is to use certificate authentication, but if you have no control over the server this will not be possible.

If you are using form-based authentication you will probably need to write a class to manage the interaction for you. You can get APIs to manage the HTTPS communication and you only need to worry about implementing enough HTTP to send the login request, receive the session id, then send the session id with the processing data in a second request.

Unless I've completely misunderstood the question...

Dave
[ May 19, 2004: Message edited by: David O'Meara ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66182
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Gajanan C",

We're pleased to have you here with us in the JSP forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!