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


Java TreeNode.getName方法代码示例

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


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

示例1: createInitParam

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
String[] createInitParam(TreeNode elem) {
    String[] initParam = new String[2];

    Iterator<TreeNode> list = elem.findChildren();
    while (list.hasNext()) {
        TreeNode element = list.next();
        String tname = element.getName();
        if ("param-name".equals(tname)) {
            initParam[0] = element.getBody();
        } else if ("param-value".equals(tname)) {
            initParam[1] = element.getBody();
        } else if ("description".equals(tname)) {
             // Do nothing
        } else {
            if (log.isWarnEnabled()) {
                log.warn(Localizer.getMessage(
                        "jsp.warning.unknown.element.in.initParam", tname));
            }
        }
    }
    return initParam;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:23,代码来源:TagLibraryInfoImpl.java

示例2: createInitParam

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
String[] createInitParam(TreeNode elem) {
    String[] initParam = new String[2];

    Iterator list = elem.findChildren();
    while (list.hasNext()) {
        TreeNode element = (TreeNode) list.next();
        String tname = element.getName();
        if ("param-name".equals(tname)) {
            initParam[0] = element.getBody();
        } else if ("param-value".equals(tname)) {
            initParam[1] = element.getBody();
        } else if ("description".equals(tname)) {
            ; // Do nothing
        } else {
            log.warn(Localizer.getMessage(
                        "jsp.warning.unknown.element.in.initParam", tname));
        }
    }
    return initParam;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:21,代码来源:TagLibraryInfoImpl.java

示例3: createInitParam

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
String[] createInitParam(TreeNode elem) {
	String[] initParam = new String[2];

	Iterator<TreeNode> list = elem.findChildren();
	while (list.hasNext()) {
		TreeNode element = list.next();
		String tname = element.getName();
		if ("param-name".equals(tname)) {
			initParam[0] = element.getBody();
		} else if ("param-value".equals(tname)) {
			initParam[1] = element.getBody();
		} else if ("description".equals(tname)) {
			// Do nothing
		} else {
			if (log.isWarnEnabled()) {
				log.warn(Localizer.getMessage("jsp.warning.unknown.element.in.initParam", tname));
			}
		}
	}
	return initParam;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:22,代码来源:TagLibraryInfoImpl.java

示例4: createInitParam

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
private String[] createInitParam(TreeNode elem) throws JasperException {

        String[] initParam = new String[2];
        
        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();
            if ("param-name".equals(tname)) {
                initParam[0] = element.getBody();
            } else if ("param-value".equals(tname)) {
                initParam[1] = element.getBody();
            } else if ("description".equals(tname)) {
                ; // Do nothing
            } else {
                err.jspError("jsp.error.unknown.element.in.initParam",
                             tname);
	    }
        }
	return initParam;
    }
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:22,代码来源:TagLibraryInfoImpl.java

示例5: createFunctionInfo

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
FunctionInfo createFunctionInfo(TreeNode elem) {

        String name = null;
        String klass = null;
        String signature = null;

        Iterator<TreeNode> list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = list.next();
            String tname = element.getName();

            if ("name".equals(tname)) {
                name = element.getBody();
            } else if ("function-class".equals(tname)) {
                klass = element.getBody();
            } else if ("function-signature".equals(tname)) {
                signature = element.getBody();
            } else if ("display-name".equals(tname) || // Ignored elements
                    "small-icon".equals(tname) || "large-icon".equals(tname)
                    || "description".equals(tname) || "example".equals(tname)) {
            } else {
                if (log.isWarnEnabled()) {
                    log.warn(Localizer.getMessage(
                            "jsp.warning.unknown.element.in.function", tname));
                }
            }
        }

        return new FunctionInfo(name, klass, signature);
    }
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:31,代码来源:TagLibraryInfoImpl.java

示例6: createFunctionInfo

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
FunctionInfo createFunctionInfo(TreeNode elem) {

        String name = null;
        String klass = null;
        String signature = null;

        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();

            if ("name".equals(tname)) {
                name = element.getBody();
            } else if ("function-class".equals(tname)) {
                klass = element.getBody();
            } else if ("function-signature".equals(tname)) {
                signature = element.getBody();
            } else if ("display-name".equals(tname) || // Ignored elements
                    "small-icon".equals(tname) || "large-icon".equals(tname)
                    || "description".equals(tname) || "example".equals(tname)) {
            } else {
                log.warn(Localizer.getMessage(
                            "jsp.warning.unknown.element.in.function", tname));
            }
        }

        return new FunctionInfo(name, klass, signature);
    }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:TagLibraryInfoImpl.java

示例7: createTagFileInfo

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
private TagFileInfo createTagFileInfo(TreeNode elem, JarResource jarResource) throws JasperException {

		String name = null;
		String path = null;

		Iterator<TreeNode> list = elem.findChildren();
		while (list.hasNext()) {
			TreeNode child = list.next();
			String tname = child.getName();
			if ("name".equals(tname)) {
				name = child.getBody();
			} else if ("path".equals(tname)) {
				path = child.getBody();
			} else if ("example".equals(tname)) {
				// Ignore <example> element: Bugzilla 33538
			} else if ("tag-extension".equals(tname)) {
				// Ignore <tag-extension> element: Bugzilla 33538
			} else if ("icon".equals(tname) || "display-name".equals(tname) || "description".equals(tname)) {
				// Ignore these elements: Bugzilla 38015
			} else {
				if (log.isWarnEnabled()) {
					log.warn(Localizer.getMessage("jsp.warning.unknown.element.in.tagfile", tname));
				}
			}
		}

		if (path.startsWith("/META-INF/tags")) {
			// Tag file packaged in JAR
			// See https://bz.apache.org/bugzilla/show_bug.cgi?id=46471
			// This needs to be removed once all the broken code that depends on
			// it has been removed
			ctxt.setTagFileJarResource(path, jarResource);
		} else if (!path.startsWith("/WEB-INF/tags")) {
			err.jspError("jsp.error.tagfile.illegalPath", path);
		}

		TagInfo tagInfo = TagFileProcessor.parseTagFileDirectives(parserController, name, path, jarResource, this);
		return new TagFileInfo(name, path, tagInfo);
	}
 
开发者ID:how2j,项目名称:lazycat,代码行数:40,代码来源:TagLibraryInfoImpl.java

示例8: createFunctionInfo

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
FunctionInfo createFunctionInfo(TreeNode elem) {

		String name = null;
		String klass = null;
		String signature = null;

		Iterator<TreeNode> list = elem.findChildren();
		while (list.hasNext()) {
			TreeNode element = list.next();
			String tname = element.getName();

			if ("name".equals(tname)) {
				name = element.getBody();
			} else if ("function-class".equals(tname)) {
				klass = element.getBody();
			} else if ("function-signature".equals(tname)) {
				signature = element.getBody();
			} else if ("display-name".equals(tname) || // Ignored elements
					"small-icon".equals(tname) || "large-icon".equals(tname) || "description".equals(tname)
					|| "example".equals(tname)) {
			} else {
				if (log.isWarnEnabled()) {
					log.warn(Localizer.getMessage("jsp.warning.unknown.element.in.function", tname));
				}
			}
		}

		return new FunctionInfo(name, klass, signature);
	}
 
开发者ID:how2j,项目名称:lazycat,代码行数:30,代码来源:TagLibraryInfoImpl.java

示例9: createFunctionInfo

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
private FunctionInfo createFunctionInfo(TreeNode elem)
        throws JasperException {

    String name = null;
    String klass = null;
    String signature = null;

    Iterator list = elem.findChildren();
    while (list.hasNext()) {
        TreeNode element = (TreeNode) list.next();
        String tname = element.getName();

        if ("name".equals(tname)) {
            name = element.getBody();
        } else if ("function-class".equals(tname)) {
            klass = element.getBody();
        } else if ("function-signature".equals(tname)) {
            signature = element.getBody();
        } else if ("display-name".equals(tname) ||    // Ignored elements
                 "small-icon".equals(tname) ||
                 "large-icon".equals(tname) ||
                 "description".equals(tname) || 
                 "example".equals(tname)) {
        } else {
            err.jspError("jsp.error.unknown.element.in.function",
                         tname);
 }
    }

    return new FunctionInfo(name, klass, signature);
}
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:32,代码来源:TagLibraryInfoImpl.java

示例10: createTagFileInfo

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
private TagFileInfo createTagFileInfo(TreeNode elem, JarResource jarResource)
        throws JasperException {

    String name = null;
    String path = null;

    Iterator<TreeNode> list = elem.findChildren();
    while (list.hasNext()) {
        TreeNode child = list.next();
        String tname = child.getName();
        if ("name".equals(tname)) {
            name = child.getBody();
        } else if ("path".equals(tname)) {
            path = child.getBody();
        } else if ("example".equals(tname)) {
            // Ignore <example> element: Bugzilla 33538
        } else if ("tag-extension".equals(tname)) {
            // Ignore <tag-extension> element: Bugzilla 33538
        } else if ("icon".equals(tname) 
                || "display-name".equals(tname) 
                || "description".equals(tname)) {
            // Ignore these elements: Bugzilla 38015
        } else {
            if (log.isWarnEnabled()) {
                log.warn(Localizer.getMessage(
                        "jsp.warning.unknown.element.in.tagfile", tname));
            }
        }
    }

    if (path.startsWith("/META-INF/tags")) {
        // Tag file packaged in JAR
        // See https://bz.apache.org/bugzilla/show_bug.cgi?id=46471
        // This needs to be removed once all the broken code that depends on
        // it has been removed
        ctxt.setTagFileJarResource(path, jarResource);
    } else if (!path.startsWith("/WEB-INF/tags")) {
        err.jspError("jsp.error.tagfile.illegalPath", path);
    }

    TagInfo tagInfo = TagFileProcessor.parseTagFileDirectives(
            parserController, name, path, jarResource, this);
    return new TagFileInfo(name, path, tagInfo);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:45,代码来源:TagLibraryInfoImpl.java

示例11: createTagFileInfo

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
private TagFileInfo createTagFileInfo(TreeNode elem, String uri,
        URL jarFileUrl) throws JasperException {

    String name = null;
    String path = null;

    Iterator list = elem.findChildren();
    while (list.hasNext()) {
        TreeNode child = (TreeNode) list.next();
        String tname = child.getName();
        if ("name".equals(tname)) {
            name = child.getBody();
        } else if ("path".equals(tname)) {
            path = child.getBody();
        } else if ("example".equals(tname)) {
            // Ignore <example> element: Bugzilla 33538
        } else if ("tag-extension".equals(tname)) {
            // Ignore <tag-extension> element: Bugzilla 33538
        } else if ("icon".equals(tname) 
                || "display-name".equals(tname) 
                || "description".equals(tname)) {
            // Ignore these elements: Bugzilla 38015
        } else {
            log.warn(Localizer.getMessage(
                        "jsp.warning.unknown.element.in.tagfile", tname));
        }
    }

    if (path.startsWith("/META-INF/tags")) {
        // Tag file packaged in JAR
        // See https://issues.apache.org/bugzilla/show_bug.cgi?id=46471
        // This needs to be removed once all the broken code that depends on
        // it has been removed
        ctxt.setTagFileJarUrl(path, jarFileUrl);
    } else if (!path.startsWith("/WEB-INF/tags")) {
        err.jspError("jsp.error.tagfile.illegalPath", path);
    }

    TagInfo tagInfo = TagFileProcessor.parseTagFileDirectives(
            parserController, name, path, jarFileUrl, this);
    return new TagFileInfo(name, path, tagInfo);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:43,代码来源:TagLibraryInfoImpl.java

示例12: parseImplicitTld

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
/**
 * Parses the JSP version and tlib-version from the implicit.tld at the
 * given path.
 */
private void parseImplicitTld(JspCompilationContext ctxt, String path)
        throws JasperException {

    InputStream is = null;
    TreeNode tld = null;

    try {
        URL uri = ctxt.getResource(path);
        if (uri == null) {
            // no implicit.tld
            return;
        }

        is = uri.openStream();
        /* SJSAS 6384538
        tld = new ParserUtils().parseXMLDocument(IMPLICIT_TLD, is);
        */
        // START SJSAS 6384538
        tld = new ParserUtils().parseXMLDocument(
            IMPLICIT_TLD, is, ctxt.getOptions().isValidationEnabled());
        // END SJSAS 6384538
    } catch (Exception ex) {
        throw new JasperException(ex);
    } finally {
        if (is != null) {
            try {
                is.close();
            } catch (Throwable t) {}
        }
    }

    this.jspversion = tld.findAttribute("version");

    Iterator list = tld.findChildren();
    while (list.hasNext()) {
        TreeNode element = (TreeNode) list.next();
        String tname = element.getName();
        if ("tlibversion".equals(tname)
                || "tlib-version".equals(tname)) {
            this.tlibversion = element.getBody();
        } else if ("jspversion".equals(tname)
                || "jsp-version".equals(tname)) {
            this.jspversion = element.getBody();
        } else if (!"shortname".equals(tname)
                && !"short-name".equals(tname)) {
            err.jspError("jsp.error.implicitTld.additionalElements",
                         path, tname);
        }
    }

    // JSP version in implicit.tld must be 2.0 or greater
    Double jspVersionDouble = Double.valueOf(this.jspversion);
    if (Double.compare(jspVersionDouble, Constants.JSP_VERSION_2_0) < 0) {
        err.jspError("jsp.error.implicitTld.jspVersion", path,
                     this.jspversion);
    }
}
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:62,代码来源:ImplicitTagLibraryInfo.java

示例13: createTagFileInfo

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
private TagFileInfo createTagFileInfo(TreeNode elem, String uri,
				  URL jarFileUrl)
        throws JasperException {

String name = null;
String path = null;
       String description = null;
       String displayName = null;
       String icon = null;
       boolean checkConflict = false;

       Iterator list = elem.findChildren();
       while (list.hasNext()) {
           TreeNode child = (TreeNode) list.next();
           String tname = child.getName();
    if ("name".equals(tname)) {
	name = child.getBody();
           } else if ("path".equals(tname)) {
	path = child.getBody();
           } else if ("description".equals(tname)) {
               checkConflict = true;
               description = child.getBody();
           } else if ("display-name".equals(tname)) {
               checkConflict = true;
               displayName = child.getBody();
           } else if ("icon".equals(tname)) {
               checkConflict = true;
               icon = child.getBody();
           } else if ("example".equals(tname)) {
               // Ignore <example> element: Bugzilla 33538
           } else if ("tag-extension".equals(tname)) {
               // Ignore <tag-extension> element: Bugzilla 33538
    } else {
               err.jspError("jsp.error.unknown.element.in.tagfile", tname);
           }
}

if (path.startsWith("/META-INF/tags")) {
    // Tag file packaged in JAR
    // STARTJR: fix possible NPE
    if(jarFileUrl != null) {
        ctxt.getTagFileJarUrls().put(path, jarFileUrl);
    }
    // ENDJR: fix possible NPE
} else if (!path.startsWith("/WEB-INF/tags")) {
    err.jspError("jsp.error.tagfile.illegalPath", path);
}

JasperTagInfo tagInfo = (JasperTagInfo)
    TagFileProcessor.parseTagFileDirectives(parserController, name,
					      path, this);
       if (checkConflict) {
           String tstring = tagInfo.getInfoString();
           if (tstring != null && !"".equals(tstring)) { 
               description = tstring;
           }
           tstring = tagInfo.getDisplayName();
           if (tstring != null && !"".equals(tstring)) { 
               displayName = tstring;
           }
           tstring = tagInfo.getSmallIcon();
           if (tstring != null && !"".equals(tstring)) { 
               icon = tstring;
           }
           tagInfo = new JasperTagInfo(
                             tagInfo.getTagName(),
                             tagInfo.getTagClassName(),
                             tagInfo.getBodyContent(),
                             description,
                             tagInfo.getTagLibrary(),
                             tagInfo.getTagExtraInfo(),
                             tagInfo.getAttributes(),
                             displayName,
                             icon,
                             tagInfo.getLargeIcon(),
                             tagInfo.getTagVariableInfos(),
                             tagInfo.getDynamicAttributesMapName());
       }
return new TagFileInfo(name, path, tagInfo);
   }
 
开发者ID:eclipse,项目名称:packagedrone,代码行数:81,代码来源:TagLibraryInfoImpl.java

示例14: createTagFileInfo

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
private TagFileInfo createTagFileInfo(TreeNode elem, JarResource jarResource)
        throws JasperException {

    String name = null;
    String path = null;

    Iterator<TreeNode> list = elem.findChildren();
    while (list.hasNext()) {
        TreeNode child = list.next();
        String tname = child.getName();
        if ("name".equals(tname)) {
            name = child.getBody();
        } else if ("path".equals(tname)) {
            path = child.getBody();
        } else if ("example".equals(tname)) {
            // Ignore <example> element: Bugzilla 33538
        } else if ("tag-extension".equals(tname)) {
            // Ignore <tag-extension> element: Bugzilla 33538
        } else if ("icon".equals(tname) 
                || "display-name".equals(tname) 
                || "description".equals(tname)) {
            // Ignore these elements: Bugzilla 38015
        } else {
            if (log.isWarnEnabled()) {
                log.warn(Localizer.getMessage(
                        "jsp.warning.unknown.element.in.tagfile", tname));
            }
        }
    }

    if (path.startsWith("/META-INF/tags")) {
        // Tag file packaged in JAR
        // See https://issues.apache.org/bugzilla/show_bug.cgi?id=46471
        // This needs to be removed once all the broken code that depends on
        // it has been removed
        ctxt.setTagFileJarResource(path, jarResource);
    } else if (!path.startsWith("/WEB-INF/tags")) {
        err.jspError("jsp.error.tagfile.illegalPath", path);
    }

    TagInfo tagInfo = TagFileProcessor.parseTagFileDirectives(
            parserController, name, path, jarResource, this);
    return new TagFileInfo(name, path, tagInfo);
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:45,代码来源:TagLibraryInfoImpl.java

示例15: parseImplicitTld

import org.apache.jasper.xmlparser.TreeNode; //导入方法依赖的package包/类
/**
 * Parses the JSP version and tlib-version from the implicit.tld at the
 * given path.
 */
private void parseImplicitTld(JspCompilationContext ctxt, String path)
        throws JasperException {

    InputStream is = null;
    TreeNode tld = null;

    try {
        URL uri = ctxt.getResource(path);
        if (uri == null) {
            // no implicit.tld
            return;
        }

        is = uri.openStream();
        /* SJSAS 6384538
        tld = new ParserUtils().parseXMLDocument(IMPLICIT_TLD, is);
        */
        // START SJSAS 6384538
        boolean blockExternal = Boolean.parseBoolean(ctxt.getServletContext()
               .getInitParameter(Constants.XML_BLOCK_EXTERNAL_INIT_PARAM));
        tld = new ParserUtils(blockExternal).parseXMLDocument(
            IMPLICIT_TLD, is, ctxt.getOptions().isValidationEnabled());
        // END SJSAS 6384538
    } catch (Exception ex) {
        throw new JasperException(ex);
    } finally {
        if (is != null) {
            try {
                is.close();
            } catch (Throwable t) {}
        }
    }

    this.jspversion = tld.findAttribute("version");

    Iterator list = tld.findChildren();
    while (list.hasNext()) {
        TreeNode element = (TreeNode) list.next();
        String tname = element.getName();
        if ("tlibversion".equals(tname)
                || "tlib-version".equals(tname)) {
            this.tlibversion = element.getBody();
        } else if ("jspversion".equals(tname)
                || "jsp-version".equals(tname)) {
            this.jspversion = element.getBody();
        } else if (!"shortname".equals(tname)
                && !"short-name".equals(tname)) {
            err.jspError("jsp.error.implicitTld.additionalElements",
                         path, tname);
        }
    }

    // JSP version in implicit.tld must be 2.0 or greater
    Double jspVersionDouble = Double.valueOf(this.jspversion);
    if (Double.compare(jspVersionDouble, Constants.JSP_VERSION_2_0) < 0) {
        err.jspError("jsp.error.implicitTld.jspVersion", path,
                     this.jspversion);
    }
}
 
开发者ID:ctron,项目名称:package-drone,代码行数:64,代码来源:ImplicitTagLibraryInfo.java


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