tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <>
Subject RE: Best practice for taglib declaration?
Date Fri, 01 Apr 2005 18:12:56 GMT
I'm afraid you misunderstood one important point about this.  You can't
avoid the "taglib" directive in your JSP.  The only difference in the
two strategies is what "uri" attribute you use in those taglib
directives in your JSP.  If you remove the taglib elements from your
web.xml, then the JSP taglib directives just use the "uri" that is
specified in the taglib TLD file (assuming the TLD is stored at the root
of your taglib jar).

> -----Original Message-----
> From: Nic Werner [] 
> Sent: Thursday, March 31, 2005 10:07 AM
> To: Tag Libraries Users List
> Subject: Best practice for taglib declaration?
> Greetings,
>     I realize this may be going against the grain, but is 
> there anything wrong with declaring all my taglibs in web.xml 
> so I don't have to have
> 5+ lines of code at the top of every JSP page? This seems cleaner, but
> everywhere I read people are lauding the practice of removing 
> them from web.xml and copying them into every .jsp page. I 
> see the downsideof web.xml is that you have to point to the 
> taglib uri *and* the TLD location, I can't tell if Tomcat5 
> improves upon this.
> It seems to me it would be cleaner to declare them once and 
> not clutter a .JSP page, am I wrong?
> - Nic.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message