本文整理汇总了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();
}
示例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;
}
示例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();
}
示例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;
}