dims        01/08/10 05:20:02

  Modified:    src/org/apache/cocoon/servlet CocoonServlet.java
  Log:
  Patch from "Morrison, John" <[EMAIL PROTECTED]>
  for "warn if a config setting hasn't been set"
  
  Revision  Changes    Path
  1.27      +19 -1     xml-cocoon2/src/org/apache/cocoon/servlet/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/servlet/CocoonServlet.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- CocoonServlet.java        2001/08/09 12:25:35     1.26
  +++ CocoonServlet.java        2001/08/10 12:20:02     1.27
  @@ -64,7 +64,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Nicola Ken Barozzi</a> Aisa
    * @author <a href="mailto:[EMAIL PROTECTED]";>Berin Loritsch</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.26 $ $Date: 2001/08/09 12:25:35 $
  + * @version CVS $Revision: 1.27 $ $Date: 2001/08/10 12:20:02 $
    */
   
   public class CocoonServlet extends HttpServlet {
  @@ -129,7 +129,14 @@
           this.initLogger();
   
           this.forceLoadParameter = conf.getInitParameter("load-class");
  +        if(conf.getInitParameter("load-class") == null) {
  +           log.debug("load-class was not set - defaulting to false?");
  +        }
  +
           this.addClassDirs = 
"true".equals(conf.getInitParameter("init-classloader"));
  +        if(conf.getInitParameter("init-classloader") == null) {
  +           log.debug("init-classloader was not set - defaulting to false");
  +        }
   
           String workDirParam = conf.getInitParameter("work-directory");
           if ((workDirParam != null) && (workDirParam.trim().equals("") == false)) {
  @@ -163,14 +170,25 @@
   
           this.appContext.put(Constants.CONTEXT_CONFIG_URL,
           this.getConfigFile(conf.getInitParameter("configurations")));
  +        if(conf.getInitParameter("configurations") == null) {
  +           log.debug("configurations was not set - defaulting to... ?");
  +        }
   
           // get allow reload parameter, default is true
           String value = conf.getInitParameter("allow-reload");
           this.allowReload = (value == null || value.equals("yes") || 
value.equals("true"));
  +        if(conf.getInitParameter("allow-reload") == null) {
  +           log.debug("allow-reload was not set - defaulting to true");
  +        }
   
           value = conf.getInitParameter("show-time");
           this.showTime = "yes".equals(value) || "true".equals(value)
               || (this.hiddenShowTime = "hide".equals(value));
  +
  +        if(conf.getInitParameter("show-time") == null) {
  +           log.debug("show-time was not set - defaulting to false");
  +        }
  +
           this.createCocoon();
       }
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to