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


Java Constants.TAG_FILE_PACKAGE_NAME属性代码示例

本文整理汇总了Java中org.apache.jasper.Constants.TAG_FILE_PACKAGE_NAME属性的典型用法代码示例。如果您正苦于以下问题:Java Constants.TAG_FILE_PACKAGE_NAME属性的具体用法?Java Constants.TAG_FILE_PACKAGE_NAME怎么用?Java Constants.TAG_FILE_PACKAGE_NAME使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.jasper.Constants的用法示例。


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

示例1: getClassNameBase

private static String getClassNameBase(String urn) {
    StringBuilder base =
            new StringBuilder(Constants.TAG_FILE_PACKAGE_NAME + ".meta.");
    if (urn != null) {
        base.append(makeJavaPackage(urn));
        base.append('.');
    }
    return base.toString();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:9,代码来源:JspUtil.java

示例2: getTagHandlerClassName

/**
 * Gets the fully-qualified class name of the tag handler corresponding to
 * the given tag file path.
 *
 * @param path
 *            Tag file path
 * @param err
 *            Error dispatcher
 *
 * @return Fully-qualified class name of the tag handler corresponding to
 *         the given tag file path
 */
public static String getTagHandlerClassName(String path, String urn, ErrorDispatcher err) throws JasperException {

	String className = null;
	int begin = 0;
	int index;

	index = path.lastIndexOf(".tag");
	if (index == -1) {
		err.jspError("jsp.error.tagfile.badSuffix", path);
	}

	// It's tempting to remove the ".tag" suffix here, but we can't.
	// If we remove it, the fully-qualified class name of this tag
	// could conflict with the package name of other tags.
	// For instance, the tag file
	// /WEB-INF/tags/foo.tag
	// would have fully-qualified class name
	// org.apache.jsp.tag.web.foo
	// which would conflict with the package name of the tag file
	// /WEB-INF/tags/foo/bar.tag

	index = path.indexOf(WEB_INF_TAGS);
	if (index != -1) {
		className = Constants.TAG_FILE_PACKAGE_NAME + ".web.";
		begin = index + WEB_INF_TAGS.length();
	} else {
		index = path.indexOf(META_INF_TAGS);
		if (index != -1) {
			className = getClassNameBase(urn);
			begin = index + META_INF_TAGS.length();
		} else {
			err.jspError("jsp.error.tagfile.illegalPath", path);
		}
	}

	className += makeJavaPackage(path.substring(begin));

	return className;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:51,代码来源:JspUtil.java

示例3: getClassNameBase

private static String getClassNameBase(String urn) {
	StringBuilder base = new StringBuilder(Constants.TAG_FILE_PACKAGE_NAME + ".meta.");
	if (urn != null) {
		base.append(makeJavaPackage(urn));
		base.append('.');
	}
	return base.toString();
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:8,代码来源:JspUtil.java

示例4: getTagHandlerClassName

/**
 * Gets the fully-qualified class name of the tag handler corresponding to
 * the given tag file path.
 *
 * @param path
 *            Tag file path
 * @param err
 *            Error dispatcher
 *
 * @return Fully-qualified class name of the tag handler corresponding to
 *         the given tag file path
 */
public static String getTagHandlerClassName(String path, String urn,
        ErrorDispatcher err) throws JasperException {


    String className = null;
    int begin = 0;
    int index;

    index = path.lastIndexOf(".tag");
    if (index == -1) {
        err.jspError("jsp.error.tagfile.badSuffix", path);
    }

    // It's tempting to remove the ".tag" suffix here, but we can't.
    // If we remove it, the fully-qualified class name of this tag
    // could conflict with the package name of other tags.
    // For instance, the tag file
    // /WEB-INF/tags/foo.tag
    // would have fully-qualified class name
    // org.apache.jsp.tag.web.foo
    // which would conflict with the package name of the tag file
    // /WEB-INF/tags/foo/bar.tag

    index = path.indexOf(WEB_INF_TAGS);
    if (index != -1) {
        className = Constants.TAG_FILE_PACKAGE_NAME + ".web.";
        begin = index + WEB_INF_TAGS.length();
    } else {
        index = path.indexOf(META_INF_TAGS);
        if (index != -1) {
            className = getClassNameBase(urn);
            begin = index + META_INF_TAGS.length();
        } else {
            err.jspError("jsp.error.tagfile.illegalPath", path);
        }
    }

    className += makeJavaPackage(path.substring(begin));

    return className;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:53,代码来源:JspUtil.java


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