use req.getContextPath to find the RootUri.. much more robust. 4.0 and 4.1 compatible...
[mir.git] / source / mir / misc / MirConfig.java
index c628d48..b188752 100755 (executable)
@@ -74,14 +74,14 @@ public class MirConfig extends Configuration {
    * @param name, The name of the servlet (usually "Mir")
    * @param confName, the name of the config file to load.
    */
-  public static synchronized void initConfig(ServletContext ctx, String uri,
+  public static synchronized void initConfig(ServletContext ctx, String ctxPath,
                                             String name, String confName) {
     initConfResource(confName);
     configHash = new HashMap();
 
     configHash.put("Home", ctx.getRealPath("/"));
     configHash.put("ServletContext", ctx);
-    configHash.put("RootUri", uri);
+    configHash.put("RootUri", ctxPath);
 
     Enumeration resKeys = getResourceKeys();
     while(resKeys.hasMoreElements()) {
@@ -89,13 +89,13 @@ public class MirConfig extends Configuration {
       configHash.put(keyNm, getProperty(keyNm));
     }
   }
-  /**
-   * Returns the property asked for by pulling it out a HashMap
-   * @param a String containing the property name (key)
-   * @return a String containing the prop. value
-   */
-  public static void setServletName(String servletName) {
-    configHash.put("ServletName",servletName);
+
+  public static void setAdminServletName(String servletName) {
+    configHash.put("AdminServletName",servletName);
+  }
+
+  public static void setOpenServletName(String servletName) {
+    configHash.put("OpenServletName",servletName);
   }
 
   /**