Ok, big merge. here's the new xml-config stuff in action. There's a few
[mir.git] / source / mir / servlet / AbstractServlet.java
index ac63304..53e75c6 100755 (executable)
@@ -38,7 +38,7 @@ public abstract class AbstractServlet extends HttpServlet {
     // init config
     MirConfig.initConfig(RealPath, RootUri, Name, getInitParameter("Config"));
 
-    theLog = Logfile.getInstance(MirConfig.getPropWithHome(Name+".Logfile"));
+    theLog = Logfile.getInstance(this.getClass().getName());
     theLog.printInfo(Name + " started.");
     theLog.printInfo("Path is: " + MirConfig.getProp("Home"));
     theLog.printInfo("Root URI is: " + MirConfig.getProp("RootUri"));
@@ -54,11 +54,11 @@ public abstract class AbstractServlet extends HttpServlet {
   }
 
   /**
-   * Get the session-binded language
+   * Get the session-bound language
    */
   protected String getLanguage(HttpServletRequest req, HttpSession session){
     String lang = (String)session.getAttribute("Language");
-    if(lang==null || lang==""){
+    if(lang==null || lang.equals("")){
       return getAcceptLanguage(req);
     } else {
       return lang;
@@ -66,8 +66,8 @@ public abstract class AbstractServlet extends HttpServlet {
   }
 
   /**
-   * Checks the Accept-Language of the clients browser.
-   * if this language is available it returns its country-code,
+   * Checks the Accept-Language of the client browser.
+   * If this language is available it returns its country-code,
    * else it returns the standard-language
    */
   protected String getAcceptLanguage(HttpServletRequest req){