tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Cronin <>
Subject RE: someone plz help
Date Tue, 07 May 2002 13:40:49 GMT
here's what I use.

  public static void upload
    HttpServletRequest request,
    String uploadFolder    
  ) throws IOException
    String cType = request.getContentType();

    if (cType != null &&
	    MultipartRequest multi = new MultipartRequest(request,
		  Enumeration files = multi.getFileNames();
        throw new IOException("No files upload");
      throw new IOException("Invalid Content type: " + cType);

-----Original Message-----
From: # Lalit Nagpal # []
Sent: Tuesday, May 07, 2002 12:03 AM
Subject: someone plz help

i have set multipart/form-data tag in my html form. i
need to get a form filled in by the visitors and also
an attachment on the same form (file upload). i am
using oreilly classes. problem is when i try to get
data + file on the server using MultipartRequest class
of oreilly i get the error "content type is not
multipart". I am using MultipartRequest class
getParameter function to get the data, and the file
upload works as usual. Any Ideas why this error is

Plz help.
Thanx in advance.

# Lalit Nagpal #

Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message