What are the benefits and downsides? It seems at first glance that there is no benefit to using a tablib that strictly contains jsp elements. It takes more lines of code, and more configuration. Am I wrong about this?
If you are looking for parameterization then yes, a taglib is probably better. I suppose it's also arguable that there is a more uniform look to the markup if you use tags everywhere instead of @includes.
However, if all you're doing is including some standard tag files on many pages, then it seems that a @include is quicker.
If I want to use a taglib, I have more code because I have to add at least one extra line to my jsp. I have to include the library the tag is from, along with the tag itself. I have more configuration because I have to add the tag to the .tld file.
Maybe it's not that much more, but I'm just trying to figure out if there's any benefit to justify those two extra lines. [ September 14, 2006: Message edited by: Jacob Fenwick ]
Originally posted by Jacob Fenwick: However, if all you're doing is including some standard tag files on many pages, then it seems that a @include is quicker.
For those sorts of things I use preludes.
In fact, for such things a taglib wouldn't work at all. [ September 14, 2006: Message edited by: Bear Bibeault ]
Joined: Apr 28, 2006
I don't think a prelude or a coda is quite what I'm looking. As I understand them, preludes and codas are placed specifically at the beginning or end of a group of jsp files. I just want to arbitrarily add a static fragment of markup into various jsp files, but I don't want to manually paste the markup into each jsp.
I don't see how why you couldn't use a .tag for including a group of static markup. Maybe I didn't use the right terminology and it confused you. I just mean a plain text file with extension .tag that contains jsp tags/regular html tags that is referenced from a .tld file.
However, I still think @include is quicker.
[ September 14, 2006: Message edited by: Jacob Fenwick ] [ September 14, 2006: Message edited by: Jacob Fenwick ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: @include vs taglibs containing jsp elements