You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Brian Bucknam <br...@zat.com> on 2000/11/16 01:38:13 UTC

3.2 status -- no taglibs in jars

Craig says all the critical bugs are fixed, and it seems maybe they are.

However, there is still a problem (see bug #215) in TagLibraryInfoImpl which makes it so that tag libraries cannot be packaged in .jar files. (3.2b7 (and 3.1) at least not on Windows, have not tested on *nix.)

I marked this bug "serious" when I entered it because you can 'work around it' if you un-jar the tag library into WEB-INF/classes and rename the taglib.tld file, then refer to the .tld file from your JSP's.
But if 3.2 is supposed to represent the JSP 1.1 spec, then it clearly states that packaging a tag library in a jar inside WEB-INF/lib is supposed to be a possibility. Maybe this is "critical"?


On a separate topic, we're having some classloader problems where classes supposedly available in .jars in WEB-INF/lib come up as "NoClassDefFound" as supporting classes for some servlets and JSP pages. Moving these jars to jakarta-tomcat/lib solves the problem. I haven't had time to track down exactly where the problem is, but it seems wrong that the web-app classloader that loads the servlets & JSP's seems to be ignoring the lib jars, or acting as if the classes in those jars came from a different loader.
I probably should get better details before bringing this to the list, but I saw Rickard Öberg's mention of a getResource() problem...

My $.02,
Brian



Re: 3.2 status -- no taglibs in jars

Posted by Brian Bucknam <br...@zat.com>.
Pierre Delisle wrote:

> > I'll commit the patch right now and I'd appreciate if you
> > could run some exhaustive tests.
>
> Well, it may take a little while, as my commit is currently blocked
> because of a lock held by Larry (I've notified him).
>
> Since the lock has been on for more than 10 minutes, I suspect something
> is wrong on the server side.

I made this change and rebuilt my Tomcat 3.2b7.

Everything works in the scenarios that I was attempting -- basically, just
having one taglib in a .jar.
I had hoped to do more extensive testing, but we're trying to build betas
right now, too, and I'm short on time.

Thanks, again, Pierre. The fix looks good and does not seem to break
anything.

Brian



Re: 3.2 status -- no taglibs in jars

Posted by Pierre Delisle <pi...@sun.com>.
> I'll commit the patch right now and I'd appreciate if you
> could run some exhaustive tests.

Well, it may take a little while, as my commit is currently blocked
because of a lock held by Larry (I've notified him).

Since the lock has been on for more than 10 minutes, I suspect something
is wrong on the server side.

	-- Pierre

Re: 3.2 status -- no taglibs in jars

Posted by Brian Bucknam <br...@zat.com>.
I wrote:

> > I haven't tried simply commenting out or removing the code that says "Take this stuff out..." because that would remove the entire section devoted opening the jar and finding the .tld inside. Maybe I'm missing something, but this doesn't sound like the right fix.

Then Pierre Delisle replied:

> Only the 'copy' part needs to be commented out. Here is the diff since I cannot
> commit to the master for now.

OK, that makes a lot more sense.

I'll rebuild with the change, run some tests, and let the list know.

Thanks, Pierre!
Brian



Re: 3.2 status -- no taglibs in jars

Posted by Pierre Delisle <pi...@sun.com>.
> I'd be glad to test this in my scenario and any others you suggest.
> 
> I haven't tried simply commenting out or removing the code that says "Take this stuff out..." because that would remove the entire section devoted opening the jar and finding the .tld inside. Maybe I'm missing something, but this doesn't sound like the right fix.
> I agree that it seems unnecessary to copy the jar to the work directory, but the rest of that code (ZipEntry.getNextEntry() while != TLD) seems needed.
> 
> Am I missing something?
> Brian


Only the 'copy' part needs to be commented out. Here is the diff since I cannot
commit to the master for now.

diff -r1.22.2.5 TagLibraryInfoImpl.java
236a237,238
>         // 2000.11.15 commented out the 'copy to work dir' section,
>         // which I believe is what this FIXME comment referred to. (pierred)
250a253
>             /* NOT COMPILED
281,282c284
<
<
---
>             */ // END NOT COMPILED


    -- Pierre

Re: 3.2 status -- no taglibs in jars

Posted by Brian Bucknam <br...@zat.com>.
Pierre Delisle wrote:

> Brian Bucknam wrote:
> > However, there is still a problem (see bug #215) in TagLibraryInfoImpl which makes it so that tag libraries cannot be packaged in .jar files. (3.2b7 (and 3.1) at least not on Windows, have not tested on *nix.)
> >
> > I marked this bug "serious" when I entered it because you can 'work around it' if you un-jar the tag library into WEB-INF/classes and rename the taglib.tld file, then refer to the .tld file from your JSP's.
> > But if 3.2 is supposed to represent the JSP 1.1 spec, then it clearly states that packaging a tag library in a jar inside WEB-INF/lib is supposed to be a possibility. Maybe this is "critical"?
>
> This problem occurs because the jar file is being copied into the
> work directory. However, this should not be done (there is in fact
> a comment in the code saying "Take this stuff out when taglib changes are
> thoroughly tested".)
>
> I have commented out that code section and the test
> I ran worked fine.
>
> I'll commit the patch right now and I'd appreciate if you
> could run some exhaustive tests.

I'd be glad to test this in my scenario and any others you suggest.

I haven't tried simply commenting out or removing the code that says "Take this stuff out..." because that would remove the entire section devoted opening the jar and finding the .tld inside. Maybe I'm missing something, but this doesn't sound like the right fix.
I agree that it seems unnecessary to copy the jar to the work directory, but the rest of that code (ZipEntry.getNextEntry() while != TLD) seems needed.

Am I missing something?
Brian



Re: 3.2 status -- no taglibs in jars

Posted by Pierre Delisle <pi...@sun.com>.

Brian Bucknam wrote:
> 
> Craig says all the critical bugs are fixed, and it seems maybe they are.
> 
> However, there is still a problem (see bug #215) in TagLibraryInfoImpl which makes it so that tag libraries cannot be packaged in .jar files. (3.2b7 (and 3.1) at least not on Windows, have not tested on *nix.)
> 
> I marked this bug "serious" when I entered it because you can 'work around it' if you un-jar the tag library into WEB-INF/classes and rename the taglib.tld file, then refer to the .tld file from your JSP's.
> But if 3.2 is supposed to represent the JSP 1.1 spec, then it clearly states that packaging a tag library in a jar inside WEB-INF/lib is supposed to be a possibility. Maybe this is "critical"?

This problem occurs because the jar file is being copied into the 
work directory. However, this should not be done (there is in fact
a comment in the code saying "Take this stuff out when taglib changes are 
thoroughly tested".)

I have commented out that code section and the test 
I ran worked fine.

I'll commit the patch right now and I'd appreciate if you
could run some exhaustive tests.

    -- Pierre



> 
> On a separate topic, we're having some classloader problems where classes supposedly available in .jars in WEB-INF/lib come up as "NoClassDefFound" as supporting classes for some servlets and JSP pages. Moving these jars to jakarta-tomcat/lib solves the problem. I haven't had time to track down exactly where the problem is, but it seems wrong that the web-app classloader that loads the servlets & JSP's seems to be ignoring the lib jars, or acting as if the classes in those jars came from a different loader.
> I probably should get better details before bringing this to the list, but I saw Rickard Öberg's mention of a getResource() problem...
> 
> My $.02,
> Brian
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

Re: 3.2 status -- no taglibs in jars

Posted by Nick Bauman <ni...@cortexity.com>.
On Wed, 15 Nov 2000, Brian Bucknam wrote:

> On a separate topic, we're having some classloader problems 
> where classes supposedly available in .jars in WEB-INF/lib come 
> up as "NoClassDefFound" as supporting classes for some servlets
> and JSP pages. Moving these jars to jakarta-tomcat/lib solves 
> the problem. I haven't had time to track down exactly where the 
> problem is, but it seems wrong that the web-app classloader that 
> loads the servlets & JSP's seems to be ignoring the lib jars, 
> or acting as if the classes in those jars came from a different 
> loader.  I probably should get better details before bringing 
> this to the list, but I saw Rickard �berg's mention of a 
> getResource() problem...
> 
> My $.02,
> Brian

Regarding Tomcat 3.1 

I've been talking to people at work who also use Tomcat and we've all come
to the conclusion that the classloader for each context mapping is:

A) Strange
B) Slow
C) To be avoided

In other words, when in doubt, we end up sticking the classes and jars in
Tomcat's classpath, (even the WEB-INF/classes directory!) and giving up on
servlet reloading. 

Hopefully Tomcat 3.2 isn't as bad.