From: <no...@us...> - 2003-07-24 12:38:57
|
Log Message: ----------- Added docs on configuring JSSE - contributed by Tom Hamilton Modified Files: -------------- /cvsroot/htmlunit/htmlunit/src/xdocs: changes.xml navigation.xml Added Files: ----------- /cvsroot/htmlunit/htmlunit/src/xdocs: jsse.xml Revision Data ------------- --- NEW FILE: jsse.xml --- <?xml version="1.0"?> <document> <properties> <title>Configuring JSSE</title> <author>Tom Hamilton</author> <author email="mb...@Ga...">Mike Bowler</author> <revision>$Revision: 1.1 $</revision> </properties> <body> <section name="Configuring JSSE"> <p> The following instructions were initially provided by Tom Hamilton in response to a question on the htmlunit-develop mailing list. </p> <ol> <li> Make sure that you have <a href="http://java.sun.com/products/jsse">jsse</a>! </li> <li> Make sure that you pass in the following param to the jvm <source><![CDATA[<jvmarg value="-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol"/>]]></source> </li> <li> Change your java.security file to include the following (it's the security.provider.3 line!) <source> # # List of providers and their preference orders (see above): # security.provider.1=sun.security.provider.Sun security.provider.2=com.sun.rsajca.Provider security.provider.3=com.sun.net.ssl.internal.ssl.Provider </source> </li> <li> Make sure your class path includes the right jars - in the right order! Here is a cut from my ant script that I use to run all of my tests, seeing as I had it written down... Some things to note about this class path, I'm using cactus, WebLogic, struts, log4j and Xalan. You may not need all of these, but the key part is the html unit bits and their integration with jsse. Note that all of these come first. <source><![CDATA[ <path id="test.classpath"> <!-- note - the order of the classpath is important for the html unit stuff to work --> <!-- the html unit classes --> <pathelement path="C:\HtmlUnit-1.2.2\lib\commons-httpclient.jar"/> <pathelement path="C:\HtmlUnit-1.2.2\lib\commons-logging.jar"/> <pathelement path="C:\HtmlUnit-1.2.2\lib\HtmlUnit.jar"/> <!-- jsse libs --> <pathelement path="C:\jsse1.0.3_02\lib\jcert.jar"/> <pathelement path="C:\jsse1.0.3_02\lib\jnet.jar"/> <pathelement path="C:\HtmlUnit-1.2.2\lib\js.jar"/> <pathelement path="C:\jsse1.0.3_02\lib\jsse.jar"/> <!-- some more html unit libs --> <pathelement path="C:\HtmlUnit-1.2.2\lib\nekohtml.jar"/> <pathelement path="C:\HtmlUnit-1.2.2\lib\xercesImpl.jar"/> <pathelement path="C:\HtmlUnit-1.2.2\lib\xmlParserAPIs.jar"/> <!-- jdbc classes for oracle --> <pathelement path="C:\oracle\ora81\jdbc\lib\classes12.zip"/> <pathelement path="C:\oracle\ora81\jdbc\lib\nls_charset12.zip"/> <pathelement path="C:\oracle\ora81\orb\classes\yoj.jar"/> <!-- the test classes are all in here --> <pathelement location="c:\projects\nbkrel3/webifServices/.antbuild/classes/war/"/> <!-- the cactus libs --> <pathelement path="C:\jakarta-cactus-13-1.4\lib\cactus-1.4.jar"/> <pathelement path="C:\jakarta-cactus-13-1.4\lib\aspectjrt-1.0.5.jar"/> <pathelement path="C:\jakarta-cactus-13-1.4\lib\commons-logging-1.0.jar"/> <pathelement path="C:\jakarta-cactus-13-1.4\lib\junit-3.7.jar"/> <pathelement path="C:\jakarta-cactus-13-1.4\lib\httpunit-1.4.1.jar"/> <pathelement path="C:\jakarta-cactus-13-1.4\lib\commons-httpclient-2.0alpha1-20020606.jar"/> <!-- log4j --> <pathelement path="${project.root.dir}/dependencies/lib/log4j.jar"/> <!-- struts --> <pathelement path="${project.root.dir}/dependencies/lib/jakarta-oro-2.0.6.jar"/> <pathelement path="${project.root.dir}/dependencies/lib/struts.jar"/> <!-- junit classes --> <pathelement path="${project.root.dir}/dependencies/lib/junit.jar"/> <pathelement path="${project.root.dir}/dependencies/lib/junitx.jar"/> <!-- math routines --> <pathelement path="${project.root.dir}/dependencies/lib/IBMMath.jar"/> <!-- jce --> <pathelement path="${project.root.dir}/dependencies/lib/jce1_2-do.jar"/> <!-- weblogic classes --> <pathelement path="${weblogic.dir}/lib/weblogic_sp.jar"/> <pathelement path="${weblogic.dir}/lib/weblogic.jar"/> <!-- xml classes --> <pathelement path="${xalan.dir}/bin/xml-apis.jar"/> <pathelement path="${xalan.dir}/bin/xercesImpl.jar"/> <pathelement path="${xalan.dir}/bin/xalan.jar"/> <!-- jakarta commons lib --> <pathelement path="${weblogic.dir}/lib/commons-collections.jar"/> ]]></source> The xalan stuff is in here so that the xslt transalation works when I do the junitreports </li> <li> Finally you will need to import the certificate into your jssecacerts file - this is simple enough, just lookup how to do it on javasoft.com </li> <li> Finally finally pass in the param <source><![CDATA[<jvmarg value="-Djavax.net.debug=all"/>]]></source> to check what is going wrong - 'cos it's bound to! Once it's working turn the flag to <source><![CDATA[<jvmarg value="-Djavax.net.debugx=all"/>]]></source> Then it all works, no debug comes out, and you don't forget what the flag is for next time! </li> </ol> </section> </body> </document> Index: changes.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/changes.xml,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- changes.xml 23 Jul 2003 17:26:52 -0000 1.119 +++ changes.xml 24 Jul 2003 12:38:55 -0000 1.120 @@ -127,13 +127,13 @@ <action type="update" dev="mbowler" id="738548"> Fix for bug 738548 - "Form values are not Posted Properly to Server" </action> - <action type="new" dev="mbowler"> + <action type="add" dev="mbowler"> Added support for the property Window.name </action> - <action type="new" dev="mbowler"> + <action type="add" dev="mbowler"> Added read-only support for Document.cookie. </action> - <action type="new" dev="mbowler" id="675597"> + <action type="add" dev="mbowler" id="675597"> Added support for the javascript method Window.setTimeout() </action> <action type="update" dev="mbowler"> @@ -142,7 +142,7 @@ <action type="update" dev="mbowler"> Upgraded the xerces to 2.4 </action> - <action type="new" dev="mbowler" id="742515"> + <action type="add" dev="mbowler" id="742515"> New method HtmlPage.getAllForms() </action> <action type="update" dev="mbowler"> @@ -154,6 +154,9 @@ what the browsers do. If the input's name was foo we would previously send the following values to the server: foo, foo.x and foo.y. The browsers only send foo.x and foo.y. + </action> + <action type="add" dev="mbowler"> + Added docs on configuring JSSE - contributed by Tom Hamilton </action> </release> </body> Index: navigation.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/navigation.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- navigation.xml 18 Jul 2003 15:38:37 -0000 1.6 +++ navigation.xml 24 Jul 2003 12:38:55 -0000 1.7 @@ -18,10 +18,11 @@ <item name="Download" href="http://sourceforge.net/project/showfiles.php?group_id=47038"/> </menu> <menu name="How do I..."> - <item name="Getting started" href="/gettingStarted.html"/> - <item name="Keyboard" href="/keyboard-howto.html"/> - <item name="Tables" href="/table-howto.html"/> - <item name="Window" href="/window-howto.html"/> + <item name="Get started" href="/gettingStarted.html"/> + <item name="Use the Keyboard" href="/keyboard-howto.html"/> + <item name="Use Tables" href="/table-howto.html"/> + <item name="Use Windows" href="/window-howto.html"/> + <item name="Configure JSSE" href="/jsse.html"/> </menu> <menu name="User docs"> <item name="Tool support" href="/ide.html"/> |