Exemplo n.º 1
0
 /**
  * Returns a File object for the specified file saved on the server's filesystem, or null if the
  * file was not included in the upload.
  *
  * @param name the html page's file parameter name.
  * @return a File object for the named file.
  */
 public File getFile(String name) {
   try {
     UploadedFile file = (UploadedFile) files.get(name);
     return file.getFile(); // may be null
   } catch (Exception e) {
     return null;
   }
 }