John Morrison wrote:
>
> > -----Original Message-----
> > From: David Crossley [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, 27 November 2001 8:52 am
> > To: [EMAIL PROTECTED]
> > 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

> J.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to