vmassol 2002/06/06 03:32:16
Modified: documentation/docs/xdocs contributors.xml faq.xml
resources.xml
Added: documentation/docs/xdocs/images/logos outoftheboxweb.gif
Log:
merge from branch CACTUS_13_BRANCH
Revision Changes Path
1.4 +3 -0 jakarta-cactus/documentation/docs/xdocs/contributors.xml
Index: contributors.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/contributors.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- contributors.xml 23 May 2002 09:34:59 -0000 1.3
+++ contributors.xml 6 Jun 2002 10:32:15 -0000 1.4
@@ -103,6 +103,9 @@
<li>
<link href="mailto:[EMAIL PROTECTED]">Matt Sullivan</link>
</li>
+ <li>
+ <link href="mailto:[EMAIL PROTECTED]">Alan Perfect</link>
+ </li>
</ul>
</s1>
1.6 +47 -1 jakarta-cactus/documentation/docs/xdocs/faq.xml
Index: faq.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/faq.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- faq.xml 23 May 2002 09:34:59 -0000 1.5
+++ faq.xml 6 Jun 2002 10:32:15 -0000 1.6
@@ -41,6 +41,9 @@
"<code>not a valid response</code> error message. What does it
mean ?</jump>
</li>
+ <li>
+ <jump anchor="faq7">How to send multipart/form-data ?</jump>
+ </li>
</ul>
</s1>
@@ -203,7 +206,7 @@
<code>StreamCorruptedException</code> could also result when you are
using the wrong version of the servlet.jar in some area
(any version prior to 2.2, or using servlet.jar 2.2 with a
- Cactus-2.3 installation).
+ Cactus-1.3 installation).
</p>
</s2>
@@ -307,6 +310,49 @@
</p>
</s2>
+ </s1>
+
+ <anchor id="faq7"/>
+ <s1 title="How to send multipart/form-data ?">
+
+ <s2 title="Question">
+ <p>
+ How to send multipart/form-data to my servlet under test ?
+ </p>
+ </s2>
+ <s2 title="Solution">
+ <p>
+ One solution is to use the
+ <link href="http://www.innovation.ch/java/HTTPClient/">HTTPClient</link>
+ classes from Ronald Tschalar, as demonstrated in the following
+ example :
+ </p>
+
+<source><![CDATA[
+import HTTPClient.Codecs;
+import HTTPClient.NVPair;
+.
+.
+.
+NVPair[] hdrs = new NVPair[1];
+
+public void beginUpload(WebRequest theRequest)
+{
+ NVPair[] opts = { new NVPair("option", "myoption") };
+ NVPair[] file = { new NVPair("comment", "/home/alan/src.zip") };
+ try {
+ byte[] data = Codecs.mpFormDataEncode(opts, file, hdrs);
+ InputStream i = new ByteArrayInputStream(data);
+ theRequest.setUserData(i);
+ theRequest.setContentType(hdrs[0].getValue());
+ i.close();
+ } catch (IOException e) {
+ System.out.println("Error Building Multipart");
+ }
+}
+]]></source>
+
+ </s2>
</s1>
</body>
1.4 +0 -1 jakarta-cactus/documentation/docs/xdocs/resources.xml
Index: resources.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/resources.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- resources.xml 23 May 2002 09:34:59 -0000 1.3
+++ resources.xml 6 Jun 2002 10:32:15 -0000 1.4
@@ -94,7 +94,6 @@
</table>
<p/>
->>>>>>> 1.1.2.2
<table>
<tr>
1.4 +0 -0
jakarta-cactus/documentation/docs/xdocs/images/logos/outoftheboxweb.gif
<<Binary file>>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>