It looks like the problem was with how it was declared. For example, I was using this to declare my methods:
public class KTagLib extends AbstractTagLibrary {
public static final String NAMESPACE = "http://mysite.blah/tags";
public static final KTagLib INSTANCE = new KTagLib();
public KTagLib() {
super(NAMESPACE);
try{
try {
Method[] methods = KTags.class.getMethods();
for (int i = 0; i < methods.length; i++) {
if (Modifier.isStatic(methods[i].getModifiers())) {
this.addFunction(methods[i].getName(), methods[i]);
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
and using the following configuration:
<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
<facelet-taglib>
<library-class>mypackage.KTagLib</library-class>
</facelet-taglib>
However, the this.addFunction()
is essentially calling put()
on a java.util.Map object so that duplicate methods can't be added since the keys are the same between doStuff
.
To solve this problem, I'll have to explicitly declare the methods in the *.taglib.xml unless anyone knows of a way to dynamically solve the problems.