I have a jsp
with this code snippet in it.
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
if (item.isFormField()) {
// Process a normal field
String name = item.getFieldName();
String value = item.getString();
} else {
// Process a file upload field
String fileName = item.getName();
// DO further processing
}
}