Haha :)
Of cos, the code that I was putting below was total crap.
I don't know why I was doing the (String) casting, and I meant:
// Returns a special type that allows you to write out the file, call
mpfile.getName() etc.
MultipartFile mpfile = req.getFileParameter("uploadedfile");
oh well.
Dion
ps. JavaOne is more than marketing? I thought it was the COMDEX of the Java
world ;)
> >> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Mark
> Galbreath
> Sent: Tuesday, April 17, 2001 4:47 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Curious: Why isn't Multipart built into the servlet API?
>
>
> Good question! Why don't you bring that up at Jason's seminar at
> JavaOne?
>
> :-)
>
> Cheers!
> Mark
>
> ----- Original Message -----
> From: "Dion Almaer" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 17, 2001 5:07 PM
> Subject: Curious: Why isn't Multipart built into the servlet API?
>
>
> > 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
> >
>
> __________________________________________________________________
> _________
> 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
>
___________________________________________________________________________
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