You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Hamilton <sc...@plateau.com> on 2011/02/23 20:13:31 UTC

Upgrading from Tomcat 6.0.29 to 7.0.8 - TLD Scanned Location Problem

Looks like the TldConfig class changed significantly between these versions such that now TLDs that are under WEB-INF/classes (e.g. WEB-INF/classes/META-INF) are no longer scanned/processed.

This is an issue for us in development as some of our MyEclipse projects are TLD library projects that in production will be in JARs in the WEB-INF/lib but in development get exploded into WEB-INF/classes.  In 6.0.x this worked fine for us; 7.0.8 has removed this "feature".

I realize that the reasoning behind this was to be more spec-compliant.

My question is whether there is a Tomcat work-around to this to facilitate our development environment?  I've been poking around the TC source code and as yet see no way to do this.  I was even thinking of extending TldConfig to use a subclass as a lifecycle listener (turning off the context processTlds) but (as far as I've looked at this approach) the methods I'd want to override or call in TldConfig are private. :(

Any ideas?

Thanks in advance,
Scott

RE: Upgrading from Tomcat 6.0.29 to 7.0.8 - TLD Scanned Location Problem

Posted by Scott Hamilton <sc...@plateau.com>.
Thanks - a custom JarScanner did the trick.  

I'll do the bugzilla submission soon too.

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Wednesday, February 23, 2011 3:04 PM
To: Tomcat Users List
Subject: Re: Upgrading from Tomcat 6.0.29 to 7.0.8 - TLD Scanned Location Problem

On 23/02/2011 19:13, Scott Hamilton wrote:
> Looks like the TldConfig class changed significantly between these versions such that now TLDs that are under WEB-INF/classes (e.g. WEB-INF/classes/META-INF) are no longer scanned/processed.
> 
> This is an issue for us in development as some of our MyEclipse projects are TLD library projects that in production will be in JARs in the WEB-INF/lib but in development get exploded into WEB-INF/classes.  In 6.0.x this worked fine for us; 7.0.8 has removed this "feature".
> 
> I realize that the reasoning behind this was to be more spec-compliant.

Actually, the reasoning was:
a) make TLD scanning consistent between Catalina & Jasper
b) provide the extension points required by the Virgo project for OSGI RFC66

> My question is whether there is a Tomcat work-around to this to facilitate our development environment?  I've been poking around the TC source code and as yet see no way to do this.  I was even thinking of extending TldConfig to use a subclass as a lifecycle listener (turning off the context processTlds) but (as far as I've looked at this approach) the methods I'd want to override or call in TldConfig are private. :(
> 
> Any ideas?

See http://tomcat.apache.org/tomcat-7.0-doc/config/jar-scanner.html

Implementing your own JarScanner that additionally scans WEB-INF/classes
should do the trick in the short-term.

If you open a Bugzilla issue, I'll look into providing a configuration
option that allows WEB-INF classes to be treated like an exploded JAR file.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Upgrading from Tomcat 6.0.29 to 7.0.8 - TLD Scanned Location Problem

Posted by Mark Thomas <ma...@apache.org>.
On 23/02/2011 19:13, Scott Hamilton wrote:
> Looks like the TldConfig class changed significantly between these versions such that now TLDs that are under WEB-INF/classes (e.g. WEB-INF/classes/META-INF) are no longer scanned/processed.
> 
> This is an issue for us in development as some of our MyEclipse projects are TLD library projects that in production will be in JARs in the WEB-INF/lib but in development get exploded into WEB-INF/classes.  In 6.0.x this worked fine for us; 7.0.8 has removed this "feature".
> 
> I realize that the reasoning behind this was to be more spec-compliant.

Actually, the reasoning was:
a) make TLD scanning consistent between Catalina & Jasper
b) provide the extension points required by the Virgo project for OSGI RFC66

> My question is whether there is a Tomcat work-around to this to facilitate our development environment?  I've been poking around the TC source code and as yet see no way to do this.  I was even thinking of extending TldConfig to use a subclass as a lifecycle listener (turning off the context processTlds) but (as far as I've looked at this approach) the methods I'd want to override or call in TldConfig are private. :(
> 
> Any ideas?

See http://tomcat.apache.org/tomcat-7.0-doc/config/jar-scanner.html

Implementing your own JarScanner that additionally scans WEB-INF/classes
should do the trick in the short-term.

If you open a Bugzilla issue, I'll look into providing a configuration
option that allows WEB-INF classes to be treated like an exploded JAR file.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org