try {
Class clazz = ClassUtil.loadClass(config.getClassLoader(),strClass);
if(!Reflector.isInstaneOf(clazz, CustomTag.class))
throw new ExpressionException("class ["+strClass+"] must implement interface ["+CustomTag.class.getName()+"]");
}
catch (ClassException e) {
throw Caster.toPageException(e);
}
if(name==null || name.length()==0)
throw new ExpressionException("class name can't be a empty value");
renameOldstyleCFX();
Element tags=_getRootElement("ext-tags");
// Update
Element[] children = ConfigWebFactory.getChildren(tags,"ext-tag");
for(int i=0;i<children.length;i++) {
String n=children[i].getAttribute("name");
if(n!=null && n.equalsIgnoreCase(name)) {
Element el=children[i];
if(!"java".equalsIgnoreCase(el.getAttribute("type"))) throw new ExpressionException("there is already a c++ cfx tag with this name");
el.setAttribute("class",strClass);
el.setAttribute("type","java");
return ;
}