-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

All,

I'm developing my first multipart handler since .. I dunno, maybe
2005? This is the first time I'll be using the Servlet 3.0 multipart
handling, of course through Tomcat. Some of these questions may have
answers which are "implementation-specific", so in this case, I would
like to know how things will behave in Tomcat specifically. Notes of
where the spec leaves things up to the implementation will be appreciate
d.

I'd like to submit a form which has not only a large-ish file part,
but also some regular fields like <input type="text">. My
understanding is that I'll have to read those data by calling
Part.getInputStream(), wrapping the InputStream in an
InputStreamReader using the right charset, etc.

Do I get any help from any existing APIs for doing that, or do I have
to pull the Content-Type out of the Part-headers, look for a "charset"
parameter, etc., etc., in order to get the encoding and convert to a
String value? It seems like a pretty big hole in the multipart API not
to have something like that already available.

Can I rely on the client to send the fields in any particular order?
I'm not expecting to store the file on the server myself; I'd like to
process it in a "streaming" fashion and not touch the disk if
possible. I know that the server may store the file on the disk if it
decides to. I'm not terribly worried about that. I just don't want to
have to write the file to the disk TWICE, and I need information from
those other parameters in order to configure the stream-processing.

When iterating over the Collection<Part> returned from
HttpServletRequest.getParts(), am I required to process each part in
order immediately? Or can I store a reference to a Part for later?
This kind of goes along with the previous question.

When I'm done with a part, must I explicitly call Part.delete()?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl58xDUACgkQHPApP6U8
pFi6UxAAuwqHuLd7Xa1mo6yr+MwbltHo+3xauIgyr1IF9TIseAMeBAoNJYxgM7t2
TpZT6ZGupCQjblJ5Nd3m+W8IvtIEoOjFuILg7PIvmz+CzvPWNvmWMecIO55UW41Z
khf5jX686eLelKqf8VkBkYTdwpYpvS/B+WaWgwwGS0wKsq2/Z4xiYBcr/lqaY9Hh
SMeSmrfil7+ezGwf4YqdDANG8pORkGZi0NDDwrmlapS3fwKp9gQxKdsnu9Aq3YCI
R4Dpydqo6q+XrMxT8jJXIFTjUwqCS8LosKaRoqhunzeQ2uv1guvKhjwmCwVyoK1k
yPX6jojsR3CjChKbU5JCT0t7bierZ+Pem1Ihx5kv5fIfOf2hvhFwq7v/4MsCACZb
y7PgHEXDf/r65X9w0vJ4phmQKPUWFjtKnU7GStCmD9Th/WIM9HslXDIZxzBehoOw
HXQm6A4Terk+9183M5V2PIisHdR+WY2DhPBCat/j5s4+SMScSNcrt+ovpKQbpUAA
hnosaCK+rbEKdnKFndT/2dWE5k2z2faGKwqSwAUnrFep0gSFXr3f6mrPSygw3dig
65N5tTicrmqLeXl7VjppaXuXya5wJtbC6nk+mREyyiDvni+lu+3wemqzKHAF5PT5
comqAGuLCWZiJEV53X6Xo5mfqjIklHbZIjHTHlxCqsJR/zvpg6Y=
=aFQX
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to