cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@indexgeo.com.au>
Subject Re: found the cause of Bug #5060 build docs
Date Tue, 27 Nov 2001 16:57:34 GMT
Excellent, thanks everyone. That fixes it.
I have committed the changes to CommandlineContext.java
into HEAD only.

Would people on all platforms, please please confirm that
"build docs" now works for you. Then i will add the changes
to cocoon_20_branch.
--David

Carsten wrote:
> Hi,
> perhaps changing the constructor:
> 
>     public CommandlineContext (String contextDir) {
>         this.contextDir = contextDir;
>         this.attributes = new HashMap();
>     }
> 
> to something like:
> 
>     public CommandlineContext (String contextDir) {
>         this.contextDir = new File(contextDir).getAbsolutePath();
>         this.attributes = new HashMap();
>     }
> 
> would help?
> 
> Carsten
> 
> > -----Original Message-----
> > From: David Crossley [mailto:crossley@indexgeo.com.au]
> > Sent: Tuesday, November 27, 2001 2:57 PM
> > To: cocoon-dev@xml.apache.org
> > Subject: Re: found the cause of Bug #5060 build docs
> >
> > Carsten Ziegeler wrote:
> > > John Morrison wrote:
> > > >
> > > > > -----Original Message-----
> > > > > From: David Crossley [mailto:crossley@indexgeo.com.au]
> > > > > Sent: Tuesday, 27 November 2001 8:52 am
> > > > > To: cocoon-dev@xml.apache.org
> > > > > Subject: found the cause of Bug #5060 build docs
> > > > >
> > > > <snip/>
> > > > >
> > > > > So it seems that there is inconsistency when using getResource()
> > > > > ...
> > > > > String catalogFile = params.getParameter("catalog",
> > > > >           "/resources/entities/catalog");
> > > > > String catalogURL =
> > > > > this.context.getResource(catalogFile).toExternalForm();
> > > > >
> > > > > There must be a reliable way to get the full filesystem
> > > > > pathname in both situations, but i cannot see how.
> > > >
> > > > <snip/>
> > > >
> > > > Would an alteration of the code in
> > > > src/org/apache/cocoon/environment/commandline/CommandlineContext.j
> > > > ava do it:
> > > >
> > > > (lines 61-66)
> > > >
> > > >     public URL getResource(String path) throws MalformedURLException {
> > > >         getLogger().debug("CommandlineContext: getResource=" + path);
> > > >         //return servletContext.getResource(path);
> > > >         return new URL(new
> > > >
> > StringBuffer("file:").append(this.contextDir).append(path).toString());
> > > >     }
> > > >
> > > > If this.contextDir returned the fully qualified path rather
> > than '.' would
> > > > that work?
> > > >
> > > This should be the right place, exactly.
> > > Carsten
> >
> > OK. However, i cannot see how to determine that "fully qualified
> > path rather than '.' " from within CommandlineContext.java
> > Do you have any tips?
> > --David


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


Mime
View raw message