File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Overhead in taglib directives? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Overhead in taglib directives?" Watch "Overhead in taglib directives?" New topic

Overhead in taglib directives?

Charles Hasegawa
Ranch Hand

Joined: May 22, 2003
Posts: 117
How much if any overhead is there associated with taglib directives? (ie <%@ taglib uri="" prefix="c" %> )
We have a fairly large project which I have recently joined, and am slowly refactoring to make more maintainable. I'm trying to pull out common pieces of our JSP functionality into JSPF fragments (I realize that saying JSPF fragments is redundant, but so is saying JSP pages - I digress). The problem is that some of the fragments require tag libraries. Rather than trying to update every page to make sure the directive is present, the directive is present in the JSPF. Of course this causes problems if a developer tries to include the taglib on their page if they don't realize an included fragment has already declared the taglib. We are now tossing around the idea of simply creating a fragment that has taglib directives for every taglib we declare in the web.xml file and requiring that this fragment is included on every page (and not anywhere else - such as page fragments).
Is this a bad idea or does anyone else have a better solution?
I agree. Here's the link:
subject: Overhead in taglib directives?
It's not a secret anymore!