tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CPC Livelink Admin" <>
Subject RE: Getting servletinputStream from a specific field of the posted form?
Date Sun, 26 Nov 2000 14:42:18 GMT

You need to get a multi-part post data handler.  There is one at (the O'Reilly servlets site) which is not wuite free (must
buy the book to use it commercially), but does work well.  If you browse the
archive, ( is one
archive), then you can search for other messages on this topic which show up


-----Original Message-----
From: Kirasawa, Mike []
Sent: Sunday, November 26, 2000 03:57 PM
Subject: Getting servletinputStream from a specific field of the posted


A small question, hopefully this is completely JSP-related (I think it is).
I have a form where a couple of the fields are of type <INPUT TYPE=FILE>,
which are used to upload images etc.

I would like to get the files posted through these two fields, and save them
to a pre-determined folder on the server. I came across something called:


but how would I specify exactly which file I wish to save?

I am a bit clueless here, and would appreciate a few pointers. I know that I
can write to a file by using a FileOutputStream, but before I can "put" a
file like this, I need to "get" the bytes from the posted form. Is there
anyway to get this? Request.getparameter just returns me a string, right?

Thanks a lot in advance,

View raw message