svn commit: r1544072 - in /tomcat/trunk/java/org/apache/tomcat/websocket: LocalStrings.properties WsRemoteEndpointImplBase.java
Author: markt Date: Thu Nov 21 09:11:07 2013 New Revision: 1544072 URL: http://svn.apache.org/r1544072 Log: Continuing the https://issues.apache.org/bugzilla/show_bug.cgi?id=55799 code review The check that only allowed control messages to be added to the queue is not valid so remove it. If a control message is sent in the middle of a sequence of text message parts when the current text part completes and the control message is sent there is a strong chance that the next text message part will need to be queued until the control message completes. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 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=1544072&r1=1544071&r2=1544072&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Thu Nov 21 09:11:07 2013 @@ -57,7 +57,6 @@ wsRemoteEndpoint.closedWriter=This metho wsRemoteEndpoint.changeType=When sending a fragmented message, all fragments bust be of the same type wsRemoteEndpoint.concurrentMessageSend=Messages may not be sent concurrently even when using the asynchronous send messages. The client must wait for the previous message to complete before sending the next. wsRemoteEndpoint.flushOnCloseFailed=Flushing batched messages before closing the session failed -wsRemoteEndpoint.inProgress=Unexpected state. Please report a bug. Message will not be sent because the WebSocket session is currently sending another message wsRemoteEndpoint.invalidEncoder=The specified encoder of type [{0}] could not be instantiated wsRemoteEndpoint.noEncoder=No encoder specified for object of class [{0}] wsRemoteEndpoint.wrongState=The remote endpoint was in state [{0}] which is an invalid state for called method 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=1544072&r1=1544071&r2=1544072&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java Thu Nov 21 09:11:07 2013 @@ -258,14 +258,14 @@ public abstract class WsRemoteEndpointIm } } if (messagePartInProgress) { -// This must be a Control message else the state machine would -// have thrown an IllegalStateException. -// Leave the check in place for now. -// TODO Remove this check if there are no reports of problems -if (!Util.isControl(opCode)) { -throw new IllegalStateException( -sm.getString("wsRemoteEndpoint.inProgress")); -} +// When a control message is sent while another message is being +// the control message is queued. Chances are the subsequent +// data message part will end up queued while the control +// message is sent. The logic in this class (state machine, +// EndMessageHanlder, TextMessageSendHandler) ensures that there +// will only ever be one data message part in the queue. There +// could be multiple control messages in the queue. + // Add it to the queue messagePartQueue.add(mp); } else { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1544075 - in /tomcat/trunk/java/org/apache/tomcat/websocket: LocalStrings.properties WsRemoteEndpointImplBase.java
Author: markt Date: Thu Nov 21 09:35:51 2013 New Revision: 1544075 URL: http://svn.apache.org/r1544075 Log: More https://issues.apache.org/bugzilla/show_bug.cgi?id=55799 If the connection is closed mid-message, report this cleanly back to the caller. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 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=1544075&r1=1544074&r2=1544075&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Thu Nov 21 09:35:51 2013 @@ -52,6 +52,7 @@ wsFrame.textMessageTooBig=The decoded te wsFrame.wrongRsv=The client frame set the reserved bits to [{0}] which was not supported by this endpoint wsRemoteEndpoint.closed=Message will not be sent because the WebSocket session has been closed +wsRemoteEndpoint.closedDuringMessage=The remainder of the message will not be sent because the WebSocket session has been closed wsRemoteEndpoint.closedOutputStream=This method may not be called as the OutputStream has been closed wsRemoteEndpoint.closedWriter=This method may not be called as the Writer has been closed wsRemoteEndpoint.changeType=When sending a fragmented message, all fragments bust be of the same type 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=1544075&r1=1544074&r2=1544075&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java Thu Nov 21 09:35:51 2013 @@ -66,7 +66,7 @@ public abstract class WsRemoteEndpointIm private final Object messagePartLock = new Object(); // State -private boolean closed = false; +private volatile boolean closed = false; private boolean fragmented = false; private boolean nextFragmented = false; private boolean text = false; @@ -605,7 +605,7 @@ public abstract class WsRemoteEndpointIm } -private static class TextMessageSendHandler implements SendHandler { +private class TextMessageSendHandler implements SendHandler { private final SendHandler handler; private final CharBuffer message; @@ -645,6 +645,10 @@ public abstract class WsRemoteEndpointIm handler.onResult(result); } else if(!result.isOK()) { handler.onResult(result); +} else if (closed){ +SendResult sr = new SendResult(new IOException( +sm.getString("wsRemoteEndpoint.closedDuringMessage"))); +handler.onResult(sr); } else { write(); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55799] [websocket] Stability issues when concurrently sending large messages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55799 --- Comment #12 from Mark Thomas --- (In reply to Mark Thomas from comment #11) > The IllegalStateException (closed) might be OK but I need to confirm. It is OK but could be handled better so I have improved the handling of this. > The IllegalStateException (report a bug) shouldn't happen so I want to look > at this some more. The logic was wrong here so it has been fixed. > The "Received new data frame but previous continuous frame is unfinished." > definitely shouldn't happen. Need to look into that as well. I suspect that these were a result of the logic errors. 8.0.x has been updated. As I still can't reproduce this I'd again appreciate your help with testing. -- 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: r1544082 - /tomcat/trunk/webapps/docs/config/context.xml
Author: markt Date: Thu Nov 21 10:13:20 2013 New Revision: 1544082 URL: http://svn.apache.org/r1544082 Log: Be more explicit about what the xmlNamespaceAware attribute controls Modified: tomcat/trunk/webapps/docs/config/context.xml Modified: tomcat/trunk/webapps/docs/config/context.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1544082&r1=1544081&r2=1544082&view=diff == --- tomcat/trunk/webapps/docs/config/context.xml (original) +++ tomcat/trunk/webapps/docs/config/context.xml Thu Nov 21 10:13:20 2013 @@ -514,10 +514,15 @@ -If the value of this flag is true, the validation of -XML files will be namespace-aware. If you turn this flag on, -you should probably also turn xmlValidation on. If -the org.apache.catalina.STRICT_SERVLET_COMPLIANCE +If the value of this flag is true, the parsing of +web.xml and web-fragment.xml files for this +web application will be namespace-aware. Note that *.tld, +*.jspx and *.tagx files are always parsed +using a namespace-aware parser and that the tagPlugins.xml +file (if any) is never parsed using a namespace-aware parser. Note also +that if you turn this flag on, you should probably also turn +xmlValidation on. If the +org.apache.catalina.STRICT_SERVLET_COMPLIANCE system property is set to true, the default value of this attribute will be true, else the default value will be false. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1544084 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/config/context.xml
Author: markt Date: Thu Nov 21 10:18:07 2013 New Revision: 1544084 URL: http://svn.apache.org/r1544084 Log: Be more explicit about what the xmlNamespaceAware attribute controls Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1544082 Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml?rev=1544084&r1=1544083&r2=1544084&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml Thu Nov 21 10:18:07 2013 @@ -537,10 +537,15 @@ -If the value of this flag is true, the validation of -XML files will be namespace-aware. If you turn this flag on, -you should probably also turn xmlValidation on. If -the org.apache.catalina.STRICT_SERVLET_COMPLIANCE +If the value of this flag is true, the parsing of +web.xml and web-fragment.xml files for this +web application will be namespace-aware. Note that *.tld, +*.jspx and *.tagx files are always parsed +using a namespace-aware parser and that the tagPlugins.xml +file (if any) is never parsed using a namespace-aware parser. Note also +that if you turn this flag on, you should probably also turn +xmlValidation on. If the +org.apache.catalina.STRICT_SERVLET_COMPLIANCE system property is set to true, the default value of this attribute will be true, else the default value will be false. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55806] New: Using the Http11NioProtocol in the SSL connector images get truncated
https://issues.apache.org/bugzilla/show_bug.cgi?id=55806 Bug ID: 55806 Summary: Using the Http11NioProtocol in the SSL connector images get truncated Product: Tomcat 7 Version: 7.0.42 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Connectors Assignee: dev@tomcat.apache.org Reporter: geniode...@gmail.com Created attachment 31062 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31062&action=edit the server.xml file I switched my site to https and i found that all the images get truncated, in firebug i see that the request ends with 200 response but the content is 0 bytes. if i put the HTTP/1.1 protocol everything goes back to normality, this is my configuration of the connector : -- 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: r1544139 - /tomcat/trunk/java/org/apache/catalina/Globals.java
Author: markt Date: Thu Nov 21 11:54:19 2013 New Revision: 1544139 URL: http://svn.apache.org/r1544139 Log: Update comment Modified: tomcat/trunk/java/org/apache/catalina/Globals.java Modified: tomcat/trunk/java/org/apache/catalina/Globals.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Globals.java?rev=1544139&r1=1544138&r2=1544139&view=diff == --- tomcat/trunk/java/org/apache/catalina/Globals.java (original) +++ tomcat/trunk/java/org/apache/catalina/Globals.java Thu Nov 21 11:54:19 2013 @@ -69,8 +69,8 @@ public final class Globals { /** - * The JNDI directory context which is associated with the context. This - * context can be used to manipulate static files. + * The WebResourceRoot which is associated with the context. This can be + * used to manipulate static files. */ public static final String RESOURCES_ATTR = "org.apache.catalina.resources"; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55806] Using the Http11NioProtocol in the SSL connector images get truncated
https://issues.apache.org/bugzilla/show_bug.cgi?id=55806 Konstantin Kolinko changed: What|Removed |Added OS||All --- Comment #1 from Konstantin Kolinko --- > Created attachment 31062 [details] > the server.xml file You are attaching working configuration? (protocol="HTTP/1.1"). > I see that the request ends with 200 response but the content is 0 bytes. 1. What connector name is reported in Tomcat startup log when it works and when it does not? E.g. "http-bio-8443". The protocol="HTTP/1.1" setting can select two different connector implementations, depending on a presence of tcnative library. 2. Does it happen with small files or with big ones? If this behaviour is caused by sendfile, there will be a threshold at 48 Kb. If it is a sendfile issue you should be able to work around it by specifying useSendfile="false" on your connector. 3. What are your operating system and java versions? 4. Is it reproducible with 7.0.47? (There have been an issue with APR connector in trunk, but you are reporting that you have a problem with NIO connector, so yours should be a different one. Implementations of sendfile in NIO and APR are substantially different. The APR one cannot be used with HTTPS. For reference, https://svn.apache.org/viewvc?view=revision&revision=1531659 http://tomcat.markmail.org/thread/em7lemcr7667ad4d That improvement/fix has not been ported to TC7 yet. ) -- 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 55806] Using the Http11NioProtocol in the SSL connector images get truncated
https://issues.apache.org/bugzilla/show_bug.cgi?id=55806 --- Comment #2 from Francesco Di Bartolo --- I was attaching the working configuration, i attached it only for sake of completeness. here the answers : 1. Informazioni: Starting ProtocolHandler ["http-nio-8443"] 2. ok i set this parameter : useSendfile="false" and it seems that now it is working well, what is this parameter for and why it has to be set only on ssl? 3. i deployed it on windows 7 and on CentOS linux and i get the same error (in windows with the usesendfile to false it is working, didn't try yet on linux), 4. i didn't try with tomcat 7.0.47 -- 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: r1544210 - /tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java
Author: markt Date: Thu Nov 21 15:20:28 2013 New Revision: 1544210 URL: http://svn.apache.org/r1544210 Log: Fix copy/paste oversight in r1544208 Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java?rev=1544210&r1=1544209&r2=1544210&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java Thu Nov 21 15:20:28 2013 @@ -416,9 +416,11 @@ public class Digester extends DefaultHan factory.setNamespaceAware(namespaceAware); // Preserve xmlns attributes -factory.setFeature( -"http://xml.org/sax/features/namespace-prefixes";, -true); +if (namespaceAware) { +factory.setFeature( +"http://xml.org/sax/features/namespace-prefixes";, +true); +} factory.setValidating(validating); if (validating) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1544198 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/jasper/ java/org/apache/jasper/compiler/ java/org/apache/jasper/xmlparser/
Author: markt Date: Thu Nov 21 14:49:30 2013 New Revision: 1544198 URL: http://svn.apache.org/r1544198 Log: Extend the reach of the Context attribute xmlValidation to cover XML parsing by Jasper the JSP engine. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/Globals.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/Constants.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/EmbeddedServletOptions.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/JspC.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/JspConfig.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/TagPluginManager.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1544165 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/Globals.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/Globals.java?rev=1544198&r1=1544197&r2=1544198&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/Globals.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/Globals.java Thu Nov 21 14:49:30 2013 @@ -14,18 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.apache.catalina; - /** * Global constants that are applicable to multiple packages within Catalina. * * @author Craig R. McClanahan * @version $Id$ */ - public final class Globals { /** @@ -310,4 +306,14 @@ public final class Globals { * the tomcat instance installation path */ public static final String CATALINA_BASE_PROP = "catalina.base"; + + +/** + * Name of the ServletContext attribute that determines if the JSP engine + * should validate *.tld, *.jspx and *.tagx files when parsing them. + * + * This must be kept in sync with org.apache.japser.Constants + */ +public static final String JASPER_XML_VALIDATION_ATTR = +"org.apache.jasper.XML_VALIDATE"; } Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1544198&r1=1544197&r2=1544198&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java Thu Nov 21 14:49:30 2013 @@ -235,6 +235,12 @@ public class ApplicationContext @Override public Object getAttribute(String name) { +// Special handling for XML validation as the context setting must +// always override anything that might have been set by an application. +if (Globals.JASPER_XML_VALIDATION_ATTR.equals(name) && +context.getXmlValidation()) { +return Boolean.TRUE; +} return (attributes.get(name)); } @@ -248,6 +254,11 @@ public class ApplicationContext public Enumeration getAttributeNames() { Set names = new HashSet(); names.addAll(attributes.keySet()); +// Special handling for XML validation as this attribute will always be +// available if validation has been enabled on the context +if (context.getXmlValidation()) { +names.add(Globals.JASPER_XML_VALIDATION_ATTR); +} return Collections.enumeration(names); } Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/Constants.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/Constants.java?rev=1544198&r1=1544197&r2=1544198&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/Constants.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/Constants.java Thu Nov 21 14:49:30 2013 @@ -14,14 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.jasper; import java.util.Arrays; import java.util.Collections; import java.util.List; - /** * Some constants and other global data th
[Bug 55801] Add ability to provide custom SSLContext for websocket client
https://issues.apache.org/bugzilla/show_bug.cgi?id=55801 --- Comment #2 from Christopher Schultz --- (In reply to Marek Jagielski from comment #1) > This patch would be useful also for those who cope with self-signed > certificates for test purposes. I'm just curious how this would help with self-signed certificates. What can you not accomplish with existing APIs/configuration? -- 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 55801] Add ability to provide custom SSLContext for websocket client
https://issues.apache.org/bugzilla/show_bug.cgi?id=55801 --- Comment #1 from Marek Jagielski --- Hello, What is the chance to have this patch integrated into trunk? I want to avoid keeping my fork of tomcat that is only for client code. This patch would be useful also for those who cope with self-signed certificates for test purposes. Thanks, Marek -- 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/5250 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1544165 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1544208 - in /tomcat/trunk/java/org/apache: jasper/compiler/JspDocumentParser.java tomcat/util/digester/Digester.java
Author: markt Date: Thu Nov 21 15:13:39 2013 New Revision: 1544208 URL: http://svn.apache.org/r1544208 Log: Align the XML parser configuration between the Digester (web.xml, web-fragment.xml, *.tld) and JspDocumentParser (*.jspx, *.tagx) Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java?rev=1544208&r1=1544207&r2=1544208&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java Thu Nov 21 15:13:39 2013 @@ -1423,16 +1423,24 @@ class JspDocumentParser throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); -factory.setNamespaceAware(true); +factory.setNamespaceAware(true); // Preserve xmlns attributes factory.setFeature( "http://xml.org/sax/features/namespace-prefixes";, true); + factory.setValidating(validating); -//factory.setFeature( -//"http://xml.org/sax/features/validation";, -//validating); +if (validating) { +// Enable DTD validation +factory.setFeature( +"http://xml.org/sax/features/validation";, +true); +// Enable schema validation +factory.setFeature( +"http://apache.org/xml/features/validation/schema";, +true); +} // Configure the parser SAXParser saxParser = factory.newSAXParser(); Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java?rev=1544208&r1=1544207&r2=1544208&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java Thu Nov 21 15:13:39 2013 @@ -413,7 +413,13 @@ public class Digester extends DefaultHan if (factory == null) { factory = SAXParserFactory.newInstance(); + factory.setNamespaceAware(namespaceAware); +// Preserve xmlns attributes +factory.setFeature( +"http://xml.org/sax/features/namespace-prefixes";, +true); + factory.setValidating(validating); if (validating) { // Enable DTD validation - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1544216 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/AbstractProtocol.java
Author: markt Date: Thu Nov 21 15:34:27 2013 New Revision: 1544216 URL: http://svn.apache.org/r1544216 Log: Protect against NPE. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1543897 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1544216&r1=1544215&r2=1544216&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java Thu Nov 21 15:34:27 2013 @@ -557,8 +557,12 @@ public abstract class AbstractProtocol i @SuppressWarnings("deprecation") // Old HTTP upgrade method has been deprecated public SocketState process(SocketWrapper wrapper, SocketStatus status) { -S socket = wrapper.getSocket(); +if (wrapper == null) { +// Nothing to do. Socket has been closed. +return SocketState.CLOSED; +} +S socket = wrapper.getSocket(); if (socket == null) { // Nothing to do. Socket has been closed. return SocketState.CLOSED; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55807] New: JSP's always marked as outdated with Jar Scanner Component configured with “scanAllDirectories” and referenced Taglib in WEB-INF/classes/META-INF
https://issues.apache.org/bugzilla/show_bug.cgi?id=55807 Bug ID: 55807 Summary: JSP's always marked as outdated with Jar Scanner Component configured with “scanAllDirectories” and referenced Taglib in WEB-INF/classes/META-INF Product: Tomcat 7 Version: 7.0.47 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Jasper Assignee: dev@tomcat.apache.org Reporter: it-media.her...@daimler.com consider the following (simplified) eclipse project configuration. web_base_jar (shared taglib etc.) web_war (uses web_base_jar) When developing our web project locally we use an exploded war layout. The compile output of web_base_jar is directly copied (not as a jar!) to the war’s web_war/WEB-INF/classes directory by our ide’s (eclipse with sysdeo plugin and intellij). Our shared taglib ends up here: web_war/WEB-INF/classes/META-INF/myTaglib.tld. The taglib is successfully picked up by the Jar Scanner configured with “scanAllDirectories”. This leads to the following generated jsp code when myTaglib is used: static { _jspx_dependants = new java.util.HashMap(1); _jspx_dependants.put("file:/somepath/pc_web_war_exploded/WEB-INF/classes/META-INF/ myTaglib.tld ", Long.valueOf(-1L)); } The relevant code for this snippet is in org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:173). Because the Taglib is a file uri (file:/C:/somepath/pc_web_war_exploded/WEB-INF/classes/META-INF/myTaglib.tld) it is not found by ApplicationContext#getResource and the method org.apache.jasper.JspCompilationContext.getLastModified(JspCompilationContext.java:437) returns -1 in this case. When the compiler checks if the current jsp is outdated it checks also all includes/dependants. Because myTaglib is in the dependants list of our jsps it is also checked. The check tests the lastModified timestamp of the file against -1 and returns always true. See here org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:519) This means that our jsps are recompiled on every request. We have some workarounds for this but it would be nice if this setup would work out of the box -- 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 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/5251 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1544210 Blamelist: markt Build succeeded! sincerely, -The Buildbot
[Bug 55792] EL expression containing a map is not parsed correctly. '}' is interpreted as closing brace of the EL expression.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55792 --- Comment #6 from Nick Williams --- I can confirm that this is fixed. Thanks! -- 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: r1544211 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/JspDocumentParser.java java/org/apache/tomcat/util/digester/Digester.java
Author: markt Date: Thu Nov 21 15:21:54 2013 New Revision: 1544211 URL: http://svn.apache.org/r1544211 Log: Align the XML parser configuration between the Digester (web.xml, web-fragment.xml, *.tld) and JspDocumentParser (*.jspx, *.tagx) Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/Digester.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1544208,1544210 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java?rev=1544211&r1=1544210&r2=1544211&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java Thu Nov 21 15:21:54 2013 @@ -1428,16 +1428,24 @@ class JspDocumentParser throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); -factory.setNamespaceAware(true); +factory.setNamespaceAware(true); // Preserve xmlns attributes factory.setFeature( "http://xml.org/sax/features/namespace-prefixes";, true); + factory.setValidating(validating); -//factory.setFeature( -//"http://xml.org/sax/features/validation";, -//validating); +if (validating) { +// Enable DTD validation +factory.setFeature( +"http://xml.org/sax/features/validation";, +true); +// Enable schema validation +factory.setFeature( +"http://apache.org/xml/features/validation/schema";, +true); +} // Configure the parser SAXParser saxParser = factory.newSAXParser(); Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/Digester.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/Digester.java?rev=1544211&r1=1544210&r2=1544211&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/Digester.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/Digester.java Thu Nov 21 15:21:54 2013 @@ -468,7 +468,15 @@ public class Digester extends DefaultHan if (factory == null) { factory = SAXParserFactory.newInstance(); + factory.setNamespaceAware(namespaceAware); +// Preserve xmlns attributes +if (namespaceAware) { +factory.setFeature( +"http://xml.org/sax/features/namespace-prefixes";, +true); +} + factory.setValidating(validating); if (validating) { // Enable DTD validation - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55799] [websocket] Stability issues when concurrently sending large messages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55799 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #14 from Mark Thomas --- Thanks for the testing. The slow shutdown could be caused by not correctly handling an IOException. That is something to follow-up in a separate BZ issue. -- 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
[GUMP@vmgump]: Project taglibs-standard-spec (in module tomcat-taglibs) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project taglibs-standard-spec has an issue affecting its community integration. This issue affects 1 projects. The current state of this project is 'Failed', with reason 'Missing Build Outputs'. For reference only, the following projects are affected by this: - taglibs-standard-spec : JSP Taglibs Full details are available at: http://vmgump.apache.org/gump/public/tomcat-taglibs/taglibs-standard-spec/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Sole jar output [taglibs-standard-spec-1.2-SNAPSHOT.jar] identifier set to project name -DEBUG- (Apache Gump generated) Apache Maven Settings in: /srv/gump/public/workspace/tomcat-taglibs/standard/spec/gump_mvn_settings.xml -DEBUG- Maven POM in: /srv/gump/public/workspace/tomcat-taglibs/standard/spec/pom.xml -INFO- Failed with reason missing build outputs -ERROR- Missing Output: /srv/gump/public/workspace/tomcat-taglibs/standard/spec/target/taglibs-standard-spec-1.2-SNAPSHOT.jar -ERROR- See Directory Listing Work for Missing Outputs -INFO- Failed to extract fallback artifacts from Gump Repository The following work was performed: http://vmgump.apache.org/gump/public/tomcat-taglibs/taglibs-standard-spec/gump_work/build_tomcat-taglibs_taglibs-standard-spec.html Work Name: build_tomcat-taglibs_taglibs-standard-spec (Type: Build) Work ended in a state of : Success Elapsed: 10 secs Command Line: /opt/maven2/bin/mvn --batch-mode --settings /srv/gump/public/workspace/tomcat-taglibs/standard/spec/gump_mvn_settings.xml install [Working Directory: /srv/gump/public/workspace/tomcat-taglibs/standard/spec] M2_HOME: /opt/maven2 - [INFO] Scanning for projects... Downloading: http://localhost:8192/maven2/org/apache/taglibs/taglibs-parent/3/taglibs-parent-3.pom 7K downloaded (taglibs-parent-3.pom) [INFO] [INFO] Building Apache Standard Taglib Specification API [INFO]task-segment: [install] [INFO] Downloading: http://localhost:8192/maven2/org/apache/maven/plugins/maven-checkstyle-plugin/2.6/maven-checkstyle-plugin-2.6.pom 12K downloaded (maven-checkstyle-plugin-2.6.pom) Downloading: http://localhost:8192/maven2/org/apache/maven/plugins/maven-checkstyle-plugin/2.6/maven-checkstyle-plugin-2.6.jar 80K downloaded (maven-checkstyle-plugin-2.6.jar) [INFO] [remote-resources:process {execution: default}] Downloading: http://localhost:8192/maven2/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.pom 157b downloaded (jsp-api-2.1.pom) Downloading: http://localhost:8192/maven2/javax/el/el-api/1.0/el-api-1.0.pom 184b downloaded (el-api-1.0.pom) Downloading: http://localhost:8192/maven2/javax/el/el-api/1.0/el-api-1.0.jar Downloading: http://localhost:8192/maven2/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar 23K downloaded (el-api-1.0.jar) 98K downloaded (jsp-api-2.1.jar) [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/main/resources [INFO] Copying 3 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Changes detected - recompiling the module! [INFO] Compiling 17 source files to /srv/gump/public/workspace/tomcat-taglibs/standard/spec/target/classes [WARNING] /srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedExpression.java: Some input files use unchecked or unsafe operations. [WARNING] /srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedExpression.java: Recompile with -Xlint:unchecked for details. [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/test/resources [INFO] Copying 3 resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] [bundle:bundle {execution: default-bundle}] [INFO] [install:install {execution: default-install}] [INFO] Installing /srv/gump/public/workspace/tomcat-taglibs/standard/spec/target/taglibs-standard-spec-1.2.2-SNAPSHOT.jar to /srv/gump/public/workspace/mvnlocalrepo/shared/org/apache/taglibs/taglibs-standard-spec/1.2.2-SNAPSHOT/taglibs-standard-spec-1.2.2-SNAPSHOT.jar [INFO] [bundle:install {execution: default-install}] [INFO] Writing OBR
[Bug 55799] [websocket] Stability issues when concurrently sending large messages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55799 --- Comment #13 from Konstantin Preißer --- Hi Mark, (In reply to Mark Thomas from comment #12) > 8.0.x has been updated. As I still can't reproduce this I'd again appreciate > your help with testing. I updated to r1544165 and I'm now unable to reproduce the Exceptions (besides the expected IOException) and the frame error that Google Chrome's console had shown, so I think it is now fixed. Thanks! (The only problem I got was that it took several minutes for Tomcat to shutdown after testing - it did not close the Websocket Connections and even after closing all browsers it took some minutes for Tomcat to complete shutdown.) -- 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
[GUMP@vmgump]: Project tomcat-tc7.0.x-test (in module tomcat-7.0.x) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-tc7.0.x-test has an issue affecting its community integration. This issue affects 1 projects. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-tc7.0.x-test : Tomcat 7.x, a web server implementing Java Servlet 3.0, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on junit exists, no need to add for property hamcrest.jar. -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property tomcat-dbcp-src.jar. -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property tomcat-dbcp.home. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-7.0.x/output/build/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test.html Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test (Type: Build) Work ended in a state of : Failed Elapsed: 1 sec Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-20131122.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20131122-native-src.tar.gz -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20131122-native-src.tar.gz -Dexamples.sources.skip=true -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps -Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20131122.jar -Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar -Dtest.accesslog=true -Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x -Dcommons-dbcp.home=/s rv/gump/public/workspace/commons-dbcp-1.x -Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20131122.jar -Dhamcrest.jar=/srv/gump/public/workspace/junit/dist/junit-20131122.jar test [Working Directory: /srv/gump/public/workspace/tomcat-7.0.x] CLASSPATH: /usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servle t-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-util.jar:/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20131122.jar:/srv/gump/public/workspace/apache-comm ons/daemon/dist/commo
[GUMP@vmgump]: Project tomcat-trunk-test (in module tomcat-trunk) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-trunk-test has an issue affecting its community integration. This issue affects 1 projects. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-trunk-test : Tomcat 8.x, a web server implementing the Java Servlet 3.1, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on junit exists, no need to add for property hamcrest.jar. -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -DEBUG- Dependency on tomcat-trunk exists, no need to add for property tomcat-dbcp.home. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-trunk/output/build/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.html Work Name: build_tomcat-trunk_tomcat-trunk-test (Type: Build) Work ended in a state of : Failed Elapsed: 1 sec Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-20131122.jar -Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20131122-native-src.tar.gz -Dexamples.sources.skip=true -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps -Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20131122.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20131122-native-src.tar.gz -Dtest.accesslog=true -Dcommons-pool.home=/srv/gump/public/workspace/apache-commons/pool -Dcommons-dbcp.home=/ srv/gump/public/workspace/apache-commons/dbcp -Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar -Dhamcrest.jar=/srv/gump/public/workspace/junit/dist/junit-20131122.jar -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test [Working Directory: /srv/gump/public/workspace/tomcat-trunk] CLASSPATH: /usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servle t-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat -trunk/output/build/lib/tomcat-spdy.jar:/srv/gump/public/workspace/tomcat-trunk/o
svn commit: r1544165 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/jasper/ java/org/apache/jasper/compiler/ java/org/apache/jasper/servlet/ webapps/docs/
Author: markt Date: Thu Nov 21 12:59:36 2013 New Revision: 1544165 URL: http://svn.apache.org/r1544165 Log: Extend the reach of the Context attribute xmlValidation to cover XML parsing by Jasper the JSP engine. Fix a TODO and enable validation (if required) for implicit TLD files. Modified: tomcat/trunk/java/org/apache/catalina/Globals.java tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java tomcat/trunk/java/org/apache/jasper/Constants.java tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java tomcat/trunk/java/org/apache/jasper/compiler/TldCache.java tomcat/trunk/java/org/apache/jasper/servlet/JasperInitializer.java tomcat/trunk/webapps/docs/config/context.xml Modified: tomcat/trunk/java/org/apache/catalina/Globals.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Globals.java?rev=1544165&r1=1544164&r2=1544165&view=diff == --- tomcat/trunk/java/org/apache/catalina/Globals.java (original) +++ tomcat/trunk/java/org/apache/catalina/Globals.java Thu Nov 21 12:59:36 2013 @@ -14,18 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.apache.catalina; - /** * Global constants that are applicable to multiple packages within Catalina. * * @author Craig R. McClanahan * @version $Id$ */ - public final class Globals { /** @@ -273,4 +269,14 @@ public final class Globals { * the tomcat instance installation path */ public static final String CATALINA_BASE_PROP = "catalina.base"; + + +/** + * Name of the ServletContext attribute that determines if the JSP engine + * should validate *.tld, *.jspx and *.tagx files when parsing them. + * + * This must be kept in sync with org.apache.japser.Constants + */ +public static final String JASPER_XML_VALIDATION_ATTR = +"org.apache.jasper.XML_VALIDATE"; } Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1544165&r1=1544164&r2=1544165&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Thu Nov 21 12:59:36 2013 @@ -221,6 +221,12 @@ public class ApplicationContext @Override public Object getAttribute(String name) { +// Special handling for XML validation as the context setting must +// always override anything that might have been set by an application. +if (Globals.JASPER_XML_VALIDATION_ATTR.equals(name) && +context.getXmlValidation()) { +return Boolean.TRUE; +} return (attributes.get(name)); } @@ -234,6 +240,11 @@ public class ApplicationContext public Enumeration getAttributeNames() { Set names = new HashSet<>(); names.addAll(attributes.keySet()); +// Special handling for XML validation as this attribute will always be +// available if validation has been enabled on the context +if (context.getXmlValidation()) { +names.add(Globals.JASPER_XML_VALIDATION_ATTR); +} return Collections.enumeration(names); } Modified: tomcat/trunk/java/org/apache/jasper/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/Constants.java?rev=1544165&r1=1544164&r2=1544165&view=diff == --- tomcat/trunk/java/org/apache/jasper/Constants.java (original) +++ tomcat/trunk/java/org/apache/jasper/Constants.java Thu Nov 21 12:59:36 2013 @@ -150,4 +150,13 @@ public class Constants { * the tomcat product installation path */ public static final String CATALINA_HOME_PROP = "catalina.home"; + + +/** + * Name of the ServletContext attribute that determines if the XML parsers + * used for *.tld, *.jspx and *.tagx files will be validating or not. + * + * This must be kept in sync with org.apache.catalina.Globals + */ +public static final String XML_VALIDATION_ATTR = "org.apache.jasper.XML_VALIDATE"; } Modified: tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java?rev=1544165&r1=1544164&r2=1544165&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java Thu
buildbot failure in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1563 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1544216 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
Re: svn commit: r1544165 - XML validation
On Nov 21, 2013, at 4:59 AM, ma...@apache.org wrote: > Author: markt > Date: Thu Nov 21 12:59:36 2013 > New Revision: 1544165 > > URL: http://svn.apache.org/r1544165 > Log: > Extend the reach of the Context attribute xmlValidation to cover XML parsing > by Jasper the JSP engine. > Fix a TODO and enable validation (if required) for implicit TLD files. JSP 6.2.4 raises issues around attempting to validate JSP Documents (.jspx and .tagx) due to the mixin's from the jsp: namespace. This could perhaps be enabled using a separate option from validation of the descriptors so users can validate the standard files but not need to add anything to the DOCTYPE/XSD for the application content. Looks like JasperInitializer now reads to read an attribute not an init-param. In trunk, I'd been trying to decouple Jasper from Catalina so having the latter set a jasper-specific attribute reverts that - in TC7 this is controlled for each JspServlet using a "validating" init-param (i.e. it does not inherit from the Context). I've been thinking of adding a descriptor file for Jasper (e.g. META-INF/jasper.xml to go alongside context.xml) which would contain configuration of the JSP engine that is currently split between context init-params, per-servlet init-params, and system properties. How about we configure validation there? Cheers Jeremy signature.asc Description: Message signed with OpenPGP using GPGMail