jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Friedli Beat <frie...@galexis.com>
Subject FileUpload with Cactus
Date Tue, 24 Sep 2002 06:35:31 GMT
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-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message