wood burning stoves 2.0*
The moose likes Servlets and the fly likes Using a servlet to log into a webpage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Using a servlet to log into a webpage" Watch "Using a servlet to log into a webpage" New topic

Using a servlet to log into a webpage

Aron Daburn
Ranch Hand

Joined: Mar 18, 2007
Posts: 36
I need to get a servlet to pull info off of a page that I am sent to after logging into a website.

The above code gets me the login page. What I can't figure out is how to log in to get the needed page after login.

Any ideas on how to go about doing this?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60749

I would assume that the authentication is there just to prevent such activity. That said, you might want to look into tools such as HttpClient.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Consider Paul's rocket mass heater.
subject: Using a servlet to log into a webpage
Similar Threads
HttpURLConnection or URLConnection to login in to sites
Regarding login into a webpage using java code ?
j_security_check 'next' page?
Get the URL of the page being redirected to?
How to display content of a url by using httpurlconnection?