[VOTE] Release Apache Tomcat 7.0.29
The proposed Apache Tomcat 7.0.29 release is now available for voting. It can be obtained from: https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.29/ The Maven staging repo is: https://repository.apache.org/content/repositories/orgapachetomcat-014/ The svn tag is: http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_29/ The proposed 7.0.29 release is: [ ] Broken - do not release [ ] Stable - go ahead and release as 7.0.29 Stable Cheers, Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1356708 - /tomcat/tc5.5.x/trunk/STATUS.txt
Author: kkolinko Date: Tue Jul 3 13:04:45 2012 New Revision: 1356708 URL: http://svn.apache.org/viewvc?rev=1356708view=rev Log: proposal Modified: tomcat/tc5.5.x/trunk/STATUS.txt Modified: tomcat/tc5.5.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1356708r1=1356707r2=1356708view=diff == --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Tue Jul 3 13:04:45 2012 @@ -52,3 +52,33 @@ PATCHES PROPOSED TO BACKPORT: https://issues.apache.org/bugzilla/attachment.cgi?id=28895 +1: kkolinko, schultz -1: + +* Implement maxHeaderCount attribute on HTTP Connectors. + It is equivalent of LimitRequestFields directive of Apache HTTPD + See r1356239 in Tomcat 6. + + Notes: + 1. Implemented for HTTP protocol only. (MimeHeaders.setLimit() is called + by HTTP protocol processors only). + + I suppose that users of AJP can leverage the LimitRequestFields directive + in Apache HTTPD server. + + 2. The feature is manageable through JMX on the ProtocolHandler MBean. + + Unlike later Tomcat versions, I did not add setter/getter methods to + Connector class and did not expose the property on Connector MBean. + + Note that Catalina MBeans are not visible in Tomcat 5.5 by default. + See r1356696 for instructions. + + 3. To test the feature one can use +http://localhost:8080/servlets-examples/servlet/RequestHeaderExample + + Refreshing the page in Firefox changes the number of headers in incoming request + (+= 'cache-control' for F5, += 'pragma=no-cache' for Ctrl+F5 refresh). + + Patch: + http://people.apache.org/~kkolinko/patches/2012-07-03_tc55_maxHeaderCount_v1.patch + +1: kkolinko + -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53495] module-name provided with web.xml is not processed
https://issues.apache.org/bugzilla/show_bug.cgi?id=53495 --- Comment #3 from Violeta Georgieva violet...@apache.org --- ok 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: r1356849 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
Author: fhanik Date: Tue Jul 3 17:54:25 2012 New Revision: 1356849 URL: http://svn.apache.org/viewvc?rev=1356849view=rev Log: Allow servlets to specify async support as annotation when added programatically Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1356849r1=1356848r2=1356849view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Tue Jul 3 17:54:25 2012 @@ -29,6 +29,7 @@ import java.util.logging.Logger; import javax.servlet.Servlet; import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; import org.apache.catalina.Container; import org.apache.catalina.Context; @@ -801,11 +802,25 @@ public class Tomcat { @SuppressWarnings(deprecation) public ExistingStandardWrapper( Servlet existing ) { this.existing = existing; +this.asyncSupported = isAsyncSupported(); if (existing instanceof javax.servlet.SingleThreadModel) { singleThreadModel = true; instancePool = new StackServlet(); } +this.asyncSupported = hasAsync(); } + +public boolean hasAsync() { +if (isAsyncSupported()) return true; +boolean result = false; +Class clazz = existing.getClass(); +if (clazz.isAnnotationPresent(WebServlet.class)) { +WebServlet ws = (WebServlet)clazz.getAnnotation(WebServlet.class); +result = ws.asyncSupported(); +} +return result; +} + @Override public synchronized Servlet loadServlet() throws ServletException { if (singleThreadModel) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1356852 - in /tomcat/trunk/test/org/apache/catalina/startup: BytesStreamer.java TomcatBaseTest.java
Author: fhanik Date: Tue Jul 3 17:55:09 2012 New Revision: 1356852 URL: http://svn.apache.org/viewvc?rev=1356852view=rev Log: With async and non block unit tests we need a way to stream data up to the client, byte streamer offers an easy way to do that Added: tomcat/trunk/test/org/apache/catalina/startup/BytesStreamer.java (with props) Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Added: tomcat/trunk/test/org/apache/catalina/startup/BytesStreamer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/BytesStreamer.java?rev=1356852view=auto == --- tomcat/trunk/test/org/apache/catalina/startup/BytesStreamer.java (added) +++ tomcat/trunk/test/org/apache/catalina/startup/BytesStreamer.java Tue Jul 3 17:55:09 2012 @@ -0,0 +1,45 @@ +/* + * 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.catalina.startup; + +/** + * + * Used by {@link TomcatBaseTest} + * + * + */ +public interface BytesStreamer { +/** + * Returns the length of the content about to be streamed. + * Return -1 if length is unknown and chunked encoding should be used + * @return the length if known - otherwise -1 + */ +int getLength(); + +/** + * return the number of bytes available in next chunk + * @return + */ +int available(); + +/** + * returns the next byte to write. + * if {@link #available()} method returns 0 + * @return + */ +byte[] next(); +} Propchange: tomcat/trunk/test/org/apache/catalina/startup/BytesStreamer.java -- svn:eol-style = native Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1356852r1=1356851r2=1356852view=diff == --- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original) +++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Tue Jul 3 17:55:09 2012 @@ -285,9 +285,36 @@ public abstract class TomcatBaseTest ext return postUrl(body, path, out, null, resHead); } -public static int postUrl(byte[] body, String path, ByteChunk out, +public static int postUrl(final byte[] body, String path, ByteChunk out, MapString, ListString reqHead, MapString, ListString resHead) throws IOException { +BytesStreamer s = new BytesStreamer() { +boolean done = false; +@Override +public byte[] next() { +done = true; +return body; + +} + +@Override +public int getLength() { +return body.length; +} + +@Override +public int available() { +if (done) return 0; +else return body.length; +} +}; +return postUrl(false,s,path,out,reqHead,resHead); +} + + +public static int postUrl(boolean stream, BytesStreamer streamer, String path, ByteChunk out, +MapString, ListString reqHead, +MapString, ListString resHead) throws IOException { URL url = new URL(path); HttpURLConnection connection = @@ -307,15 +334,26 @@ public abstract class TomcatBaseTest ext valueList.toString()); } } +if (streamer != null stream) { +if (streamer.getLength()0) { +connection.setFixedLengthStreamingMode(streamer.getLength()); +} else { +connection.setChunkedStreamingMode(1024); +} +} + connection.connect(); // Write the request body OutputStream os = null; try { os = connection.getOutputStream(); -if (body != null) { -os.write(body, 0, body.length); +while (streamer!=null streamer.available()0) { +byte[] next =
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/3153 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1356852 Blamelist: fhanik BUILD FAILED: failed compile_1 sincerely, -The Buildbot
Re: svn commit: r1356849 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
On 03/07/2012 18:54, fha...@apache.org wrote: Author: fhanik Date: Tue Jul 3 17:54:25 2012 New Revision: 1356849 URL: http://svn.apache.org/viewvc?rev=1356849view=rev Log: Allow servlets to specify async support as annotation when added programatically Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1356849r1=1356848r2=1356849view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Tue Jul 3 17:54:25 2012 @@ -29,6 +29,7 @@ import java.util.logging.Logger; import javax.servlet.Servlet; import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; import org.apache.catalina.Container; import org.apache.catalina.Context; @@ -801,11 +802,25 @@ public class Tomcat { @SuppressWarnings(deprecation) public ExistingStandardWrapper( Servlet existing ) { this.existing = existing; +this.asyncSupported = isAsyncSupported(); I don't get what the purpose of the above line is given that asyncSupported is set again without apparently being used a few lines later. What am I missing? Mark if (existing instanceof javax.servlet.SingleThreadModel) { singleThreadModel = true; instancePool = new StackServlet(); } +this.asyncSupported = hasAsync(); } + +public boolean hasAsync() { +if (isAsyncSupported()) return true; +boolean result = false; +Class clazz = existing.getClass(); +if (clazz.isAnnotationPresent(WebServlet.class)) { +WebServlet ws = (WebServlet)clazz.getAnnotation(WebServlet.class); +result = ws.asyncSupported(); +} +return result; +} + @Override public synchronized Servlet loadServlet() throws ServletException { if (singleThreadModel) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1356867 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
Author: markt Date: Tue Jul 3 18:50:03 2012 New Revision: 1356867 URL: http://svn.apache.org/viewvc?rev=1356867view=rev Log: Fix NPE triggered by r1356852 Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1356867r1=1356866r2=1356867view=diff == --- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original) +++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Tue Jul 3 18:50:03 2012 @@ -304,7 +304,7 @@ public abstract class TomcatBaseTest ext @Override public int available() { -if (done) return 0; +if (done || body == null) return 0; else return body.length; } }; - 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
2012/7/3 build...@apache.org: 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/3153 NPE in TestStandardWrapper, both NIO and BIO: [[[ Testcase: testSecurityAnnotationsMethods2 took 0.106 sec Caused an ERROR null java.lang.NullPointerException at org.apache.catalina.startup.TomcatBaseTest$1.available(TomcatBaseTest.java:308) at org.apache.catalina.startup.TomcatBaseTest.postUrl(TomcatBaseTest.java:351) at org.apache.catalina.startup.TomcatBaseTest.postUrl(TomcatBaseTest.java:311) at org.apache.catalina.core.TestStandardWrapper.doTest(TestStandardWrapper.java:263) at org.apache.catalina.core.TestStandardWrapper.testSecurityAnnotationsMethods2(TestStandardWrapper.java:85) ]]] See logs here: http://ci.apache.org/projects/tomcat/tomcat8/logs/ -1356852/ Best regards, Konstantin Kolinko - 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/3154 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1356867 Blamelist: markt Build succeeded! sincerely, -The Buildbot
svn commit: r1356877 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
Author: fhanik Date: Tue Jul 3 19:25:32 2012 New Revision: 1356877 URL: http://svn.apache.org/viewvc?rev=1356877view=rev Log: remove line not needed Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1356877r1=1356876r2=1356877view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Tue Jul 3 19:25:32 2012 @@ -802,7 +802,6 @@ public class Tomcat { @SuppressWarnings(deprecation) public ExistingStandardWrapper( Servlet existing ) { this.existing = existing; -this.asyncSupported = isAsyncSupported(); if (existing instanceof javax.servlet.SingleThreadModel) { singleThreadModel = true; instancePool = new StackServlet(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
RE: svn commit: r1356849 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
-Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Tuesday, July 03, 2012 12:37 PM To: Tomcat Developers List Subject: Re: svn commit: r1356849 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java On 03/07/2012 18:54, fha...@apache.org wrote: Author: fhanik Date: Tue Jul 3 17:54:25 2012 New Revision: 1356849 URL: http://svn.apache.org/viewvc?rev=1356849view=rev Log: Allow servlets to specify async support as annotation when added programatically Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/start up/Tomcat.java?rev=1356849r1=1356848r2=1356849view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Tue Jul 3 17:54:25 2012 @@ -29,6 +29,7 @@ import java.util.logging.Logger; import javax.servlet.Servlet; import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; import org.apache.catalina.Container; import org.apache.catalina.Context; @@ -801,11 +802,25 @@ public class Tomcat { @SuppressWarnings(deprecation) public ExistingStandardWrapper( Servlet existing ) { this.existing = existing; +this.asyncSupported = isAsyncSupported(); I don't get what the purpose of the above line is given that asyncSupported is set again without apparently being used a few lines later. What am I missing? [Filip Hanik] That line will have to go. The other line ends up setting it to true if there is an annotation (default is false) Filip - 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
Will fix! -Original Message- From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Tuesday, July 03, 2012 12:51 PM To: Tomcat Developers List Subject: Re: buildbot failure in ASF Buildbot on tomcat-trunk 2012/7/3 build...@apache.org: 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/3153 NPE in TestStandardWrapper, both NIO and BIO: [[[ Testcase: testSecurityAnnotationsMethods2 took 0.106 sec Caused an ERROR null java.lang.NullPointerException at org.apache.catalina.startup.TomcatBaseTest$1.available(TomcatBaseTest.ja va:308) at org.apache.catalina.startup.TomcatBaseTest.postUrl(TomcatBaseTest.java:3 51) at org.apache.catalina.startup.TomcatBaseTest.postUrl(TomcatBaseTest.java:3 11) at org.apache.catalina.core.TestStandardWrapper.doTest(TestStandardWrapper. java:263) at org.apache.catalina.core.TestStandardWrapper.testSecurityAnnotationsMeth ods2(TestStandardWrapper.java:85) ]]] See logs here: http://ci.apache.org/projects/tomcat/tomcat8/logs/ -1356852/ Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1356880 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
Author: fhanik Date: Tue Jul 3 19:29:17 2012 New Revision: 1356880 URL: http://svn.apache.org/viewvc?rev=1356880view=rev Log: Fix where body can be null Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1356880r1=1356879r2=1356880view=diff == --- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original) +++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Tue Jul 3 19:29:17 2012 @@ -299,13 +299,13 @@ public abstract class TomcatBaseTest ext @Override public int getLength() { -return body.length; +return body!=null?body.length:0; } @Override public int available() { -if (done || body == null) return 0; -else return body.length; +if (done) return 0; +else return getLength(); } }; return postUrl(false,s,path,out,reqHead,resHead); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1356898 - /tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
Author: fhanik Date: Tue Jul 3 20:00:40 2012 New Revision: 1356898 URL: http://svn.apache.org/viewvc?rev=1356898view=rev Log: both timeout and complete, as with all container callbacks must be invoked with the right context Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1356898r1=1356897r2=1356898view=diff == --- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Tue Jul 3 20:00:40 2012 @@ -110,21 +110,30 @@ public class AsyncContextImpl implements request.getCoyoteRequest().action(ActionCode.ASYNC_TIMEOUT, result); if (result.get()) { -boolean listenerInvoked = false; -ListAsyncListenerWrapper listenersCopy = -new ArrayListAsyncListenerWrapper(); -listenersCopy.addAll(listeners); -for (AsyncListenerWrapper listener : listenersCopy) { -listener.fireOnTimeout(event); -listenerInvoked = true; -} -if (listenerInvoked) { -request.getCoyoteRequest().action( -ActionCode.ASYNC_IS_TIMINGOUT, result); -return !result.get(); -} else { -// No listeners, container calls complete -complete(); + +ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); +ClassLoader newCL = request.getContext().getLoader().getClassLoader(); +try { +Thread.currentThread().setContextClassLoader(newCL); +boolean listenerInvoked = false; +ListAsyncListenerWrapper listenersCopy = +new ArrayListAsyncListenerWrapper(); +listenersCopy.addAll(listeners); +for (AsyncListenerWrapper listener : listenersCopy) { +listener.fireOnTimeout(event); +listenerInvoked = true; +} +if (listenerInvoked) { +request.getCoyoteRequest().action( +ActionCode.ASYNC_IS_TIMINGOUT, result); +return !result.get(); +} else { +// No listeners, container calls complete +complete(); +} + +} finally { +Thread.currentThread().setContextClassLoader(oldCL); } } return true; - 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/3156 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1356898 Blamelist: fhanik BUILD FAILED: failed compile_1 sincerely, -The Buildbot
Re: buildbot failure in ASF Buildbot on tomcat-trunk
On 03/07/2012 21:35, build...@apache.org wrote: 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/3156 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1356898 Blamelist: fhanik BUILD FAILED: failed compile_1 Timing error. We have been seeing a few of these lately. May be GC related? Anyway, nothing that obviously needs fixing at this point. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.29
On 03/07/2012 12:30, Mark Thomas wrote: The proposed Apache Tomcat 7.0.29 release is now available for voting. It can be obtained from: https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.29/ The Maven staging repo is: https://repository.apache.org/content/repositories/orgapachetomcat-014/ The svn tag is: http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_29/ The proposed 7.0.29 release is: [ ] Broken - do not release [X] Stable - go ahead and release as 7.0.29 Stable Unit tests pass on 64-bit Windows and 64-bit Linux EL TCK passes JSP TCK passes with HTTP (direct) BIO, NIO APR/native (1.1.24) Servlet TCK passes with - HTTP (direct) BIO, NIO APR/native (1.1.24) - HTTP (mod_proxy_http) BIO, NIO APR/native (1.1.24) - AJP (mod_jk) BIO, NIO APR/native (1.1.24) - AJP (mod_proxy_ajp) BIO, NIO APR/native (1.1.24) All TCK tests run on 64-bit Linux with a security manager Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
can tomcat do uri decoding leniently?
Is it possible to have tomcat decode web request parameters leniently? This is how perl, python libs do it by default. For incorrect encodings, tomcat currently rejects the parameter and the way tomcat decodes, it does get corrupted in the buffer built inside org.apache.tomcat.util.buf.UDecoder.convert(). When decoding fails, we see this in the catalina.out file : INFO: Character decoding failed. Parameter [ns_cut] with value [c9=http%3A%2F%2Fwww4.mpire.com%2Fadreview%2Fvarick.htm2Fvarick.htm%] has been ignored. Note that the name and value quoted here may be corrupted due to the failed decoding. Use debug level logging to see the original, non-corrupted values. java.io.CharConversionException: EOF at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:80) at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:46) at org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:410) at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:370) at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:420) at org.apache.tomcat.util.http.Parameters.handleQueryParameters(Parameters.java:186) at org.apache.catalina.connector.Request.parseParameters(Request.java:2594) at org.apache.catalina.connector.Request.getParameterNames(Request.java:1148) at org.apache.catalina.connector.Request.getParameterMap(Request.java:1128) at org.apache.catalina.connector.RequestFacade.getParameterMap(RequestFacade.java:414) at com.mpire.mpsys.req.RequestDispatcher.dispatch(RequestDispatcher.java:374) at com.mpire.mpsys.MpireSystemServlet.dispatchRequest(MpireSystemServlet.java:396) at com.mpire.mpsys.MpireSystemServlet.doGet(MpireSystemServlet.java:371) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) This is the parameter that produced this failure : ns_cut=c9%3Dhttp%253A%252F%252Fwww4.mpire.com%252Fadreview%252Fvarick.htm% So the trailing % is not leniently handled by tomcat. But notice, that the tomcat buffer is corrupted - it has an additional 2Fvarick.htm What I'm looking for is this type of lenient decoding : [~/] python -c 'import urllib; print urllib.unquote(c9%3Dhttp%253A%252F% 252Fwww4.mpire.com%252Fadreview%252Fvarick.htm%);' c9=http%3A%2F%2Fwww4.mpire.com%2Fadreview%2Fvarick.htm% thx, thushara
Get-and-set with JMXProxyServlet
All, I have a slight interest in implementing either a get-and-set or get-and-invoke (or both) in JMXProxyServlet. While it is easy to script get-then-set (or get-then-invoke), I'd like to be able to, with a single URL, get one value and (for example) reset the value to zero (or call something like resetCounters). The current implementation of JMXProxyServlet's doGet method is something like this: String qry=request.getParameter(get); if(qry != null) { // do the get return; } I was thinking that I could just let the if case fall-through after the (partial) response has been written: the client would then receive *two* responses in the same HTTP response: one from the get and another from the invoke. Presumably, the client will understand the nature of the two responses and will be able to tell which is which. Are there any objections or alternatives anyone would like to raise? If necessary, I certainly *can* script these two operations but I thought it might be a nice feature to have. On a related note, I was thinking it might be nice to allow multiple get (or any other) operations in a single request, but there are pairs of request parameters (get + att + key) that must be matched-up for certain requests and so that is problematic (unless we allow ?get0=xatt0=ykey=zget1=x1att1=...). If anyone has any suggestions, I'd be happy to implement something like that. Thanks, -chris signature.asc Description: OpenPGP digital signature
svn commit: r1357039 - in /tomcat/trunk: java/javax/servlet/ java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/coyote/ java/org/apache/coyote/http11/ java/org/apache/t
Author: fhanik Date: Wed Jul 4 01:56:46 2012 New Revision: 1357039 URL: http://svn.apache.org/viewvc?rev=1357039view=rev Log: First revision of an example non blocking read operation. The servlet specification, and discussions on the expert group are quite contradictory. According to the specification request response object can only live during service() or when an AsyncContext is present. but the NIO api is written with examples of bypassing both. So for this iteration, we are working with the assumption that NIO is only allowed during async operations, otherwise there is no point to NIO. This is because 'polling' was not allowed, so there is no point to have NIO when the thread is present Added: tomcat/trunk/test/org/apache/catalina/nonblocking/ tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java (with props) Modified: tomcat/trunk/java/javax/servlet/ServletInputStream.java tomcat/trunk/java/javax/servlet/ServletOutputStream.java tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java tomcat/trunk/java/org/apache/coyote/ActionCode.java tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java tomcat/trunk/java/org/apache/coyote/Request.java tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java tomcat/trunk/java/org/apache/tomcat/util/net/SocketStatus.java Modified: tomcat/trunk/java/javax/servlet/ServletInputStream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletInputStream.java?rev=1357039r1=1357038r2=1357039view=diff == --- tomcat/trunk/java/javax/servlet/ServletInputStream.java (original) +++ tomcat/trunk/java/javax/servlet/ServletInputStream.java Wed Jul 4 01:56:46 2012 @@ -94,8 +94,11 @@ public abstract class ServletInputStream * @return */ public abstract boolean isFinished(); + /** * TODO SERVLET 3.1 + * If this returns false, the container will invoke + * {@link ReadListener#onDataAvailable()} when data is available. * @return */ public abstract boolean isReady(); Modified: tomcat/trunk/java/javax/servlet/ServletOutputStream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletOutputStream.java?rev=1357039r1=1357038r2=1357039view=diff == --- tomcat/trunk/java/javax/servlet/ServletOutputStream.java (original) +++ tomcat/trunk/java/javax/servlet/ServletOutputStream.java Wed Jul 4 01:56:46 2012 @@ -273,6 +273,8 @@ public abstract class ServletOutputStrea } /** + * If this returns false, it will cause a callback to + * {@link WriteListener#onWritePossible()} when the buffer has emptied * TODO SERVLET 3.1 * @return */ Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1357039r1=1357038r2=1357039view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Wed Jul 4 01:56:46 2012 @@ -20,6 +20,7 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; import java.util.EnumSet; +import java.util.concurrent.atomic.AtomicBoolean; import javax.servlet.RequestDispatcher; import javax.servlet.SessionTrackingMode; @@ -293,6 +294,22 @@ public class CoyoteAdapter implements Ad asyncConImpl.setErrorState(null); } } + + +if (!request.isAsyncDispatching() request.isAsync()) { +AtomicBoolean result = new AtomicBoolean(true); +req.action(ActionCode.ASYNC_DISPATCH_FOR_OPERATION, this); +if (result.get()) { +if (status==SocketStatus.OPEN_WRITE) { +//TODO Notify write listener +} else if (status==SocketStatus.OPEN) { +//TODO Notify read listener +asyncConImpl.canRead(); +} +success = true; +} +} +
svn commit: r1357040 - in /tomcat/trunk/java/org/apache: catalina/connector/ coyote/ajp/ coyote/http11/ tomcat/util/net/
Author: fhanik Date: Wed Jul 4 01:59:47 2012 New Revision: 1357040 URL: http://svn.apache.org/viewvc?rev=1357040view=rev Log: rename OPEN to OPEN_READ since we have two different types of operations Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java tomcat/trunk/java/org/apache/tomcat/util/net/SocketStatus.java Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1357040r1=1357039r2=1357040view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Wed Jul 4 01:59:47 2012 @@ -155,7 +155,7 @@ public class CoyoteAdapter implements Ad boolean error = false; boolean read = false; try { -if (status == SocketStatus.OPEN) { +if (status == SocketStatus.OPEN_READ) { if (response.isClosed()) { // The event has been closed asynchronously, so call end instead of // read to cleanup the pipeline @@ -219,7 +219,7 @@ public class CoyoteAdapter implements Ad connector.getService().getContainer().getPipeline().getFirst().event(request, response, request.getEvent()); } if (response.isClosed() || !request.isComet()) { -if (status==SocketStatus.OPEN +if (status==SocketStatus.OPEN_READ request.getEvent().getEventType() != EventType.END) { //CometEvent.close was called during an event other than END request.getEvent().setEventType(CometEvent.EventType.END); @@ -302,7 +302,7 @@ public class CoyoteAdapter implements Ad if (result.get()) { if (status==SocketStatus.OPEN_WRITE) { //TODO Notify write listener -} else if (status==SocketStatus.OPEN) { +} else if (status==SocketStatus.OPEN_READ) { //TODO Notify read listener asyncConImpl.canRead(); } @@ -324,7 +324,7 @@ public class CoyoteAdapter implements Ad if (!response.isClosed() !response.isError()) { if (request.getAvailable() || (request.getContentLength() 0 (!request.isParametersParsed( { // Invoke a read event right away if there are available bytes -if (event(req, res, SocketStatus.OPEN)) { +if (event(req, res, SocketStatus.OPEN_READ)) { comet = true; res.action(ActionCode.COMET_BEGIN, null); } @@ -427,7 +427,7 @@ public class CoyoteAdapter implements Ad if (!response.isClosed() !response.isError()) { if (request.getAvailable() || (request.getContentLength() 0 (!request.isParametersParsed( { // Invoke a read event right away if there are available bytes -if (event(req, res, SocketStatus.OPEN)) { +if (event(req, res, SocketStatus.OPEN_READ)) { comet = true; res.action(ActionCode.COMET_BEGIN, null); } Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=1357040r1=1357039r2=1357040view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Wed Jul 4 01:59:47 2012 @@ -261,7 +261,7 @@ public class AjpAprProcessor extends Abs if (actionCode == ActionCode.ASYNC_COMPLETE) { if (asyncStateMachine.asyncComplete()) { ((AprEndpoint)endpoint).processSocketAsync(this.socket, -
svn commit: r1357042 - /tomcat/trunk/webapps/docs/monitoring.xml
Author: schultz Date: Wed Jul 4 02:30:56 2012 New Revision: 1357042 URL: http://svn.apache.org/viewvc?rev=1357042view=rev Log: Added information about and links to Manager's JMXProxyServlet. Modified: tomcat/trunk/webapps/docs/monitoring.xml Modified: tomcat/trunk/webapps/docs/monitoring.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/monitoring.xml?rev=1357042r1=1357041r2=1357042view=diff == --- tomcat/trunk/webapps/docs/monitoring.xml (original) +++ tomcat/trunk/webapps/docs/monitoring.xml Wed Jul 4 02:30:56 2012 @@ -1126,5 +1126,44 @@ Wait for server connection and that clus /section + section name=Using the JMXProxyServlet + +p + Tomcat offers an alternative to using remote (or even local) JMX + connections while still giving you access to everything JMX has to offer: + Tomcat's + a href=api/org/apache/catalina/manager/JMXProxyServlet.htmlJMXProxyServlet/a. +/p + +p + The JMXProxyServlet allows a client to issue JMX queries via an HTTP + interface. This technique offers the following advantages over using + JMX directly from a client program: +/p + +ul + liYou don't have to launch a full JVM and make a remote JMX connection + just to ask for one small piece of data from a runing server/li + liYou don't have to know how to work with JMX connections/li + liYou don't need any of the complex configuration covered in the rest + of this page/li + liYour client program does not have to be written in Java/li +/ul + +p + A perfect example of JMX overkill can be seen in the case of popular + server-monitoring software such as Nagios or Ichinga: if you want to + monitor 10 items via JMX, you will have to launch 10 JVMs, make 10 JMX + connections, and then shut them all down every few minutes. With the + JMXProxyServlet, you can make 10 HTTP connections and be done with it. +/p + +p + You can find out more information about the JMXProxyServlet in the + documentation for the + a href=manager-howto.html#Using_the_JMX_Proxy_ServletTomcat + manager/a. +/p + /section /body /document - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1357043 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/monitoring.xml
Author: schultz Date: Wed Jul 4 02:34:36 2012 New Revision: 1357043 URL: http://svn.apache.org/viewvc?rev=1357043view=rev Log: Added information about and links to the Manager's JMXProxyServlet. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/monitoring.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1357042 Modified: tomcat/tc7.0.x/trunk/webapps/docs/monitoring.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/monitoring.xml?rev=1357043r1=1357042r2=1357043view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/monitoring.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/monitoring.xml Wed Jul 4 02:34:36 2012 @@ -1126,5 +1126,44 @@ Wait for server connection and that clus /section + section name=Using the JMXProxyServlet + +p + Tomcat offers an alternative to using remote (or even local) JMX + connections while still giving you access to everything JMX has to offer: + Tomcat's + a href=api/org/apache/catalina/manager/JMXProxyServlet.htmlJMXProxyServlet/a. +/p + +p + The JMXProxyServlet allows a client to issue JMX queries via an HTTP + interface. This technique offers the following advantages over using + JMX directly from a client program: +/p + +ul + liYou don't have to launch a full JVM and make a remote JMX connection + just to ask for one small piece of data from a runing server/li + liYou don't have to know how to work with JMX connections/li + liYou don't need any of the complex configuration covered in the rest + of this page/li + liYour client program does not have to be written in Java/li +/ul + +p + A perfect example of JMX overkill can be seen in the case of popular + server-monitoring software such as Nagios or Ichinga: if you want to + monitor 10 items via JMX, you will have to launch 10 JVMs, make 10 JMX + connections, and then shut them all down every few minutes. With the + JMXProxyServlet, you can make 10 HTTP connections and be done with it. +/p + +p + You can find out more information about the JMXProxyServlet in the + documentation for the + a href=manager-howto.html#Using_the_JMX_Proxy_ServletTomcat + manager/a. +/p + /section /body /document - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53504] New: jstl.jar not scanned for TLDs
https://issues.apache.org/bugzilla/show_bug.cgi?id=53504 Priority: P2 Bug ID: 53504 Assignee: dev@tomcat.apache.org Summary: jstl.jar not scanned for TLDs Severity: minor Classification: Unclassified OS: All Reporter: rksa...@gmail.com Hardware: All Status: NEW Version: 7.0.14 Component: Catalina Product: Tomcat 7 The jarsToSkip property in catalina.properties includes jstl.jar as a JAR that should be excluded while scanning for TLDs. It's worth considering to remove that entry in the jarsToSkip property. I believe that jstl.jar was originally added as an exclusion because older versions of JSTL were composed of jstl.jar and standard.jar, and standard.jar was the JAR with the TLD. Therefore, there was no reason to scan jstl.jar. In newer versions of JSTL, the JARs may be named like javax.servlet.jsp.jstl-api-1.2.1.jar and javax.servlet.jsp.jstl-1.2.1.jar. If anybody decides to rename these to, say, jstl-api.jar and jstl.jar, the latter won't be scanned. I ran into this on my project when I was following JAR naming conventions. The workaround is simple: either rename the JAR to not be jstl.jar, or remove the entry from catalina.properties. However, it's worth considering removing the entry in the baseline because the newer JSTL versions don't consist of jstl.jar and standard.jar anymore. -- 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 53505] New: Documentation specifies to use old JSTL version
https://issues.apache.org/bugzilla/show_bug.cgi?id=53505 Priority: P2 Bug ID: 53505 Assignee: dev@tomcat.apache.org Summary: Documentation specifies to use old JSTL version Severity: minor Classification: Unclassified OS: All Reporter: rksa...@gmail.com Hardware: All Status: NEW Version: trunk Component: Documentation Product: Tomcat 7 The documentation at http://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html (and SVN trunk) says: That JSP page makes use of JSTL's SQL and Core taglibs. You can get it from Apache Tomcat Taglibs - Standard Tag Library project — just make sure you get a 1.1.x release. There's no reason to require a 1.1.x release. 1.2.x should work fine. -- 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 53504] jstl.jar not scanned for TLDs
https://issues.apache.org/bugzilla/show_bug.cgi?id=53504 rksa...@gmail.com changed: What|Removed |Added Version|7.0.14 |trunk -- 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