use req.getContextPath to find the RootUri.. much more robust. 4.0 and 4.1 compatible...
[mir.git] / source / OpenMir.java
index da49b75..912a666 100755 (executable)
@@ -61,6 +61,8 @@ public class OpenMir extends AbstractServlet {
   private static String lang;
   public HttpSession session;
 
+  private boolean nameSet = false;
+
   public void doGet(HttpServletRequest req, HttpServletResponse res)
     throws ServletException, IOException {
     doPost(req,res);
@@ -77,6 +79,11 @@ public class OpenMir extends AbstractServlet {
     if(getServletContext().getAttribute("mir.confed") == null) {
       getConfig(req);
     }
+    if (!nameSet) {
+        MirConfig.setOpenServletName(getServletName());
+        nameSet = true;
+    }
+      
     session = req.getSession();
 
     if(session.getAttribute("Language")==null){