Java Reference
In-Depth Information
Figure E.1
Setting up a JRE in Eclipse for HtmlUnit
E.2
Configuring Cactus with HtmlUnit
HtmlUnit integration requires Cactus version 1.8 or greater and a container such as
Tomcat or Jetty. Depending on which container you pick, and the version of Cactus
and HtmlUnit, you might have to adjust your installation.
Because Cactus 1.8.1 ships with HtmlUnit 1.6, you may want to update Cactus to
HtmlUnit 2.7 by copying the HtmlUnit JAR files over the ones provided by Cactus
and deleting htmlunit-1.6.jar. The HtmlUnit 2.7 HTML parser depends on the
Xerces and Xalan classes, so make sure you also make these JAR files available to
your web application or container.
Chapter 12 introduces writing HtmlUnit tests in the Cactus framework and chap-
ter 14 dives into the details. For the details regarding the installation and manage-
ment of applications and tests within particular containers, we refer you to the
Cactus documentation. We wrote the examples in this chapter with Tomcat 6.0.18
and Cactus 1.8.1, and setup is per the Cactus installation guide. 3
3
For Cactus and Tomcat setup, see http://jakarta.apache.org/cactus/integration/howto_tomcat.html.
 
 
Search WWH ::




Custom Search