Refine search
/** * Get the TagFileInfo for a given tag name, looking through all the * tag files in this tag library. * * @param shortname The short name (no prefix) of the tag * @return the TagFileInfo for the specified Tag file, or null * if no Tag file is found * @since JSP 2.0 */ public TagFileInfo getTagFile(String shortname) { TagFileInfo tagFiles[] = getTagFiles(); if (tagFiles == null || tagFiles.length == 0) { return null; } for (int i=0; i < tagFiles.length; i++) { if (tagFiles[i].getName().equals(shortname)) { return tagFiles[i]; } } return null; }
/** * Get the TagInfo for a given tag name, looking through all the * tags in this tag library. * * @param shortname The short name (no prefix) of the tag * @return the TagInfo for the tag with the specified short name, or * null if no such tag is found */ public TagInfo getTag(String shortname) { TagInfo tags[] = getTags(); if (tags == null || tags.length == 0) { return null; } for (int i=0; i < tags.length; i++) { if (tags[i].getTagName().equals(shortname)) { return tags[i]; } } return null; }
TagInfo tagInfo = tagLibInfo.getTag(localName); TagFileInfo tagFileInfo = tagLibInfo.getTagFile(localName); if (tagInfo == null && tagFileInfo == null) { throw new SAXException( String handlerClassName = tagInfo.getTagClassName(); try { tagHandlerClass = ctxt.getClassLoader().loadClass(handlerClassName); } catch (Exception e) { throw new SAXException( ret = new Node.CustomTag( tagLibInfo.getRequiredVersion(), qName, prefix, ret = new Node.CustomTag( tagLibInfo.getRequiredVersion(), qName, prefix,
public void visit(Node.CustomTag n) throws JasperException { TagFileInfo tagFileInfo = n.getTagFileInfo(); if (tagFileInfo != null) { String tagFilePath = tagFileInfo.getPath(); if (tagFilePath.startsWith("/META-INF/")) { // For tags in JARs, add the TLD and the tag as a dependency String[] location = compiler.getCompilationContext().getTldLocation( tagFileInfo.getTagInfo().getTagLibrary().getURI()); // Add TLD pageInfo.addDependant("jar:" + location[0] + "!/" + location[1]); // Add Tag pageInfo.addDependant("jar:" + location[0] + "!" + tagFilePath); } else { pageInfo.addDependant(tagFilePath); } Class c = loadTagFile(compiler, tagFilePath, n.getTagInfo(), pageInfo); n.setTagHandlerClass(c); } visitBody(n); } }
TagInfo tagInfo = tagLibInfo.getTag(shortTagName); TagFileInfo tagFileInfo = tagLibInfo.getTagFile(shortTagName); if (tagInfo == null && tagFileInfo == null) { err.jspError(start, "jsp.error.bad_tag", shortTagName, prefix); new Node.CustomTag(tagLibInfo.getRequiredVersion(), tagName, prefix, shortTagName, uri, attrs, start, parent, tagInfo, tagHandlerClass); } else { new Node.CustomTag(tagLibInfo.getRequiredVersion(), tagName, prefix, shortTagName, uri, attrs, start, parent, tagFileInfo); bc = tagInfo.getBodyContent(); } else { bc = tagFileInfo.getTagInfo().getBodyContent(); tagNode = new Node.CustomTag(tagLibInfo.getRequiredVersion(), tagName, prefix, shortTagName, uri, attrs, start, parent, tagInfo, tagHandlerClass); } else { tagNode = new Node.CustomTag(tagLibInfo.getRequiredVersion(), tagName, prefix, shortTagName, uri, attrs, start, parent, tagFileInfo);
if (ctxt.isTagFile()) { String versionString = ctxt.getTagInfo().getTagLibrary().getRequiredVersion(); Double version = Double.valueOf(versionString).doubleValue(); if (version < 2.1) {
/** * Checks to see if the given tag name maps to a tag file path, * and if so, parses the corresponding tag file. * * @return The TagFileInfo corresponding to the given tag name, or null if * the given tag name is not implemented as a tag file */ public TagFileInfo getTagFile(String shortName) { TagFileInfo tagFile = super.getTagFile(shortName); if (tagFile == null) { String path = tagFileMap.get(shortName); if (path == null) { return null; } TagInfo tagInfo = null; try { tagInfo = TagFileProcessor.parseTagFileDirectives(pc, shortName, path, this); } catch (JasperException je) { throw new RuntimeException(je.toString()); } tagFile = new TagFileInfo(shortName, path, tagInfo); vec.add(tagFile); this.tagFiles = vec.toArray(new TagFileInfo[vec.size()]); } return tagFile; }
TagFileInfo tagFileInfo = n.getTagFileInfo(); if (tagFileInfo != null) { String tagFilePath = tagFileInfo.getPath(); if (tagFilePath.startsWith("/META-INF/")) { compiler.getCompilationContext().getTldResourcePath( tagFileInfo.getTagInfo().getTagLibrary().getURI()); } else { pageInfo.addDependant(tagFilePath, compiler.getCompilationContext().getLastModified(tagFilePath)); compiler.getCompilationContext().getLastModified(tagFilePath));
String prefix = tag.getTagLibrary().getPrefixString(); String uri = tag.getTagLibrary().getURI(); String name = prefix + ':' + tag.getTagName();
TagFileInfo tagFile = super.getTagFile(shortName); if (tagFile == null) { String path = (String) tagFileMap.get(shortName); shortName, path, pc.getJspCompilationContext().getTagFileJarUrl(path), this); } catch (JasperException je) { tagFile = new TagFileInfo(shortName, path, tagInfo); vec.addElement(tagFile);
@Override public boolean isPre21Taglib() { if (_tagInfo == null) return false; TagLibraryInfo library = _tagInfo.getTagLibrary(); if (library == null || library.getRequiredVersion() == null) return false; return "2.1".compareTo(library.getRequiredVersion()) > 0; }
public TagFileDirectiveVisitor(Compiler compiler, TagLibraryInfo tagLibInfo, String name, String path) { err = compiler.getErrorDispatcher(); this.tagLibInfo = tagLibInfo; this.name = name; this.path = path; attributeVector = new ArrayList<TagAttributeInfo>(); variableVector = new ArrayList<TagVariableInfo>(); jspVersionDouble = Double.valueOf(tagLibInfo.getRequiredVersion()); }
public TagFileInfo getTagFile(String shortName) { TagFileInfo tagFile = super.getTagFile(shortName); if (tagFile == null) { String path = tagFileMap.get(shortName); shortName, path, pc.getJspCompilationContext().getTagFileJarResource(path), this); } catch (JasperException je) { tagFile = new TagFileInfo(shortName, path, tagInfo); vec.addElement(tagFile);
/** * True if this is a jstl node. */ @Override public boolean isJstl() { String uri = _tag.getTagInfo().getTagLibrary().getURI(); return (JavaJspBuilder.JSTL_CORE_URI.equals(uri) || JavaJspBuilder.JSTL_EL_CORE_URI.equals(uri) || JavaJspBuilder.JSTL_FMT_URI.equals(uri) || JavaJspBuilder.JSTL_XML_URI.equals(uri) || JavaJspBuilder.JSTL_EL_XML_URI.equals(uri) || JavaJspBuilder.JSTL_SQL_URI.equals(uri) || JavaJspBuilder.JSTL_EL_SQL_URI.equals(uri)); }
/**************************************************************************/ public static String getTagLibPrefix(JTextComponent target, String tagLibUri) { FileObject fobj = getFileObject(target); if (fobj != null) { JspParserAPI.ParseResult result = JspContextInfo.getContextInfo(fobj).getCachedParseResult(fobj, false, true); if (result != null && result.getPageInfo() != null) { for (TagLibraryInfo tli : result.getPageInfo().getTaglibs()) { if (tagLibUri.equals(tli.getURI())) return tli.getPrefixString(); } } } return null; }
public TagInfo getTagInfo() throws JasperException { if (name == null) { // XXX Get it from tag file name } if (bodycontent == null) { bodycontent = TagInfo.BODY_CONTENT_SCRIPTLESS; } String tagClassName = JspUtil.getTagHandlerClassName( path, tagLibInfo.getReliableURN(), err); TagVariableInfo[] tagVariableInfos = new TagVariableInfo[variableVector .size()]; variableVector.copyInto(tagVariableInfos); TagAttributeInfo[] tagAttributeInfo = new TagAttributeInfo[attributeVector .size()]; attributeVector.copyInto(tagAttributeInfo); return new JasperTagInfo(name, tagClassName, bodycontent, description, tagLibInfo, tei, tagAttributeInfo, displayName, smallIcon, largeIcon, tagVariableInfos, dynamicAttrsMapName); }
TagInfo tagInfo = tagLibInfo.getTag(localName); TagFileInfo tagFileInfo = tagLibInfo.getTagFile(localName); if (tagInfo == null && tagFileInfo == null) { throw new SAXException( String handlerClassName = tagInfo.getTagClassName(); try { tagHandlerClass = ctxt.getClassLoader().loadClass(handlerClassName); } catch (Exception e) { throw new SAXException( ret = new Node.CustomTag( tagLibInfo.getRequiredVersion(), qName, prefix, ret = new Node.CustomTag( tagLibInfo.getRequiredVersion(), qName, prefix,
public void visit(Node.CustomTag n) throws JasperException { TagFileInfo tagFileInfo = n.getTagFileInfo(); if (tagFileInfo != null) { String tagFilePath = tagFileInfo.getPath(); if (tagFilePath.startsWith("/META-INF/")) { // For tags in JARs, add the TLD and the tag as a dependency String[] location = compiler.getCompilationContext().getTldLocation( tagFileInfo.getTagInfo().getTagLibrary().getURI()); // Add TLD pageInfo.addDependant("jar:" + location[0] + "!/" + location[1]); // Add Tag pageInfo.addDependant("jar:" + location[0] + "!" + tagFilePath); } else { pageInfo.addDependant(tagFilePath); } Class c = loadTagFile(compiler, tagFilePath, n.getTagInfo(), pageInfo); n.setTagHandlerClass(c); } visitBody(n); } }
TagInfo tagInfo = tagLibInfo.getTag(shortTagName); TagFileInfo tagFileInfo = tagLibInfo.getTagFile(shortTagName); if (tagInfo == null && tagFileInfo == null) { err.jspError(start, "jsp.error.bad_tag", shortTagName, prefix); String handlerClassName = tagInfo.getTagClassName(); try { tagHandlerClass = ctxt.getClassLoader().loadClass( handlerClassName); } catch (Exception e) { bc = tagInfo.getBodyContent(); } else { bc = tagFileInfo.getTagInfo().getBodyContent();
if (ctxt.isTagFile()) { String versionString = ctxt.getTagInfo().getTagLibrary().getRequiredVersion(); Double version = Double.valueOf(versionString).doubleValue(); if (version < 2.1) {