commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shervin Asgari <>
Subject Cannot find FileItemIterator.
Date Wed, 15 Nov 2006 15:31:55 GMT

I am trying to test FileUpload, and used a sample from the User Guide 
and Streaming Guide. But I get the same error.

I have uploaded the commons-fileupload.1.1 to my WEB-INF/lib directory 
and when the first test, which is

boolean isMultipart = ServletFileUpload.isMultipartContent(request);
returns true.
So I know I have a multipart/form-data

But when I try to read the data I get an error.
FileItemIterator iter = upload.getItemIterator(request);

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 8 in the jsp file: /test/uploadPhoto.jsp
Generated servlet error:
FileItemIterator cannot be resolved to a type

It seems it cannot find FileItemIterator. I have imported
<%@ page import="org.apache.commons.fileupload.*"%>
and in desperation I tried to import mostly all I found logical
<%@ page import="org.apache.commons.fileupload.servlet.*"%>
<%@ page import="org.apache.commons.fileupload.portlet.*"%>
<%@ page import="org.apache.commons.collections.*"%>

but still I get the same error. What am I doing wrong? I am using Java 
1.4.2, maybe I have to use 1.5?
Could that be the problem?

Shervin Asgari - System Consultant
M: +47 918 64 148, @:
Linpro AS - Leading on Linux	Tel: +47 21 54 41 00/02
Vitaminveien 1A        Fax: +47 21 54 41 01
PB 4 Grefsen, 0409 Oslo    WWW:

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

View raw message