Search in sources :

Example 1 with TagExtraInfo

use of jakarta.servlet.jsp.tagext.TagExtraInfo in project tomcat by apache.

the class TagLibraryInfoImpl method createTagInfo.

private TagInfo createTagInfo(TagXml tagXml) throws JasperException {
    String teiClassName = tagXml.getTeiClass();
    TagExtraInfo tei = null;
    if (teiClassName != null && !teiClassName.isEmpty()) {
        try {
            Class<?> teiClass = ctxt.getClassLoader().loadClass(teiClassName);
            tei = (TagExtraInfo) teiClass.getConstructor().newInstance();
        } catch (Exception e) {
            err.jspError(e, "jsp.error.teiclass.instantiation", teiClassName);
        }
    }
    List<TagAttributeInfo> attributeInfos = tagXml.getAttributes();
    List<TagVariableInfo> variableInfos = tagXml.getVariables();
    return new TagInfo(tagXml.getName(), tagXml.getTagClass(), tagXml.getBodyContent(), tagXml.getInfo(), this, tei, attributeInfos.toArray(new TagAttributeInfo[0]), tagXml.getDisplayName(), tagXml.getSmallIcon(), tagXml.getLargeIcon(), variableInfos.toArray(new TagVariableInfo[0]), tagXml.hasDynamicAttributes());
}
Also used : TagExtraInfo(jakarta.servlet.jsp.tagext.TagExtraInfo) TagAttributeInfo(jakarta.servlet.jsp.tagext.TagAttributeInfo) TagInfo(jakarta.servlet.jsp.tagext.TagInfo) TagVariableInfo(jakarta.servlet.jsp.tagext.TagVariableInfo) URISyntaxException(java.net.URISyntaxException) JasperException(org.apache.jasper.JasperException) IOException(java.io.IOException)

Aggregations

TagAttributeInfo (jakarta.servlet.jsp.tagext.TagAttributeInfo)1 TagExtraInfo (jakarta.servlet.jsp.tagext.TagExtraInfo)1 TagInfo (jakarta.servlet.jsp.tagext.TagInfo)1 TagVariableInfo (jakarta.servlet.jsp.tagext.TagVariableInfo)1 IOException (java.io.IOException)1 URISyntaxException (java.net.URISyntaxException)1 JasperException (org.apache.jasper.JasperException)1