Re: setRequest method on HttpServletRequestWrapper
>>>You have to create your own subclass of HttpServletRequestWrapper. >>Note also, that the Servlet specification says something about >>wrapping and unwrapping the requests and responses. E.g., SRV.6.2.2, SRV.9.9.1 in the Servlet 2.5 specification. Servlet specification does not talk about overriding getRequestURI, getRequestURL or getServletPath methods. Also nothing about setRequest method. These methods are used by tomcat container for implementing request forwarding and include. My question was, why these are available on API for developers? Overriding these methods will never work, in case >>Note, that there is already one such well-known library, >>http://tuckey.org/urlrewrite/ UrlRewriteFilter uses request forwarding and include. It does not (and can not) use request wrapping. Just a note, UrlRewriteFilter can not be used with Struts 2.1, because Struts 2.1 uses servlet filters as controllers and we can not get request dispatcher for filters. This is also my second question. Why use servlet filter as controller? Is struts 2.1 breaking servlet specification? Thanks, Unmesh - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49134] New: Server.stop() doesn't unregister all MBeans
https://issues.apache.org/bugzilla/show_bug.cgi?id=49134 Summary: Server.stop() doesn't unregister all MBeans Product: Tomcat 7 Version: trunk Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: mguille...@yahoo.fr Created an attachment (id=25306) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25306) Unit test illustrating the problem Server.stop() should unregister all MBeans registered by Tomcat but it is not the case. It has side effects when starting a new Server as some Tomcat components like MapperListener components rely on what they find in the MBeanServer and try to work with objects that don't exist anymore (like Host for MapperListener) Provided unit test shows a part of the problem (in fact the helper class Tomcat should be improved to register all MBeans just like a "normal" Tomcat distribution). A workaround consists in cleaning up the JMX tree from all Catalina objects once server.stop() has been called. For info: it seems that such a problem has already been reported: bug #47046 -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 49134] Server.stop() doesn't unregister all MBeans
https://issues.apache.org/bugzilla/show_bug.cgi?id=49134 --- Comment #1 from Marc Guillemot 2010-04-16 05:33:11 EDT --- For info: same problem exists with Tomcat 6 -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 49135] New: SPDY Connector for The Tomcat
https://issues.apache.org/bugzilla/show_bug.cgi?id=49135 Summary: SPDY Connector for The Tomcat Product: Tomcat Connectors Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Common AssignedTo: dev@tomcat.apache.org ReportedBy: xil...@googlemail.com Created an attachment (id=25307) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25307) My full Proposal for the Google Summer of Code Currently the Coyote packages provide HTTP1.1 connectors and an AJP connector for the Tomcat. The Chromium Projects have made a suggestion for a protocol that reduces latency: SPDY. There is already a 1.draft implementation for Tomcat-lite. To make the Tomcat with SPDY really fast and compliant to the standards it will be necessary to implement SPDY with the APR library. I made a Proposal for Google Summer of Code to Implement it. See my full proposal in the attachment. Hope you enjoy it. Felix Kurth -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 49132] JNDI not working
https://issues.apache.org/bugzilla/show_bug.cgi?id=49132 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Comment #1 from Mark Thomas 2010-04-16 08:27:20 EDT --- There are unit tests that cover this (they pass) and I also tested this explicitly without any issue. Looks like a configuration/environment issue. Please use the users list if you require further assistance. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: setRequest method on HttpServletRequestWrapper
2010/4/16 Unmesh Joshi : You have to create your own subclass of HttpServletRequestWrapper. >>>Note also, that the Servlet specification says something about >>>wrapping and unwrapping the requests and responses. > E.g., SRV.6.2.2, SRV.9.9.1 in the Servlet 2.5 specification. > > Servlet specification does not talk about overriding getRequestURI, > getRequestURL or getServletPath methods. Also nothing about setRequest > method. > These methods are used by tomcat container for implementing request > forwarding and include. > My question was, why these are available on API for developers? > Overriding these methods will never work, in case > Too lazy to comment on that, sorry. >>>Note, that there is already one such well-known library, >>>http://tuckey.org/urlrewrite/ > > UrlRewriteFilter uses request forwarding and include. It does not (and > can not) use request wrapping. http://code.google.com/p/urlrewritefilter/source/browse/trunk/src/java/org/tuckey/web/filters/urlrewrite/UrlRewriteWrappedRequest.java > Just a note, UrlRewriteFilter can not be used with Struts 2.1, because > Struts 2.1 uses servlet filters as controllers and we can not get > request dispatcher for filters. Filters can be called for forwarded and included requests, if you map them in certain way (something like INCLUDE). See the Servlet spec for details. SRV.6.2.5 Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49135] SPDY Connector for The Tomcat
https://issues.apache.org/bugzilla/show_bug.cgi?id=49135 jfclere changed: What|Removed |Added CC||jfcl...@gmail.com -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
[Tomcat Wiki] Trivial Update of "PoweredBy" by Bruno
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "PoweredBy" page has been changed by Bruno. http://wiki.apache.org/tomcat/PoweredBy?action=diff&rev1=254&rev2=255 -- === MetaWerx === {{http://www.metawerx.net/images/logo/logo256smlspc.gif}} [[http://www.metawerx.net/default2.htm|MetaWerx.net]] - Australia's first and largest Java hosting provider + + === SempiHost === + {{http://www.sempihost.com.br/images/logo-sempihost.jpg}} [[http://www.sempihost.com.br/|SempiHost - Hospedagem de Sites]] provides webhosting with JSP/Servlets support using Tomcat 5.0, 5.5 and 6.0. === MIVITEC GmbH (German Internet Service Provider) === {{http://mivitec.de/mirsky-new/mivitec_web.gif}} [[http://www.mivitec.de|MIVITEC GmbH - ISP from Germany / Munich]] - One of the leading business hosting providers in Germany, uses Tomcat and Tomcat clusters for client's sites, CMS systems like OpenCMS and Magnolia etc. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r934922 - in /tomcat/tc5.5.x/trunk: STATUS.txt connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java container/webapps/docs/changelog.xml
Author: kkolinko Date: Fri Apr 16 14:33:13 2010 New Revision: 934922 URL: http://svn.apache.org/viewvc?rev=934922&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48843 Prevent possible deadlock for worker allocation in APR connectors Modified: tomcat/tc5.5.x/trunk/STATUS.txt tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Modified: tomcat/tc5.5.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=934922&r1=934921&r2=934922&view=diff == --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Fri Apr 16 14:33:13 2010 @@ -120,9 +120,3 @@ PATCHES PROPOSED TO BACKPORT: (there is no link above): http://svn.apache.org/viewvc?rev=928732&view=rev -1: - -* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48843 - Prevent possible deadlock for worker allocation in APR - https://issues.apache.org/bugzilla/attachment.cgi?id=25226 - +1: kkolinko, markt, jfclere, rjung - -1: Modified: tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=934922&r1=934921&r2=934922&view=diff == --- tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Apr 16 14:33:13 2010 @@ -923,18 +923,17 @@ public class AprEndpoint { */ protected Worker getWorkerThread() { // Allocate a new worker thread -Worker workerThread = createWorkerThread(); -while (workerThread == null) { -try { -synchronized (workers) { +synchronized (workers) { +Worker workerThread; +while ((workerThread = createWorkerThread()) == null) { +try { workers.wait(); +} catch (InterruptedException e) { +// Ignore } -} catch (InterruptedException e) { -// Ignore } -workerThread = createWorkerThread(); +return workerThread; } -return workerThread; } Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml?rev=934922&r1=934921&r2=934922&view=diff == --- tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml (original) +++ tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Fri Apr 16 14:33:13 2010 @@ -29,10 +29,14 @@ Filip Hanik Peter Rossbach Konstantin Kolinko +Keiichi Fujino Changelog + @@ -63,6 +67,10 @@ the Listener element has been specified in server.xml. (fhanik/kkolinko) +48843: Prevent possible deadlock for worker allocation in +APR connectors. (kkolinko) + + Use chunked encoding for http 1.1 responses with no content-length (regardless of keep-alive) so client can differentiate between complete and partial responses. (markt) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 48843] Tomcat Acceptor Thread goes into wait() and it will never come back
https://issues.apache.org/bugzilla/show_bug.cgi?id=48843 --- Comment #6 from Konstantin Kolinko 2010-04-16 10:39:19 EDT --- The patch was applied to 5.5 in r934922, will be in 5.5.30 onwards. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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: r934936 - /tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
Author: jfclere Date: Fri Apr 16 14:44:50 2010 New Revision: 934936 URL: http://svn.apache.org/viewvc?rev=934936&view=rev Log: Fix asyn with APR. Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=934936&r1=934935&r2=934936&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Fri Apr 16 14:44:50 2010 @@ -21,6 +21,7 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InterruptedIOException; import java.util.StringTokenizer; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; import java.security.cert.CertificateFactory; @@ -181,6 +182,12 @@ public class Http11AprProcessor implemen /** + * Async used + */ +protected boolean async = false; + + +/** * Content delimiter for the request (if false, the connection will * be closed at the end of the request). */ @@ -777,6 +784,7 @@ public class Http11AprProcessor implemen // Error flag error = false; comet = false; +async = false; keepAlive = true; int keepAliveLeft = maxKeepAliveRequests; @@ -785,7 +793,7 @@ public class Http11AprProcessor implemen boolean keptAlive = false; boolean openSocket = false; -while (!error && keepAlive && !comet) { +while (!error && keepAlive && !comet && !async) { // Parsing the request header try { @@ -862,7 +870,7 @@ public class Http11AprProcessor implemen } // Finish the handling of the request -if (!comet) { +if (!comet && !async) { // If we know we are closing the connection, don't drain input. // This way uploading a 100GB file doesn't tie up the thread // if the servlet has rejected it. @@ -878,7 +886,7 @@ public class Http11AprProcessor implemen } request.updateCounters(); -if (!comet) { +if (!comet && !async) { // Next request inputBuffer.nextRequest(); outputBuffer.nextRequest(); @@ -900,7 +908,7 @@ public class Http11AprProcessor implemen rp.setStage(org.apache.coyote.Constants.STAGE_ENDED); -if (comet) { +if (comet || async) { if (error) { inputBuffer.nextRequest(); outputBuffer.nextRequest(); @@ -1010,6 +1018,7 @@ public class Http11AprProcessor implemen // transactions with the client comet = false; +async = false; try { outputBuffer.endRequest(); } catch (IOException e) { @@ -1212,10 +1221,32 @@ public class Http11AprProcessor implemen //no op } else if (actionCode == ActionCode.ACTION_ASYNC_START) { //TODO SERVLET3 - async +async = true; } else if (actionCode == ActionCode.ACTION_ASYNC_COMPLETE) { //TODO SERVLET3 - async +AtomicBoolean dispatch = (AtomicBoolean)param; +RequestInfo rp = request.getRequestProcessor(); +if ( rp.getStage() != org.apache.coyote.Constants.STAGE_SERVICE ) { //async handling +dispatch.set(true); +// endpoint.processSocket(this.socket, SocketStatus.STOP); +} else { +dispatch.set(false); +} } else if (actionCode == ActionCode.ACTION_ASYNC_SETTIMEOUT) { //TODO SERVLET3 - async +if (param==null) return; +if (socket==0) return; +long timeout = ((Long)param).longValue(); +Socket.timeoutSet(socket, timeout * 1000); +} else if (actionCode == ActionCode.ACTION_ASYNC_DISPATCH) { +RequestInfo rp = request.getRequestProcessor(); +AtomicBoolean dispatch = (AtomicBoolean)param; +if ( rp.getStage() != org.apache.coyote.Constants.STAGE_SERVICE ) {//async handling +endpoint.getPoller().add(this.socket); +dispatch.set(true); +} else { +dispatch.set(true); +} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r934968 - /tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java
Author: kkolinko Date: Fri Apr 16 15:44:51 2010 New Revision: 934968 URL: http://svn.apache.org/viewvc?rev=934968&view=rev Log: Remove unused dependency on o.a.t.util.collections.MultiMap. An indication here is that MultiMap$Field.name and .value fields are never assigned. Modified: tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java Modified: tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java?rev=934968&r1=934967&r2=934968&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java Fri Apr 16 15:44:51 2010 @@ -26,13 +26,12 @@ import org.apache.tomcat.util.buf.ByteCh import org.apache.tomcat.util.buf.CharChunk; import org.apache.tomcat.util.buf.MessageBytes; import org.apache.tomcat.util.buf.UDecoder; -import org.apache.tomcat.util.collections.MultiMap; /** * * @author Costin Manolache */ -public final class Parameters extends MultiMap { +public final class Parameters { private static final org.apache.juli.logging.Log log= @@ -49,8 +48,6 @@ public final class Parameters extends Mu UDecoder urlDec; MessageBytes decodedQuery=MessageBytes.newInstance(); - -public static final int INITIAL_SIZE=4; String encoding=null; String queryStringEncoding=null; @@ -59,7 +56,6 @@ public final class Parameters extends Mu * */ public Parameters() { -super( INITIAL_SIZE ); } public void setQuery( MessageBytes queryMB ) { @@ -84,9 +80,7 @@ public final class Parameters extends Mu } } -@Override public void recycle() { -super.recycle(); paramHashStringArray.clear(); didQueryParameters=false; encoding=null; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Proposal (cleanup): drop "org.apache.tomcat.util.collections" package (MultiMap class) in TC7
Hi! I propose to drop the "org.apache.tomcat.util.collections" package in our trunk (TC7). It contains the following classes: MultiMap MultiMapNamesEnumeration MultiMapValuesEnumeration Rationale: Cleanup. The implementation is incomplete, e.g. MultiMap$Field.name and .value fields are never assigned. This situation is the same in trunk, TC6, TC5.5. As I see from comments, the MultiMap class was intended to provide a faster implementation for org.apache.tomcat.util.http.Parameters, MimeHeaders, Cookies. That never happened. As of 5.5, 6.0 and trunk the MimeHeaders, Cookies classes already have their own "fast" implementation and won't use this class. The Parameters class still uses a Hashtable, but I doubt that there is a need to make its implementation faster. In r934968 I removed the dependency between Parameters and MultiMap in our trunk. There were some other classes in the "org.apache.tomcat.util.collections" package in the 5.5, 6.0 versions of Tomcat, but those have been removed already. That said, if anybody objects the removal and sees some purpose for keeping that MultiMap class, I will leave it where it is and will just mark it as deprecated. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Proposal (cleanup): drop "org.apache.tomcat.util.collections" package (MultiMap class) in TC7
On 16/04/2010 17:34, Konstantin Kolinko wrote: > Hi! > > I propose to drop the "org.apache.tomcat.util.collections" package in > our trunk (TC7). +1 Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r935071 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Fri Apr 16 20:32:13 2010 New Revision: 935071 URL: http://svn.apache.org/viewvc?rev=935071&view=rev Log: vote and proposal Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=935071&r1=935070&r2=935071&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Apr 16 20:32:13 2010 @@ -207,6 +207,7 @@ PATCHES PROPOSED TO BACKPORT: -1: Alternative patch: + Note: This was applied to 5.5 in r934922 https://issues.apache.org/bugzilla/attachment.cgi?id=25225 +1: kkolinko -1: @@ -269,5 +270,13 @@ PATCHES PROPOSED TO BACKPORT: * sessionCounter and expiredSessions declares as long instead of int. http://svn.apache.org/viewvc?view=revision&revision=934337 +1: kfujino - -1: + -1: kkolinko: I think that we cannot change o.a.c.Manager API in such way +in a dot release. Alternative proposal below. +* Fix possible overflows when calculating session statistics + Fixes a) miscalculating the "average" because of multiplication overflow, + b) ArithmeticException division by zero when numExpired overflows. + The fix for trunk is already provided by r934337. + http://people.apache.org/~kkolinko/patches/2010-04-17_tc6_StandardSession_statistics.patch + +1: kkolinko + -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r935072 - /tomcat/tc5.5.x/trunk/STATUS.txt
Author: kkolinko Date: Fri Apr 16 20:34:13 2010 New Revision: 935072 URL: http://svn.apache.org/viewvc?rev=935072&view=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=935072&r1=935071&r2=935072&view=diff == --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Fri Apr 16 20:34:13 2010 @@ -120,3 +120,11 @@ PATCHES PROPOSED TO BACKPORT: (there is no link above): http://svn.apache.org/viewvc?rev=928732&view=rev -1: + +* Fix possible overflows when calculating session statistics + Fixes a) miscalculating the "average" because of multiplication overflow, + b) ArithmeticException division by zero when numExpired overflows. + The fix for trunk is already provided by r934337. + http://people.apache.org/~kkolinko/patches/2010-04-17_tc6_StandardSession_statistics.patch + +1: kkolinko + -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r935077 - /tomcat/trunk/build.xml
Author: markt Date: Fri Apr 16 20:41:11 2010 New Revision: 935077 URL: http://svn.apache.org/viewvc?rev=935077&view=rev Log: Get build working with relative base.path Modified: tomcat/trunk/build.xml Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=935077&r1=935076&r2=935077&view=diff == --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Fri Apr 16 20:41:11 2010 @@ -1688,9 +1688,7 @@ Apache Tomcat ${version} native binaries - - - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49072] NullPointerException in Request.removeAttribute
https://issues.apache.org/bugzilla/show_bug.cgi?id=49072 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #1 from Mark Thomas 2010-04-16 17:56:51 EDT --- Your application is retaining a reference to a request object after request processing has been completed in breach of the Servlet specification. If you need further assistance, please use the Tomcat users mailing list. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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: r935092 - /tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt
Author: markt Date: Fri Apr 16 22:39:55 2010 New Revision: 935092 URL: http://svn.apache.org/viewvc?rev=935092&view=rev Log: More checking against the spec Modified: tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt Modified: tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt URL: http://svn.apache.org/viewvc/tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt?rev=935092&r1=935091&r2=935092&view=diff == --- tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt (original) +++ tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt Fri Apr 16 22:39:55 2010 @@ -32,14 +32,14 @@ - Section 4.5 - Compliant - Section 4.6 - TODO getResource() & META-INF/resources - Section 4.7 to 4.8 - Compliant - - Sections 5 to 6 - not checked - - Section 7 - Compliant + - Sections 5 to 7 - Section 8 - in progress - 8.1 - not checked - 8.2 - in progress, 'just' annotation scanning left - 8.3 - not checked - 8.4 - not checked - - Sections 9 to 12 - not checked + 8.1 - Compliant + 8.2 - TODO - ServletContainerInitializer + 8.3 - Scope for re-factoring + 8.4 - Compliant + - Section 9 - Compliant + - Section 10 to 12 - not checked - Section 13 - In progess 13.1 to 13.3 - Compliant 13.4 - In progress - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r935092 - /tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt
On 16/04/2010, ma...@apache.org wrote: > Author: markt > Date: Fri Apr 16 22:39:55 2010 > New Revision: 935092 > > URL: http://svn.apache.org/viewvc?rev=935092&view=rev > Log: > More checking against the spec > > Modified: > tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt > > Modified: tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt > URL: > http://svn.apache.org/viewvc/tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt?rev=935092&r1=935091&r2=935092&view=diff > > == > --- tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt (original) > +++ tomcat/trunk/TOMCAT-7-RELEASE-PLAN.txt Fri Apr 16 22:39:55 2010 > @@ -32,14 +32,14 @@ > - Section 4.5 - Compliant > - Section 4.6 - TODO getResource() & META-INF/resources > - Section 4.7 to 4.8 - Compliant > - - Sections 5 to 6 - not checked > - - Section 7 - Compliant > + - Sections 5 to 7 Should there be a comment on the line above? > - Section 8 - in progress > - 8.1 - not checked > - 8.2 - in progress, 'just' annotation scanning left > - 8.3 - not checked > - 8.4 - not checked > - - Sections 9 to 12 - not checked > + 8.1 - Compliant > + 8.2 - TODO - ServletContainerInitializer > + 8.3 - Scope for re-factoring > + 8.4 - Compliant > + - Section 9 - Compliant > + - Section 10 to 12 - not checked > - Section 13 - In progess > 13.1 to 13.3 - Compliant > 13.4 - In progress > > > > - > 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
Re: setRequest method on HttpServletRequestWrapper
> Filters can be called for forwarded and included requests, if you map > them in certain way (something like INCLUDE). > See the Servlet spec for details. SRV.6.2.5 But you cant get dispatchers for filters. UrlRewriteFilter gets a dispatcher (so rewrtten url must have a servlet or jsp handler). - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49140] New: Inefficient use of keySet() iterator in StandardContext.java
https://issues.apache.org/bugzilla/show_bug.cgi?id=49140 Summary: Inefficient use of keySet() iterator in StandardContext.java Product: Tomcat 7 Version: trunk Platform: PC OS/Version: Windows XP Status: NEW Severity: enhancement Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: s...@apache.org Created an attachment (id=25316) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25316) Change keySet() Iterator to values() The loadOnStartup(Container[]) method of StandardContext loops on the keySet() but actually only uses the key to get the values, so it would be more efficient to use the values() Iterator. According to the Javadoc, the keySet() and values() iterators generate the entries in the same order (key ascending). Findbugs detected another 6 such instances for which I can provide patches if required. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 49141] New: Impossible cast in naming.factory.SendMailFactory.getObjectInstance
https://issues.apache.org/bugzilla/show_bug.cgi?id=49141 Summary: Impossible cast in naming.factory.SendMailFactory.getObjectInstance Product: Tomcat 7 Version: trunk Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: s...@apache.org naming.factory.SendMailFactory.getObjectInstance contains an impossible cast from javax.mail.internet.MimeMessage to javax.mail.internet.MimePart [Findbugs] -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 49142] New: Missing serialVersionUIDs
https://issues.apache.org/bugzilla/show_bug.cgi?id=49142 Summary: Missing serialVersionUIDs Product: Tomcat 7 Version: trunk Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: s...@apache.org org.apache.catalina.ha.ClusterMessageBase is Serializable; consider declaring a serialVersionUID Similarly for: org.apache.catalina.ha.session.ReplicatedSession org.apache.catalina.ha.session.SerializablePrincipal org.apache.catalina.session.StandardSession org.apache.catalina.tribes.tipis.AbstractReplicatedMap.MapMessage org.apache.tomcat.util.modeler.ManagedBean -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 49142] Missing serialVersionUIDs
https://issues.apache.org/bugzilla/show_bug.cgi?id=49142 Sebb changed: What|Removed |Added Severity|normal |enhancement -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: setRequest method on HttpServletRequestWrapper
2010/4/17 Unmesh Joshi : >> Filters can be called for forwarded and included requests, if you map >> them in certain way (something like INCLUDE). >> See the Servlet spec for details. SRV.6.2.5 > But you cant get dispatchers for filters. UrlRewriteFilter gets a > dispatcher (so rewrtten url must have a servlet or jsp handler). Have you tried? - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49143] New: Possible incorrect lazy initialisations
https://issues.apache.org/bugzilla/show_bug.cgi?id=49143 Summary: Possible incorrect lazy initialisations Product: Tomcat 7 Version: trunk Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: s...@apache.org Incorrect lazy initialization of static field: org.apache.catalina.realm.RealmBase.md5Helper org.apache.catalina.session.StandardSession.sessionContext org.apache.catalina.startup.TldConfig.noTldJars org.apache.catalina.util.ExtensionValidator.containerAvailableExtensions org.apache.tomcat.util.modeler.modules.MbeansDescriptorsDigesterSource.digester fields should probably all be made volatile -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 49144] New: Incorrect lazy initialization and update of static fields?
https://issues.apache.org/bugzilla/show_bug.cgi?id=49144 Summary: Incorrect lazy initialization and update of static fields? Product: Tomcat 7 Version: trunk Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: s...@apache.org Incorrect lazy initialization and update of static fields: org.apache.catalina.startup.Bootstrap.daemon org.apache.catalina.startup.ContextConfig.contextDigester Findbugs says: This method contains an unsynchronized lazy initialization of a static field. After the field is set, the object stored into that location is further updated or accessed. The setting of the field is visible to other threads as soon as it is set. If the futher accesses in the method that set the field serve to initialize the object, then you have a very serious multithreading bug, unless something else prevents any other thread from accessing the stored object until it is fully initialized. Even if you feel confident that the method is never called by multiple threads, it might be better to not set the static field until the value you are setting it to is fully populated/initialized. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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: r935105 - in /tomcat/trunk/webapps/examples: WEB-INF/classes/chat/ChatServlet.java jsp/chat/chat.jsp jsp/chat/index.jsp jsp/chat/login.jsp jsp/chat/post.jsp
Author: kkolinko Date: Sat Apr 17 01:59:56 2010 New Revision: 935105 URL: http://svn.apache.org/viewvc?rev=935105&view=rev Log: Improve the ChatServlet comet example. 1. Fix possible deadlock in ChatServlet$MessageSender, similar to BZ 48843. 2. Properly wake up ChatServlet$MessageSender when the servlet is destroyed. 3. Filter special characters when printing the message in ChatServlet. 4. Provide an explicit charset everywhere. 5. Fix frames layout. Fix redirections. Use target="" attribute in HTML to send request to a particular frame. 6. Fix DTDs. Use frameset DTD for the page containing frames. 7. Add "xxx joined the chat" message at startup. 8. Rename chat.jsp -> index.jsp, so that the entry point to this example is more visible. 9. Corrected the link that opens a new chat window. It referenced an undefined JavaScript function. Now it is implemented just by using target="_blank". 10. Added submit button to the form pages. 11. Minor message tweaks. Added: tomcat/trunk/webapps/examples/jsp/chat/index.jsp - copied, changed from r934640, tomcat/trunk/webapps/examples/jsp/chat/chat.jsp Removed: tomcat/trunk/webapps/examples/jsp/chat/chat.jsp Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java tomcat/trunk/webapps/examples/jsp/chat/login.jsp tomcat/trunk/webapps/examples/jsp/chat/post.jsp Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java?rev=935105&r1=935104&r2=935105&view=diff == --- tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java (original) +++ tomcat/trunk/webapps/examples/WEB-INF/classes/chat/ChatServlet.java Sat Apr 17 01:59:56 2010 @@ -41,6 +41,8 @@ public class ChatServlet private static final long serialVersionUID = 1L; +private static final String CHARSET = "UTF-8"; + protected ArrayList connections = new ArrayList(); protected MessageSender messageSender = null; @@ -82,7 +84,7 @@ public class ChatServlet if ("login".equals(action)) { String nickname = request.getParameter("nickname"); request.getSession(true).setAttribute("nickname", nickname); -response.sendRedirect("post.jsp"); +response.sendRedirect("index.jsp"); event.close(); return; } @@ -114,15 +116,20 @@ public class ChatServlet HttpServletRequest request, HttpServletResponse response) throws IOException { log("Begin for session: " + request.getSession(true).getId()); - + +response.setContentType("text/html; charset=" + CHARSET); + PrintWriter writer = response.getWriter(); -writer.println(""); +writer.println("http://www.w3.org/TR/html4/loose.dtd\";>"); writer.println("JSP Chat"); +writer.println("Welcome to the chat. Click here to reload this window"); writer.flush(); synchronized(connections) { connections.add(response); } + +messageSender.send("Tomcat", request.getSession(true).getAttribute("nickname") + " joined the chat."); } protected void end(CometEvent event, HttpServletRequest request, HttpServletResponse response) @@ -136,7 +143,6 @@ public class ChatServlet writer.println(""); event.close(); - } protected void error(CometEvent event, HttpServletRequest request, HttpServletResponse response) @@ -170,10 +176,12 @@ public class ChatServlet protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Compatibility method: equivalent method using the regular connection model +response.setContentType("text/html; charset=" + CHARSET); PrintWriter writer = response.getWriter(); -writer.println(""); +writer.println("http://www.w3.org/TR/html4/loose.dtd\";>"); writer.println("JSP Chat"); -writer.println("Chat example only supports Comet processing"); +writer.println("Chat example only supports Comet processing. "); +writer.println("Configure a connector that supports Comet and try again."); writer.println(""); } @@ -192,6 +200,9 @@ public class ChatServlet public void stop() { running = false; +synchronized (messages) { +messages.notify(); +} } public void send(String user, String message) { @@ -209,34 +220,29 @@ public class ChatServlet // Loop until we receive a shutdown command while (running) { -// Loop if endpoint is paused - -if (mess
svn commit: r935107 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Sat Apr 17 02:09:09 2010 New Revision: 935107 URL: http://svn.apache.org/viewvc?rev=935107&view=rev Log: proposal Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=935107&r1=935106&r2=935107&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Sat Apr 17 02:09:09 2010 @@ -280,3 +280,8 @@ PATCHES PROPOSED TO BACKPORT: http://people.apache.org/~kkolinko/patches/2010-04-17_tc6_StandardSession_statistics.patch +1: kkolinko -1: + +* Improve the ChatServlet comet example and fix some issues there + http://svn.apache.org/viewvc?rev=935105&view=rev + +1: kkolinko + -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: setRequest method on HttpServletRequestWrapper
Yes. On tomcat u get dispatcher for DefaultServlet if there is no servlet mapping for the url. Typically on Struts2 all the urls get handled in StrutsExecuteFilter and u dont get dispatcher go that filter. On Sat, Apr 17, 2010 at 7:11 AM, Konstantin Kolinko wrote: > 2010/4/17 Unmesh Joshi : >>> Filters can be called for forwarded and included requests, if you map >>> them in certain way (something like INCLUDE). >>> See the Servlet spec for details. SRV.6.2.5 >> But you cant get dispatchers for filters. UrlRewriteFilter gets a >> dispatcher (so rewrtten url must have a servlet or jsp handler). > > Have you tried? > > - > 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
Re: setRequest method on HttpServletRequestWrapper
2010/4/17 Unmesh Joshi : > Yes. On tomcat u get dispatcher for DefaultServlet if there is no > servlet mapping for the url. Typically on Struts2 all the urls get > handled in StrutsExecuteFilter and u dont get dispatcher go that > filter. > > On Sat, Apr 17, 2010 at 7:11 AM, Konstantin Kolinko > wrote: >> 2010/4/17 Unmesh Joshi : Filters can be called for forwarded and included requests, if you map them in certain way (something like INCLUDE). See the Servlet spec for details. SRV.6.2.5 >>> But you cant get dispatchers for filters. UrlRewriteFilter gets a >>> dispatcher (so rewrtten url must have a servlet or jsp handler). >> >> Have you tried? >> >> - >> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: dev-h...@tomcat.apache.org >> And how your StrutsExecuteFilter is mapped in web.xml ? - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: setRequest method on HttpServletRequestWrapper
StrutsExecuteFilter is mapped to * struts2-execute /* SRV.15.2.5 explains RequestDispatcher as follows. It does not say u can (or can not) get request dispatcher for filters. But I think Filters do not match definition of 'Resource' in SRV. Resources are either servlets, jsps or static content. SRV.15.2.5 RequestDispatcher public interface RequestDispatcher Defines an object that receives requests from the client and sends them to any resource (such as a servlet, HTML file, or JSP file) on the server. The servlet con- tainer creates the RequestDispatcher object, which is used as a wrapper around a server resource located at a particular path or given by a particular name. This interface is intended to wrap servlets, but a servlet container can create RequestDispatcher objects to wrap any type of resource. On Sat, Apr 17, 2010 at 8:03 AM, Konstantin Kolinko wrote: > 2010/4/17 Unmesh Joshi : >> Yes. On tomcat u get dispatcher for DefaultServlet if there is no >> servlet mapping for the url. Typically on Struts2 all the urls get >> handled in StrutsExecuteFilter and u dont get dispatcher go that >> filter. >> >> On Sat, Apr 17, 2010 at 7:11 AM, Konstantin Kolinko >> wrote: >>> 2010/4/17 Unmesh Joshi : > Filters can be called for forwarded and included requests, if you map > them in certain way (something like INCLUDE). > See the Servlet spec for details. SRV.6.2.5 But you cant get dispatchers for filters. UrlRewriteFilter gets a dispatcher (so rewrtten url must have a servlet or jsp handler). >>> >>> Have you tried? >>> >>> - >>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: dev-h...@tomcat.apache.org >>> > > And how your StrutsExecuteFilter is mapped in web.xml ? > > - > 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