How do you extend an existing JSP custom tag?
As you know, a custom tag consists of two parts, an implementation class and a TLD file. I can extend the parent custom tag’s class, but how do you “extend” its TLD file? One obvious solution is to cut and paste it and then add my stuff, but I wonder if there’s a more elegant solution like the way you extend a tiles definition in Apache Tiles.
Thanks.
I don’t think you can extend an existing tag, but a similar approach is to use a common abstract superclass for two tag implementation classes:
But I’m afraid you will have to configure each tag class separately, as I don’t think there are abstract tag definitions in taglibs.