Author: jfrederic.clere(a)jboss.com
Date: 2008-04-25 06:48:18 -0400 (Fri, 25 Apr 2008)
New Revision: 1565
Added:
sandbox/httpd/src/java/TestHttpClient.sh
Log:
Add the test examples.
Added: sandbox/httpd/src/java/TestHttpClient.sh
===================================================================
--- sandbox/httpd/src/java/TestHttpClient.sh (rev 0)
+++ sandbox/httpd/src/java/TestHttpClient.sh 2008-04-25 10:48:18 UTC (rev 1565)
@@ -0,0 +1,36 @@
+#
+# Copyright 2008 Red Hat Middleware, LLC.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software distributed
+# under the License is distributed on an "AS IS" BASIS,i
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+CLASSES=$HOME/java/commons-httpclient-3.1/commons-httpclient-3.1.jar
+javac -classpath $CLASSES *Method.java
+javac -classpath $CLASSES:. TestHttpClient.java
+CLASSES=$CLASSES:$HOME/java/commons-logging-1.0.4/commons-logging.jar:$HOME/java/commons-codec-1.3/commons-codec-1.3.jar:.
+
+# Send a CONFIG command.
+java -Djavax.net.ssl.trustStore=$HOME/.keystore
-Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12
-Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12"
-classpath $CLASSES TestHttpClient
https://localhost:6666/test_bla/ CONFIG
+
+java -Djavax.net.ssl.trustStore=$HOME/.keystore
-Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12
-Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12"
-classpath $CLASSES TestHttpClient
https://localhost:6666/test_bla/ DUMP
+
+# Send a ENABLE for /myapp
+java -Djavax.net.ssl.trustStore=$HOME/.keystore
-Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12
-Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12"
-classpath $CLASSES TestHttpClient
https://localhost:6666/test_bla/ ENABLE
+
+java -Djavax.net.ssl.trustStore=$HOME/.keystore
-Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12
-Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12"
-classpath $CLASSES TestHttpClient
https://localhost:6666/test_bla/ DUMP
+
+# Send a REMOVE for /hisapp
+java -Djavax.net.ssl.trustStore=$HOME/.keystore
-Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12
-Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12"
-classpath $CLASSES TestHttpClient
https://localhost:6666/test_bla/ REMOVE
+
+java -Djavax.net.ssl.trustStore=$HOME/.keystore
-Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12
-Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12"
-classpath $CLASSES TestHttpClient
https://localhost:6666/test_bla/ DUMP
+
+java -Djavax.net.ssl.trustStore=$HOME/.keystore
-Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12
-Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12"
-classpath $CLASSES TestHttpClient
https://localhost:6666/test_bla/ STATUS
+
+#java -Djavax.net.ssl.trustStore=$HOME/.keystore
-Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12
-Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12"
-classpath $CLASSES TestHttpClient
https://localhost:6666/test_bla/ INFO