Hi Friedli,

There is a FAQ entry for this:
http://jakarta.apache.org/cactus/faq.html#faq7

We also have the following task in our todo list
(http://jakarta.apache.org/cactus/todo.html):

"
Help Cactus users test multipart/form-data. At least explain how to do
it. Some idea: use cos.jar (from http://www.servlets.com/cos/index.html)
to read multipart/form-data on the server side. Now we still need to
provide a mechanism to easily send multipart/form-data on the Cactus
client side. The best solution would be to use HttpClient but we need to
check if it has this feature or if it can be added. Submitted by Gunnar
Ole Skogen.   
"

Hope it helps
-Vincent

> -----Original Message-----
> From: Friedli Beat [mailto:[EMAIL PROTECTED]]
> Sent: 24 September 2002 07:36
> To: 'Cactus Users List'
> Subject: FileUpload with Cactus
> 
> Hi list
> 
> Can somebody point me to a decription of how to simulate a fileUpload
in
> cactus? (I'm working with cactus 1.3)
> 
> Below is how far I got until now. But there sam to be missing a few
> things.
> 
> //---------------------
> public void beginFileUpload(WebRequest theRequest) {
> 
>       // set setContentType to  multipart
>       theRequest.setContentType("multipart/form-data");
> 
>       // specify a file to upload
>       String theContentToUpload  = "this simulates a file.";
>       ByteArrayInputStream bis = new
> ByteArrayInputStream(theContentToUpload.getBytes());
>       theRequest.setUserData( bis );
> }
> 
> 
> Thanks!
> 
> Galexis AG
> Beat Friedli . SW-Entwicklung (DDIS/ASW)
> Grubenstrasse 11 . CH-3322 Schoenbuehl
> tel: +41 (0)31 858 72 32 . fax: +41 (0)31 858 78 81
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:cactus-user-
> [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to