[Bug 55217] New: Common EntityResolver that can be used by Catalina and Jasper
https://issues.apache.org/bugzilla/show_bug.cgi?id=55217 Bug ID: 55217 Summary: Common EntityResolver that can be used by Catalina and Jasper Product: Tomcat 8 Version: trunk Hardware: All OS: All Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: jboy...@apache.org Duplicate functionality exists in both SchemaResolver and ParserUtils.MyEntityResolver. There's also a basic version in Digester. -- 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
[Bug 55217] Common EntityResolver that can be used by Catalina and Jasper
https://issues.apache.org/bugzilla/show_bug.cgi?id=55217 --- Comment #1 from Jeremy Boynes --- Created attachment 30570 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30570&action=edit Implementation of an EntityResolver2 that loads local resources Also includes constants for well-known XML identifiers as documented in the specs. -- 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
[Bug 55217] Common EntityResolver that can be used by Catalina and Jasper
https://issues.apache.org/bugzilla/show_bug.cgi?id=55217 --- Comment #2 from Jeremy Boynes --- I added the base Class as DigesterFactory and Jasper's MyEntityResolver may be coming from different ClassLoaders which in an OSGI world may have a different version of servlet-api.jar. I have trouble envisioning how that would work but there are comments to that end in the Jasper code. -- 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
Bugzilla component for Tomcat-Utils?
Is it worth adding one for tomcat-util to be distinct from Catalina and Jasper? - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55218] New: Upgrade Digester to be based on DefaultHandler2 and use LexicalHandler to detect publicId
https://issues.apache.org/bugzilla/show_bug.cgi?id=55218 Bug ID: 55218 Summary: Upgrade Digester to be based on DefaultHandler2 and use LexicalHandler to detect publicId Product: Tomcat 8 Version: trunk Hardware: PC OS: Mac OS X 10.4 Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: jboy...@apache.org Digester uses SAX2 features but is still based the SAX1 DefaultHandler. By upgrading to DefaultHandler2 it would be able to handle baseURIs when resolving entities and would have a default implementation of a LexicalHandler. Using LexicalHandler would allow it to respond directly to the startDTD event that reports the DOCTYPE (if present) so that it would not need to infer that from the first attempt to resolve an entity. -- 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
[Bug 55219] New: Simplify version detection in WebXml
https://issues.apache.org/bugzilla/show_bug.cgi?id=55219 Bug ID: 55219 Summary: Simplify version detection in WebXml Product: Tomcat 8 Version: trunk Hardware: All OS: All Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: jboy...@apache.org WebXml has two ways of detecting the version of the web application. setPublicId() handles all versions but only actually needs to deal with the DTD-based descriptors (2.2 and 2.3). setVersion() treats the version attribute as a numeric value and parse out major and minor based on decimal values. However, each version of the spec defines a literal String that could be matched directly instead. It also only needs to handle XSD-based descriptors (2.4 and later). As a minor note, the string id "webxml.unrecognisedPublicId" is inconsistent with other values (it has a lower case X) -- 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
[Bug 55220] New: Tomcat adding trailing slash when directory exists
https://issues.apache.org/bugzilla/show_bug.cgi?id=55220 Bug ID: 55220 Summary: Tomcat adding trailing slash when directory exists Product: Tomcat 7 Version: 7.0.41 Hardware: PC OS: Linux Status: NEW Severity: blocker Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: japgo...@gmail.com Hello. I have a Scala Lift application, packaged as a WAR, that expands to the following structure: foo.html foo/star.html WEB-INF/web.xml WEB-INF/classes/... ... The servlet matches against /foo and /foo/xxx differently. If /foo is matched it loads the foo.html resource and transforms it. If /foo/(anything-or-nothing) is matched, it loads the foo/star.html resource and transforms it. The problem is Tomcat is seeing that a foo directory exists and redirecting /foo to /foo/ which is breaking Lift's routing rules. I can confirm this by renaming the directory (which fixes Tomcat redirecting but then breaks the app). Is there a way to tell Tomcat that it's ok, the servlet knows how to process /foo without a trailing slash and can be trusted to do so? Over 2 hours of searching and head-scratching has yielded a 'no' so far, hence this bug. -- 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
[Bug 55220] Tomcat adding trailing slash when directory exists
https://issues.apache.org/bugzilla/show_bug.cgi?id=55220 japgo...@gmail.com changed: What|Removed |Added CC||japgo...@gmail.com --- Comment #1 from japgo...@gmail.com --- FYI: Seemingly related to bug 32424. -- 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
Re: buildbot failure in ASF Buildbot on tomcat-trunk
On 09/07/2013 06:39, Violeta Georgieva wrote: > 2013/7/9 Konstantin Kolinko wrote: >> >> 2013/7/9 : >>> The Buildbot has detected a new failure on builder tomcat-trunk while > building ASF Buildbot. >>> Full details are available at: >>> http://ci.apache.org/builders/tomcat-trunk/builds/4625 >>> >>> Buildbot URL: http://ci.apache.org/ >>> >>> Buildslave for this Build: bb-vm_ubuntu >>> >>> Build Reason: scheduler >>> Build Source Stamp: [branch tomcat/trunk] 1500979 >>> Blamelist: markt >>> >>> BUILD FAILED: failed compile_1 >>> >> >> >> Test org.apache.catalina.core.TestApplicationContext FAILED >> Test org.apache.catalina.core.TestStandardContext FAILED >> and many others are failing..., >> > > The build is OK now. Thanks for those fixes. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55220] Tomcat adding trailing slash when directory exists
https://issues.apache.org/bugzilla/show_bug.cgi?id=55220 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #2 from Mark Thomas --- You need to map your servlet explicitly to /foo else the rules for welcome files will be applied which trigger the redirect to /foo/ -- 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: r1501139 - in /tomcat/trunk: java/org/apache/tomcat/util/descriptor/LocalResolver.java java/org/apache/tomcat/util/descriptor/XmlIdentifiers.java test/org/apache/tomcat/util/descriptor/Tes
Author: markt Date: Tue Jul 9 08:51:17 2013 New Revision: 1501139 URL: http://svn.apache.org/r1501139 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55217 Implement a common EntityResolver that can be used by Catalina and Jasper. Patch provided by Jeremy Boynes. Added: tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java (with props) tomcat/trunk/java/org/apache/tomcat/util/descriptor/XmlIdentifiers.java (with props) tomcat/trunk/test/org/apache/tomcat/util/descriptor/TestLocalResolver.java (with props) Added: tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java?rev=1501139&view=auto == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java (added) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java Tue Jul 9 08:51:17 2013 @@ -0,0 +1,127 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.util.descriptor; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.Map; + +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; +import org.xml.sax.ext.EntityResolver2; + +/** + * A resolver for locally cached XML resources. + */ +public class LocalResolver implements EntityResolver2 { + +private final Class base; +private final Map publicIds; +private final Map systemIds; + + +/** + * Constructor providing mappings of public and system identifiers to local + * resources. Each map contains a mapping from a well-known identifier to a + * resource path that will be further resolved using the base Class using + * Class#getResource(String). + * + * @param base the class to use to locate local copies + * @param publicIds mapping of public identifiers to local resources + * @param systemIds mapping of system identifiers to local resources + */ +public LocalResolver(Class base, Map publicIds, +Map systemIds) { +this.base = base; +this.publicIds = publicIds; +this.systemIds = systemIds; +} + + +@Override +public InputSource resolveEntity(String publicId, String systemId) +throws SAXException, IOException { +return resolveEntity(null, publicId, null, systemId); +} + + +@Override +public InputSource resolveEntity(String name, String publicId, +String baseURI, String systemId) throws SAXException, IOException { + +String resolved = resolve(publicId, systemId, baseURI); +if (resolved == null) { +return null; +} + +URL url = base.getResource(resolved); +if (url != null) { +resolved = url.toExternalForm(); +} +InputSource is = new InputSource(resolved); +is.setPublicId(publicId); +return is; +} + + +@Override +public InputSource getExternalSubset(String name, String baseURI) +throws SAXException, IOException { +return null; +} + + +private String resolve(String publicId, String systemId, String baseURI) { +// try resolving using the publicId +String resolved = publicIds.get(publicId); +if (resolved != null) { +return resolved; +} + +// try resolving using the systemId +if (systemId == null) { +return null; +} + +systemId = resolve(baseURI, systemId); +resolved = systemIds.get(systemId); +if (resolved != null) { +return resolved; +} + +// fall back to the supplied systemId +return systemId; +} + + +private static String resolve(String baseURI, String systemId) { +try { +if (baseURI == null) { +return systemId; +} +URI systemUri = new URI(systemId); +if (systemUri.isAbsolute()) { +return systemId; +} +return new URI(baseURI).resolve(sy
[Bug 55217] Common EntityResolver that can be used by Catalina and Jasper
https://issues.apache.org/bugzilla/show_bug.cgi?id=55217 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Mark Thomas --- Perfect. Many thanks. The patch has been applied to trunk and will be included in 8.0.x. -- 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: r1501143 - in /tomcat/trunk/java/org/apache/tomcat/util/descriptor/web: LocalStrings.properties WebXml.java
Author: markt Date: Tue Jul 9 09:01:11 2013 New Revision: 1501143 URL: http://svn.apache.org/r1501143 Log: Consistency Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties?rev=1501143&r1=1501142&r2=1501143&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties Tue Jul 9 09:01:11 2013 @@ -47,6 +47,6 @@ webXml.mergeConflictSessionTimeout=The s webXml.mergeConflictSessionTrackingMode=The session tracking modes were defined inconsistently in multiple fragments including fragment with name [{0}] located at [{1}] webXml.mergeConflictString=The [{0}] with name [{1}] was defined inconsistently in multiple fragments including fragment with name [{2}] located at [{3}] webXml.multipleOther=Multiple others entries in ordering -webxml.unrecognisedPublicId=The public ID [{0}] did not match any of the known public ID's for web.xml files so the version could not be identified +webXml.unrecognisedPublicId=The public ID [{0}] did not match any of the known public ID's for web.xml files so the version could not be identified webXml.version.nfe=Unable to parse [{0}] from the version string [{1}]. This component of the version string will be ignored. webXml.wrongFragmentName=Used a wrong fragment name {0} at web.xml absolute-ordering tag! \ No newline at end of file Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java?rev=1501143&r1=1501142&r2=1501143&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Tue Jul 9 09:01:11 2013 @@ -213,7 +213,7 @@ public class WebXml { // traced back. Ignore it. } else { // Unrecognised publicId -log.warn(sm.getString("webxml.unrecognisedPublicId", publicId)); +log.warn(sm.getString("webXml.unrecognisedPublicId", publicId)); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1501154 - in /tomcat/trunk: java/org/apache/catalina/startup/DigesterFactory.java java/org/apache/catalina/util/SchemaResolver.java webapps/docs/changelog.xml
Author: markt Date: Tue Jul 9 09:21:40 2013 New Revision: 1501154 URL: http://svn.apache.org/r1501154 Log: Switch to using new LocalResolver. Based on a patch by Jeremy Boynes. Removed: tomcat/trunk/java/org/apache/catalina/util/SchemaResolver.java Modified: tomcat/trunk/java/org/apache/catalina/startup/DigesterFactory.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/DigesterFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/DigesterFactory.java?rev=1501154&r1=1501153&r2=1501154&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/DigesterFactory.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/DigesterFactory.java Tue Jul 9 09:21:40 2013 @@ -14,28 +14,89 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.apache.catalina.startup; -import java.net.URL; +import java.util.HashMap; +import java.util.Map; -import org.apache.catalina.util.SchemaResolver; -import org.apache.juli.logging.Log; -import org.apache.juli.logging.LogFactory; +import javax.servlet.Servlet; + +import org.apache.tomcat.util.descriptor.LocalResolver; +import org.apache.tomcat.util.descriptor.XmlIdentifiers; import org.apache.tomcat.util.digester.Digester; import org.apache.tomcat.util.digester.RuleSet; + /** - * Wrapper class around the Digester that hide Digester's initialization details - * - * @author Jean-Francois Arcand + * Wrapper class around the Digester that hide Digester's initialization + * details. */ public class DigesterFactory { + /** - * The log. + * A resolver for the resources packaged in servlet-api.jar */ -private static final Log log = LogFactory.getLog(DigesterFactory.class); +public static final LocalResolver SERVLET_RESOLVER; + + +static { +Map publicIds = new HashMap<>(); +Map systemIds = new HashMap<>(); + +// W3C +publicIds.put(XmlIdentifiers.XSD_10_PUBLIC, +urlFor("/javax/servlet/resources/XMLSchema.dtd")); +publicIds.put(XmlIdentifiers.DATATYPES_PUBLIC, +urlFor("/javax/servlet/resources/datatypes.dtd")); +systemIds.put(XmlIdentifiers.XML_2001_XSD, +urlFor("/javax/servlet/resources/xml.xsd")); + +// from J2EE 1.2 +publicIds.put(XmlIdentifiers.WEB_22_PUBLIC, +urlFor("/javax/servlet/resources/web-app_2_2.dtd")); +publicIds.put(XmlIdentifiers.TLD_11_PUBLIC, +urlFor("/javax/servlet/resources/web-jsptaglibrary_1_1.dtd")); + +// from J2EE 1.3 +publicIds.put(XmlIdentifiers.WEB_23_PUBLIC, +urlFor("/javax/servlet/resources/web-app_2_3.dtd")); +publicIds.put(XmlIdentifiers.TLD_12_PUBLIC, +urlFor("/javax/servlet/resources/web-jsptaglibrary_1_2.dtd")); + +// from J2EE 1.4 + systemIds.put("http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd";, + urlFor("/javax/servlet/resources/j2ee_web_services_client_1_1.xsd")); +systemIds.put(XmlIdentifiers.WEB_24_XSD, +urlFor("/javax/servlet/resources/web-app_2_4.xsd")); +systemIds.put(XmlIdentifiers.TLD_20_XSD, +urlFor("/javax/servlet/resources/web-jsptaglibrary_2_0.xsd")); + +// from JavaEE 5 +systemIds.put(XmlIdentifiers.WEB_25_XSD, +urlFor("/javax/servlet/resources/web-app_2_5.xsd")); +systemIds.put(XmlIdentifiers.TLD_21_XSD, +urlFor("/javax/servlet/resources/web-jsptaglibrary_2_1.xsd")); + +// from JavaEE 6 +systemIds.put(XmlIdentifiers.WEB_30_XSD, +urlFor("/javax/servlet/resources/web-app_3_0.xsd")); +systemIds.put(XmlIdentifiers.WEB_FRAGMENT_30_XSD, +urlFor("/javax/servlet/resources/web-fragment_3_0.xsd")); + +// from JavaEE 7 +systemIds.put(XmlIdentifiers.WEB_31_XSD, +urlFor("/javax/servlet/resources/web-app_3_1.xsd")); +systemIds.put(XmlIdentifiers.WEB_FRAGMENT_31_XSD, +urlFor("/javax/servlet/resources/web-fragment_3_1.xsd")); + +SERVLET_RESOLVER = +new LocalResolver(Servlet.class, publicIds, systemIds); +} + + +private static String urlFor(String file) { +return DigesterFactory.class.getResource(file).toExternalForm(); +} /** @@ -51,175 +112,11 @@ public class DigesterFactory { digester.setNamespaceAware(xmlNamespaceAware); digester.setValidating(xmlValidation); digester.setUseContextClassLoader(true); - -SchemaResolver schemaResolver = new SchemaResolver(digester); -registerLocalSchema(schemaResolver); - -digester.setEntityResolver(schemaResolver); +digester.setEntityRe
svn commit: r1501159 - in /tomcat/trunk/java/org/apache: catalina/ant/ValidatorTask.java catalina/startup/ContextConfig.java catalina/startup/DigesterFactory.java catalina/startup/TldConfig.java tomca
Author: markt Date: Tue Jul 9 09:25:47 2013 New Revision: 1501159 URL: http://svn.apache.org/r1501159 Log: Move DigesterFactory to new o.a.t.u.descriptor package since JspC will eventually need to use it. Added: tomcat/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java - copied, changed from r1501154, tomcat/trunk/java/org/apache/catalina/startup/DigesterFactory.java Removed: tomcat/trunk/java/org/apache/catalina/startup/DigesterFactory.java Modified: tomcat/trunk/java/org/apache/catalina/ant/ValidatorTask.java tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java Modified: tomcat/trunk/java/org/apache/catalina/ant/ValidatorTask.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ant/ValidatorTask.java?rev=1501159&r1=1501158&r2=1501159&view=diff == --- tomcat/trunk/java/org/apache/catalina/ant/ValidatorTask.java (original) +++ tomcat/trunk/java/org/apache/catalina/ant/ValidatorTask.java Tue Jul 9 09:25:47 2013 @@ -25,7 +25,7 @@ import java.io.FileInputStream; import java.io.InputStream; import org.apache.catalina.startup.Constants; -import org.apache.catalina.startup.DigesterFactory; +import org.apache.tomcat.util.descriptor.DigesterFactory; import org.apache.tomcat.util.digester.Digester; import org.apache.tools.ant.BuildException; import org.xml.sax.InputSource; Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1501159&r1=1501158&r2=1501159&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Tue Jul 9 09:25:47 2013 @@ -87,6 +87,7 @@ import org.apache.tomcat.util.bcel.class import org.apache.tomcat.util.bcel.classfile.ElementValue; import org.apache.tomcat.util.bcel.classfile.ElementValuePair; import org.apache.tomcat.util.bcel.classfile.JavaClass; +import org.apache.tomcat.util.descriptor.DigesterFactory; import org.apache.tomcat.util.descriptor.web.ApplicationListener; import org.apache.tomcat.util.descriptor.web.ContextEjb; import org.apache.tomcat.util.descriptor.web.ContextEnvironment; Modified: tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java?rev=1501159&r1=1501158&r2=1501159&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java Tue Jul 9 09:25:47 2013 @@ -39,6 +39,7 @@ import org.apache.tomcat.JarScanType; import org.apache.tomcat.JarScanner; import org.apache.tomcat.JarScannerCallback; import org.apache.tomcat.util.ExceptionUtils; +import org.apache.tomcat.util.descriptor.DigesterFactory; import org.apache.tomcat.util.descriptor.web.ApplicationListener; import org.apache.tomcat.util.digester.Digester; import org.apache.tomcat.util.res.StringManager; Copied: tomcat/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java (from r1501154, tomcat/trunk/java/org/apache/catalina/startup/DigesterFactory.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java?p2=tomcat/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java&p1=tomcat/trunk/java/org/apache/catalina/startup/DigesterFactory.java&r1=1501154&r2=1501159&rev=1501159&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/DigesterFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java Tue Jul 9 09:25:47 2013 @@ -14,15 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.catalina.startup; +package org.apache.tomcat.util.descriptor; import java.util.HashMap; import java.util.Map; import javax.servlet.Servlet; -import org.apache.tomcat.util.descriptor.LocalResolver; -import org.apache.tomcat.util.descriptor.XmlIdentifiers; import org.apache.tomcat.util.digester.Digester; import org.apache.tomcat.util.digester.RuleSet; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1501176 - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/tomcat/util/descriptor/web/ java/org/apache/tomcat/util/digester/ test/javax/servlet/resources/ test/org/apache/
Author: markt Date: Tue Jul 9 10:07:23 2013 New Revision: 1501176 URL: http://svn.apache.org/r1501176 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55218 and https://issues.apache.org/bugzilla/show_bug.cgi?id=55219 Upgrade digester to use DefaultHandler2 and use LexicalHandler to detect publicId. Simplify web application version detection in web.xml Extracted from a patch by Jeremy Boynes. Added: tomcat/trunk/test/javax/servlet/resources/ tomcat/trunk/test/javax/servlet/resources/TestSchemaValidation.java (with props) Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1501176&r1=1501175&r2=1501176&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Jul 9 10:07:23 2013 @@ -113,6 +113,7 @@ import org.apache.tomcat.JarScanner; import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.IntrospectionUtils; import org.apache.tomcat.util.buf.UDecoder; +import org.apache.tomcat.util.descriptor.XmlIdentifiers; import org.apache.tomcat.util.descriptor.web.ApplicationListener; import org.apache.tomcat.util.descriptor.web.ApplicationParameter; import org.apache.tomcat.util.descriptor.web.ErrorPage; @@ -5759,17 +5760,10 @@ public class StandardContext extends Con */ @Override public boolean isServlet22() { - -if (this.publicId == null) -return (false); -if (this.publicId.equals -(org.apache.catalina.startup.Constants.WebDtdPublicId_22)) -return (true); -else -return (false); - +return XmlIdentifiers.WEB_22_PUBLIC.equals(publicId); } + @Override public Set addServletSecurity( ServletRegistration.Dynamic registration, Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties?rev=1501176&r1=1501175&r2=1501176&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties Tue Jul 9 10:07:23 2013 @@ -48,5 +48,5 @@ webXml.mergeConflictSessionTrackingMode= webXml.mergeConflictString=The [{0}] with name [{1}] was defined inconsistently in multiple fragments including fragment with name [{2}] located at [{3}] webXml.multipleOther=Multiple others entries in ordering webXml.unrecognisedPublicId=The public ID [{0}] did not match any of the known public ID's for web.xml files so the version could not be identified -webXml.version.nfe=Unable to parse [{0}] from the version string [{1}]. This component of the version string will be ignored. +webXml.version.unknown=Unknown version string [{0}]. Default version will be used. webXml.wrongFragmentName=Used a wrong fragment name {0} at web.xml absolute-ordering tag! \ No newline at end of file Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java?rev=1501176&r1=1501175&r2=1501176&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Tue Jul 9 10:07:23 2013 @@ -32,6 +32,7 @@ import java.util.Set; import javax.servlet.ServletContext; import javax.servlet.SessionTrackingMode; +import org.apache.tomcat.util.descriptor.XmlIdentifiers; import org.apache.tomcat.util.res.StringManager; /** @@ -127,93 +128,55 @@ public class WebXml { * @param version Values of null will be ignored */ public void setVersion(String version) { -if (version == null) return; - -// Update major and minor version -// Expected format is n.n - allow for any number of digits just in case -String major = null; -String minor = null; -int split = version.indexOf('.'); -if (split < 0) { -// Major only -major = version; -} else { -major = version.substring(0, split); -
[Bug 55218] Upgrade Digester to be based on DefaultHandler2 and use LexicalHandler to detect publicId
https://issues.apache.org/bugzilla/show_bug.cgi?id=55218 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- Thanks. This has beeen fixed in trunk based on the larger patch you submitted for bug 55166. It will be included in 8.0.x. -- 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
[Bug 55219] Simplify version detection in WebXml
https://issues.apache.org/bugzilla/show_bug.cgi?id=55219 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- Thanks. This has beeen fixed in trunk based on the larger patch you submitted for bug 55166. It will be included in 8.0.x. -- 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
[Bug 55171] [jsr 356] All server threads become blocked after some websocket testing
https://issues.apache.org/bugzilla/show_bug.cgi?id=55171 --- Comment #7 from Stoyan Boshev --- The SocketProcessor.status for those threads that are blocked at line 1542 of NioEndpoint is OPEN_READ. -- 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: r1501179 - /tomcat/trunk/java/org/apache/catalina/startup/Constants.java
Author: markt Date: Tue Jul 9 10:10:29 2013 New Revision: 1501179 URL: http://svn.apache.org/r1501179 Log: Removed unused constants. Modified: tomcat/trunk/java/org/apache/catalina/startup/Constants.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Constants.java?rev=1501179&r1=1501178&r2=1501179&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Constants.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Constants.java Tue Jul 9 10:10:29 2013 @@ -20,8 +20,6 @@ package org.apache.catalina.startup; * String constants for the startup package. * * @author Craig R. McClanahan - * @author Jean-Francois Arcand - * @version $Id$ */ public final class Constants { @@ -44,181 +42,6 @@ public final class Constants { * * @see Tomcat */ -public static final String NoDefaultWebXml = "org/apache/catalina/startup/NO_DEFAULT_XML"; - -// J2EE -public static final String J2eeSchemaPublicId_14 = -"j2ee_1_4.xsd"; -public static final String J2eeSchemaResourcePath_14 = -"/javax/servlet/resources/j2ee_1_4.xsd"; - -public static final String JavaeeSchemaPublicId_5 = -"javaee_5.xsd"; -public static final String JavaeeSchemaResourcePath_5 = -"/javax/servlet/resources/javaee_5.xsd"; - -public static final String JavaeeSchemaPublicId_6 = -"javaee_6.xsd"; -public static final String JavaeeSchemaResourcePath_6 = -"/javax/servlet/resources/javaee_6.xsd"; - -public static final String JavaeeSchemaPublicId_7 = -"javaee_7.xsd"; -public static final String JavaeeSchemaResourcePath_7 = -"/javax/servlet/resources/javaee_7.xsd"; - - -// W3C -public static final String W3cSchemaPublicId_10 = -"xml.xsd"; -public static final String W3cSchemaResourcePath_10 = -"/javax/servlet/resources/xml.xsd"; - -public static final String W3cSchemaDTDPublicId_10 = -"XMLSchema.dtd"; -public static final String W3cSchemaDTDResourcePath_10 = -"/javax/servlet/resources/XMLSchema.dtd"; - -public static final String W3cDatatypesDTDPublicId_10 = -"datatypes.dtd"; -public static final String W3cDatatypesDTDResourcePath_10 = -"/javax/servlet/resources/datatypes.dtd"; - - -// JSP -public static final String JspSchemaPublicId_20 = -"jsp_2_0.xsd"; -public static final String JspSchemaResourcePath_20 = -"/javax/servlet/resources/jsp_2_0.xsd"; - -public static final String JspSchemaPublicId_21 = -"jsp_2_1.xsd"; -public static final String JspSchemaResourcePath_21 = -"/javax/servlet/resources/jsp_2_1.xsd"; - -public static final String JspSchemaPublicId_22 = -"jsp_2_2.xsd"; -public static final String JspSchemaResourcePath_22 = -"/javax/servlet/resources/jsp_2_2.xsd"; - -public static final String JspSchemaPublicId_23 = -"jsp_2_3.xsd"; -public static final String JspSchemaResourcePath_23 = -"/javax/servlet/resources/jsp_2_3.xsd"; - - -// TLD -public static final String TldDtdPublicId_11 = -"-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"; -public static final String TldDtdResourcePath_11 = -"/javax/servlet/resources/web-jsptaglibrary_1_1.dtd"; - -public static final String TldDtdPublicId_12 = -"-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"; -public static final String TldDtdResourcePath_12 = -"/javax/servlet/resources/web-jsptaglibrary_1_2.dtd"; - -public static final String TldSchemaPublicId_20 = -"web-jsptaglibrary_2_0.xsd"; -public static final String TldSchemaResourcePath_20 = -"/javax/servlet/resources/web-jsptaglibrary_2_0.xsd"; - -public static final String TldSchemaPublicId_21 = -"web-jsptaglibrary_2_1.xsd"; -public static final String TldSchemaResourcePath_21 = -"/javax/servlet/resources/web-jsptaglibrary_2_1.xsd"; - - -// web.xml -public static final String WebDtdPublicId_22 = -"-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"; -public static final String WebDtdResourcePath_22 = -"/javax/servlet/resources/web-app_2_2.dtd"; - -public static final String WebDtdPublicId_23 = -"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"; -public static final String WebDtdResourcePath_23 = -"/javax/servlet/resources/web-app_2_3.dtd"; - -public static final String WebSchemaPublicId_24 = -"web-app_2_4.xsd"; -public static final String WebSchemaResourcePath_24 = -"/javax/servlet/resources/web-app_2_4.xsd"; - -public static final String WebSchemaPublicId_25 = -"web-app_2_5.xsd"; -public static final String WebSchemaResourcePath_25 = -"/
[jira] [Commented] (MTOMCAT-231) tomcat6:run fail with jdk1.5 because commons-io-2.4 requires jdk1.6
[ https://issues.apache.org/jira/browse/MTOMCAT-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13703118#comment-13703118 ] ricou7b commented on MTOMCAT-231: - Hi, I've modified the file tomcat-maven-plugin-2.0.pom to use commons-io 2.2 and it works: l497 to l501: commons-io commons-io 2.2 Regards, > tomcat6:run fail with jdk1.5 because commons-io-2.4 requires jdk1.6 > --- > > Key: MTOMCAT-231 > URL: https://issues.apache.org/jira/browse/MTOMCAT-231 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat6 >Affects Versions: 2.0, 2.1 > Environment: all >Reporter: ricou7b >Assignee: Olivier Lamy (*$^¨%`£) > Labels: jdk1.5, newbie, tomcat6:run > > You can't launch mvn tomcat6:run with jdk5 because the plugin dependency > commons-io-2.4 requires jdk6. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1501183 - /tomcat/maven-plugin/trunk/pom.xml
Author: olamy Date: Tue Jul 9 10:17:04 2013 New Revision: 1501183 URL: http://svn.apache.org/r1501183 Log: [MTOMCAT-231] tomcat6:run fail with jdk1.5 because commons-io-2.4 requires jdk1.6 Modified: tomcat/maven-plugin/trunk/pom.xml Modified: tomcat/maven-plugin/trunk/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/pom.xml?rev=1501183&r1=1501182&r2=1501183&view=diff == --- tomcat/maven-plugin/trunk/pom.xml (original) +++ tomcat/maven-plugin/trunk/pom.xml Tue Jul 9 10:17:04 2013 @@ -540,7 +540,7 @@ commons-io commons-io -2.4 +2.2 commons-lang - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Closed] (MTOMCAT-231) tomcat6:run fail with jdk1.5 because commons-io-2.4 requires jdk1.6
[ https://issues.apache.org/jira/browse/MTOMCAT-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) closed MTOMCAT-231. -- Resolution: Fixed Fix Version/s: 2.2 fixed. BTW you can change the dependency in element of the plugin declaration in your pom. > tomcat6:run fail with jdk1.5 because commons-io-2.4 requires jdk1.6 > --- > > Key: MTOMCAT-231 > URL: https://issues.apache.org/jira/browse/MTOMCAT-231 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat6 >Affects Versions: 2.0, 2.1 > Environment: all >Reporter: ricou7b >Assignee: Olivier Lamy (*$^¨%`£) > Labels: jdk1.5, newbie, tomcat6:run > Fix For: 2.2 > > > You can't launch mvn tomcat6:run with jdk5 because the plugin dependency > commons-io-2.4 requires jdk6. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/4628 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1501159 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
[jira] [Commented] (MTOMCAT-231) tomcat6:run fail with jdk1.5 because commons-io-2.4 requires jdk1.6
[ https://issues.apache.org/jira/browse/MTOMCAT-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13703138#comment-13703138 ] ricou7b commented on MTOMCAT-231: - thx for all, I've deployed your solution. cheers, > tomcat6:run fail with jdk1.5 because commons-io-2.4 requires jdk1.6 > --- > > Key: MTOMCAT-231 > URL: https://issues.apache.org/jira/browse/MTOMCAT-231 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat6 >Affects Versions: 2.0, 2.1 > Environment: all >Reporter: ricou7b >Assignee: Olivier Lamy (*$^¨%`£) > Labels: jdk1.5, newbie, tomcat6:run > Fix For: 2.2 > > > You can't launch mvn tomcat6:run with jdk5 because the plugin dependency > commons-io-2.4 requires jdk6. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1501195 - in /tomcat/trunk: java/org/apache/catalina/startup/ java/org/apache/tomcat/util/descriptor/web/ test/javax/servlet/resources/ test/org/apache/catalina/startup/ test/org/apache/t
Author: markt Date: Tue Jul 9 10:41:35 2013 New Revision: 1501195 URL: http://svn.apache.org/r1501195 Log: Move WebRuleSet to new o.a.t.u.descriptor.web package Added: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings_es.properties (with props) tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebRuleSet.java - copied, changed from r1501133, tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebRuleSet.java - copied, changed from r1501133, tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java Removed: tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties tomcat/trunk/test/javax/servlet/resources/TestSchemaValidation.java Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1501195&r1=1501194&r2=1501195&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Tue Jul 9 10:41:35 2013 @@ -106,6 +106,7 @@ import org.apache.tomcat.util.descriptor import org.apache.tomcat.util.descriptor.web.SecurityRoleRef; import org.apache.tomcat.util.descriptor.web.ServletDef; import org.apache.tomcat.util.descriptor.web.SessionConfig; +import org.apache.tomcat.util.descriptor.web.WebRuleSet; import org.apache.tomcat.util.descriptor.web.WebXml; import org.apache.tomcat.util.digester.Digester; import org.apache.tomcat.util.digester.RuleSet; Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=1501195&r1=1501194&r2=1501195&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Tue Jul 9 10:41:35 2013 @@ -130,12 +130,5 @@ userConfig.start=UserConfig: Processing userConfig.stop=UserConfig: Processing STOP userConfig.deploy.threaded.error=Error waiting for multi-thread deployment of user directories to complete webAnnotationSet.invalidInjection=Invalid method resource injection annotation. -webRuleSet.absoluteOrdering= element not valid in web-fragment.xml and will be ignored -webRuleSet.absoluteOrderingCount= element is limited to 1 occurrence -webRuleSet.nameCount= element is limited to 1 occurrence -webRuleSet.postconstruct.duplicate=Duplicate post construct method definition for class {0} -webRuleSet.predestroy.duplicate=Duplicate pre destroy method definition for class {0} -webRuleSet.relativeOrdering= element not valid in web.xml and will be ignored -webRuleSet.relativeOrderingCount= element is limited to 1 occurrence xmlErrorHandler.error=Non-fatal error [{0}] reported processing [{1}]. xmlErrorHandler.warning=Warning [{0}] reported processing [{1}]. Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties?rev=1501195&r1=1501194&r2=1501195&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties Tue Jul 9 10:41:35 2013 @@ -21,6 +21,14 @@ securityConstraint.uncoveredHttpOmittedM servletDef.invalidServletName=Invalid [{0}] in servlet definition. +webRuleSet.absoluteOrdering= element not valid in web-fragment.xml and will be ignored +webRuleSet.absoluteOrderingCount= element is limited to 1 occurrence +webRuleSet.nameCount= element is limited to 1 occurrence +webRuleSet.postconstruct.duplicate=Duplicate post construct method definition for class {0} +webRuleSet.predestroy.duplicate=Duplicate pre destroy method definition for class {0} +webRuleSet.relativeOrdering= element not valid in web.xml and will be ignored +webRuleSet.relativeOrderingCount= element is limited to 1 occurrence + webXml.duplicateEnvEntry=Duplicate env-entry name [{0}] webXml.duplicateFilter=Duplicate filter name [{0}] webXml.duplicateMessageDestination=Duplicate message-destination name [{0}] Added: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings_es.proper
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/4629 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1501179 Blamelist: markt Build succeeded! sincerely, -The Buildbot
[jira] [Commented] (MTOMCAT-231) tomcat6:run fail with jdk1.5 because commons-io-2.4 requires jdk1.6
[ https://issues.apache.org/jira/browse/MTOMCAT-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13703169#comment-13703169 ] Hudson commented on MTOMCAT-231: Integrated in TomcatMavenPlugin-mvn3.x #252 (See [https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/252/]) [MTOMCAT-231] tomcat6:run fail with jdk1.5 because commons-io-2.4 requires jdk1.6 (Revision 1501183) Result = SUCCESS olamy : http://svn.apache.org/viewvc/?view=rev&rev=1501183 Files : * /tomcat/maven-plugin/trunk/pom.xml > tomcat6:run fail with jdk1.5 because commons-io-2.4 requires jdk1.6 > --- > > Key: MTOMCAT-231 > URL: https://issues.apache.org/jira/browse/MTOMCAT-231 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat6 >Affects Versions: 2.0, 2.1 > Environment: all >Reporter: ricou7b >Assignee: Olivier Lamy (*$^¨%`£) > Labels: jdk1.5, newbie, tomcat6:run > Fix For: 2.2 > > > You can't launch mvn tomcat6:run with jdk5 because the plugin dependency > commons-io-2.4 requires jdk6. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55221] New: [websocket] Session is closed without notification
https://issues.apache.org/bugzilla/show_bug.cgi?id=55221 Bug ID: 55221 Summary: [websocket] Session is closed without notification Product: Tomcat 8 Version: trunk Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: s.bos...@gmail.com I am trying to retest the scenario described in bug#55200 after that bug was fixed. Now I can see the session is being silently closed without any notification after several thousands messages were sent. I could not find any errors in the logs as well. -- 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: r1501266 - in /tomcat/trunk: java/javax/el/MapELResolver.java test/javax/el/TestMapELResolver.java
Author: violetagg Date: Tue Jul 9 13:59:07 2013 New Revision: 1501266 URL: http://svn.apache.org/r1501266 Log: javax.el.MapELResolver: 1. According to javadoc when creating FeatureDescriptors - ShortDescription must be empty string - ELResolver.RESOLVABLE_AT_DESIGN_TIME must be TRUE 2. Unit tests are added Added: tomcat/trunk/test/javax/el/TestMapELResolver.java (with props) Modified: tomcat/trunk/java/javax/el/MapELResolver.java Modified: tomcat/trunk/java/javax/el/MapELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/MapELResolver.java?rev=1501266&r1=1501265&r2=1501266&view=diff == --- tomcat/trunk/java/javax/el/MapELResolver.java (original) +++ tomcat/trunk/java/javax/el/MapELResolver.java Tue Jul 9 13:59:07 2013 @@ -118,11 +118,12 @@ public class MapELResolver extends ELRes key = itr.next(); desc = new FeatureDescriptor(); desc.setDisplayName(key.toString()); +desc.setShortDescription(""); desc.setExpert(false); desc.setHidden(false); desc.setName(key.toString()); desc.setPreferred(true); -desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE); +desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE); desc.setValue(TYPE, key.getClass()); feats.add(desc); } Added: tomcat/trunk/test/javax/el/TestMapELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestMapELResolver.java?rev=1501266&view=auto == --- tomcat/trunk/test/javax/el/TestMapELResolver.java (added) +++ tomcat/trunk/test/javax/el/TestMapELResolver.java Tue Jul 9 13:59:07 2013 @@ -0,0 +1,318 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package javax.el; + +import java.beans.FeatureDescriptor; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + +public class TestMapELResolver { + +/** + * Tests that a null context results in an NPE as per EL Javadoc. + */ +@Test(expected = NullPointerException.class) +public void testGetType01() { +MapELResolver mapELResolver = new MapELResolver(); +mapELResolver.getType(null, new Object(), new Object()); +} + +/** + * Tests that a valid property is not resolved if base is not Map. + */ +@Test +public void testGetType02() { +doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_TYPE, +true); +} + +/** + * Tests that a valid property is resolved. + */ +@Test +public void testGetType03() { +MapELResolver mapELResolver = new MapELResolver(); +ELContext context = new StandardELContext( +ELManager.getExpressionFactory()); + +Class result = mapELResolver.getType(context, new HashMap<>(), +"test"); + +Assert.assertEquals(Object.class, result); +Assert.assertTrue(context.isPropertyResolved()); +} + +/** + * Tests that a null context results in an NPE as per EL Javadoc. + */ +@Test(expected = NullPointerException.class) +public void testGetValue01() { +MapELResolver mapELResolver = new MapELResolver(); +mapELResolver.getValue(null, new Object(), new Object()); +} + +/** + * Tests that a valid property is not resolved if base is not Map. + */ +@Test +public void testGetValue02() { +doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_VALUE, +true); +} + +/** + * Tests that a valid property is resolved. + */ +@Test +public void testGetValue03() { +MapELResolver mapELResolver = new MapELResolver(); +ELContext context = new StandardELContext( +ELManager.getExpressionFactory()); + +Map map = new HashMap<>(); +map.put("key", "value"); +Object result = mapELResolver.getVa
svn commit: r1501280 - in /tomcat/trunk/java/org/apache: catalina/startup/ tomcat/util/descriptor/ tomcat/util/descriptor/web/
Author: markt Date: Tue Jul 9 14:10:04 2013 New Revision: 1501280 URL: http://svn.apache.org/r1501280 Log: Refactor WebXml parsing to new package. Based on a patch by violetagg. Added: tomcat/trunk/java/org/apache/tomcat/util/descriptor/Constants.java (with props) tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalStrings_es.properties tomcat/trunk/java/org/apache/tomcat/util/descriptor/XmlErrorHandler.java - copied, changed from r1501133, tomcat/trunk/java/org/apache/catalina/startup/XmlErrorHandler.java tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXmlParser.java (with props) Removed: tomcat/trunk/java/org/apache/catalina/startup/XmlErrorHandler.java Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/startup/LocalStrings_es.properties tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/LocalStrings_es.properties Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1501280&r1=1501279&r2=1501280&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Tue Jul 9 14:10:04 2013 @@ -87,7 +87,7 @@ import org.apache.tomcat.util.bcel.class import org.apache.tomcat.util.bcel.classfile.ElementValue; import org.apache.tomcat.util.bcel.classfile.ElementValuePair; import org.apache.tomcat.util.bcel.classfile.JavaClass; -import org.apache.tomcat.util.descriptor.DigesterFactory; +import org.apache.tomcat.util.descriptor.XmlErrorHandler; import org.apache.tomcat.util.descriptor.web.ApplicationListener; import org.apache.tomcat.util.descriptor.web.ContextEjb; import org.apache.tomcat.util.descriptor.web.ContextEnvironment; @@ -106,8 +106,8 @@ import org.apache.tomcat.util.descriptor import org.apache.tomcat.util.descriptor.web.SecurityRoleRef; import org.apache.tomcat.util.descriptor.web.ServletDef; import org.apache.tomcat.util.descriptor.web.SessionConfig; -import org.apache.tomcat.util.descriptor.web.WebRuleSet; import org.apache.tomcat.util.descriptor.web.WebXml; +import org.apache.tomcat.util.descriptor.web.WebXmlParser; import org.apache.tomcat.util.digester.Digester; import org.apache.tomcat.util.digester.RuleSet; import org.apache.tomcat.util.res.StringManager; @@ -252,20 +252,7 @@ public class ContextConfig implements Li */ protected boolean handlesTypesNonAnnotations = false; -/** - * The Digester we will use to process web application - * deployment descriptor files. - */ -protected Digester webDigester = null; -protected WebRuleSet webRuleSet = null; - -/** - * The Digester we will use to process web fragment - * deployment descriptor files. - */ -protected Digester webFragmentDigester = null; -protected WebRuleSet webFragmentRuleSet = null; - +private WebXmlParser webXmlParser; // - Properties /** @@ -457,25 +444,6 @@ public class ContextConfig implements Li /** - * Create and return a Digester configured to process the - * web application deployment descriptor (web.xml). - */ -public void createWebXmlDigester(boolean namespaceAware, -boolean validation) { - -webRuleSet = new WebRuleSet(false); -webDigester = DigesterFactory.newDigester(validation, -namespaceAware, webRuleSet); -webDigester.getParser(); - -webFragmentRuleSet = new WebRuleSet(true); -webFragmentDigester = DigesterFactory.newDigester(validation, -namespaceAware, webFragmentRuleSet); -webFragmentDigester.getParser(); -} - - -/** * Create (if necessary) and return a Digester configured to process the * context configuration descriptor for an application. */ @@ -771,7 +739,7 @@ public class ContextConfig implements Li contextConfig(contextDigester); -createWebXmlDigester(context.getXmlNamespaceAware(), +webXmlParser = new WebXmlParser(context.getXmlNamespaceAware(), context.getXmlValidation()); } @@ -1145,7 +1113,9 @@ public class ContextConfig implements Li // Parse context level web.xml InputSource contextWebXml = getContextWebXmlSource(); -parseWebXml(contextWebXml, webXml, false); +if (!webXmlParser.parseWebXml(contextWebXml, webXml,
svn commit: r1501296 - /tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java
Author: markt Date: Tue Jul 9 14:39:55 2013 New Revision: 1501296 URL: http://svn.apache.org/r1501296 Log: Change the default Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java?rev=1501296&r1=1501295&r2=1501296&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Tue Jul 9 14:39:55 2013 @@ -199,9 +199,9 @@ public class WebXml { } // Derived major and minor version attributes -// Default to 3.0 until we know otherwise +// Default to 3.1 until we know otherwise private int majorVersion = 3; -private int minorVersion = 0; +private int minorVersion = 1; public int getMajorVersion() { return majorVersion; } public int getMinorVersion() { return minorVersion; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1501302 - in /tomcat/trunk/java/org/apache/jasper/compiler: JspConfig.java TldLocationsCache.java WebXml.java
Author: markt Date: Tue Jul 9 14:48:01 2013 New Revision: 1501302 URL: http://svn.apache.org/r1501302 Log: Re-apply r1377509 - the fix for bug 53737 that did not account for JspC Removed: tomcat/trunk/java/org/apache/jasper/compiler/WebXml.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java?rev=1501302&r1=1501301&r2=1501302&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java Tue Jul 9 14:48:01 2013 @@ -17,14 +17,14 @@ package org.apache.jasper.compiler; +import java.util.Collection; import java.util.Iterator; import java.util.Vector; import javax.servlet.ServletContext; +import javax.servlet.descriptor.JspConfigDescriptor; +import javax.servlet.descriptor.JspPropertyGroupDescriptor; -import org.apache.jasper.JasperException; -import org.apache.jasper.xmlparser.ParserUtils; -import org.apache.jasper.xmlparser.TreeNode; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -59,171 +59,105 @@ public class JspConfig { this.ctxt = ctxt; } -private double getVersion(TreeNode webApp) { -String v = webApp.findAttribute("version"); -if (v != null) { -try { -return Double.parseDouble(v); -} catch (NumberFormatException e) { -} -} -return 2.3; -} - -private void processWebDotXml() throws JasperException { - -WebXml webXml = null; - -try { -webXml = new WebXml(ctxt); - -TreeNode webApp = null; -if (webXml.getInputSource() != null) { -ParserUtils pu = new ParserUtils(); -webApp = pu.parseXMLDocument(webXml.getSystemId(), -webXml.getInputSource()); -} +private void processWebDotXml() { -if (webApp == null -|| getVersion(webApp) < 2.4) { -defaultIsELIgnored = "true"; -defaultDeferedSyntaxAllowedAsLiteral = "true"; -return; -} -if (getVersion(webApp) < 2.5) { +// Very, very unlikely but just in case... +if (ctxt.getMajorVersion() < 2) { +defaultIsELIgnored = "true"; +defaultDeferedSyntaxAllowedAsLiteral = "true"; +return; +} +if (ctxt.getMajorVersion() == 2) { +if (ctxt.getMinorVersion() < 5) { defaultDeferedSyntaxAllowedAsLiteral = "true"; } -TreeNode jspConfig = webApp.findChild("jsp-config"); -if (jspConfig == null) { +if (ctxt.getMinorVersion() < 4) { +defaultIsELIgnored = "true"; return; } +} -jspProperties = new Vector<>(); -Iterator jspPropertyList = -jspConfig.findChildren("jsp-property-group"); -while (jspPropertyList.hasNext()) { - -TreeNode element = jspPropertyList.next(); -Iterator list = element.findChildren(); - -Vector urlPatterns = new Vector<>(); -String pageEncoding = null; -String scriptingInvalid = null; -String elIgnored = null; -String isXml = null; -Vector includePrelude = new Vector<>(); -Vector includeCoda = new Vector<>(); -String deferredSyntaxAllowedAsLiteral = null; -String trimDirectiveWhitespaces = null; -String defaultContentType = null; -String buffer = null; -String errorOnUndeclaredNamespace = null; - -while (list.hasNext()) { - -element = list.next(); -String tname = element.getName(); - -if ("url-pattern".equals(tname)) -urlPatterns.addElement( element.getBody() ); -else if ("page-encoding".equals(tname)) -pageEncoding = element.getBody(); -else if ("is-xml".equals(tname)) -isXml = element.getBody(); -else if ("el-ignored".equals(tname)) -elIgnored = element.getBody(); -else if ("scripting-invalid".equals(tname)) -scriptingInvalid = element.getBody(); -else if ("include-prelude".equals(tname)) -includePrelude.addElement(element.getBody()); -else if ("include-coda
svn commit: r1501303 - in /tomcat/trunk/java/org/apache/jasper: JspC.java compiler/ParserController.java
Author: markt Date: Tue Jul 9 14:48:24 2013 New Revision: 1501303 URL: http://svn.apache.org/r1501303 Log: Fix Eclipse warnings Modified: tomcat/trunk/java/org/apache/jasper/JspC.java tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Modified: tomcat/trunk/java/org/apache/jasper/JspC.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1501303&r1=1501302&r2=1501303&view=diff == --- tomcat/trunk/java/org/apache/jasper/JspC.java (original) +++ tomcat/trunk/java/org/apache/jasper/JspC.java Tue Jul 9 14:48:24 2013 @@ -1220,7 +1220,7 @@ public class JspC extends Task implement * Locate all jsp files in the webapp. Used if no explicit * jsps are specified. */ -public void scanFiles( File base ) throws JasperException { +public void scanFiles( File base ) { Stack dirs = new Stack<>(); dirs.push(base.toString()); Modified: tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java?rev=1501303&r1=1501302&r2=1501303&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Tue Jul 9 14:48:24 2013 @@ -276,8 +276,7 @@ class ParserController implements TagCon * @return The value of the attribute of the * jsp-property-group with matching URL pattern */ -private String getJspConfigPageEncoding(String absFileName) -throws JasperException { +private String getJspConfigPageEncoding(String absFileName) { JspConfig jspConfig = ctxt.getOptions().getJspConfig(); JspConfig.JspProperty jspProperty - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1501304 - /tomcat/trunk/java/org/apache/jasper/JspC.java
Author: markt Date: Tue Jul 9 14:48:40 2013 New Revision: 1501304 URL: http://svn.apache.org/r1501304 Log: Clean-up. Extracted from a patch by Jeremy Boynes. Modified: tomcat/trunk/java/org/apache/jasper/JspC.java Modified: tomcat/trunk/java/org/apache/jasper/JspC.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1501304&r1=1501303&r2=1501304&view=diff == --- tomcat/trunk/java/org/apache/jasper/JspC.java (original) +++ tomcat/trunk/java/org/apache/jasper/JspC.java Tue Jul 9 14:48:40 2013 @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.jasper; import java.io.BufferedReader; @@ -30,7 +29,6 @@ import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.Reader; import java.io.Writer; -import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; @@ -1414,15 +1412,11 @@ public class JspC extends Task implement } } -protected void initServletContext() { -try { -context =new JspCServletContext -(new PrintWriter(System.out), - new URL("file:" + uriRoot.replace('\\','/') + '/')); -tldLocationsCache = TldLocationsCache.getInstance(context); -} catch (MalformedURLException me) { -System.out.println("**" + me); -} +protected void initServletContext() throws IOException { + // TODO: should we use the Ant Project's log? +PrintWriter log = new PrintWriter(System.out); +URL resourceBase = new File(uriRoot).getCanonicalFile().toURI().toURL(); +context = new JspCServletContext(log, resourceBase); rctxt = new JspRuntimeContext(context, this); jspConfig = new JspConfig(context); tagPluginManager = new TagPluginManager(context); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55217] Common EntityResolver that can be used by Catalina and Jasper
https://issues.apache.org/bugzilla/show_bug.cgi?id=55217 --- Comment #4 from Jeremy Boynes --- Created attachment 30571 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30571&action=edit Simpler DigesterFactory with base Class With the base class added, the urlFor is not needed any more so this could now be a little simpler. The original also used DigesterFactory as the Class for loading resources rather than Servlet.class. -- 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: r1501305 - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/catalina/startup/ java/org/apache/jasper/ java/org/apache/jasper/servlet/ java/org/apache/tomcat/util/descriptor
Author: markt Date: Tue Jul 9 14:49:28 2013 New Revision: 1501305 URL: http://svn.apache.org/r1501305 Log: Fully fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53737 Enable Jasper to use information from the ServletContext rather than having to re-parse web.xml This commit re-adds the ability to parse web.xml to JspC but now using the same parser as Catalina. Includes extracts from patches by Jeremy Boynes and violetagg. Note: Fragment support is still TODO The need for annotation support still needs to be reviewed. Added: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/JspConfigDescriptorImpl.java - copied, changed from r1501304, tomcat/trunk/java/org/apache/catalina/core/ApplicationJspConfigDescriptor.java tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/JspPropertyGroupDescriptorImpl.java - copied, changed from r1501304, tomcat/trunk/java/org/apache/catalina/core/ApplicationJspPropertyGroupDescriptor.java tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/TaglibDescriptorImpl.java - copied, changed from r1501304, tomcat/trunk/java/org/apache/catalina/core/ApplicationTaglibDescriptor.java tomcat/trunk/test/org/apache/jasper/servlet/ tomcat/trunk/test/org/apache/jasper/servlet/TestJspCServletContext.java Removed: tomcat/trunk/java/org/apache/catalina/core/ApplicationJspConfigDescriptor.java tomcat/trunk/java/org/apache/catalina/core/ApplicationJspPropertyGroupDescriptor.java tomcat/trunk/java/org/apache/catalina/core/ApplicationTaglibDescriptor.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/trunk/java/org/apache/jasper/JspC.java tomcat/trunk/java/org/apache/jasper/servlet/JspCServletContext.java tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/Constants.java tomcat/trunk/res/checkstyle/org-import-control.xml Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1501305&r1=1501304&r2=1501305&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Jul 9 14:49:28 2013 @@ -121,6 +121,7 @@ import org.apache.tomcat.util.descriptor import org.apache.tomcat.util.descriptor.web.FilterMap; import org.apache.tomcat.util.descriptor.web.Injectable; import org.apache.tomcat.util.descriptor.web.InjectionTarget; +import org.apache.tomcat.util.descriptor.web.JspConfigDescriptorImpl; import org.apache.tomcat.util.descriptor.web.LoginConfig; import org.apache.tomcat.util.descriptor.web.MessageDestination; import org.apache.tomcat.util.descriptor.web.MessageDestinationRef; @@ -821,7 +822,7 @@ public class StandardContext extends Con private int effectiveMinorVersion = 0; private JspConfigDescriptor jspConfigDescriptor = -new ApplicationJspConfigDescriptor(); +new JspConfigDescriptorImpl(); private Set resourceOnlyServlets = new HashSet<>(); @@ -5696,7 +5697,7 @@ public class StandardContext extends Con applicationListeners = new ApplicationListener[0]; applicationEventListenersObjects = new Object[0]; applicationLifecycleListenersObjects = new Object[0]; -jspConfigDescriptor = new ApplicationJspConfigDescriptor(); +jspConfigDescriptor = new JspConfigDescriptorImpl(); initializers.clear(); Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1501305&r1=1501304&r2=1501305&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Tue Jul 9 14:49:28 2013 @@ -67,8 +67,6 @@ import org.apache.catalina.Valve; import org.apache.catalina.WebResource; import org.apache.catalina.WebResourceRoot; import org.apache.catalina.Wrapper; -import org.apache.catalina.core.ApplicationJspPropertyGroupDescriptor; -import org.apache.catalina.core.ApplicationTaglibDescriptor; import org.apache.catalina.core.StandardContext; import org.apache.catalina.core.StandardHost; import org.apache.catalina.util.ContextName; @@ -99,6 +97,7 @@ import org.apache.tomcat.util.descriptor import org.apache.tomcat.util.descriptor.web.FilterDef; import org.apache.tomcat.util.descriptor.web.FilterMap; import org.apache.tomcat.util.descriptor.web.JspPropertyGroup; +import org.apache.tomcat.util.descriptor.web.JspPropertyGroupDescriptorImpl; import org.apache.tomcat.util.descriptor.web.LoginConfig; import org.apache.tomcat.util.desc
[Bug 53737] Use ServletContext.getJspConfigDescriptor() in Jasper instead of XML-parsing of merged web.xml
https://issues.apache.org/bugzilla/show_bug.cgi?id=53737 --- Comment #6 from Mark Thomas --- This has been partially fixed using a combination of the original fix, the patches here and patches from violetagg. web-fragment and annotations are still TODO so the code is effectively in the same place funcitonaly as before the patch. -- 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
[Bug 55221] [websocket] Session is closed without notification
https://issues.apache.org/bugzilla/show_bug.cgi?id=55221 Stoyan Boshev changed: What|Removed |Added OS||All --- Comment #1 from Stoyan Boshev --- I think I found where the problem is. The bug is in WsSession.sendCloseMessage(). This method creates a ByteBuffer with size 125, but the closeReason which is added in this buffer may be way beyond this limit. In such case it will throw BufferOverflowException and cause the handlers not being notified. Perhaps the close reason needs to be truncated in order to fit the maximum limit of the buffer. In my case the close reason was "Unable to complete read due to destination buffer overflow. Destination is [8,192] bytes in size and currently contains [0] bytes." -- 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: r1501310 - /tomcat/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java
Author: markt Date: Tue Jul 9 15:02:15 2013 New Revision: 1501310 URL: http://svn.apache.org/r1501310 Log: Simplify. Use DigesterFactory as base for loading resources for consistency with earlier versions. Patch provided by Jeremy Boynes. Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java?rev=1501310&r1=1501309&r2=1501310&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/DigesterFactory.java Tue Jul 9 15:02:15 2013 @@ -19,8 +19,6 @@ package org.apache.tomcat.util.descripto import java.util.HashMap; import java.util.Map; -import javax.servlet.Servlet; - import org.apache.tomcat.util.digester.Digester; import org.apache.tomcat.util.digester.RuleSet; @@ -43,57 +41,52 @@ public class DigesterFactory { // W3C publicIds.put(XmlIdentifiers.XSD_10_PUBLIC, -urlFor("/javax/servlet/resources/XMLSchema.dtd")); +"/javax/servlet/resources/XMLSchema.dtd"); publicIds.put(XmlIdentifiers.DATATYPES_PUBLIC, -urlFor("/javax/servlet/resources/datatypes.dtd")); +"/javax/servlet/resources/datatypes.dtd"); systemIds.put(XmlIdentifiers.XML_2001_XSD, -urlFor("/javax/servlet/resources/xml.xsd")); +"/javax/servlet/resources/xml.xsd"); // from J2EE 1.2 publicIds.put(XmlIdentifiers.WEB_22_PUBLIC, -urlFor("/javax/servlet/resources/web-app_2_2.dtd")); +"/javax/servlet/resources/web-app_2_2.dtd"); publicIds.put(XmlIdentifiers.TLD_11_PUBLIC, -urlFor("/javax/servlet/resources/web-jsptaglibrary_1_1.dtd")); +"/javax/servlet/resources/web-jsptaglibrary_1_1.dtd"); // from J2EE 1.3 publicIds.put(XmlIdentifiers.WEB_23_PUBLIC, -urlFor("/javax/servlet/resources/web-app_2_3.dtd")); +"/javax/servlet/resources/web-app_2_3.dtd"); publicIds.put(XmlIdentifiers.TLD_12_PUBLIC, -urlFor("/javax/servlet/resources/web-jsptaglibrary_1_2.dtd")); +"/javax/servlet/resources/web-jsptaglibrary_1_2.dtd"); // from J2EE 1.4 systemIds.put("http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd";, - urlFor("/javax/servlet/resources/j2ee_web_services_client_1_1.xsd")); +"/javax/servlet/resources/j2ee_web_services_client_1_1.xsd"); systemIds.put(XmlIdentifiers.WEB_24_XSD, -urlFor("/javax/servlet/resources/web-app_2_4.xsd")); +"/javax/servlet/resources/web-app_2_4.xsd"); systemIds.put(XmlIdentifiers.TLD_20_XSD, -urlFor("/javax/servlet/resources/web-jsptaglibrary_2_0.xsd")); +"/javax/servlet/resources/web-jsptaglibrary_2_0.xsd"); // from JavaEE 5 systemIds.put(XmlIdentifiers.WEB_25_XSD, -urlFor("/javax/servlet/resources/web-app_2_5.xsd")); +"/javax/servlet/resources/web-app_2_5.xsd"); systemIds.put(XmlIdentifiers.TLD_21_XSD, -urlFor("/javax/servlet/resources/web-jsptaglibrary_2_1.xsd")); +"/javax/servlet/resources/web-jsptaglibrary_2_1.xsd"); // from JavaEE 6 systemIds.put(XmlIdentifiers.WEB_30_XSD, -urlFor("/javax/servlet/resources/web-app_3_0.xsd")); +"/javax/servlet/resources/web-app_3_0.xsd"); systemIds.put(XmlIdentifiers.WEB_FRAGMENT_30_XSD, -urlFor("/javax/servlet/resources/web-fragment_3_0.xsd")); +"/javax/servlet/resources/web-fragment_3_0.xsd"); // from JavaEE 7 systemIds.put(XmlIdentifiers.WEB_31_XSD, -urlFor("/javax/servlet/resources/web-app_3_1.xsd")); +"/javax/servlet/resources/web-app_3_1.xsd"); systemIds.put(XmlIdentifiers.WEB_FRAGMENT_31_XSD, -urlFor("/javax/servlet/resources/web-fragment_3_1.xsd")); +"/javax/servlet/resources/web-fragment_3_1.xsd"); SERVLET_RESOLVER = -new LocalResolver(Servlet.class, publicIds, systemIds); -} - - -private static String urlFor(String file) { -return DigesterFactory.class.getResource(file).toExternalForm(); +new LocalResolver(DigesterFactory.class, publicIds, systemIds); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55217] Common EntityResolver that can be used by Catalina and Jasper
https://issues.apache.org/bugzilla/show_bug.cgi?id=55217 --- Comment #5 from Mark Thomas --- Thanks. Applied. -- 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
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/4632 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1501296 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1501341 - /tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
Author: markt Date: Tue Jul 9 15:43:33 2013 New Revision: 1501341 URL: http://svn.apache.org/r1501341 Log: Update default version in test. Modified: tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Modified: tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java?rev=1501341&r1=1501340&r2=1501341&view=diff == --- tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java (original) +++ tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Tue Jul 9 15:43:33 2013 @@ -38,7 +38,7 @@ public class TestWebXml { // Defaults Assert.assertEquals(3, webxml.getMajorVersion()); -Assert.assertEquals(0, webxml.getMinorVersion()); +Assert.assertEquals(1, webxml.getMinorVersion()); // Both get changed webxml.setVersion("2.5"); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Bugzilla component for Tomcat-Utils?
On 09.07.2013 09:20, Jeremy Boynes wrote: > Is it worth adding one for tomcat-util to be distinct from Catalina and > Jasper? Done: added Component "Util" to Tomcat 8. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Bugzilla component for Tomcat-Utils?
On 09.07.2013 09:20, Jeremy Boynes wrote: > Is it worth adding one for tomcat-util to be distinct from Catalina and > Jasper? Done: added Component "Util" to Tomcat 8. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55171] [jsr 356] All server threads become blocked after some websocket testing
https://issues.apache.org/bugzilla/show_bug.cgi?id=55171 --- Comment #8 from Mark Thomas --- OK. Not what I was expecting but thanks for the information. -- 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
[Bug 55171] [jsr 356] All server threads become blocked after some websocket testing
https://issues.apache.org/bugzilla/show_bug.cgi?id=55171 --- Comment #9 from Mark Thomas --- I'm not sure how it ended up this way (I cleary wasn't paying attention to this particular refactoring) but we have timeouts for non-blocking / async messages but not for blocking / sync messages. That looks very much like an oversight in the spec to me. I'll look into providing a default timeout for blocking messages (I'm thinking 5 seconds) and a way for users to override that - probably via setting a user property on the session. -- 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: r1501478 - in /tomcat/tc7.0.x/trunk: ./ java/javax/el/MapELResolver.java test/javax/el/TestMapELResolver.java webapps/docs/changelog.xml
Author: violetagg Date: Tue Jul 9 19:25:22 2013 New Revision: 1501478 URL: http://svn.apache.org/r1501478 Log: Merged revision 1501266 from tomcat/trunk: javax.el.MapELResolver: 1. According to javadoc when creating FeatureDescriptors - ShortDescription must be empty string - ELResolver.RESOLVABLE_AT_DESIGN_TIME must be TRUE 2. Unit tests are added Added: tomcat/tc7.0.x/trunk/test/javax/el/TestMapELResolver.java - copied, changed from r1501266, tomcat/trunk/test/javax/el/TestMapELResolver.java Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/javax/el/MapELResolver.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1501266 Modified: tomcat/tc7.0.x/trunk/java/javax/el/MapELResolver.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/el/MapELResolver.java?rev=1501478&r1=1501477&r2=1501478&view=diff == --- tomcat/tc7.0.x/trunk/java/javax/el/MapELResolver.java (original) +++ tomcat/tc7.0.x/trunk/java/javax/el/MapELResolver.java Tue Jul 9 19:25:22 2013 @@ -124,11 +124,12 @@ public class MapELResolver extends ELRes key = itr.next(); desc = new FeatureDescriptor(); desc.setDisplayName(key.toString()); +desc.setShortDescription(""); desc.setExpert(false); desc.setHidden(false); desc.setName(key.toString()); desc.setPreferred(true); -desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE); +desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE); desc.setValue(TYPE, key.getClass()); feats.add(desc); } Copied: tomcat/tc7.0.x/trunk/test/javax/el/TestMapELResolver.java (from r1501266, tomcat/trunk/test/javax/el/TestMapELResolver.java) URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/javax/el/TestMapELResolver.java?p2=tomcat/tc7.0.x/trunk/test/javax/el/TestMapELResolver.java&p1=tomcat/trunk/test/javax/el/TestMapELResolver.java&r1=1501266&r2=1501478&rev=1501478&view=diff == --- tomcat/trunk/test/javax/el/TestMapELResolver.java (original) +++ tomcat/tc7.0.x/trunk/test/javax/el/TestMapELResolver.java Tue Jul 9 19:25:22 2013 @@ -25,6 +25,8 @@ import java.util.Map; import org.junit.Assert; import org.junit.Test; +import org.apache.jasper.el.ELContextImpl; + public class TestMapELResolver { /** @@ -51,11 +53,10 @@ public class TestMapELResolver { @Test public void testGetType03() { MapELResolver mapELResolver = new MapELResolver(); -ELContext context = new StandardELContext( -ELManager.getExpressionFactory()); +ELContext context = new ELContextImpl(); -Class result = mapELResolver.getType(context, new HashMap<>(), -"test"); +Class result = mapELResolver.getType(context, +new HashMap(), "test"); Assert.assertEquals(Object.class, result); Assert.assertTrue(context.isPropertyResolved()); @@ -85,10 +86,9 @@ public class TestMapELResolver { @Test public void testGetValue03() { MapELResolver mapELResolver = new MapELResolver(); -ELContext context = new StandardELContext( -ELManager.getExpressionFactory()); +ELContext context = new ELContextImpl(); -Map map = new HashMap<>(); +Map map = new HashMap(); map.put("key", "value"); Object result = mapELResolver.getValue(context, map, "key"); @@ -125,11 +125,10 @@ public class TestMapELResolver { @Test(expected = PropertyNotWritableException.class) public void testSetValue03() { MapELResolver mapELResolver = new MapELResolver(true); -ELContext context = new StandardELContext( -ELManager.getExpressionFactory()); +ELContext context = new ELContextImpl(); -mapELResolver.setValue(context, new HashMap<>(), new Object(), -new Object()); +mapELResolver.setValue(context, new HashMap(), +new Object(), new Object()); } /** @@ -138,10 +137,9 @@ public class TestMapELResolver { @Test public void testSetValue04() { MapELResolver mapELResolver = new MapELResolver(); -ELContext context = new StandardELContext( -ELManager.getExpressionFactory()); +ELContext context = new ELContextImpl(); -Map map = new HashMap<>(); +Map map = new HashMap(); mapELResolver.setValue(context, map, "key", "value"); Assert.assertEquals("value", @@ -155,10 +153,10 @@ public class TestMapELResolver { @Test(expected = Proper
svn commit: r1501512 - in /tomcat/trunk: java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java webapps/docs/web-socket-howto.xml
Author: markt Date: Tue Jul 9 20:08:08 2013 New Revision: 1501512 URL: http://svn.apache.org/r1501512 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55171 Add a default timeout of 5s to all blocking writes and make the timeout user configurable. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java tomcat/trunk/webapps/docs/web-socket-howto.xml Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java?rev=1501512&r1=1501511&r2=1501512&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java Tue Jul 9 20:08:08 2013 @@ -52,6 +52,12 @@ public abstract class WsRemoteEndpointIm private static final StringManager sm = StringManager.getManager(Constants.PACKAGE_NAME); +// Milliseconds so this is 5 seconds +private static final long DEFAULT_BLOCKING_SEND_TIMEOUT = 5 * 1000; + +public static final String BLOCKING_SEND_TIMEOUT_PROPERTY = +"org.apache.tomcat.websocket.BLOCKING_SEND_TIMEOUT"; + private final Log log = LogFactory.getLog(WsRemoteEndpointImplBase.class); private boolean messagePartInProgress = false; @@ -76,7 +82,6 @@ public abstract class WsRemoteEndpointIm private WsSession wsSession; private List encoderEntries = new ArrayList<>(); - public long getSendTimeout() { return sendTimeout; } @@ -187,8 +192,14 @@ public abstract class WsRemoteEndpointIm TextMessageSendHandler tmsh = new TextMessageSendHandler(f2sh, part, last, encoder, encoderBuffer, this); tmsh.write(); -f2sh.get(); -} catch (InterruptedException | ExecutionException e) { +long timeout = getBlockingSendTimeout(); +if (timeout == -1) { +f2sh.get(); +} else { +f2sh.get(timeout, TimeUnit.MILLISECONDS); +} +} catch (InterruptedException | ExecutionException | +TimeoutException e) { throw new IOException(e); } } @@ -199,8 +210,14 @@ public abstract class WsRemoteEndpointIm FutureToSendHandler f2sh = new FutureToSendHandler(); startMessage(opCode, payload, last, f2sh); try { -f2sh.get(); -} catch (InterruptedException | ExecutionException e) { +long timeout = getBlockingSendTimeout(); +if (timeout == -1) { +f2sh.get(); +} else { +f2sh.get(timeout, TimeUnit.MILLISECONDS); +} +} catch (InterruptedException | ExecutionException | +TimeoutException e) { throw new IOException(e); } } @@ -339,6 +356,21 @@ public abstract class WsRemoteEndpointIm } +private long getBlockingSendTimeout() { +Object obj = wsSession.getUserProperties().get( +BLOCKING_SEND_TIMEOUT_PROPERTY); +Long userTimeout = null; +if (obj instanceof Long) { +userTimeout = (Long) obj; +} +if (userTimeout == null) { +return DEFAULT_BLOCKING_SEND_TIMEOUT; +} else { +return userTimeout.longValue(); +} +} + + private static class MessagePart { private final byte opCode; private final ByteBuffer payload; Modified: tomcat/trunk/webapps/docs/web-socket-howto.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/web-socket-howto.xml?rev=1501512&r1=1501511&r2=1501512&view=diff == --- tomcat/trunk/webapps/docs/web-socket-howto.xml (original) +++ tomcat/trunk/webapps/docs/web-socket-howto.xml Tue Jul 9 20:08:08 2013 @@ -34,41 +34,34 @@ Tomcat provides support for WebSocket as defined by - http://tools.ietf.org/html/rfc6455";>RFC 6455. This feature is - not yet finalised and you are encouraged to provide feedback in the form - of bug reports (via - https://issues.apache.org/bugzilla";>Bugzilla), suggested API - changes (via the - http://tomcat.apache.org/lists.html#tomcat-dev";>dev list) or - other comments (again via the - http://tomcat.apache.org/lists.html#tomcat-dev";>dev list). + http://tools.ietf.org/html/rfc6455";>RFC 6455. -The API used for application development has not yet been finalised. Rather - than document something here that will quickly be out of date, please see the - Javadoc for the - - org.apache.catalina.websocket package. The Javadoc - pages are not included with Tomcat binary distributions. To view them - locally you would have to download and install
[Bug 55171] [jsr 356] All server threads become blocked after some websocket testing
https://issues.apache.org/bugzilla/show_bug.cgi?id=55171 --- Comment #10 from Mark Thomas --- I've added a default timeout of 5s to all blocking writes to trunk. That should resolve the issues you see. If you could repeat your test and report back that would be very helpful. -- 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: r1501530 - in /tomcat/trunk/java/org/apache/tomcat/websocket: AsyncChannelWrapperSecure.java LocalStrings.properties
Author: markt Date: Tue Jul 9 20:21:35 2013 New Revision: 1501530 URL: http://svn.apache.org/r1501530 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55221 Shorten message and make it more useful. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1501530&r1=1501529&r2=1501530&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java Tue Jul 9 20:21:35 2013 @@ -296,6 +296,8 @@ public class AsyncChannelWrapperSecure i // store all of the data throw new IOException(sm.getString( "asyncChannelWrapperSecure.readOverflow", +Integer.valueOf( +socketReadBuffer.remaining()), Integer.valueOf(dest.limit()), Integer.valueOf(dest.position(; } else { Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1501530&r1=1501529&r2=1501530&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Tue Jul 9 20:21:35 2013 @@ -17,7 +17,7 @@ asyncChannelWrapperSecure.closeFail=Fail asyncChannelWrapperSecure.concurrentRead=Concurrent read operations are not permitted asyncChannelWrapperSecure.concurrentWrite=Concurrent write operations are not permitted asyncChannelWrapperSecure.eof=Unexpected end of stream -asyncChannelWrapperSecure.readOverflow=Unable to complete read due to destination buffer overflow. Destination is [{0}] bytes in size and currently contains [{1}] bytes. +asyncChannelWrapperSecure.readOverflow=Buffer overflow unwrapping [{0}] bytes into a [{1}] byte buffer that already contained [{2}] bytes. asyncChannelWrapperSecure.statusUnwrap=Unexpected Status of SSLEngineResult after an unwrap() operation asyncChannelWrapperSecure.statusWrap=Unexpected Status of SSLEngineResult after a wrap() operation asyncChannelWrapperSecure.tooBig=The result [{0}] is too big to be expressed as an Integer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55221] [websocket] Session is closed without notification
https://issues.apache.org/bugzilla/show_bug.cgi?id=55221 --- Comment #2 from Mark Thomas --- I've fixed the immediate issue in trunk and provided some more information in the message. I'll look into truncating overly long close reasons. -- 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: r1501548 - in /tomcat/trunk: java/org/apache/tomcat/websocket/WsSession.java test/org/apache/tomcat/websocket/TestWsSession.java
Author: markt Date: Tue Jul 9 21:01:37 2013 New Revision: 1501548 URL: http://svn.apache.org/r1501548 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55221 Truncate excessively long clean reasons before sending as control messages are strictly limited in length. Added: tomcat/trunk/test/org/apache/tomcat/websocket/TestWsSession.java (with props) Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java?rev=1501548&r1=1501547&r2=1501548&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java Tue Jul 9 21:01:37 2013 @@ -48,6 +48,12 @@ import org.apache.tomcat.util.res.String public class WsSession implements Session { private static final Charset UTF8 = Charset.forName("UTF8"); +// An ellipsis is a single character that looks like three periods in a row +// and is used to indicate a continuation. +private static final byte[] ELLIPSIS_BYTES = "\u2026".getBytes(UTF8); +// An ellipsis is three bytes in UTF-8 +private static final int ELLIPSIS_BYTES_LEN = ELLIPSIS_BYTES.length; + private static final StringManager sm = StringManager.getManager(Constants.PACKAGE_NAME); private static AtomicLong ids = new AtomicLong(0); @@ -450,9 +456,10 @@ public class WsSession implements Sessio // 125 is maximum size for the payload of a control message ByteBuffer msg = ByteBuffer.allocate(125); msg.putShort((short) closeReason.getCloseCode().getCode()); + String reason = closeReason.getReasonPhrase(); if (reason != null && reason.length() > 0) { -msg.put(reason.getBytes(UTF8)); +appendCloseReasonWithTruncation(msg, reason); } msg.flip(); try { @@ -470,6 +477,35 @@ public class WsSession implements Sessio } +/** + * Use protected so unit tests can access this method directly. + */ +protected static void appendCloseReasonWithTruncation(ByteBuffer msg, +String reason) { +// Once the close code has been added there are a maximum of 123 bytes +// left for the reason phrase. If it is truncated then care needs to be +// taken to ensure the bytes are not truncated in the middle of a +// multi-byte UTF-8 character. +byte[] reasonBytes = reason.getBytes(UTF8); + +if (reasonBytes.length <= 123) { +// No need to truncate +msg.put(reasonBytes); +} else { +// Need to truncate +int remaining = 123 - ELLIPSIS_BYTES_LEN; +int pos = 0; +byte[] bytesNext = reason.substring(pos, pos + 1).getBytes(UTF8); +while (remaining >= bytesNext.length) { +msg.put(bytesNext); +remaining -= bytesNext.length; +pos++; +bytesNext = reason.substring(pos, pos + 1).getBytes(UTF8); +} +msg.put(ELLIPSIS_BYTES); +} +} + @Override public URI getRequestURI() { checkState(); Added: tomcat/trunk/test/org/apache/tomcat/websocket/TestWsSession.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWsSession.java?rev=1501548&view=auto == --- tomcat/trunk/test/org/apache/tomcat/websocket/TestWsSession.java (added) +++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWsSession.java Tue Jul 9 21:01:37 2013 @@ -0,0 +1,107 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.websocket; + +import java.nio.ByteBuffer; + +import org.junit.Assert; +import org.junit.Test; + +public class TestWsSession { + +@Test +public void testAppendCloseReasonWithTruncation01() { +doTestAppendCloseReasonWithTruncation(100); +} + + +@Test +public void testAppendClose
[Bug 55221] [websocket] Session is closed without notification
https://issues.apache.org/bugzilla/show_bug.cgi?id=55221 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Mark Thomas --- I've added truncation of the close reason phrase. Any reason > 123 bytes in length (the first two bytes are the clse code) is truncated at a character boundary to 120 characters or less and an ellipsis is appended to indicate that the message has been truncated. -- 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
[Bug 55220] Tomcat adding trailing slash when directory exists
https://issues.apache.org/bugzilla/show_bug.cgi?id=55220 --- Comment #3 from japgo...@gmail.com --- My servlet is mapped to /* so shouldn't that pickup /foo? When you say "the rules for welcome files will be applied" can you help me understand where/how that happens? Ideally I'd like a way to disable or preempt those rules in my Tomcat instance. I'm asking because there are many frameworks these days that expect to catch all requests in a single servlet and route internally. This isn't an isolated use case. If someone had a large application surely they wouldn't be expected to have to hand-edit their web.xml adding potentially hundreds of lines of explicit URL mappings to the same servlet as /*. That would be a significant deterrent coming from other web servers like Jetty. -- 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
[Bug 55228] New: AbstractHttp11Processor overwrites Date header, even when set by application
https://issues.apache.org/bugzilla/show_bug.cgi?id=55228 Bug ID: 55228 Summary: AbstractHttp11Processor overwrites Date header, even when set by application Product: Tomcat 6 Version: 6.0.37 Hardware: All OS: All Status: NEW Severity: major Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: f...@alum.mit.edu If the application sets the Date header, then it is most likely for caching purposes and Tomcat needs to return it as is. A consistent Date header is very important for proper Age/Max-Age calculations. http://www.w3.org/Protocols/HTTP/Issues/add-age.html -- 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
[Bug 55228] AbstractHttp11Processor overwrites Date header, even when set by application
https://issues.apache.org/bugzilla/show_bug.cgi?id=55228 --- Comment #1 from f...@alum.mit.edu --- I opened this bug against Tomcat6 since that is what we're using, but this bug exists on all Tomcat7, as well, and most likely Tomcat8. I'm not sure how to deal with that. Looking at tomcat-embed-core-7.0.42.jar: AbstractHttp11Processor.prepareResponse line: 1458 // Add date header headers.setValue("Date").setString(FastHttpDateFormat.getCurrentDate()); You see that it sets the Date header, not checking if it had been already set by that application. Should be able to easily wrap it with: if ( headers.getValue("Date") == null ) { ... } -- 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
[Bug 55228] AbstractHttp11Processor overwrites Date header, even when set by application
https://issues.apache.org/bugzilla/show_bug.cgi?id=55228 f...@alum.mit.edu changed: What|Removed |Added CC||f...@alum.mit.edu -- 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
[Bug 55230] New: DirContextURLConnection.getInputStream() fails to reopen resources for ProxyDirContext
https://issues.apache.org/bugzilla/show_bug.cgi?id=55230 Bug ID: 55230 Summary: DirContextURLConnection.getInputStream() fails to reopen resources for ProxyDirContext Product: Tomcat 7 Version: 7.0.39 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: zik...@gmail.com There appears to be a bug in the DirContextURLConnection where it fails to reopen the resource in the getInputStream method when its context is a ProxyDirContext. The DirContextURLConnection's connect method has some special case code for the ProxyDirContext where it's stripping the hostName and the contextPath off of the path given by the URL, and then using that stripped path in its context.lookup call. This part works great. However, in the getInputStream method the DirContextURLConnection attempts to reopen the resource without doing this special case logic on the path used in the context lookup. It tries to look up the resource with the raw path from the URL object, which fails. A NamingException is thrown, which is swallowed, and the potentially stale resource from the initial call to connect is returned instead. In my application this isn't causing a logic issue because the resources I'm looking up aren't changing between the initial connection and the first call to getInputStream, but this bug is manifesting as a notable performance problem. Every time a bad path is passed into the ProxyDirContext it's actually causing quite a lot of NamingExceptions to be thrown as it tries alternative paths (see BaseDirContext.lookup). All of these exceptions are swallowed but what I'm seeing is that this is happening many times over the course of a request as my application is looking up different resources, and the time it takes to build all of these swallowed NamingExceptions has become significant. -- 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
[Bug 55231] New: NPE and incorrect version detection in JspC
https://issues.apache.org/bugzilla/show_bug.cgi?id=55231 Bug ID: 55231 Summary: NPE and incorrect version detection in JspC Product: Tomcat 8 Version: trunk Hardware: PC OS: Mac OS X 10.4 Status: NEW Severity: normal Priority: P2 Component: Jasper Assignee: dev@tomcat.apache.org Reporter: jboy...@apache.org JspC's JspConfig now reads version and jsp-config information from the ServletContext. It uses getMajorVersion() which returns the maximum version supported by the container. It should use getEffectiveVersion() to use the version of the web application. ServletContext.getJspConfigDescriptor() can return null if there is no in the web.xml. JspConfig does not allow for this and will throw a NPE e.g. if there is no web.xml in the application. -- 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
[Bug 55231] NPE and incorrect version detection in JspC
https://issues.apache.org/bugzilla/show_bug.cgi?id=55231 --- Comment #1 from Jeremy Boynes --- Created attachment 30574 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30574&action=edit Patch extracted from 53737 that fixes these Extracted changes to JspConfig from 53737 proposal that fixes these issues. The large patch also cleaned up JspConfig to simplify initialization (it does not need to be lazy for JspC), to use Collection instead of Vector to match the spec, to avoid unnecessary copying of the common JspProperty, and to use Java5 foreach. -- 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