Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

automatic login with java

 
tatu rodriguez
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of authentication is the server using?
 
tatu rodriguez
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic