cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject Re: [C2] How to create a disk path from the URL ?
Date Mon, 09 Apr 2001 11:38:34 GMT
Igor Romanov wrote:
> Hello Giacomo,
> GP> In the setup method you usually do a:
> GP>     InputSource src = resolver.resolveEntity(null, src);
> GP>     String      systemID = src.getSystemId();
> GP> You get the external form of an URL of the src attribute in variable
> GP> systemID.
> thanks. doesn't work (as I was expecting 8))
> Say i have <img src="/images/1.gif"/> - then I want to have
> "d:/hosting/mysite/images/1.gif" to be able to open image and
> determine it's size, but I got only "file:/images/1.gif" after
> that manipulations 8( Where's the context stored? How to get this
> "D:/bla-bla-bla" prefix while inside the transformer?

First, C2 was meant to work in a Context (I don't mean ServletContext
but an abstracted one) If you serve images out of that context your left
on your own. The code snipped posted previously (see above) is the
protocol to resolve context relative files/URLs in a sitemap component
(e.g. Transformer). This has to be done because your sitemap is located
at a context only the resolver passed to your component knows how to
resolve (because of the possibility of mounted sub sitemap at different
context roots).


> GP> Giacomo
> --
> Cheers...
> RiO                
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

View raw message