Hi Ramit, > i want to set a byte array as one of my attributes in the post request, > similar to request.setAttribute(String,Object) in servlets? How do i > acheive this ?
you can not set anything in a request similar to ServletRequest.setAttribute. Request attributes on the server side are kept in memory and accessed as Java objects. Whatever you put into an HTTP request needs to be sent over a connection to the server, and as such you have to indicate where in the request it should be put and what transformation/encoding to use. The two concepts are really completely different. Have a look at the MultipartRequestEntity and the PartSource interface. You can feed your byte array in as a ByteArrayInputStream with an empty or invented filename. http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/methods/multipart/MultipartRequestEntity.html http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/methods/multipart/PartSource.html hope that helps, Roland --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
