Hi Gennady,
Cactus 1.1 and 1.2 is relying on HttpURLConnection for setting up all HTTP
data needed on the server side when the unit tests are executed. The goal is
to move to the Jakarta Commons HttpClient framework in the future (you can
check it at : http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/),
i.e. probably for Version 1.3. Thus, all features supported by HttpClient
will be supported by Cactus WebRequest (ServletTestRequest is now deprecated
and has been renamed WebRequest). I don't know if HttpClient currently
supports multipart. However, we'll add a mechanism so that you'll be able to
send your own data from beginXXX() and set the correct mime type.
>From the Cactus TODO list, on the web site :
"Add an API in WebRequest to send data to the URL connection output stream.
This is, for example, to easily test code that upload files to a servlet.
This would need managing "multipart/form-data" MIME type in the HTTP
connection. A convenience method, like WebRequest.uploadFile(InputStream)
should be added. We should wait till Cactus moves to using
commons-httpclient for HTTP connections (in replacement of
HttpURLConnection). "
Sorry about that ... The more help we get, the fastest we'll implement it
... :-)
Thanks
-Vincent
----- Original Message -----
From: "Gennady Berezhnoy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 24, 2001 12:42 PM
Subject: cactus question
> Hello Cactus developers team!
> I work with Cactus for our projects and found it very usefull. Now olny
> one think not enough for me...
> ..I try make test to testing multipart support but don't found way to do
> this. As described in cactusAPI :
>
> public class ServletTestRequest
> extends java.lang.Object
> Contains all HTTP request data for a test case. ...
>
> In follow ServletTestRequest class API I don't found method wich give
> possibilities to stream manipulation. Is problem in me or..?
> I need access to multipart data, but still not ready do it :(
> Generic Method of ServletRequest : ServletInputStream
> getInputStream() Retrieves the body of the request as binary
> data using a ServletInputStream.
> has no equvivalent in ServletTestRequest class.
>
> Kind regards,
> Gennady Berezhnoy.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]