public File getAppBase() {
   File base = new File(host.getAppBase());
   if (!base.isAbsolute()) {
     base = new File(System.getProperty("catalina.base"), host.getAppBase());
   }
   return base;
 }
Esempio n. 2
0
  /** Return a File object representing the "application root" directory for our associated Host. */
  protected File appBase() {

    if (appBase != null) {
      return appBase;
    }

    File file = new File(host.getAppBase());
    if (!file.isAbsolute()) file = new File(System.getProperty("catalina.base"), host.getAppBase());
    try {
      appBase = file.getCanonicalFile();
    } catch (IOException e) {
      appBase = file;
    }
    return (appBase);
  }