aspose file tools*
The moose likes Java in General and the fly likes Webrowsing with Sessions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Webrowsing with Sessions" Watch "Webrowsing with Sessions" New topic
Author

Webrowsing with Sessions

Stephen Tallamy
Greenhorn

Joined: Jan 08, 2002
Posts: 16
Hi,
Can anyone help me solve the following problem:
I need to connect to a website, login using a username and password, and then perform a number of actions on the website - e.g. navigate to a page & post some information. How do I do this using Java classes?
Stephen
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

Check out HttpUnit
Here's a short description of it:

The normal way to access web sites is via a browser; however, there are times when it is desirable to bypass the browser and access a site from a program, including:
* automated web site testing
* using a web-site as part of a distributed application
HttpUnit makes this easy. Written in Java, HttpUnit emulates the relevant portions of browser behavior, including form submission, basic http authentication, cookies and automatic page redirection, and allows Java test code to examine returned pages as text, an XML DOM, or containers of forms, tables, and links.

hope that helps!


- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Stephen Tallamy
Greenhorn

Joined: Jan 08, 2002
Posts: 16
Looks like a winner. Many thanks for your help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Webrowsing with Sessions