Java 类javax.servlet.jsp.tagext.TagInfo 实例源码

项目:tomcat7    文件:JspServletWrapper.java   
public JspServletWrapper(ServletContext servletContext,
                         Options options,
                         String tagFilePath,
                         TagInfo tagInfo,
                         JspRuntimeContext rctxt,
                         JarResource tagJarResource) {

    this.isTagFile = true;
    this.config = null;        // not used
    this.options = options;
    this.jspUri = tagFilePath;
    this.tripCount = 0;
    unloadByCount = options.getMaxLoadedJsps() > 0 ? true : false;
    unloadByIdle = options.getJspIdleTimeout() > 0 ? true : false;
    unloadAllowed = unloadByCount || unloadByIdle ? true : false;
    ctxt = new JspCompilationContext(jspUri, tagInfo, options,
                                     servletContext, this, rctxt,
                                     tagJarResource);
}
项目:tomcat7    文件:TagFileProcessor.java   
public TagInfo getTagInfo() throws JasperException {

            if (name == null) {
                // XXX Get it from tag file name
            }

            if (bodycontent == null) {
                bodycontent = TagInfo.BODY_CONTENT_SCRIPTLESS;
            }

            String tagClassName = JspUtil.getTagHandlerClassName(
                    path, tagLibInfo.getReliableURN(), err);

            TagVariableInfo[] tagVariableInfos = new TagVariableInfo[variableVector
                    .size()];
            variableVector.copyInto(tagVariableInfos);

            TagAttributeInfo[] tagAttributeInfo = new TagAttributeInfo[attributeVector
                    .size()];
            attributeVector.copyInto(tagAttributeInfo);

            return new JasperTagInfo(name, tagClassName, bodycontent,
                    description, tagLibInfo, tei, tagAttributeInfo,
                    displayName, smallIcon, largeIcon, tagVariableInfos,
                    dynamicAttrsMapName);
        }
项目:lams    文件:JspServletWrapper.java   
public JspServletWrapper(ServletContext servletContext,
             Options options,
             String tagFilePath,
             TagInfo tagInfo,
             JspRuntimeContext rctxt,
             URL tagFileJarUrl)
    throws JasperException {

this.isTagFile = true;
       this.config = null;  // not used
       this.options = options;
this.jspUri = tagFilePath;
this.tripCount = 0;
       ctxt = new JspCompilationContext(jspUri, tagInfo, options,
                 servletContext, this, rctxt,
                 tagFileJarUrl);
   }
项目:lams    文件:Generator.java   
/**
 * Constructor.
 */
public GenerateVisitor(boolean isTagFile, ServletWriter out,
        ArrayList methodsBuffered,
        FragmentHelperClass fragmentHelperClass, ClassLoader loader,
        TagInfo tagInfo) {

    this.isTagFile = isTagFile;
    this.out = out;
    this.methodsBuffered = methodsBuffered;
    this.fragmentHelperClass = fragmentHelperClass;
    this.loader = loader;
    this.tagInfo = tagInfo;
    methodNesting = 0;
    handlerInfos = new Hashtable();
    tagVarNumbers = new Hashtable();
    textMap = new HashMap();
}
项目:lams    文件:TagFileProcessor.java   
public void visit(Node.TagDirective n) throws JasperException {

            JspUtil.checkAttributes("Tag directive", n, tagDirectiveAttrs, err);

            bodycontent = checkConflict(n, bodycontent, "body-content");
            if (bodycontent != null
                    && !bodycontent
                            .equalsIgnoreCase(TagInfo.BODY_CONTENT_EMPTY)
                    && !bodycontent
                            .equalsIgnoreCase(TagInfo.BODY_CONTENT_TAG_DEPENDENT)
                    && !bodycontent
                            .equalsIgnoreCase(TagInfo.BODY_CONTENT_SCRIPTLESS)) {
                err.jspError(n, "jsp.error.tagdirective.badbodycontent",
                        bodycontent);
            }
            dynamicAttrsMapName = checkConflict(n, dynamicAttrsMapName,
                    "dynamic-attributes");
            if (dynamicAttrsMapName != null) {
                checkUniqueName(dynamicAttrsMapName, TAG_DYNAMIC, n);
            }
            smallIcon = checkConflict(n, smallIcon, "small-icon");
            largeIcon = checkConflict(n, largeIcon, "large-icon");
            description = checkConflict(n, description, "description");
            displayName = checkConflict(n, displayName, "display-name");
            example = checkConflict(n, example, "example");
        }
项目:lams    文件:TagFileProcessor.java   
public TagInfo getTagInfo() throws JasperException {

            if (name == null) {
                // XXX Get it from tag file name
            }

            if (bodycontent == null) {
                bodycontent = TagInfo.BODY_CONTENT_SCRIPTLESS;
            }

            String tagClassName = JspUtil.getTagHandlerClassName(
                    path, tagLibInfo.getReliableURN(), err);

            TagVariableInfo[] tagVariableInfos = new TagVariableInfo[variableVector
                    .size()];
            variableVector.copyInto(tagVariableInfos);

            TagAttributeInfo[] tagAttributeInfo = new TagAttributeInfo[attributeVector
                    .size()];
            attributeVector.copyInto(tagAttributeInfo);

            return new JasperTagInfo(name, tagClassName, bodycontent,
                    description, tagLibInfo, tei, tagAttributeInfo,
                    displayName, smallIcon, largeIcon, tagVariableInfos,
                    dynamicAttrsMapName);
        }
项目:lams    文件:TagLibraryInfo.java   
/**
 * Get the TagInfo for a given tag name, looking through all the
 * tags in this tag library.
 *
 * @param shortname The short name (no prefix) of the tag
 * @return the TagInfo for the tag with the specified short name, or
 *         null if no such tag is found
 */

public TagInfo getTag(String shortname) {
    TagInfo tags[] = getTags();

    if (tags == null || tags.length == 0) {
        return null;
    }

    for (int i=0; i < tags.length; i++) {
        if (tags[i].getTagName().equals(shortname)) {
            return tags[i];
        }
    }
    return null;
}
项目:apache-tomcat-7.0.73-with-comment    文件:JspServletWrapper.java   
public JspServletWrapper(ServletContext servletContext,
                         Options options,
                         String tagFilePath,
                         TagInfo tagInfo,
                         JspRuntimeContext rctxt,
                         JarResource tagJarResource) {

    this.isTagFile = true;
    this.config = null;        // not used
    this.options = options;
    this.jspUri = tagFilePath;
    this.tripCount = 0;
    unloadByCount = options.getMaxLoadedJsps() > 0 ? true : false;
    unloadByIdle = options.getJspIdleTimeout() > 0 ? true : false;
    unloadAllowed = unloadByCount || unloadByIdle ? true : false;
    ctxt = new JspCompilationContext(jspUri, tagInfo, options,
                                     servletContext, this, rctxt,
                                     tagJarResource);
}
项目:lazycat    文件:TagFileProcessor.java   
public TagInfo getTagInfo() throws JasperException {

            if (name == null) {
                // XXX Get it from tag file name
            }

            if (bodycontent == null) {
                bodycontent = TagInfo.BODY_CONTENT_SCRIPTLESS;
            }

            String tagClassName = JspUtil.getTagHandlerClassName(path, tagLibInfo.getReliableURN(), err);

            TagVariableInfo[] tagVariableInfos = new TagVariableInfo[variableVector.size()];
            variableVector.copyInto(tagVariableInfos);

            TagAttributeInfo[] tagAttributeInfo = new TagAttributeInfo[attributeVector.size()];
            attributeVector.copyInto(tagAttributeInfo);

            return new JasperTagInfo(name, tagClassName, bodycontent, description, tagLibInfo, tei, tagAttributeInfo,
                    displayName, smallIcon, largeIcon, tagVariableInfos, dynamicAttrsMapName);
        }
项目:apache-tomcat-7.0.73-with-comment    文件:TagFileProcessor.java   
public TagInfo getTagInfo() throws JasperException {

            if (name == null) {
                // XXX Get it from tag file name
            }

            if (bodycontent == null) {
                bodycontent = TagInfo.BODY_CONTENT_SCRIPTLESS;
            }

            String tagClassName = JspUtil.getTagHandlerClassName(
                    path, tagLibInfo.getReliableURN(), err);

            TagVariableInfo[] tagVariableInfos = new TagVariableInfo[variableVector
                    .size()];
            variableVector.copyInto(tagVariableInfos);

            TagAttributeInfo[] tagAttributeInfo = new TagAttributeInfo[attributeVector
                    .size()];
            attributeVector.copyInto(tagAttributeInfo);

            return new JasperTagInfo(name, tagClassName, bodycontent,
                    description, tagLibInfo, tei, tagAttributeInfo,
                    displayName, smallIcon, largeIcon, tagVariableInfos,
                    dynamicAttrsMapName);
        }
项目:lazycat    文件:Node.java   
public CustomTag(String qName, String prefix, String localName, String uri, Attributes attrs,
        Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent, TagInfo tagInfo,
        Class<?> tagHandlerClass) {
    super(qName, localName, attrs, nonTaglibXmlnsAttrs, taglibAttrs, start, parent);

    this.uri = uri;
    this.prefix = prefix;
    this.tagInfo = tagInfo;
    this.tagHandlerClass = tagHandlerClass;
    this.customNestingLevel = makeCustomNestingLevel();
    this.childInfo = new ChildInfo();

    this.implementsIterationTag = IterationTag.class.isAssignableFrom(tagHandlerClass);
    this.implementsBodyTag = BodyTag.class.isAssignableFrom(tagHandlerClass);
    this.implementsTryCatchFinally = TryCatchFinally.class.isAssignableFrom(tagHandlerClass);
    this.implementsSimpleTag = SimpleTag.class.isAssignableFrom(tagHandlerClass);
    this.implementsDynamicAttributes = DynamicAttributes.class.isAssignableFrom(tagHandlerClass);
    this.implementsJspIdConsumer = JspIdConsumer.class.isAssignableFrom(tagHandlerClass);
}
项目:lazycat    文件:TagFileProcessor.java   
@Override
public void visit(Node.TagDirective n) throws JasperException {

    JspUtil.checkAttributes("Tag directive", n, tagDirectiveAttrs, err);

    bodycontent = checkConflict(n, bodycontent, "body-content");
    if (bodycontent != null && !bodycontent.equalsIgnoreCase(TagInfo.BODY_CONTENT_EMPTY)
            && !bodycontent.equalsIgnoreCase(TagInfo.BODY_CONTENT_TAG_DEPENDENT)
            && !bodycontent.equalsIgnoreCase(TagInfo.BODY_CONTENT_SCRIPTLESS)) {
        err.jspError(n, "jsp.error.tagdirective.badbodycontent", bodycontent);
    }
    dynamicAttrsMapName = checkConflict(n, dynamicAttrsMapName, "dynamic-attributes");
    if (dynamicAttrsMapName != null) {
        checkUniqueName(dynamicAttrsMapName, TAG_DYNAMIC, n);
    }
    smallIcon = checkConflict(n, smallIcon, "small-icon");
    largeIcon = checkConflict(n, largeIcon, "large-icon");
    description = checkConflict(n, description, "description");
    displayName = checkConflict(n, displayName, "display-name");
    example = checkConflict(n, example, "example");
}
项目:tomcat7    文件:JspCompilationContext.java   
public JspCompilationContext(String tagfile,
                             TagInfo tagInfo,
                             Options options,
                             ServletContext context,
                             JspServletWrapper jsw,
                             JspRuntimeContext rctxt,
                             JarResource tagJarResource) {
    this(tagfile, options, context, jsw, rctxt);
    this.isTagFile = true;
    this.tagInfo = tagInfo;
    this.tagJarResource = tagJarResource;
}
项目:tomcat7    文件:Validator.java   
@Override
public void visit(Node.CustomTag n) throws JasperException {
    TagInfo tagInfo = n.getTagInfo();
    if (tagInfo == null) {
        err.jspError(n, "jsp.error.missing.tagInfo", n.getQName());
    }

    ValidationMessage[] errors = tagInfo.validate(n.getTagData());
    if (errors != null && errors.length != 0) {
        StringBuilder errMsg = new StringBuilder();
        errMsg.append("<h3>");
        errMsg.append(Localizer.getMessage(
                "jsp.error.tei.invalid.attributes", n.getQName()));
        errMsg.append("</h3>");
        for (int i = 0; i < errors.length; i++) {
            errMsg.append("<p>");
            if (errors[i].getId() != null) {
                errMsg.append(errors[i].getId());
                errMsg.append(": ");
            }
            errMsg.append(errors[i].getMessage());
            errMsg.append("</p>");
        }

        err.jspError(n, errMsg.toString());
    }

    visitBody(n);
}
项目:tomcat7    文件:JspDocumentParser.java   
private boolean isTagDependent(Node n) {

        if (n instanceof Node.CustomTag) {
            String bodyType = getBodyType((Node.CustomTag) n);
            return
                TagInfo.BODY_CONTENT_TAG_DEPENDENT.equalsIgnoreCase(bodyType);
        }
        return false;
    }
项目:tomcat7    文件:Parser.java   
private void parseElement(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node elementNode = new Node.JspElement(attrs, start, parent);

    parseOptionalBody(elementNode, "jsp:element", TagInfo.BODY_CONTENT_JSP);
}
项目:tomcat7    文件:Parser.java   
private void parseGetProperty(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node getPropertyNode = new Node.GetProperty(attrs, start, parent);

    parseOptionalBody(getPropertyNode, "jsp:getProperty",
            TagInfo.BODY_CONTENT_EMPTY);
}
项目:tomcat7    文件:Parser.java   
private void parseSetProperty(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node setPropertyNode = new Node.SetProperty(attrs, start, parent);

    parseOptionalBody(setPropertyNode, "jsp:setProperty",
            TagInfo.BODY_CONTENT_EMPTY);
}
项目:tomcat7    文件:Parser.java   
private void parseUseBean(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node useBeanNode = new Node.UseBean(attrs, start, parent);

    parseOptionalBody(useBeanNode, "jsp:useBean", TagInfo.BODY_CONTENT_JSP);
}
项目:tomcat7    文件:Node.java   
public CustomTag(String qName, String prefix, String localName,
        String uri, Attributes attrs, Attributes nonTaglibXmlnsAttrs,
        Attributes taglibAttrs, Mark start, Node parent,
        TagInfo tagInfo, Class<?> tagHandlerClass) {
    super(qName, localName, attrs, nonTaglibXmlnsAttrs, taglibAttrs,
            start, parent);

    this.uri = uri;
    this.prefix = prefix;
    this.tagInfo = tagInfo;
    this.tagHandlerClass = tagHandlerClass;
    this.customNestingLevel = makeCustomNestingLevel();
    this.childInfo = new ChildInfo();

    this.implementsIterationTag = IterationTag.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsBodyTag = BodyTag.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsTryCatchFinally = TryCatchFinally.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsSimpleTag = SimpleTag.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsDynamicAttributes = DynamicAttributes.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsJspIdConsumer = JspIdConsumer.class
            .isAssignableFrom(tagHandlerClass);
}
项目:tomcat7    文件:TagFileProcessor.java   
@Override
public void visit(Node.TagDirective n) throws JasperException {

    JspUtil.checkAttributes("Tag directive", n, tagDirectiveAttrs, err);

    bodycontent = checkConflict(n, bodycontent, "body-content");
    if (bodycontent != null
            && !bodycontent
                    .equalsIgnoreCase(TagInfo.BODY_CONTENT_EMPTY)
            && !bodycontent
                    .equalsIgnoreCase(TagInfo.BODY_CONTENT_TAG_DEPENDENT)
            && !bodycontent
                    .equalsIgnoreCase(TagInfo.BODY_CONTENT_SCRIPTLESS)) {
        err.jspError(n, "jsp.error.tagdirective.badbodycontent",
                bodycontent);
    }
    dynamicAttrsMapName = checkConflict(n, dynamicAttrsMapName,
            "dynamic-attributes");
    if (dynamicAttrsMapName != null) {
        checkUniqueName(dynamicAttrsMapName, TAG_DYNAMIC, n);
    }
    smallIcon = checkConflict(n, smallIcon, "small-icon");
    largeIcon = checkConflict(n, largeIcon, "large-icon");
    description = checkConflict(n, description, "description");
    displayName = checkConflict(n, displayName, "display-name");
    example = checkConflict(n, example, "example");
}
项目:lams    文件:JspCompilationContext.java   
public JspCompilationContext(String tagfile,
                             TagInfo tagInfo, 
                             Options options,
                             ServletContext context,
                             JspServletWrapper jsw,
                             JspRuntimeContext rctxt,
                             URL tagFileJarUrl) {
    this(tagfile, false, options, context, jsw, rctxt);
    this.isTagFile = true;
    this.tagInfo = tagInfo;
    this.tagFileJarUrl = tagFileJarUrl;
    if (tagFileJarUrl != null) {
        isPackagedTagFile = true;
    }
}
项目:lams    文件:Validator.java   
public void visit(Node.CustomTag n) throws JasperException {
    TagInfo tagInfo = n.getTagInfo();
    if (tagInfo == null) {
        err.jspError(n, "jsp.error.missing.tagInfo", n.getQName());
    }

    ValidationMessage[] errors = tagInfo.validate(n.getTagData());
    if (errors != null && errors.length != 0) {
        StringBuffer errMsg = new StringBuffer();
        errMsg.append("<h3>");
        errMsg.append(Localizer.getMessage(
                "jsp.error.tei.invalid.attributes", n.getQName()));
        errMsg.append("</h3>");
        for (int i = 0; i < errors.length; i++) {
            errMsg.append("<p>");
            if (errors[i].getId() != null) {
                errMsg.append(errors[i].getId());
                errMsg.append(": ");
            }
            errMsg.append(errors[i].getMessage());
            errMsg.append("</p>");
        }

        err.jspError(n, errMsg.toString());
    }

    visitBody(n);
}
项目:lams    文件:JspDocumentParser.java   
private boolean isTagDependent(Node n) {

        if (n instanceof Node.CustomTag) {
            String bodyType = getBodyType((Node.CustomTag) n);
            return
                TagInfo.BODY_CONTENT_TAG_DEPENDENT.equalsIgnoreCase(bodyType);
        }
        return false;
    }
项目:lams    文件:Parser.java   
private void parseElement(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node elementNode = new Node.JspElement(attrs, start, parent);

    parseOptionalBody(elementNode, "jsp:element", TagInfo.BODY_CONTENT_JSP);
}
项目:lams    文件:Parser.java   
private void parseGetProperty(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node getPropertyNode = new Node.GetProperty(attrs, start, parent);

    parseOptionalBody(getPropertyNode, "jsp:getProperty",
            TagInfo.BODY_CONTENT_EMPTY);
}
项目:lams    文件:Parser.java   
private void parseSetProperty(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node setPropertyNode = new Node.SetProperty(attrs, start, parent);

    parseOptionalBody(setPropertyNode, "jsp:setProperty",
            TagInfo.BODY_CONTENT_EMPTY);
}
项目:lams    文件:Parser.java   
private void parseUseBean(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node useBeanNode = new Node.UseBean(attrs, start, parent);

    parseOptionalBody(useBeanNode, "jsp:useBean", TagInfo.BODY_CONTENT_JSP);
}
项目:lams    文件:Node.java   
public CustomTag(String qName, String prefix, String localName,
        String uri, Attributes attrs, Attributes nonTaglibXmlnsAttrs,
        Attributes taglibAttrs, Mark start, Node parent,
        TagInfo tagInfo, Class tagHandlerClass) {
    super(qName, localName, attrs, nonTaglibXmlnsAttrs, taglibAttrs,
            start, parent);

    this.uri = uri;
    this.prefix = prefix;
    this.tagInfo = tagInfo;
    this.tagHandlerClass = tagHandlerClass;
    this.customNestingLevel = makeCustomNestingLevel();
    this.childInfo = new ChildInfo();

    this.implementsIterationTag = IterationTag.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsBodyTag = BodyTag.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsTryCatchFinally = TryCatchFinally.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsSimpleTag = SimpleTag.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsDynamicAttributes = DynamicAttributes.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsJspIdConsumer = JspIdConsumer.class
            .isAssignableFrom(tagHandlerClass);
}
项目:lams    文件:Node.java   
public TagAttributeInfo getTagAttributeInfo(String name) {
    TagInfo info = this.getTagInfo();
    if (info == null)
        return null;
    TagAttributeInfo[] tai = info.getAttributes();
    for (int i = 0; i < tai.length; i++) {
        if (tai[i].getName().equals(name)) {
            return tai[i];
        }
    }
    return null;
}
项目:apache-tomcat-7.0.73-with-comment    文件:Validator.java   
@Override
public void visit(Node.CustomTag n) throws JasperException {
    TagInfo tagInfo = n.getTagInfo();
    if (tagInfo == null) {
        err.jspError(n, "jsp.error.missing.tagInfo", n.getQName());
    }

    ValidationMessage[] errors = tagInfo.validate(n.getTagData());
    if (errors != null && errors.length != 0) {
        StringBuilder errMsg = new StringBuilder();
        errMsg.append("<h3>");
        errMsg.append(Localizer.getMessage(
                "jsp.error.tei.invalid.attributes", n.getQName()));
        errMsg.append("</h3>");
        for (int i = 0; i < errors.length; i++) {
            errMsg.append("<p>");
            if (errors[i].getId() != null) {
                errMsg.append(errors[i].getId());
                errMsg.append(": ");
            }
            errMsg.append(errors[i].getMessage());
            errMsg.append("</p>");
        }

        err.jspError(n, errMsg.toString());
    }

    visitBody(n);
}
项目:apache-tomcat-7.0.73-with-comment    文件:JspDocumentParser.java   
private boolean isTagDependent(Node n) {

        if (n instanceof Node.CustomTag) {
            String bodyType = getBodyType((Node.CustomTag) n);
            return
                TagInfo.BODY_CONTENT_TAG_DEPENDENT.equalsIgnoreCase(bodyType);
        }
        return false;
    }
项目:apache-tomcat-7.0.73-with-comment    文件:Parser.java   
private void parseElement(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node elementNode = new Node.JspElement(attrs, start, parent);

    parseOptionalBody(elementNode, "jsp:element", TagInfo.BODY_CONTENT_JSP);
}
项目:apache-tomcat-7.0.73-with-comment    文件:Parser.java   
private void parseGetProperty(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node getPropertyNode = new Node.GetProperty(attrs, start, parent);

    parseOptionalBody(getPropertyNode, "jsp:getProperty",
            TagInfo.BODY_CONTENT_EMPTY);
}
项目:apache-tomcat-7.0.73-with-comment    文件:Parser.java   
private void parseSetProperty(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node setPropertyNode = new Node.SetProperty(attrs, start, parent);

    parseOptionalBody(setPropertyNode, "jsp:setProperty",
            TagInfo.BODY_CONTENT_EMPTY);
}
项目:apache-tomcat-7.0.73-with-comment    文件:Parser.java   
private void parseUseBean(Node parent) throws JasperException {
    Attributes attrs = parseAttributes();
    reader.skipSpaces();

    Node useBeanNode = new Node.UseBean(attrs, start, parent);

    parseOptionalBody(useBeanNode, "jsp:useBean", TagInfo.BODY_CONTENT_JSP);
}
项目:apache-tomcat-7.0.73-with-comment    文件:Node.java   
public CustomTag(String qName, String prefix, String localName,
        String uri, Attributes attrs, Attributes nonTaglibXmlnsAttrs,
        Attributes taglibAttrs, Mark start, Node parent,
        TagInfo tagInfo, Class<?> tagHandlerClass) {
    super(qName, localName, attrs, nonTaglibXmlnsAttrs, taglibAttrs,
            start, parent);

    this.uri = uri;
    this.prefix = prefix;
    this.tagInfo = tagInfo;
    this.tagHandlerClass = tagHandlerClass;
    this.customNestingLevel = makeCustomNestingLevel();
    this.childInfo = new ChildInfo();

    this.implementsIterationTag = IterationTag.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsBodyTag = BodyTag.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsTryCatchFinally = TryCatchFinally.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsSimpleTag = SimpleTag.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsDynamicAttributes = DynamicAttributes.class
            .isAssignableFrom(tagHandlerClass);
    this.implementsJspIdConsumer = JspIdConsumer.class
            .isAssignableFrom(tagHandlerClass);
}
项目:apache-tomcat-7.0.73-with-comment    文件:TagFileProcessor.java   
@Override
public void visit(Node.TagDirective n) throws JasperException {

    JspUtil.checkAttributes("Tag directive", n, tagDirectiveAttrs, err);

    bodycontent = checkConflict(n, bodycontent, "body-content");
    if (bodycontent != null
            && !bodycontent
                    .equalsIgnoreCase(TagInfo.BODY_CONTENT_EMPTY)
            && !bodycontent
                    .equalsIgnoreCase(TagInfo.BODY_CONTENT_TAG_DEPENDENT)
            && !bodycontent
                    .equalsIgnoreCase(TagInfo.BODY_CONTENT_SCRIPTLESS)) {
        err.jspError(n, "jsp.error.tagdirective.badbodycontent",
                bodycontent);
    }
    dynamicAttrsMapName = checkConflict(n, dynamicAttrsMapName,
            "dynamic-attributes");
    if (dynamicAttrsMapName != null) {
        checkUniqueName(dynamicAttrsMapName, TAG_DYNAMIC, n);
    }
    smallIcon = checkConflict(n, smallIcon, "small-icon");
    largeIcon = checkConflict(n, largeIcon, "large-icon");
    description = checkConflict(n, description, "description");
    displayName = checkConflict(n, displayName, "display-name");
    example = checkConflict(n, example, "example");
}
项目:lazycat    文件:JspServletWrapper.java   
public JspServletWrapper(ServletContext servletContext, Options options, String tagFilePath, TagInfo tagInfo,
        JspRuntimeContext rctxt, JarResource tagJarResource) {

    this.isTagFile = true;
    this.config = null; // not used
    this.options = options;
    this.jspUri = tagFilePath;
    this.tripCount = 0;
    unloadByCount = options.getMaxLoadedJsps() > 0 ? true : false;
    unloadByIdle = options.getJspIdleTimeout() > 0 ? true : false;
    unloadAllowed = unloadByCount || unloadByIdle ? true : false;
    ctxt = new JspCompilationContext(jspUri, tagInfo, options, servletContext, this, rctxt, tagJarResource);
}
项目:lazycat    文件:JspCompilationContext.java   
public JspCompilationContext(String tagfile, TagInfo tagInfo, Options options, ServletContext context,
        JspServletWrapper jsw, JspRuntimeContext rctxt, JarResource tagJarResource) {
    this(tagfile, options, context, jsw, rctxt);
    this.isTagFile = true;
    this.tagInfo = tagInfo;
    this.tagJarResource = tagJarResource;
}