当前位置: 首页>>代码示例>>Java>>正文


Java TagLibraryInfo类代码示例

本文整理汇总了Java中javax.servlet.jsp.tagext.TagLibraryInfo的典型用法代码示例。如果您正苦于以下问题:Java TagLibraryInfo类的具体用法?Java TagLibraryInfo怎么用?Java TagLibraryInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TagLibraryInfo类属于javax.servlet.jsp.tagext包,在下文中一共展示了TagLibraryInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: JasperTagInfo

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
public JasperTagInfo(String tagName,
        String tagClassName,
        String bodyContent,
        String infoString,
        TagLibraryInfo taglib,
        TagExtraInfo tagExtraInfo,
        TagAttributeInfo[] attributeInfo,
        String displayName,
        String smallIcon,
        String largeIcon,
        TagVariableInfo[] tvi,
        String mapName) {

    super(tagName, tagClassName, bodyContent, infoString, taglib,
            tagExtraInfo, attributeInfo, displayName, smallIcon, largeIcon,
            tvi);
    
    this.dynamicAttrsMapName = mapName;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:20,代码来源:JasperTagInfo.java

示例2: PageInfo

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
PageInfo(BeanRepository beanRepository, String jspFile, boolean isTagFile) {
    this.isTagFile = isTagFile;
    this.jspFile = jspFile;
    this.beanRepository = beanRepository;
    this.varInfoNames = new HashSet<String>();
    this.taglibsMap = new HashMap<String, TagLibraryInfo>();
    this.jspPrefixMapper = new HashMap<String, String>();
    this.xmlPrefixMapper = new HashMap<String, LinkedList<String>>();
    this.nonCustomTagPrefixMap = new HashMap<String, Mark>();
    this.imports = new Vector<String>();
    this.dependants = new HashMap<String,Long>();
    this.includePrelude = new Vector<String>();
    this.includeCoda = new Vector<String>();
    this.pluginDcls = new Vector<String>();
    this.prefixes = new HashSet<String>();

    // Enter standard imports
    imports.addAll(Constants.STANDARD_IMPORTS);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:20,代码来源:PageInfo.java

示例3: startPrefixMapping

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
public void startPrefixMapping(String prefix, String uri)
    throws SAXException {
    TagLibraryInfo taglibInfo;

    if (directivesOnly && !(JSP_URI.equals(uri))) {
        return;
    }
    
    try {
        taglibInfo = getTaglibInfo(prefix, uri);
    } catch (JasperException je) {
        throw new SAXParseException(
            Localizer.getMessage("jsp.error.could.not.add.taglibraries"),
            locator,
            je);
    }

    if (taglibInfo != null) {
        if (pageInfo.getTaglib(uri) == null) {
            pageInfo.addTaglib(uri, taglibInfo);
        }
        pageInfo.pushPrefixMapping(prefix, uri);
    } else {
        pageInfo.pushPrefixMapping(prefix, null);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:27,代码来源:JspDocumentParser.java

示例4: startPrefixMapping

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
@Override
public void startPrefixMapping(String prefix, String uri) throws SAXException {
	TagLibraryInfo taglibInfo;

	if (directivesOnly && !(JSP_URI.equals(uri))) {
		return;
	}

	try {
		taglibInfo = getTaglibInfo(prefix, uri);
	} catch (JasperException je) {
		throw new SAXParseException(Localizer.getMessage("jsp.error.could.not.add.taglibraries"), locator, je);
	}

	if (taglibInfo != null) {
		if (pageInfo.getTaglib(uri) == null) {
			pageInfo.addTaglib(uri, taglibInfo);
		}
		pageInfo.pushPrefixMapping(prefix, uri);
	} else {
		pageInfo.pushPrefixMapping(prefix, null);
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:24,代码来源:JspDocumentParser.java

示例5: PageInfo

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
PageInfo(BeanRepository beanRepository, String jspFile, boolean isTagFile) {
	this.isTagFile = isTagFile;
	this.jspFile = jspFile;
	this.beanRepository = beanRepository;
	this.varInfoNames = new HashSet<String>();
	this.taglibsMap = new HashMap<String, TagLibraryInfo>();
	this.jspPrefixMapper = new HashMap<String, String>();
	this.xmlPrefixMapper = new HashMap<String, LinkedList<String>>();
	this.nonCustomTagPrefixMap = new HashMap<String, Mark>();
	this.imports = new Vector<String>();
	this.dependants = new HashMap<String, Long>();
	this.includePrelude = new Vector<String>();
	this.includeCoda = new Vector<String>();
	this.pluginDcls = new Vector<String>();
	this.prefixes = new HashSet<String>();

	// Enter standard imports
	imports.addAll(Constants.STANDARD_IMPORTS);
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:20,代码来源:PageInfo.java

示例6: initServletContext

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
private void initServletContext() {
    try {
        context =new JspCServletContext
            (new PrintWriter(new OutputStreamWriter(System.out, "UTF-8")),

             new URL("file:" + uriRoot.replace('\\','/') + '/'));
        tldScanner = new TldScanner(context, isValidationEnabled);

        // START GlassFish 750
        taglibs = new ConcurrentHashMap<String, TagLibraryInfo>();
        context.setAttribute(Constants.JSP_TAGLIBRARY_CACHE, taglibs);

        tagFileJarUrls = new ConcurrentHashMap<String, URL>();
        context.setAttribute(Constants.JSP_TAGFILE_JAR_URLS_CACHE,
                             tagFileJarUrls);
        // END GlassFish 750
    } catch (MalformedURLException me) {
        System.out.println("**" + me);
    } catch (UnsupportedEncodingException ex) {
    }
    rctxt = new JspRuntimeContext(context, this);
    jspConfig = new JspConfig(context);
    tagPluginManager = new TagPluginManager(context);
}
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:25,代码来源:JspC.java

示例7: getTagLibraryInfos

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
/**
 * Returns an array of TagLibraryInfo objects representing the entire set
 * of tag libraries (including this TagLibraryInfo) imported by taglib
 * directives in the translation unit that references this
 * TagLibraryInfo.
 *
 * If a tag library is imported more than once and bound to different
 * prefices, only the TagLibraryInfo bound to the first prefix must be
 * included in the returned array.
 *
 * @return Array of TagLibraryInfo objects representing the entire set
 * of tag libraries (including this TagLibraryInfo) imported by taglib
 * directives in the translation unit that references this TagLibraryInfo.
 *
 * @since 2.1
 */
public TagLibraryInfo[] getTagLibraryInfos() {

    TagLibraryInfo[] taglibs = null;

    Collection c = pageInfo.getTaglibs();
    if (c != null) {
        Object[] objs = c.toArray();
        if (objs != null && objs.length > 0) {
            taglibs = new TagLibraryInfo[objs.length];
            for (int i=0; i<objs.length; i++) {
                taglibs[i] = (TagLibraryInfo) objs[i];
            }
        }
    }

    return taglibs;
}
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:34,代码来源:ImplicitTagLibraryInfo.java

示例8: PageInfo

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
PageInfo(BeanRepository beanRepository, String jspFile) {

        this.jspFile = jspFile;
	this.beanRepository = beanRepository;
	this.taglibsMap = new HashMap<String, TagLibraryInfo>();
	this.jspPrefixMapper = new HashMap<String, String>();
	this.xmlPrefixMapper = new HashMap<String, LinkedList<String>>();
        this.nonCustomTagPrefixMap = new HashMap<String, Mark>();
	this.imports = new ArrayList<String>();
        this.dependants = new ArrayList<String>();
	this.includePrelude = new ArrayList<String>();
	this.includeCoda = new ArrayList<String>();
	this.pluginDcls = new ArrayList<String>();
	this.prefixes = new HashSet<String>();

	// Enter standard imports
	for(int i = 0; i < STANDARD_IMPORTS.length; i++)
	    imports.add(STANDARD_IMPORTS[i]);
    }
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:20,代码来源:PageInfo.java

示例9: PageInfo

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
PageInfo(BeanRepository beanRepository, String jspFile) {

        this.jspFile = jspFile;
        this.beanRepository = beanRepository;
        this.varInfoNames = new HashSet<String>();
        this.taglibsMap = new HashMap<String, TagLibraryInfo>();
        this.jspPrefixMapper = new HashMap<String, String>();
        this.xmlPrefixMapper = new HashMap<String, LinkedList<String>>();
        this.nonCustomTagPrefixMap = new HashMap<String, Mark>();
        this.imports = new Vector<String>();
        this.dependants = new HashMap<String,Long>();
        this.includePrelude = new Vector<String>();
        this.includeCoda = new Vector<String>();
        this.pluginDcls = new Vector<String>();
        this.prefixes = new HashSet<String>();

        // Enter standard imports
        imports.addAll(Constants.STANDARD_IMPORTS);
    }
 
开发者ID:WhiteBearSolutions,项目名称:WBSAirback,代码行数:20,代码来源:PageInfo.java

示例10: startPrefixMapping

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
@Override
public void startPrefixMapping(String prefix, String uri)
    throws SAXException {
    TagLibraryInfo taglibInfo;

    if (directivesOnly && !(JSP_URI.equals(uri))) {
        return;
    }

    try {
        taglibInfo = getTaglibInfo(prefix, uri);
    } catch (JasperException je) {
        throw new SAXParseException(
            Localizer.getMessage("jsp.error.could.not.add.taglibraries"),
            locator,
            je);
    }

    if (taglibInfo != null) {
        if (pageInfo.getTaglib(uri) == null) {
            pageInfo.addTaglib(uri, taglibInfo);
        }
        pageInfo.pushPrefixMapping(prefix, uri);
    } else {
        pageInfo.pushPrefixMapping(prefix, null);
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:28,代码来源:JspDocumentParser.java

示例11: TagFileDirectiveVisitor

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
public TagFileDirectiveVisitor(Compiler compiler,
        TagLibraryInfo tagLibInfo, String name, String path) {
    err = compiler.getErrorDispatcher();
    this.tagLibInfo = tagLibInfo;
    this.name = name;
    this.path = path;
    attributeVector = new Vector<TagAttributeInfo>();
    variableVector = new Vector<TagVariableInfo>();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:10,代码来源:TagFileProcessor.java

示例12: TagFileDirectiveVisitor

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
public TagFileDirectiveVisitor(Compiler compiler,
        TagLibraryInfo tagLibInfo, String name, String path) {
    err = compiler.getErrorDispatcher();
    this.tagLibInfo = tagLibInfo;
    this.name = name;
    this.path = path;
    attributeVector = new Vector();
    variableVector = new Vector();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:TagFileProcessor.java

示例13: validateXmlView

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
/**
 * Validate XML view against the TagLibraryValidator classes of all imported
 * tag libraries.
 */
private static void validateXmlView(PageData xmlView, Compiler compiler) throws JasperException {

	StringBuilder errMsg = null;
	ErrorDispatcher errDisp = compiler.getErrorDispatcher();

	for (Iterator<TagLibraryInfo> iter = compiler.getPageInfo().getTaglibs().iterator(); iter.hasNext();) {

		Object o = iter.next();
		if (!(o instanceof TagLibraryInfoImpl))
			continue;
		TagLibraryInfoImpl tli = (TagLibraryInfoImpl) o;

		ValidationMessage[] errors = tli.validate(xmlView);
		if ((errors != null) && (errors.length != 0)) {
			if (errMsg == null) {
				errMsg = new StringBuilder();
			}
			errMsg.append("<h3>");
			errMsg.append(Localizer.getMessage("jsp.error.tlv.invalid.page", tli.getShortName(),
					compiler.getPageInfo().getJspFile()));
			errMsg.append("</h3>");
			for (int i = 0; i < errors.length; i++) {
				if (errors[i] != null) {
					errMsg.append("<p>");
					errMsg.append(errors[i].getId());
					errMsg.append(": ");
					errMsg.append(errors[i].getMessage());
					errMsg.append("</p>");
				}
			}
		}
	}

	if (errMsg != null) {
		errDisp.jspError(errMsg.toString());
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:42,代码来源:Validator.java

示例14: parseCustomAction

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
private Node parseCustomAction(String qName, String localName, String uri, Attributes nonTaglibAttrs,
		Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent) throws SAXException {

	// Check if this is a user-defined (custom) tag
	TagLibraryInfo tagLibInfo = pageInfo.getTaglib(uri);
	if (tagLibInfo == null) {
		return null;
	}

	TagInfo tagInfo = tagLibInfo.getTag(localName);
	TagFileInfo tagFileInfo = tagLibInfo.getTagFile(localName);
	if (tagInfo == null && tagFileInfo == null) {
		throw new SAXParseException(Localizer.getMessage("jsp.error.xml.bad_tag", localName, uri), locator);
	}
	Class<?> tagHandlerClass = null;
	if (tagInfo != null) {
		String handlerClassName = tagInfo.getTagClassName();
		try {
			tagHandlerClass = ctxt.getClassLoader().loadClass(handlerClassName);
		} catch (Exception e) {
			throw new SAXParseException(
					Localizer.getMessage("jsp.error.loadclass.taghandler", handlerClassName, qName), locator, e);
		}
	}

	String prefix = getPrefix(qName);

	Node.CustomTag ret = null;
	if (tagInfo != null) {
		ret = new Node.CustomTag(qName, prefix, localName, uri, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs,
				start, parent, tagInfo, tagHandlerClass);
	} else {
		ret = new Node.CustomTag(qName, prefix, localName, uri, nonTaglibAttrs, nonTaglibXmlnsAttrs, taglibAttrs,
				start, parent, tagFileInfo);
	}

	return ret;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:39,代码来源:JspDocumentParser.java

示例15: getTaglibInfo

import javax.servlet.jsp.tagext.TagLibraryInfo; //导入依赖的package包/类
private TagLibraryInfo getTaglibInfo(String prefix, String uri) throws JasperException {

		TagLibraryInfo result = null;

		if (uri.startsWith(URN_JSPTAGDIR)) {
			// uri (of the form "urn:jsptagdir:path") references tag file dir
			String tagdir = uri.substring(URN_JSPTAGDIR.length());
			result = new ImplicitTagLibraryInfo(ctxt, parserController, pageInfo, prefix, tagdir, err);
		} else {
			// uri references TLD file
			boolean isPlainUri = false;
			if (uri.startsWith(URN_JSPTLD)) {
				// uri is of the form "urn:jsptld:path"
				uri = uri.substring(URN_JSPTLD.length());
			} else {
				isPlainUri = true;
			}

			TldLocation location = ctxt.getTldLocation(uri);
			if (location != null || !isPlainUri) {
				if (ctxt.getOptions().isCaching()) {
					result = ctxt.getOptions().getCache().get(uri);
				}
				if (result == null) {
					/*
					 * If the uri value is a plain uri, a translation error must
					 * not be generated if the uri is not found in the taglib
					 * map. Instead, any actions in the namespace defined by the
					 * uri value must be treated as uninterpreted.
					 */
					result = new TagLibraryInfoImpl(ctxt, parserController, pageInfo, prefix, uri, location, err, null);
					if (ctxt.getOptions().isCaching()) {
						ctxt.getOptions().getCache().put(uri, result);
					}
				}
			}
		}

		return result;
	}
 
开发者ID:how2j,项目名称:lazycat,代码行数:41,代码来源:JspDocumentParser.java


注:本文中的javax.servlet.jsp.tagext.TagLibraryInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。