Thanks - good point about the null.  So what's the deal with a
non-FilesystemBased context, i.e. what are they?  In the original version of
the source only URL's with a protocol of "file" were processed.  The prob
was that "file" resources are now being handed back with a protocol of
"jndi".  So I guess the question is what should be supported?  If only
"file" resources need to be supported then can we just "continue" out of the
loop if we get a null back, i.e. if the context is not FilesystemBased.  Or
should all types of resources be supported?  In which case I would think
that any URL's passed back in the call to getResource() should have a
service provider for their particular protocol, how to get a handle to
thoses service providers is another question.  I'm happy to keep working on
this as I'd like to get it working.

Thanks,
Robert

-----Original Message-----
From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 5:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [PATCH] RE: Packaged tag libraries


> Ok well here is a patch to TldLocationsCache that should all Jasper to
> correctly process packaged tab libraries.  I tested on my system and it
> works well.  I changed processJars() to use the "getResourcePaths" method
as
> Remy suggested.  I pulled "tldConfigJar()" as it did a bunch of stuff with
> URL's that appeared to be overly complex.  I put the logic from that
method
> right in the "processJars()" and accessed the jar files directly (i.e.
w/out
> a url or connection).  I changed "parseTldForUri()" because it was looking
> for a child <taglib> and then a <uri> it should have just looked for a
<uri>
> right off.
>
> Lastly I'm not sure why the diff produced some 'goofy' stuff.  If somebody
> lets me know how to fix it I won't do it in the future.
>
> Really lastly - this is my first attempt at sending in a patch to an open
> source project so if somehow I've f'ed up the etiquette, then please be
> gentle.

Nice work, but you shouldn't use getRealPath() and access as a file, as
getRealPath() can return null.
Although it is indeed more complex, tldConfigJar() is the way to go, as it
should work in all cases.

Remy


Reply via email to