Time for 7.0.48
Hi, I'm planning to prepare 7.0.48 for voting. Please reply here if you would like to include something in that release. Regards Violeta
Re: [VOTE] Release Apache Standard Taglib 1.2.1
On Nov 13, 2013, at 6:58 PM, Jeremy Boynes wrote: > I'd like to release Apache Standard Taglib 1.2.1. This is an update to the > withdrawn 1.2.0, built with JDK 1.7.0_45 to address JavaDoc issues and > incorporating feedback on the documentation. > > Maven Staging Repository: > https://repository.apache.org/content/repositories/orgapachetomcat-132/ > > Source Distribution: > https://repository.apache.org/content/repositories/orgapachetomcat-132/org/apache/taglibs/taglibs-standard/1.2.1/ > > SVN tag: > https://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1 > @ r1541786 > https://svn.apache.org/r1541786 > > KEYS: https://svn.apache.org/repos/asf/tomcat/trunk/KEYS > > The proposed 1.2.1 release is: > [ ] Broken - do not release > [ ] OK - release as 1.2.1 Nudge - please could a couple of PMC members vote on this release (there are no PMC votes at the moment). Thanks Jeremy signature.asc Description: Message signed with OpenPGP using GPGMail
Re: [VOTE] Release Apache Standard Taglib 1.2.1
On 14.11.2013 03:58, Jeremy Boynes wrote: > I'd like to release Apache Standard Taglib 1.2.1. This is an update to the > withdrawn 1.2.0, built with JDK 1.7.0_45 to address JavaDoc issues and > incorporating feedback on the documentation. > > Maven Staging Repository: > https://repository.apache.org/content/repositories/orgapachetomcat-132/ > > Source Distribution: > https://repository.apache.org/content/repositories/orgapachetomcat-132/org/apache/taglibs/taglibs-standard/1.2.1/ > > SVN tag: > https://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1 > @ r1541786 > https://svn.apache.org/r1541786 > > KEYS: https://svn.apache.org/repos/asf/tomcat/trunk/KEYS > > The proposed 1.2.1 release is: > [ ] Broken - do not release > [X] OK - release as 1.2.1 Thanks for the detailed cleanups following my 1.2.0 mail. Overview: - MD5 and SHA1 OK - signatures OK - key in KEYS file - src zip consistent with svn tag - except file DEPENDENCIES which is only in zip (OK) - builds fine, except for the warnings listed below - build result looks consistent with binaries - some exceptions, see below - no checkstyle complaints - no Javadoc warnings - No unit test failures Build and tests were done using Maven 2.2.1 and Java 1.7.0_45. OS was Solaris 10 Sparc. Build warnings: 6 times: WARNING: 'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.' Warning: org.apache.xerces.parsers.SAXParser: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized. Warning: org.apache.xerces.parsers.SAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized. Warning: org.apache.xerces.parsers.SAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized. Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Standard Taglib 1.2.1
On Nov 16, 2013, at 10:33 AM, Rainer Jung wrote: > > Build warnings: > > 6 times: > > WARNING: 'org.apache.xerces.jaxp.SAXParserImpl: Property > 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not > recognized.' > Warning: org.apache.xerces.parsers.SAXParser: Feature > 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized. > Warning: org.apache.xerces.parsers.SAXParser: Property > 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not > recognized. > Warning: org.apache.xerces.parsers.SAXParser: Property > 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not > recognized. > Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property > 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not > recognized. I started seeing those as well once I switched to JDK 1.7.0_45. They come from the RAT plugin used to verify the file licenses so I think are OK for this release (to be looked at in trunk, may just need a different version of the plugin). Thanks Jeremy signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r1542550 - /tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
Author: jboynes Date: Sat Nov 16 18:55:43 2013 New Revision: 1542550 URL: http://svn.apache.org/r1542550 Log: remove dead code left after TldLocation refactor Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1542550&r1=1542549&r2=1542550&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Sat Nov 16 18:55:43 2013 @@ -24,7 +24,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Hashtable; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; @@ -39,11 +38,9 @@ import javax.servlet.jsp.tagext.TagLibra import javax.servlet.jsp.tagext.TagLibraryValidator; import javax.servlet.jsp.tagext.TagVariableInfo; import javax.servlet.jsp.tagext.ValidationMessage; -import javax.servlet.jsp.tagext.VariableInfo; import org.apache.jasper.JasperException; import org.apache.jasper.JspCompilationContext; -import org.apache.jasper.xmlparser.TreeNode; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.descriptor.tld.TagFileXml; @@ -294,149 +291,6 @@ class TagLibraryInfoImpl extends TagLibr return new TagFileInfo(name, path, tagInfo); } -TagAttributeInfo createAttribute(TreeNode elem, String jspVersion) { -String name = null; -String type = null; -String expectedType = null; -String methodSignature = null; -boolean required = false, rtexprvalue = false, isFragment = false, deferredValue = false, deferredMethod = false; - -Iterator list = elem.findChildren(); -while (list.hasNext()) { -TreeNode element = list.next(); -String tname = element.getName(); - -if ("name".equals(tname)) { -name = element.getBody(); -} else if ("required".equals(tname)) { -String s = element.getBody(); -if (s != null) -required = JspUtil.booleanValue(s); -} else if ("rtexprvalue".equals(tname)) { -String s = element.getBody(); -if (s != null) -rtexprvalue = JspUtil.booleanValue(s); -} else if ("type".equals(tname)) { -type = element.getBody(); -if ("1.2".equals(jspVersion) -&& (type.equals("Boolean") || type.equals("Byte") -|| type.equals("Character") -|| type.equals("Double") -|| type.equals("Float") -|| type.equals("Integer") -|| type.equals("Long") || type.equals("Object") -|| type.equals("Short") || type -.equals("String"))) { -type = "java.lang." + type; -} -} else if ("fragment".equals(tname)) { -String s = element.getBody(); -if (s != null) { -isFragment = JspUtil.booleanValue(s); -} -} else if ("deferred-value".equals(tname)) { -deferredValue = true; -type = "javax.el.ValueExpression"; -TreeNode child = element.findChild("type"); -if (child != null) { -expectedType = child.getBody(); -if (expectedType != null) { -expectedType = expectedType.trim(); -} -} else { -expectedType = "java.lang.Object"; -} -} else if ("deferred-method".equals(tname)) { -deferredMethod = true; -type = "javax.el.MethodExpression"; -TreeNode child = element.findChild("method-signature"); -if (child != null) { -methodSignature = child.getBody(); -if (methodSignature != null) { -methodSignature = methodSignature.trim(); -} -} else { -methodSignature = "java.lang.Object method()"; -} -} else if ("description".equals(tname) || false) { -// Ignored elements -} else { -if (log.isWarnEnabled()) { -log.warn(Localizer.getMessage( -"jsp.warning.unknown.element.in.attribute", tname)); -} -} -} - -
Re: [VOTE] Release Apache Standard Taglib 1.2.1
On 16.11.2013 19:47, Jeremy Boynes wrote: > On Nov 16, 2013, at 10:33 AM, Rainer Jung wrote: >> >> Build warnings: >> >> 6 times: >> >> WARNING: 'org.apache.xerces.jaxp.SAXParserImpl: Property >> 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not >> recognized.' >> Warning: org.apache.xerces.parsers.SAXParser: Feature >> 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized. >> Warning: org.apache.xerces.parsers.SAXParser: Property >> 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not >> recognized. >> Warning: org.apache.xerces.parsers.SAXParser: Property >> 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not >> recognized. >> Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property >> 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not >> recognized. > > I started seeing those as well once I switched to JDK 1.7.0_45. They come > from the RAT plugin used to verify the file licenses so I think are OK for > this release (to be looked at in trunk, may just need a different version of > the plugin). Ah, OK. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
MBeanDeregistration test failure
On Nov 15, 2013, at 11:29 PM, Mark Thomas wrote: > > On a related note, when I ran the unit tests last night I saw a couple of > intermittent failures that I'd like to try and get to the bottom of before > tagging the next RC. Is one of those org.apache.catalina.mbeans.TestRegistration? It has recently started failing for me in BIO mode and looks related to r1539452. Thanks Jeremy signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r1542565 - /tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
Author: jboynes Date: Sat Nov 16 20:36:37 2013 New Revision: 1542565 URL: http://svn.apache.org/r1542565 Log: remove IDE warnings in TagLibraryInfoImpl Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1542565&r1=1542564&r2=1542565&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Sat Nov 16 20:36:37 2013 @@ -41,8 +41,6 @@ import javax.servlet.jsp.tagext.Validati import org.apache.jasper.JasperException; import org.apache.jasper.JspCompilationContext; -import org.apache.juli.logging.Log; -import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.descriptor.tld.TagFileXml; import org.apache.tomcat.util.descriptor.tld.TagXml; import org.apache.tomcat.util.descriptor.tld.TaglibXml; @@ -61,9 +59,6 @@ import org.apache.tomcat.util.scan.Jar; */ class TagLibraryInfoImpl extends TagLibraryInfo implements TagConstants { -// Logger -private final Log log = LogFactory.getLog(TagLibraryInfoImpl.class); - private final JspCompilationContext ctxt; private final PageInfo pi; @@ -72,7 +67,7 @@ class TagLibraryInfoImpl extends TagLibr private final ParserController parserController; -private final void print(String name, String value, PrintWriter w) { +private static void print(String name, String value, PrintWriter w) { if (value != null) { w.print(name + " = {\n\t"); w.print(value); @@ -92,14 +87,17 @@ class TagLibraryInfoImpl extends TagLibr print("uri", uri, out); print("tagLibraryValidator", "" + tagLibraryValidator, out); -for (int i = 0; i < tags.length; i++) -out.println(tags[i].toString()); +for (TagInfo tag : tags) { +out.println(tag.toString()); +} -for (int i = 0; i < tagFiles.length; i++) -out.println(tagFiles[i].toString()); +for (TagFileInfo tagFile : tagFiles) { +out.println(tagFile.toString()); +} -for (int i = 0; i < functions.length; i++) -out.println(functions[i].toString()); +for (FunctionInfo function : functions) { +out.println(function.toString()); +} return sw.toString(); } @@ -119,8 +117,7 @@ class TagLibraryInfoImpl extends TagLibr this.err = err; if (tldResourcePath == null) { -// The URI points to the TLD itself or to a JAR file in which the -// TLD is stored +// The URI points to the TLD itself or to a JAR file in which the TLD is stored tldResourcePath = generateTldResourcePath(uri, ctxt); } @@ -141,8 +138,7 @@ class TagLibraryInfoImpl extends TagLibr // Add TLD within the JAR to the dependency list String entryName = tldResourcePath.getEntryName(); try { -pageInfo.addDependant(jar.getURL(entryName), -Long.valueOf(jar.getLastModified(entryName))); +pageInfo.addDependant(jar.getURL(entryName), jar.getLastModified(entryName)); } catch (IOException ioe) { throw new JasperException(ioe); } @@ -183,12 +179,10 @@ class TagLibraryInfoImpl extends TagLibr } if (tlibversion == null) { -err.jspError("jsp.error.tld.mandatory.element.missing", -"tlib-version", uri); +err.jspError("jsp.error.tld.mandatory.element.missing", "tlib-version", uri); } if (jspversion == null) { -err.jspError("jsp.error.tld.mandatory.element.missing", -"jsp-version", uri); +err.jspError("jsp.error.tld.mandatory.element.missing", "jsp-version", uri); } this.tags = tagInfos.toArray(new TagInfo[tagInfos.size()]); @@ -199,7 +193,7 @@ class TagLibraryInfoImpl extends TagLibr @Override public TagLibraryInfo[] getTagLibraryInfos() { Collection coll = pi.getTaglibs(); -return coll.toArray(new TagLibraryInfo[0]); +return coll.toArray(new TagLibraryInfo[coll.size()]); } /* @@ -225,8 +219,7 @@ class TagLibraryInfoImpl extends TagLibr try { url = ctxt.getResource(uri); } catch (Exception ex) { -err.jspError("jsp.error.tld.unable_to_get_jar", uri, ex -.toString()); +err.jspError("jsp.error.tld.unable_to_get_jar", uri, ex.toString()); } if (uri.endsWith(".jar")) { if (url == null) { @@ -242,39 +235,33 @@
Re: MBeanDeregistration test failure
On 16.11.2013 21:19, Jeremy Boynes wrote: > On Nov 15, 2013, at 11:29 PM, Mark Thomas wrote: >> >> On a related note, when I ran the unit tests last night I saw a couple of >> intermittent failures that I'd like to try and get to the bottom of before >> tagging the next RC. > > Is one of those org.apache.catalina.mbeans.TestRegistration? It has recently > started failing for me in BIO mode and looks related to r1539452. Confirmed here, only failing for BIO. Fails in about 1/3 of the runs. Still registered MBean is: Name: Tomcat:type=RequestProcessor,worker="http-bio-127.0.0.1-auto-1-35854",name=HttpRequest1 modelerType: org.apache.tomcat.util.modeler.BaseModelMBean requestProcessingTime: 1384636195336 bytesSent: 0 rpName: Tomcat:type=RequestProcessor,worker="http-bio-127.0.0.1-auto-1-35854",name=HttpRequest1 processingTime: 621 errorCount: 1 maxTime: 621 requestBytesReceived: 0 maxRequestUri: / stage: 1 lastRequestProcessingTime: 621 globalProcessor: org.apache.coyote.RequestGroupInfo@298da4 serverPort: -1 bytesReceived: 0 requestCount: 1 requestBytesSent: 0 contentLength: -1 remoteAddr: 127.0.0.1 Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1542606 - in /tomcat/trunk/java/org/apache: jasper/compiler/ImplicitTagLibraryInfo.java tomcat/util/descriptor/tld/ImplicitTldRuleSet.java tomcat/util/descriptor/tld/TldParser.java
Author: jboynes Date: Sat Nov 16 22:47:58 2013 New Revision: 1542606 URL: http://svn.apache.org/r1542606 Log: Use Digester to load implicit.tld taglib descriptors Added: tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/ImplicitTldRuleSet.java - copied, changed from r1542562, tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldRuleSet.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldParser.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java?rev=1542606&r1=1542605&r2=1542606&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java Sat Nov 16 22:47:58 2013 @@ -17,10 +17,10 @@ package org.apache.jasper.compiler; -import java.io.InputStream; +import java.io.IOException; +import java.net.URL; import java.util.Collection; import java.util.Hashtable; -import java.util.Iterator; import java.util.Set; import java.util.Vector; @@ -31,9 +31,11 @@ import javax.servlet.jsp.tagext.TagLibra import org.apache.jasper.JasperException; import org.apache.jasper.JspCompilationContext; -import org.apache.jasper.util.ExceptionUtils; -import org.apache.jasper.xmlparser.ParserUtils; -import org.apache.jasper.xmlparser.TreeNode; +import org.apache.tomcat.util.descriptor.tld.ImplicitTldRuleSet; +import org.apache.tomcat.util.descriptor.tld.TaglibXml; +import org.apache.tomcat.util.descriptor.tld.TldParser; +import org.apache.tomcat.util.descriptor.tld.TldResourcePath; +import org.xml.sax.SAXException; /** * Class responsible for generating an implicit tag library containing tag @@ -97,9 +99,7 @@ class ImplicitTagLibraryInfo extends Tag // Populate mapping of tag names to tag file paths Set dirList = ctxt.getResourcePaths(tagdir); if (dirList != null) { -Iterator it = dirList.iterator(); -while (it.hasNext()) { -String path = it.next(); +for (String path : dirList) { if (path.endsWith(TAG_FILE_SUFFIX) || path.endsWith(TAGX_FILE_SUFFIX)) { /* @@ -114,60 +114,32 @@ class ImplicitTagLibraryInfo extends Tag tagName.lastIndexOf(suffix)); tagFileMap.put(tagName, path); } else if (path.endsWith(IMPLICIT_TLD)) { -InputStream in = null; +TaglibXml taglibXml; try { -in = ctxt.getResourceAsStream(path); -if (in != null) { - -// Add implicit TLD to dependency list -if (pi != null) { -pi.addDependant(path, ctxt.getLastModified(path)); -} - -ParserUtils pu = new ParserUtils(); -TreeNode tld = pu.parseXMLDocument(uri, in); - -if (tld.findAttribute("version") != null) { -this.jspversion = tld.findAttribute("version"); -} - -// Process each child element of our element -Iterator list = tld.findChildren(); - -while (list.hasNext()) { -TreeNode element = list.next(); -String tname = element.getName(); - -if ("tlibversion".equals(tname) // JSP 1.1 -|| "tlib-version".equals(tname)) { // JSP 1.2 -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)) { -// Ignore -} else { -// All other elements are invalid -err.jspError("jsp.error.invalid.implicit", path); -} -} -try { -double version = Double.parseDouble(this.jspversion); -if (version < 2.0) { - err.jspError("jsp.error.invalid.implicit.version", path); -
[Bug 55788] New: TagPlugins should key on tag QName rather than implementation class
https://issues.apache.org/bugzilla/show_bug.cgi?id=55788 Bug ID: 55788 Summary: TagPlugins should key on tag QName rather than implementation class Product: Tomcat 8 Version: trunk Hardware: All OS: All Status: NEW Severity: enhancement Priority: P2 Component: Jasper Assignee: dev@tomcat.apache.org Reporter: jboy...@apache.org Tag plugins key off a tag's implementation class, for example: org.apache.taglibs.standard.tag.rt.core.IfTag org.apache.jasper.tagplugins.jstl.core.If This is fragile, for example, if the class name changes or if multiple tags happen to use the same class name. It also means the plugin will not recognize alternate implementations of the same tag, and cannot be used to adapt tagfiles. Instead, the plugin should key off the tag's fully qualified name (TLD URI + name) such as {http://java.sun.com/jsp/jstl/core, if} for the JSTL tag above. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1542630 - in /tomcat/trunk/java/org/apache: jasper/compiler/TagPluginManager.java tomcat/util/descriptor/tagplugin/ tomcat/util/descriptor/tagplugin/TagPluginParser.java
Author: jboynes Date: Sun Nov 17 01:31:56 2013 New Revision: 1542630 URL: http://svn.apache.org/r1542630 Log: Refactor TagPluginManager to use Digester The split in packages is due to import restrictions between o.a.tomcat and o.a.jasper Added: tomcat/trunk/java/org/apache/tomcat/util/descriptor/tagplugin/ tomcat/trunk/java/org/apache/tomcat/util/descriptor/tagplugin/TagPluginParser.java (with props) Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java?rev=1542630&r1=1542629&r2=1542630&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java Sun Nov 17 01:31:56 2013 @@ -17,22 +17,22 @@ package org.apache.jasper.compiler; import java.io.IOException; -import java.io.InputStream; import java.net.URL; import java.util.Enumeration; import java.util.HashMap; -import java.util.Iterator; +import java.util.Map; import javax.servlet.ServletContext; import org.apache.jasper.JasperException; import org.apache.jasper.compiler.tagplugin.TagPlugin; import org.apache.jasper.compiler.tagplugin.TagPluginContext; -import org.apache.jasper.xmlparser.ParserUtils; -import org.apache.jasper.xmlparser.TreeNode; +import org.apache.tomcat.util.descriptor.tagplugin.TagPluginParser; +import org.xml.sax.SAXException; /** * Manages tag plugin optimizations. + * * @author Kin-man Chung */ public class TagPluginManager { @@ -40,11 +40,9 @@ public class TagPluginManager { private static final String META_INF_JASPER_TAG_PLUGINS_XML = "META-INF/org.apache.jasper/tagPlugins.xml"; private static final String TAG_PLUGINS_XML = "/WEB-INF/tagPlugins.xml"; -private static final String TAG_PLUGINS_ROOT_ELEM = "tag-plugins"; - -private boolean initialized = false; -private HashMap tagPlugins = null; private final ServletContext ctxt; +private HashMap tagPlugins; +private boolean initialized = false; public TagPluginManager(ServletContext ctxt) { this.ctxt = ctxt; @@ -54,93 +52,47 @@ public class TagPluginManager { throws JasperException { init(err); -if (tagPlugins == null || tagPlugins.size() == 0) { -return; +if (!tagPlugins.isEmpty()) { +page.visit(new NodeVisitor(this, pageInfo)); } - -page.visit(new NodeVisitor(this, pageInfo)); } private void init(ErrorDispatcher err) throws JasperException { if (initialized) return; -tagPlugins = new HashMap<>(); +TagPluginParser parser = new TagPluginParser(ctxt); -Enumeration urls = null; try { -urls = ctxt.getClassLoader().getResources( -META_INF_JASPER_TAG_PLUGINS_XML); -} catch (IOException ioe) { -throw new JasperException(ioe); -} - -if (urls != null) { -while(urls.hasMoreElements()) { -URL url = urls.nextElement(); -try (InputStream is = url.openStream()){ -loadTagPlugins(err, is); -} catch(IOException ioe) { -throw new JasperException(ioe); +Enumeration urls = + ctxt.getClassLoader().getResources(META_INF_JASPER_TAG_PLUGINS_XML); +if (urls != null) { +while (urls.hasMoreElements()) { +URL url = urls.nextElement(); +parser.parse(url); } } -} -try (InputStream is = ctxt.getResourceAsStream(TAG_PLUGINS_XML)) { -if (is != null) { -loadTagPlugins(err, is); +URL url = ctxt.getResource(TAG_PLUGINS_XML); +if (url != null) { +parser.parse(url); } -} catch (IOException ioe) { -throw new JasperException(ioe); -} - -initialized = true; -} - - -private void loadTagPlugins(ErrorDispatcher err, InputStream is) -throws JasperException { - -TreeNode root = -(new ParserUtils()).parseXMLDocument(TAG_PLUGINS_XML, is); -if (root == null) { -return; -} - -if (!TAG_PLUGINS_ROOT_ELEM.equals(root.getName())) { -err.jspError("jsp.error.plugin.wrongRootElement", TAG_PLUGINS_XML, - TAG_PLUGINS_ROOT_ELEM); +} catch (IOException | SAXException e) { +throw new JasperException(e); } -tagPlugins = new HashMap<>(); -Iterator pluginList = root.findChildren("tag-plugin"); -while (pluginList.hasNext()) {
svn commit: r1542633 - in /tomcat/trunk/java/org/apache/jasper: EmbeddedServletOptions.java JspC.java xmlparser/ParserUtils.java xmlparser/TreeNode.java
Author: jboynes Date: Sun Nov 17 01:57:41 2013 New Revision: 1542633 URL: http://svn.apache.org/r1542633 Log: Remove ParserUtils and DOM-like TreeNode now all descriptors are parsed using Digester Removed: tomcat/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java tomcat/trunk/java/org/apache/jasper/xmlparser/TreeNode.java Modified: tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java tomcat/trunk/java/org/apache/jasper/JspC.java Modified: tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java?rev=1542633&r1=1542632&r2=1542633&view=diff == --- tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java (original) +++ tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java Sun Nov 17 01:57:41 2013 @@ -30,7 +30,6 @@ import org.apache.jasper.compiler.JspCon import org.apache.jasper.compiler.Localizer; import org.apache.jasper.compiler.TagPluginManager; import org.apache.jasper.compiler.TldCache; -import org.apache.jasper.xmlparser.ParserUtils; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -457,10 +456,6 @@ public final class EmbeddedServletOption setProperty( k, v); } -// quick hack -String validating=config.getInitParameter( "validating"); -if( "false".equals( validating )) ParserUtils.validating=false; - String keepgen = config.getInitParameter("keepgenerated"); if (keepgen != null) { if (keepgen.equalsIgnoreCase("true")) { Modified: tomcat/trunk/java/org/apache/jasper/JspC.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1542633&r1=1542632&r2=1542633&view=diff == --- tomcat/trunk/java/org/apache/jasper/JspC.java (original) +++ tomcat/trunk/java/org/apache/jasper/JspC.java Sun Nov 17 01:57:41 2013 @@ -844,7 +844,6 @@ public class JspC extends Task implement public void setValidateXml( boolean b ) { this.validateXml = b; -org.apache.jasper.xmlparser.ParserUtils.validating=b; } public boolean isValidateXml() { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/5224 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1542630 Blamelist: jboynes Build succeeded! sincerely, -The Buildbot