use req.getContextPath to find the RootUri.. much more robust. 4.0 and 4.1 compatible...
[mir.git] / source / Mir.java
index f66b9a7..545d85f 100755 (executable)
@@ -58,9 +58,12 @@ import java.util.Locale;
  * Mir.java - main servlet, that dispatches to servletmodules
  *
  * @author $Author: mh $
- * @version $Revision: 1.17.2.1 $ $Date: 2002/09/01 21:31:39 $
+ * @version $Revision: 1.17.2.2 $ $Date: 2002/11/25 21:59:47 $
  *
  * $Log: Mir.java,v $
+ * Revision 1.17.2.2  2002/11/25 21:59:47  mh
+ * use req.getContextPath to find the RootUri.. much more robust. 4.0 and 4.1 compatible due to new web.xml mapping
+ *
  * Revision 1.17.2.1  2002/09/01 21:31:39  mh
  * Mir goes GPL
  *
@@ -76,6 +79,8 @@ public class Mir extends AbstractServlet {
     private static ModuleMessage messageModule = null;
     private final static HashMap servletModuleInstanceHash = new HashMap();
 
+    private static boolean nameSet = false;
+
     public HttpSession session;
 
     public void doGet(HttpServletRequest req, HttpServletResponse res)
@@ -95,7 +100,11 @@ public class Mir extends AbstractServlet {
         if (getServletContext().getAttribute("mir.confed") == null) {
             getConfig(req);
         }
-        MirConfig.setServletName(getServletName());
+
+        if (!nameSet) {
+          MirConfig.setAdminServletName(getServletName());
+          nameSet = true;
+        }
 
         session = req.getSession(true);