This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes httpclient - commons 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 » Products » Other Open Source Projects
Bookmark "httpclient - commons" Watch "httpclient - commons" New topic
Author

httpclient - commons

friso dejonge
Ranch Hand

Joined: Jul 11, 2002
Posts: 162
Hi,
i just read some articles on the commons, but i am looking specifically at the httpclient now. It looks to me like this can be used, maybe is used as some sort of testing engine like the httpunit.jar
Retrieve a webpage, and take a look at the outcome.
So my questions are:
1. can you chain pages, like filling in a form stretching over multiple pages, and then test the whole form filling procedure
2. can you use javascript in this httpclient, and use the dom-model ?
thanks
friso


swimming certificate (A & B), shoelaces diploma, and some useless java ones.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
The Commons HttpClient doesn't deal with the HTML/JavaScript level you're describing -- it concentrates on implementing the HTTP protocol and doing it well.
HttpUnit (and HtmlUnit, JWebUnit) on the other hand supports filling and submitting HTML forms and, to some degree, JavaScript on HTML pages.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Harshad Oak
Author
Ranch Hand

Joined: Oct 21, 2002
Posts: 45
HttpClient is concerned with sending HTTP requests from Java code and then handling the response in Java code.
If i am not mistaken, HtmlUnit uses HttpClient.


------------------------<br />Harshad Oak<br /> <br />- Oracle ACE Director, Sun Java Champion<br /> <br />Author:<br />- Pro Jakarta Commons<br />- Oracle JDeveloper 10g: Empowering J2EE development<br />- Java 2 Enterprise Edition 1.4 Bible<br /> <br />- SCJP, SCWCD<br />------------------------
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341
I agree with Lasse Koskela and Harshad Oak, please see HttpClient features.
friso dejonge
Ranch Hand

Joined: Jul 11, 2002
Posts: 162
i get the point. thanks,
 
Consider Paul's rocket mass heater.
 
subject: httpclient - commons
 
Similar Threads
Auto-submit a form on a jsp page
Calling a servlet from a test harness
Uploading files without form
Passing parameters from tag to servlet
scanning the webpage