File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes automatic login with java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "automatic login with java" Watch "automatic login with java" New topic
Author

automatic login with java

tatu rodriguez
Greenhorn

Joined: Jun 28, 2005
Posts: 2
Hi I want to crawl a webpage that requieres an id username and password.
I've got the user and password and I want to know how can I create a java program to crawl these pages automatically
Sharad Agarwal
Ranch Hand

Joined: Sep 11, 2002
Posts: 167
What kind of authentication is the server using?


Alco-Haul: We move spirits.
Demented Deliberations of a Dilettante
tatu rodriguez
Greenhorn

Joined: Jun 28, 2005
Posts: 2
Hello

It is about a form-based authentication in a JSP page.

I've got a crawler that can save pages but I also want to save those homepages which need to be filled with a user name and password

Could you tell me how I can make an automated login?
Sharad Agarwal
Ranch Hand

Joined: Sep 11, 2002
Posts: 167
If it is form-based authentication, all you need to do is figure out the parameters for the username and password (from 'view source') and make a request (GET or POST, whatever is more appropriate) with values for those parameters.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: automatic login with java