Re: Using Java to supply username and password to login to a web site
From: Amit (amitshettyg_at_hotmail.com)
Date: 10/20/03
- Next message: Chris Smith: "Re: byte to int casting question"
- Previous message: Illya Kysil: "Re: Daylight savings problem"
- In reply to: Chris Smith: "Re: Using Java to supply username and password to login to a web site"
- Next in thread: Chris Smith: "Re: Using Java to supply username and password to login to a web site"
- Reply: Chris Smith: "Re: Using Java to supply username and password to login to a web site"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Oct 2003 08:03:14 -0700
Chris Smith <cdsmith@twu.net> wrote in message news:<MPG.19fa15acd99503139896f9@news.pop4.net>...
> Amit wrote:
> > Using Java, I want to supply my username and password to login to a
> > web site and manipulate the data on that site. Any suggestions?
>
> Can you provide more information about the web server? Is it expecting
> a form login? HTTP basic authentication? HTTP digest authentication?
> If it's not form login, then you can send an unauthenticated request,
> and get the type of authentication required back from the response
> headers. Form login is not designed to be accessible to machines, and
> requires human intelligence to figure it out from scratch, so you'd need
> to build in some knowledge (particularly, the names of the various
> fields).
Chris, Thanks for the reply.
What I am trying to do is to retrieve and save a page from a website.
The website has a login page which is a form. When I type the url for
any page, it returns the login page. i want to send the username and
password using my Java program, so that it will return the actual
page, rather than the redirected login page. Is it possible to submit
the login form and then access the required page.
>
> Incidentally, if you want to do the HTTP auth bit in a long-term
> maintainable way, I'd take a good strong look at HttpClient from Jakarta
> Commons and abandon URLConnection immediately (assuming you were looking
> at it in the first place).
- Next message: Chris Smith: "Re: byte to int casting question"
- Previous message: Illya Kysil: "Re: Daylight savings problem"
- In reply to: Chris Smith: "Re: Using Java to supply username and password to login to a web site"
- Next in thread: Chris Smith: "Re: Using Java to supply username and password to login to a web site"
- Reply: Chris Smith: "Re: Using Java to supply username and password to login to a web site"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|