You will need to throw in a condition to check to see if the file name is blank and if so not call the method that does the uploading.
Example:
// Read the parameter/item that should hold the file name
String itemName = item.getName();
// Check to see if the file name is blank.
// for some reason doing an if compare to null did not work for
// me
if(itemName.length()<2)
{System.err.println("Oppsss no file to upload");}
else
{ // Open else in readParam method
System.out.println("If triggered");
File fullFile = new File(itemName);
File savedFile = new File(getServletContext().getRealPath("/"),fullFile.getName());
item.write(savedFile);
System.out.println("Ok, the file should have been written somewhere....");
} // Close else in readP
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
