Hi Peter,

   Let me start by saying that this is ugly but will work...

   Essentially you can use the current Thread as a key to
a HashTable to lookup the context in your resolver.  You can
also subclass Thread to add this information as well (Although
that might be tricky in a Servlet).

   As a total aside, I've come around to the belief that you need
to pass context information to the URL classes for them to be
fully functional.  It's a shame we don't...

Peter Coppens <[EMAIL PROTECTED]> wrote on 06/27/2007 04:57:27 
AM:

> Could one use the ParsedURL approach to have a different URI resolution
> mechanism for each "rendering" invocation of Batik in a multi threaded
> server environment.
> 
> I was using
>     ParsedURL.registerHandler(myUriResolver);
> 
> but I guess that won't work in a multi threaded environment.
> 
> The need arises because I want to support relative uri's for e.g.
> svg:image's where the href's should be resolved relative to a path that 
is
> different for each user of the (servlet) service.
> 
> What would be my options?
> 
> Thanks
> 
> Peter
> 
> 
> thomas.deweese wrote:
> > 
> > Hi Steven,
> > 
> > Steven Vetzal <[EMAIL PROTECTED]> wrote on 02/01/2007 06:59:03 AM:
> > 
> >> I want to make local graphics from our JSR170 repository available 
> >> using the <svg:image> tag. While I can do this neatly using Apache 
> >> FOP using my own URIResolver, I can't find any way to do this same 
> >> thing with Batik.
> > 
> >    Correct we aren't tied into the URIResolver stuff.
> > 
> >> Has anyone out there attempted attaching a custom URIResolver or 
> >> otherwise hooked into the URI lookups in Batik? What approach did you 

> > take?
> > 
> >    All of our URI lookups go through our local class 
> > "batik.util.ParsedURL" which roughly replaces java.net.URL.  It 
> > has the ability to specify custom protocols which you might use 
> > to redirect lookups to your URI resolver.
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: 
[EMAIL PROTECTED]
> > 
> > 
> > 
> 
> 
> 
> 
> -- 
> View this message in context: http://www.nabble.com/URIResolver-and-
> Batik-tf3154421.html#a11320753
> Sent from the Batik - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to