コード例 #1
0
ファイル: Environment.java プロジェクト: Eljah/jamwiki
 /**
  * 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
ファイル: Environment.java プロジェクト: Eljah/jamwiki
 /**
  * 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 "";
 }