cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: AW: AW: cocoon-reload=true or cocoon-reload%3Dtrue ?
Date Mon, 02 Apr 2001 08:46:36 GMT
Quoting Carsten Ziegeler <cziegeler@sundn.de>:

> > Giacomo Pati wrote:
> > Quoting Carsten Ziegeler <cziegeler@sundn.de>:
> > 
> > > After some investigation in this problem, I found a difference in
> the
> > > servlet engines.
> > > The CocoonServlet.getCocoon() method checks the pathInfo of the
> request:
> > > <<code snip>>
> > >     private synchronized Cocoon getCocoon(final String pathInfo,
> final
> > > String reloadParam) {
> > >         if (this.cocoon != null) {
> > >             if (this.cocoon.modifiedSince(this.creationTime)) {
> > >                 log.info("Configuration changed reload attempt");
> > >                 this.createCocoon();
> > >                 return this.cocoon;
> > >   !!TEST!!          } else if ((pathInfo == null) && (reloadParam !=
> > > null)) {
> > >                 log.info("Forced reload attempt");
> > >                 this.createCocoon();
> > >                 return this.cocoon;
> > >             }
> > >   !!TEST!!      } else if ((pathInfo == null) && (reloadParam !=
> null))
> > > {
> > >             log.info("Invalid configurations reload");
> > >             this.createCocoon();
> > >             return this.cocoon;
> > >         }
> > >
> > >         return this.cocoon;
> > >     }
> > > <<end code snip>>
> > >
> > > So the cocoon-reload parameter does only take effect if the pathInfo
> is
> > > null. Using
> > > Tomcat 3.2.1 the pathInfo is always null, so the cocoon-reload works
> > > fine.
> > > Using e.g. Bea 5.1 the pathInfo is never null but the name of the
> > > requested resource,
> > > so cocoon-reload never works!
> > > Why is this test of the pathInfo here? What is the reason for this
> test?
> > 
> > Can you test if Catalina is reporting a PathInfo == null, too? 
> Sorry, not today as we have nowhere Catalina installed, but perhaps
> tomorrow or so.

It's not that important (I guess it will because it runs well with the current 
setup).

> > I can
> > imagine
> > that these tests are coded because of those servlet engines showed up
> a
> > null
> > PathInfo. If Bea reports a empty string we will have to extend 
> > the test for
> > empty strings, too. The test how I understand them are that the
> > cocoon-reload
> > parameter can only be honored on the root context PathInfo. Thus an
> URI
> > like
> > http://localhost/cocoon/foo/bar?cocoon-reload=yes will never be used
> to
> > reload
> > the cocoon engine given that http://localhost/cocoon is the context
> root,
> > rigth?
> OK, this makes sense, but unfortunately Bea does not report an empty
> string, but
> the resource name. So requesting http://localhost/cocoon/hello will on
> Bea
> result in the pathInfo "hello". 

What is Bea reporting on a URL like http://localhost/cocoon or 
http://localhost/cocoon/ ?

> If I understood the servlet api
> correctly, this
> is a bug of Bea. Is this right?

Uh, anybody really familiar with the spec concerning this?

Giacomo

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message