You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@infoplanning.com> on 2000/12/07 16:17:22 UTC

Things that Cocoon needs explicitly passed

URL configuration file (works with servlet, easy to convert files)
String classpath
File WorkDir (needs to be guaranteed writable)
URL Root (Should this be URL, File, or String?)

Personally I think it is bad design to determine the root from
the parent of the cocoon.xconf file.  I want to hide that file
in WEB-INF for security reasons--and that can't happen right
now.

This does specify different TYPES passed to Cocoon.

---------------------------------------
If you lust for Ham and Eggs, you have
committed breakfast in your heart
already.   -- C. S. Lewis


Re: Things that Cocoon needs explicitly passed

Posted by Paul Russell <pa...@luminas.co.uk>.
On Thu, Dec 07, 2000 at 10:17:22AM -0500, Berin Loritsch wrote:
> URL configuration file (works with servlet, easy to convert files)
> String classpath
> File WorkDir (needs to be guaranteed writable)
> URL Root (Should this be URL, File, or String?)

Certainly not a string. Is there really such a thing as a 'root',
or should we always use getResource/getRealPath?

> Personally I think it is bad design to determine the root from
> the parent of the cocoon.xconf file.  I want to hide that file
> in WEB-INF for security reasons--and that can't happen right
> now.

Agreed. It's *always* the root of the web application, isn't it?
Failing that, it should be specified in web.xml, I think.


Paul

-- 
Paul Russell                               <pa...@luminas.co.uk>
Technical Director,                   http://www.luminas.co.uk
Luminas Ltd.

Re: Things that Cocoon needs explicitly passed

Posted by Berin Loritsch <bl...@infoplanning.com>.
----- Original Message ----- 
From: "Paul Russell" <pa...@luminas.co.uk>
To: <co...@xml.apache.org>
Sent: Thursday, December 07, 2000 1:03 PM
Subject: Re: Things that Cocoon needs explicitly passed


> On Thu, Dec 07, 2000 at 11:46:03AM -0500, Berin Loritsch wrote:
> > > URL configuration file (works with servlet, easy to convert files)
> > > String classpath
> > > File WorkDir (needs to be guaranteed writable)
> > > URL Root (Should this be URL, File, or String?)
> > I have a version that specifies everything listed here (Root is String),
> > and works.  Shall I commit it?  It changes the Cocoon constructor,
> > and the Programming section to use a File for the workDir.
> > 
> > public Cocoon(URL configuraitonFile, String classpath, File workDir, String Root) {}
> 
> Without the typo, right? ;) Is the root specified in web.xml, or
> extracted from the context? I'm still not entirely happy with
> using a string to specify the root, but I guess we can tackle that
> in due course.


Yes.  It is extracted from the context.  I will have to double-check,
but if root is held as a URL, we should pass it as a URL.

CocoonServlet gets the root information by context.getRealPath("/").
It's easy enough to derive a File/URL from that result.


Re: Things that Cocoon needs explicitly passed

Posted by Paul Russell <pa...@luminas.co.uk>.
On Thu, Dec 07, 2000 at 11:46:03AM -0500, Berin Loritsch wrote:
> > URL configuration file (works with servlet, easy to convert files)
> > String classpath
> > File WorkDir (needs to be guaranteed writable)
> > URL Root (Should this be URL, File, or String?)
> I have a version that specifies everything listed here (Root is String),
> and works.  Shall I commit it?  It changes the Cocoon constructor,
> and the Programming section to use a File for the workDir.
> 
> public Cocoon(URL configuraitonFile, String classpath, File workDir, String Root) {}

Without the typo, right? ;) Is the root specified in web.xml, or
extracted from the context? I'm still not entirely happy with
using a string to specify the root, but I guess we can tackle that
in due course.

+1


Paul.

-- 
Paul Russell                               <pa...@luminas.co.uk>
Technical Director,                   http://www.luminas.co.uk
Luminas Ltd.

Re: Things that Cocoon needs explicitly passed

Posted by Berin Loritsch <bl...@infoplanning.com>.
----- Original Message ----- 
From: "Berin Loritsch" <bl...@infoplanning.com>
To: <co...@xml.apache.org>
Sent: Thursday, December 07, 2000 10:17 AM
Subject: Things that Cocoon needs explicitly passed


> URL configuration file (works with servlet, easy to convert files)
> String classpath
> File WorkDir (needs to be guaranteed writable)
> URL Root (Should this be URL, File, or String?)
> 
> Personally I think it is bad design to determine the root from
> the parent of the cocoon.xconf file.  I want to hide that file
> in WEB-INF for security reasons--and that can't happen right
> now.

I have a version that specifies everything listed here (Root is String),
and works.  Shall I commit it?  It changes the Cocoon constructor,
and the Programming section to use a File for the workDir.

public Cocoon(URL configuraitonFile, String classpath, File workDir, String Root) {}