diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index 23fee26d..8c961338 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -199,13 +199,11 @@ public final class Application implements IPathElement, Runnable { // if appDir and dbDir weren't explicitely passed, use the // standard subdirectories of the Hop home directory if (appDir == null) { - appDir = new File(home, "apps"); - appDir = new File(appDir, name); + appDir = new File(server.getAppsHome(), name); } if (dbDir == null) { - dbDir = new File(home, "db"); - dbDir = new File(dbDir, name); + dbDir = new File(server.getDbHome(), name); } // get system-wide properties diff --git a/src/helma/main/Server.java b/src/helma/main/Server.java index ec062ca9..ce612165 100644 --- a/src/helma/main/Server.java +++ b/src/helma/main/Server.java @@ -673,15 +673,30 @@ public class Server implements IPathElement, Runnable { * @return ... */ public File getAppsHome() { - String appHome = sysProps.getProperty("appHome"); + String appHome = sysProps.getProperty("appHome", ""); - if ((appHome != null) && !"".equals(appHome.trim())) { + if (appHome.trim().length() != 0) { return new File(appHome); } else { return new File(hopHome, "apps"); } } + /** + * + * + * @return ... + */ + public File getDbHome() { + String dbHome = sysProps.getProperty("dbHome", ""); + + if (dbHome.trim().length() != 0) { + return new File(dbHome); + } else { + return new File(hopHome, "db"); + } + } + /** * *