badi malik wrote:
How are you handling the request? I don't think the request object will have a parameter named filedata.

like thus...

            fileItems = 
servletFileUpload.parseRequest(pageContext.getRequest());

i'm using the pageContext to get the request in this sample because i pulled my 
code out of the servlet i was using originally just to see if that was part of 
the problem and put it in a scriplet...either way, there are no parameters in 
the request...i used the Enumeration object to verify this...
There will be no parameters on the request object because it does not find any in a multipart request. You need to iterate over the fileItems list to find your files.

Example:

// Process the uploaded items
Iterator iter = fileItems.iterator();
while (iter.hasNext()) {
   FileItem item = (FileItem) iter.next();

   if (item.isFormField()) {
       processFormField(item);
   } else {
       processUploadedFile(item);
   }
}

Hope this helps.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to