/** * Adds the TLD location mapping from the TLD itself. */ private void addTldLocationFromTld(TldLocation tldLocation) throws IOException, SAXException { InputStream in = tldLocation.getInputStream(); try { addTldLocationFromTld(in, tldLocation); } finally { in.close(); } }
private static final Map parseToTagsAndFunctions( ServletContext ctx, TldLocation tldLocation, ObjectWrapper objectWrapper) throws IOException, SAXException { final TldParserForTaglibBuilding tldParser = new TldParserForTaglibBuilding(objectWrapper); InputStream in = tldLocation.getInputStream(); try { parseXml(in, tldLocation.getXmlSystemId(), tldParser); } finally { in.close(); } EventForwarding eventForwarding = EventForwarding.getInstance(ctx); if (eventForwarding != null) { eventForwarding.addListeners(tldParser.getListeners()); } else if (tldParser.getListeners().size() > 0) { throw new TldParsingSAXException( "Event listeners specified in the TLD could not be " + " registered since the web application doesn't have a" + " listener of class " + EventForwarding.class.getName() + ". To remedy this, add this element to web.xml:\n" + "| <listener>\n" + "| <listener-class>" + EventForwarding.class.getName() + "</listener-class>\n" + "| </listener>", null); } return tldParser.getTagsAndFunctions(); } }
/** * Adds the TLD location mapping from the TLD itself. */ private void addTldLocationFromTld(TldLocation tldLocation) throws IOException, SAXException { InputStream in = tldLocation.getInputStream(); try { addTldLocationFromTld(in, tldLocation); } finally { in.close(); } }
private static final Map parseToTagsAndFunctions( ServletContext ctx, TldLocation tldLocation, ObjectWrapper objectWrapper) throws IOException, SAXException { final TldParserForTaglibBuilding tldParser = new TldParserForTaglibBuilding(objectWrapper); InputStream in = tldLocation.getInputStream(); try { parseXml(in, tldLocation.getXmlSystemId(), tldParser); } finally { in.close(); } EventForwarding eventForwarding = EventForwarding.getInstance(ctx); if (eventForwarding != null) { eventForwarding.addListeners(tldParser.getListeners()); } else if (tldParser.getListeners().size() > 0) { throw new TldParsingSAXException( "Event listeners specified in the TLD could not be " + " registered since the web application doesn't have a" + " listener of class " + EventForwarding.class.getName() + ". To remedy this, add this element to web.xml:\n" + "| <listener>\n" + "| <listener-class>" + EventForwarding.class.getName() + "</listener-class>\n" + "| </listener>", null); } return tldParser.getTagsAndFunctions(); } }
private static final Map parseToTagsAndFunctions( ServletContext ctx, TldLocation tldLocation, ObjectWrapper objectWrapper) throws IOException, SAXException { final TldParserForTaglibBuilding tldParser = new TldParserForTaglibBuilding(objectWrapper); InputStream in = tldLocation.getInputStream(); try { parseXml(in, tldLocation.getXmlSystemId(), tldParser); } finally { in.close(); } EventForwarding eventForwarding = EventForwarding.getInstance(ctx); if (eventForwarding != null) { eventForwarding.addListeners(tldParser.getListeners()); } else if (tldParser.getListeners().size() > 0) { throw new TldParsingSAXException( "Event listeners specified in the TLD could not be " + " registered since the web application doesn't have a" + " listener of class " + EventForwarding.class.getName() + ". To remedy this, add this element to web.xml:\n" + "| <listener>\n" + "| <listener-class>" + EventForwarding.class.getName() + "</listener-class>\n" + "| </listener>", null); } return tldParser.getTagsAndFunctions(); } }
/** * Adds the TLD location mapping from the TLD itself. */ private void addTldLocationFromTld(TldLocation tldLocation) throws IOException, SAXException { InputStream in = tldLocation.getInputStream(); try { addTldLocationFromTld(in, tldLocation); } finally { in.close(); } }