cziegeler    2002/06/24 01:20:10

  Modified:    src/java/org/apache/cocoon/servlet CocoonServlet.java
  Log:
  Fixed setting of cache directory
  
  Revision  Changes    Path
  1.29      +9 -9      
xml-cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- CocoonServlet.java        11 Jun 2002 13:47:36 -0000      1.28
  +++ CocoonServlet.java        24 Jun 2002 08:20:10 -0000      1.29
  @@ -160,7 +160,7 @@
       private String defaultFormEncoding;
   
       protected ServletContext servletContext;
  -    
  +
       /** The classloader that will be set as the context classloader if 
init-classloader is true */
       protected ClassLoader classLoader = this.getClass().getClassLoader();
       protected boolean initClassLoader = false;
  @@ -205,12 +205,12 @@
       throws ServletException {
   
           super.init(conf);
  -        
  +
           final String initClassLoaderParam = 
conf.getInitParameter("init-classloader");
           this.initClassLoader = "true".equalsIgnoreCase(initClassLoaderParam) ||
                                  "yes".equalsIgnoreCase(initClassLoaderParam);
   
  -     if (this.initClassLoader) {
  +    if (this.initClassLoader) {
               // Force context classloader so that JAXP can work correctly
               // (see javax.xml.parsers.FactoryFinder.findClassLoader())
               try {
  @@ -350,7 +350,7 @@
           String cacheDirParam = conf.getInitParameter("cache-directory");
           if ((cacheDirParam != null) && (!cacheDirParam.trim().equals(""))) {
               if (this.servletContextPath == null) {
  -                this.cacheDir = new File(uploadDirParam);
  +                this.cacheDir = new File(cacheDirParam);
               } else {
                   this.cacheDir = IOUtils.createFile( new File(servletContextPath) , 
cacheDirParam);
               }
  @@ -440,8 +440,8 @@
        */
       public void destroy()
       {
  -     if (this.initClassLoader)
  -     {
  +        if (this.initClassLoader)
  +        {
               try {
                   Thread.currentThread().setContextClassLoader(this.classLoader);
               } catch (Exception e){}
  @@ -455,7 +455,7 @@
               this.disposeCocoon();
           }
       }
  -     
  +
       /**
        * Adds an URL to the classloader. Does nothing here, but is
        * overriden in {@link ParanoidCocoonServlet}.
  @@ -548,7 +548,7 @@
               File[] libraries = root.listFiles();
               Arrays.sort(libraries);
               for (int i = 0; i < libraries.length; i++) {
  -             String fullName = IOUtils.getFullFilename(libraries[i]);
  +                String fullName = IOUtils.getFullFilename(libraries[i]);
                   buildClassPath.append(File.pathSeparatorChar).append(fullName);
   
                   addClassLoaderDirectory(fullName);
  
  
  

----------------------------------------------------------------------
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