Hi guys -

When I have to deal w/ multipart (form upload etc), I use the O'reilly code.
When I work w/ multipart in other languages
it is built in.  Why isn't this the case w/ servlets?  I would like to be
able to change the ENCTYPE in the form,
without having to change the servlet that reads in that info.  Right now it
is tightly coupled.  Ideally
I would like to be able to do:

req.getParameter("name"); <- can read in whether multitype or not

and for the files either:

// just get it as a string
String contents = (String) req.getParameter("uploadedfile");
// convention means that <formname>-filename returns the name of the file
that was uploaded
String filename = (String) req.getParameter("uploadedfile-filename");

OR:

// Returns a special type that allows you to write out the file, call
mpfile.getName() etc.
MultipartFile mpfile = (MultipartFile) req.getParameter("uploadedfile");

Dion
_____________________________________________________________
Dion Almaer | [EMAIL PROTECTED]       | voice: 720.304.3244
CustomWare  | http://www.customware.com | fax:   360.242.0671

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to