File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes commons.httpclient.methods.multipart.MultipartRequestEntity work´s but i need i good idea ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "commons.httpclient.methods.multipart.MultipartRequestEntity work´s but i need i good idea ?" Watch "commons.httpclient.methods.multipart.MultipartRequestEntity work´s but i need i good idea ?" New topic
Author

commons.httpclient.methods.multipart.MultipartRequestEntity work´s but i need i good idea ?

Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 348
I have created a client and a servlet that uses multipart, it works fine

The servlet returns a large 1 -- 3 mb binary stream in the responsebody ....

Now the curstomer wants to get some more information, back together with the stream.

I could can correct my servlet, so that the first 200 bytes i return is xml, with this information, and the rest is the stream ....

But then the client schould take the first 200 bytes and make some xml parsing on that, and after this, thake the rest and stream the content into a file ......

Hmmm is the only possibiliy, or is there someone out there that can give me an idea, how i can resolve this issue on a better way ?

Frank


Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 348
I found the anser myself, i will put it as header information off course ......................
 
Don't get me started about those stupid light bulbs.
 
subject: commons.httpclient.methods.multipart.MultipartRequestEntity work´s but i need i good idea ?
 
Similar Threads
Reading variable size buffer into an byte array
Need help regarding my J2ME client server application
Problem reading the HttpConection response in some devices
Strange webserver performance
Http Connection stream only sends 2048 bytes