Parsing multi-part response

joex
joex used Ask the Experts™
on
Would like java code to parse multipart/mixed response returned from a servlet.

The servlet returns the multipart response based on a parameter in the URL.

Thanks,

Tim
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
You should probably use a dedicated api, such as Apache HttpClient

Author

Commented:
Please provide more details as this is completely new to me.

Author

Commented:
Also, it needs to handle streaming.
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Commented:
I think you mean  multipart   "request"    
http://commons.apache.org/fileupload/ 
has  
Streaming API.

Author

Commented:
The response being sent has the following setting:  "multipart/mixed".  

Commented:
Ok, I was wrong.
Top Expert 2016

Commented:
Actually, surprisingly, it seems HttpClient doesn't support this response type directly. Have a look into

http://incubator.apache.org/wink/1.1/api/org/apache/wink/common/model/multipart/InMultiPart.html

instead
Top Expert 2016

Commented:
>>http://www.servlets.com/cos/

No doubt since that's server-oriented, it seems to have classes for producing that type of response, but none for parsing them, unless i've overlooked it

Author

Commented:
I figured it out.

Thanks.
Top Expert 2016

Commented:
:)

joex, Can you say what you did for the benefit of future visitors?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial