本文整理匯總了Java中javax.servlet.descriptor.JspConfigDescriptor.getTaglibs方法的典型用法代碼示例。如果您正苦於以下問題:Java JspConfigDescriptor.getTaglibs方法的具體用法?Java JspConfigDescriptor.getTaglibs怎麽用?Java JspConfigDescriptor.getTaglibs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.servlet.descriptor.JspConfigDescriptor
的用法示例。
在下文中一共展示了JspConfigDescriptor.getTaglibs方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: processWebDotXml
import javax.servlet.descriptor.JspConfigDescriptor; //導入方法依賴的package包/類
private void processWebDotXml() throws Exception {
// Skip if we are only looking for listeners
if (scanListeners) {
return;
}
JspConfigDescriptor jspConfig = ctxt.getJspConfigDescriptor();
if (jspConfig == null) {
return;
}
for (TaglibDescriptor taglib: jspConfig.getTaglibs()) {
if (taglib == null) {
continue;
}
String tagUri = taglib.getTaglibURI();
String tagLoc = taglib.getTaglibLocation();
if (tagUri == null || tagLoc == null) {
continue;
}
// Ignore system tlds in web.xml, for backward compatibility
if (systemUris.contains(tagUri)
|| (!useMyFaces && systemUrisJsf.contains(tagUri))) {
continue;
}
// Save this location if appropriate
if (uriType(tagLoc) == NOROOT_REL_URI)
tagLoc = "/WEB-INF/" + tagLoc;
String tagLoc2 = null;
if (tagLoc.endsWith(JAR_FILE_SUFFIX)) {
tagLoc = ctxt.getResource(tagLoc).toString();
tagLoc2 = "META-INF/taglib.tld";
}
if (log.isLoggable(Level.FINE)) {
log.fine( "Add tld map from web.xml: " + tagUri + "=>" + tagLoc+ "," + tagLoc2);
}
mappings.put(tagUri, new String[] { tagLoc, tagLoc2 });
}
}