Пример #1
0
 /**
  * Return the default upload directory (/webapp-root/upload/) as a String.
  *
  * @return The default upload directory (/webapp-root/upload/) as a String.
  */
 private static String retrieveDefaultUploadDirectory() {
   try {
     return new File(Utilities.getWebappRoot(), "upload").getPath();
   } catch (Exception e) {
     logger.severe("Failure while trying to retrieve default file upload directory", e);
   }
   return "";
 }
Пример #2
0
 /**
  * Return the default relative upload directory (/context/upload/) as a String.
  *
  * @return The default relative upload directory (/context/upload/) as a String.
  */
 private static String retrieveDefaultRelativeUploadDirectory() {
   try {
     return "/" + Utilities.getWebappRoot().getName() + "/upload/";
   } catch (Exception e) {
     logger.severe("Failure while trying to retrieve default file upload directory", e);
   }
   return "";
 }