Ulf Dittmer wrote:Check out the Apache HttpClient library -which knows how to handle cookies- or, even better because it works on a higher level, the jWebUnit library. In my opinion, it's the best library for programmatic HTTP access that exists in the Java space.
i googeld that jWebUnit, as it seems its like JUnit but for web applications, so its only for testing?
Ulf Dittmer wrote:
i googeld that jWebUnit, as it seems its like JUnit but for web applications, so its only for testing?
No. Just ignore everything it says about unit testing - it's a general-purpose web client library.
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Ulf Dittmer wrote:In addition to importing all classes, you need to keep *all* jar files in the classpath. It looks like you're missing two of the ones that come with the httpcomponents-client download (apache-mime4j and httpcore).
Jesper de Jong wrote:This page lists the dependencies. Besides the httpclient jar, you need commons-codec and commons-logging (junit is only needed for testing). Download those libraries and also put them in your classpath.
Note that the download page also offers a "Binary with dependencies" package. That contains the httpclient jar together with the dependencies that it needs.
Getting the OSGi bundle will not help (it's really only useful when you want to deploy it as a module in an OSGi container).
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Prime wrote:You have a compiler error somewhere. Solve that first before running your application.
...make sure you add the jwebunit-htmlunit-plugin-XX.jar, jwebunit-core-XX.jar and all HtmlUnit dependencies (these files are in lib/ folder of the JWebUnit package) to your classpath in your IDE.
seems like noone has experience with such specific and advanced stuff.
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Vijitha Kumara wrote:You might want to check this thread (and perhaps some other threads too...).
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
If you don't explicitly configure commons logging to use LOG4J or another logging framework then it will use the simple logger. When using the simple logger, you can change the default logging level by setting the following system property.
2) also how can use jwebunit without the testing..i was lookin for different code examples, but theres always some testmethods.
so eventually i tried importing this address...
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Ulf Dittmer wrote:
i googeld that jWebUnit, as it seems its like JUnit but for web applications, so its only for testing?
No. Just ignore everything it says about unit testing - it's a general-purpose web client library.
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Oh the stink of it! Smell my tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|