Java Code Examples for javax.servlet.jsp.tagext.TagInfo#BODY_CONTENT_SCRIPTLESS

The following examples show how to use javax.servlet.jsp.tagext.TagInfo#BODY_CONTENT_SCRIPTLESS . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TagFileProcessor.java    From Tomcat8-Source-Read with MIT License 6 votes vote down vote up
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, null, tagAttributeInfo,
                    displayName, smallIcon, largeIcon, tagVariableInfos,
                    dynamicAttrsMapName);
        }
 
Example 2
Source File: TagFileProcessor.java    From Tomcat7.0.67 with Apache License 2.0 6 votes vote down vote up
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);
        }
 
Example 3
Source File: TagFileProcessor.java    From tomcatsrc with Apache License 2.0 6 votes vote down vote up
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);
        }
 
Example 4
Source File: TagFileProcessor.java    From packagedrone with Eclipse Public License 1.0 5 votes vote down vote up
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, err);

            TagVariableInfo[] tagVariableInfos
                = variableVector.toArray(new TagVariableInfo[0]);

            TagAttributeInfo[] tagAttributeInfo
                = attributeVector.toArray(new TagAttributeInfo[0]);

            return new JasperTagInfo(name,
			       tagClassName,
			       bodycontent,
			       description,
			       tagLibInfo,
			       tei,
			       tagAttributeInfo,
			       displayName,
			       smallIcon,
			       largeIcon,
			       tagVariableInfos,
			       dynamicAttrsMapName);
        }
 
Example 5
Source File: Parser.java    From Tomcat8-Source-Read with MIT License 4 votes vote down vote up
/**
 * Determine the body type of <jsp:attribute> from the enclosing node
 */
private String getAttributeBodyType(Node n, String name) {

    if (n instanceof Node.CustomTag) {
        TagInfo tagInfo = ((Node.CustomTag) n).getTagInfo();
        TagAttributeInfo[] tldAttrs = tagInfo.getAttributes();
        for (int i = 0; i < tldAttrs.length; i++) {
            if (name.equals(tldAttrs[i].getName())) {
                if (tldAttrs[i].isFragment()) {
                    return TagInfo.BODY_CONTENT_SCRIPTLESS;
                }
                if (tldAttrs[i].canBeRequestTime()) {
                    return TagInfo.BODY_CONTENT_JSP;
                }
            }
        }
        if (tagInfo.hasDynamicAttributes()) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.IncludeAction) {
        if ("page".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.ForwardAction) {
        if ("page".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.SetProperty) {
        if ("value".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.UseBean) {
        if ("beanName".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.PlugIn) {
        if ("width".equals(name) || "height".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.ParamAction) {
        if ("value".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.JspElement) {
        return TagInfo.BODY_CONTENT_JSP;
    }

    return JAVAX_BODY_CONTENT_TEMPLATE_TEXT;
}
 
Example 6
Source File: Parser.java    From Tomcat7.0.67 with Apache License 2.0 4 votes vote down vote up
/**
 * Determine the body type of <jsp:attribute> from the enclosing node
 */
private String getAttributeBodyType(Node n, String name) {

    if (n instanceof Node.CustomTag) {
        TagInfo tagInfo = ((Node.CustomTag) n).getTagInfo();
        TagAttributeInfo[] tldAttrs = tagInfo.getAttributes();
        for (int i = 0; i < tldAttrs.length; i++) {
            if (name.equals(tldAttrs[i].getName())) {
                if (tldAttrs[i].isFragment()) {
                    return TagInfo.BODY_CONTENT_SCRIPTLESS;
                }
                if (tldAttrs[i].canBeRequestTime()) {
                    return TagInfo.BODY_CONTENT_JSP;
                }
            }
        }
        if (tagInfo.hasDynamicAttributes()) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.IncludeAction) {
        if ("page".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.ForwardAction) {
        if ("page".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.SetProperty) {
        if ("value".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.UseBean) {
        if ("beanName".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.PlugIn) {
        if ("width".equals(name) || "height".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.ParamAction) {
        if ("value".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.JspElement) {
        return TagInfo.BODY_CONTENT_JSP;
    }

    return JAVAX_BODY_CONTENT_TEMPLATE_TEXT;
}
 
Example 7
Source File: Parser.java    From tomcatsrc with Apache License 2.0 4 votes vote down vote up
/**
 * Determine the body type of <jsp:attribute> from the enclosing node
 */
private String getAttributeBodyType(Node n, String name) {

    if (n instanceof Node.CustomTag) {
        TagInfo tagInfo = ((Node.CustomTag) n).getTagInfo();
        TagAttributeInfo[] tldAttrs = tagInfo.getAttributes();
        for (int i = 0; i < tldAttrs.length; i++) {
            if (name.equals(tldAttrs[i].getName())) {
                if (tldAttrs[i].isFragment()) {
                    return TagInfo.BODY_CONTENT_SCRIPTLESS;
                }
                if (tldAttrs[i].canBeRequestTime()) {
                    return TagInfo.BODY_CONTENT_JSP;
                }
            }
        }
        if (tagInfo.hasDynamicAttributes()) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.IncludeAction) {
        if ("page".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.ForwardAction) {
        if ("page".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.SetProperty) {
        if ("value".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.UseBean) {
        if ("beanName".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.PlugIn) {
        if ("width".equals(name) || "height".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.ParamAction) {
        if ("value".equals(name)) {
            return TagInfo.BODY_CONTENT_JSP;
        }
    } else if (n instanceof Node.JspElement) {
        return TagInfo.BODY_CONTENT_JSP;
    }

    return JAVAX_BODY_CONTENT_TEMPLATE_TEXT;
}
 
Example 8
Source File: Parser.java    From packagedrone with Eclipse Public License 1.0 4 votes vote down vote up
/**
    * Determine the body type of <jsp:attribute> from the enclosing node
    */
   private String getAttributeBodyType(Node n, String name) {

if (n instanceof Node.CustomTag) {
    TagInfo tagInfo = ((Node.CustomTag)n).getTagInfo();
    TagAttributeInfo[] tldAttrs = tagInfo.getAttributes();
    for (int i=0; i<tldAttrs.length; i++) {
	if (name.equals(tldAttrs[i].getName())) {
	    if (tldAttrs[i].isFragment()) {
	        return TagInfo.BODY_CONTENT_SCRIPTLESS;
	    }
	    if (tldAttrs[i].canBeRequestTime()) {
	        return TagInfo.BODY_CONTENT_JSP;
	    }
	}
    }
    if (tagInfo.hasDynamicAttributes()) {
	return TagInfo.BODY_CONTENT_JSP;
    }
} else if (n instanceof Node.IncludeAction) {
    if ("page".equals(name)) {
	return TagInfo.BODY_CONTENT_JSP;
    }
} else if (n instanceof Node.ForwardAction) {
    if ("page".equals(name)) {
	return TagInfo.BODY_CONTENT_JSP;
    }
} else if (n instanceof Node.SetProperty) {
    if ("value".equals(name)) {
	return TagInfo.BODY_CONTENT_JSP;
    }
} else if (n instanceof Node.UseBean) {
    if ("beanName".equals(name)) {
	return TagInfo.BODY_CONTENT_JSP;
    }
} else if (n instanceof Node.PlugIn) {
    if ("width".equals(name) || "height".equals(name)) {
	return TagInfo.BODY_CONTENT_JSP;
    }
} else if (n instanceof Node.ParamAction) {
    if ("value".equals(name)) {
	return TagInfo.BODY_CONTENT_JSP;
    }
} else if (n instanceof Node.JspElement) {
    return TagInfo.BODY_CONTENT_JSP;
}

return JAVAX_BODY_CONTENT_TEMPLATE_TEXT;
   }