svn commit: r1162082 - /tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
Author: kkolinko Date: Fri Aug 26 12:24:56 2011 New Revision: 1162082 URL: http://svn.apache.org/viewvc?rev=1162082view=rev Log: Make the fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=50394 done in r1148815 more explicit. No functional change. Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1162082r1=1162081r2=1162082view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Fri Aug 26 12:24:56 2011 @@ -615,7 +615,10 @@ public class InternalAprInputBuffer exte } else { if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) { throw new SocketTimeoutException(sm.getString(iib.failedread)); -} else if (nRead != 0) { +} else if (nRead == 0) { +// APR_STATUS_IS_EOF, since native 1.1.22 +return false; +} else { throw new IOException(sm.getString(iib.failedread)); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1162087 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/InternalAprInputBuffer.java
Author: kkolinko Date: Fri Aug 26 12:27:52 2011 New Revision: 1162087 URL: http://svn.apache.org/viewvc?rev=1162087view=rev Log: Backport r1162082 Make the fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=50394 done in r1148815 more explicit. No functional change. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Aug 26 12:27:52 2011 @@ -1 +1 @@ -/tomcat/trunk:1156171,1156276,1156304,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584 +/tomcat/trunk:1156171,1156276,1156304,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1162087r1=1162086r2=1162087view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Fri Aug 26 12:27:52 2011 @@ -615,7 +615,10 @@ public class InternalAprInputBuffer exte } else { if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) { throw new SocketTimeoutException(sm.getString(iib.failedread)); -} else if (nRead != 0) { +} else if (nRead == 0) { +// APR_STATUS_IS_EOF, since native 1.1.22 +return false; +} else { throw new IOException(sm.getString(iib.failedread)); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 50394] InternalAprInputBuffer.fill() doesn't deal correctly with EOF
https://issues.apache.org/bugzilla/show_bug.cgi?id=50394 --- Comment #6 from Konstantin Kolinko knst.koli...@gmail.com 2011-08-26 12:33:39 UTC --- Created attachment 27437 -- https://issues.apache.org/bugzilla/attachment.cgi?id=27437 2011-08-26_tc55_50394_InternalAprInputBuffer.patch -- 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 50394] InternalAprInputBuffer.fill() doesn't deal correctly with EOF
https://issues.apache.org/bugzilla/show_bug.cgi?id=50394 --- Comment #7 from Konstantin Kolinko knst.koli...@gmail.com 2011-08-26 12:34:10 UTC --- Created attachment 27438 -- https://issues.apache.org/bugzilla/attachment.cgi?id=27438 2011-08-26_tc6_50394_InternalAprInputBuffer.patch -- 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: r1162091 - in /tomcat: tc5.5.x/trunk/STATUS.txt tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Fri Aug 26 12:42:43 2011 New Revision: 1162091 URL: http://svn.apache.org/viewvc?rev=1162091view=rev Log: proposal Modified: tomcat/tc5.5.x/trunk/STATUS.txt tomcat/tc6.0.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=1162091r1=1162090r2=1162091view=diff == --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Fri Aug 26 12:42:43 2011 @@ -81,3 +81,11 @@ PATCHES PROPOSED TO BACKPORT: in build/build.properties.default +1: kkolinko, markt -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50394 + Return -1 from read operation instead of throwing an exception when + encountering an EOF with the HTTP APR connector. + Native 1.1.22 is required for this fix. + https://issues.apache.org/bugzilla/attachment.cgi?id=27437 + +1: kkolinko + -1: Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1162091r1=1162090r2=1162091view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Aug 26 12:42:43 2011 @@ -118,3 +118,11 @@ PATCHES PROPOSED TO BACKPORT: http://people.apache.org/~markt/patches/2011-08-25-lib-update-tc6.patch +1: markt, kkolinko -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50394 + Return -1 from read operation instead of throwing an exception when + encountering an EOF with the HTTP APR connector. + Native 1.1.22 is required for this fix. + https://issues.apache.org/bugzilla/attachment.cgi?id=27438 + +1: kkolinko + -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 50394] InternalAprInputBuffer.fill() doesn't deal correctly with EOF
https://issues.apache.org/bugzilla/show_bug.cgi?id=50394 --- Comment #8 from Konstantin Kolinko knst.koli...@gmail.com 2011-08-26 12:43:33 UTC --- Proposed the patches for Tomcat 6.0 and 5.5. -- 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: r1162096 - in /tomcat: tc5.5.x/trunk/STATUS.txt tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Fri Aug 26 12:54:47 2011 New Revision: 1162096 URL: http://svn.apache.org/viewvc?rev=1162096view=rev Log: proposal Modified: tomcat/tc5.5.x/trunk/STATUS.txt tomcat/tc6.0.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=1162096r1=1162095r2=1162096view=diff == --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Fri Aug 26 12:54:47 2011 @@ -82,6 +82,11 @@ PATCHES PROPOSED TO BACKPORT: +1: kkolinko, markt -1: +* Update recommended version of Tomcat-Native to 1.1.22 + http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?r1=1154911r2=1154910pathrev=1154911 + +1: kkolinko + -1: + * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50394 Return -1 from read operation instead of throwing an exception when encountering an EOF with the HTTP APR connector. Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1162096r1=1162095r2=1162096view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Aug 26 12:54:47 2011 @@ -119,6 +119,11 @@ PATCHES PROPOSED TO BACKPORT: +1: markt, kkolinko -1: +* Update recommended version of Tomcat-Native to 1.1.22 + http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?r1=1154911r2=1154910pathrev=1154911 + +1: kkolinko + -1: + * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50394 Return -1 from read operation instead of throwing an exception when encountering an EOF with the HTTP APR connector. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1162102 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
Author: kkolinko Date: Fri Aug 26 13:07:16 2011 New Revision: 1162102 URL: http://svn.apache.org/viewvc?rev=1162102view=rev Log: Followup for r1157874 which is a Fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=51583 Break loop immediately, because con is never set to null and you'll try releasing it twice. Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1162102r1=1162101r2=1162102view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Fri Aug 26 13:07:16 2011 @@ -366,6 +366,8 @@ public class ConnectionPool { abandon(con); if (pool.size()0) { con = pool.poll(1000, TimeUnit.MILLISECONDS); +} else { +break; } } //while } catch (InterruptedException ex) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1162111 - in /tomcat/tc7.0.x/trunk: modules/ webapps/docs/changelog.xml
Author: kkolinko Date: Fri Aug 26 13:22:30 2011 New Revision: 1162111 URL: http://svn.apache.org/viewvc?rev=1162111view=rev Log: Update jdbc-pool to r1162102 to include the fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=51583 Modified: tomcat/tc7.0.x/trunk/modules/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/modules/ -- --- svn:externals (original) +++ svn:externals Fri Aug 26 13:22:30 2011 @@ -1 +1 @@ -^/tomcat/trunk/modules/jdbc-pool@1155255 jdbc-pool +^/tomcat/trunk/modules/jdbc-pool@1162102 jdbc-pool Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1162111r1=1162110r2=1162111view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Aug 26 13:22:30 2011 @@ -143,8 +143,8 @@ subsection name=Other changelog add -bug51583/bug (rev1157874/rev): Fix jdbc-pool shutdown delay. -(fhanik) +bug51583/bug (rev1157874/rev, rev1162102/rev): Fix +shutdown delay in jdbc-pool. (fhanik/kkolinko) /add /changelog /subsection - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1157874 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
2011/8/25 Konstantin Kolinko knst.koli...@gmail.com: URL: http://svn.apache.org/viewvc?rev=1157874view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51583 1) I think that because of this change the while (con != null) { loop may run infinitely, because when pool.size() is 0 the con variable is never set to null. You'll repeatedly release the same connection. 2) Note that this change is in changelog for 7.0.21, but actually it is not in TC7, because svn:externals property on tc7.0.x/trunk/modules has not been updated. I fixed the loop and updated externals in TC7. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Possible bug in Tomcat Date header handling
Tomcat 7.0.20 Windows XP JDK 1.6.0_20 I think there is a bug in Tomcat's handling of the Date HTTP header. I'm mailing this list because there is a minor suggested code change at the bottom to fix. When the system clock time is advanced and then put back, with an HTTP request being handled in between those two actions, Tomcat will send the later of the two times in the response headers until the later time is reached. I think the problem is in the following code: package org.apache.tomcat.util.http; ... public final class FastHttpDateFormat { ... /** * Get the current date in HTTP format. */ public static final String getCurrentDate() { long now = System.currentTimeMillis(); if ((now - currentDateGenerated) 1000) { synchronized (format) { if ((now - currentDateGenerated) 1000) { currentDate = format.format(new Date(now)); currentDateGenerated = now; } } } return currentDate; } So, when the clock is advanced, currentDateGenerated becomes 'now'. However, when it is retarded, now-currentDateGenerated will typically be a negative number, and so the current date is never updated. This is causing us a problem since we have systems that sync off the date header. I have tried to work around the problem with a ServletFilter: HttpServletResponse httpResp = (HttpServletResponse) resp; DateFormat df = new SimpleDateFormat(HTTP_RESPONSE_DATE_HEADER, Locale.US); df.setTimeZone(GMT_ZONE); httpResp.setHeader(Date, df.format(new Date(System.currentTimeMillis(; However, it looks like Tomcat is overriding the Date header later in the request lifecycle than a ServetFilter can intercept. I understand that the 'getCurrentDate()' method in the code above means that Tomcat only needs to do a DateFormat.format() on a long value once every second at most and so was clearly introduced to improve performance, but this makes Tomcat susceptible to incorrect system dates and will also be returning an invalid time for (typically) one hour when clocks go back in the autumn / fall. It would be better to check for a negative number in this method and regenerate 'currentDateGenerated' if this is the case: ... if ((now - currentDateGenerated) 1000 || (now - currentDateGenerated) 0) { synchronized (format) { if ((now - currentDateGenerated) 1000) { currentDate = format.format(new Date(now)); currentDateGenerated = now; } } } return currentDate; ... Please let me know if there is a workaround or if I'm wrong in my reading of the situation. Thanks, Mick Sear - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Possible bug in Tomcat Date header handling
On 26/08/2011 16:25, Mick Sear wrote: Tomcat 7.0.20 Windows XP JDK 1.6.0_20 I think there is a bug in Tomcat's handling of the Date HTTP header. I disagree. When the system clock time is advanced and then put back, with an HTTP request being handled in between those two actions, Tomcat will send the later of the two times in the response headers until the later time is reached. Then don't do that. Servers should have stable clocks sync'd to a reliable time source, e.g. via ntp. This is causing us a problem since we have systems that sync off the date header. Fix the cause, not the symptom. I understand that the 'getCurrentDate()' method in the code above means that Tomcat only needs to do a DateFormat.format() on a long value once every second at most and so was clearly introduced to improve performance, but this makes Tomcat susceptible to incorrect system dates and will also be returning an invalid time for (typically) one hour when clocks go back in the autumn / fall. No it won't. System.getCurrentTimeMillis() uses UTC and should be immune to changes in daylight savings offset and timezone. If a system is not set up correctly, you might see step changes in the return value from System.getCurrentTimeMillis() but again in that case fixing the configuration is the right approach. It would be better to check for a negative number in this method and regenerate 'currentDateGenerated' if this is the case: ... if ((now - currentDateGenerated) 1000 || (now - currentDateGenerated) 0) { synchronized (format) { if ((now - currentDateGenerated) 1000) { currentDate = format.format(new Date(now)); currentDateGenerated = now; } } } return currentDate; ... Please let me know if there is a workaround or if I'm wrong in my reading of the situation. The fix is to address the root cause which appears to be a poorly configured system clock. I am loath to add a work-around at any point in the Tomcat source code to handle time apparently going backwards rather than forwards. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Possible bug in Tomcat Date header handling
The fix is to address the root cause which appears to be a poorly configured system clock. I am loath to add a work-around at any point in the Tomcat source code to handle time apparently going backwards rather than forwards. +1. It's SysAdmin team responsability to ensure hosting machine get a reliable system clock, adjusted by NTP or other mecanism. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51726] New: configure reports cannot remove `libtoolT': No such file or directory
https://issues.apache.org/bugzilla/show_bug.cgi?id=51726 Bug #: 51726 Summary: configure reports cannot remove `libtoolT': No such file or directory Product: Tomcat Connectors Version: unspecified Platform: PC Status: NEW Severity: minor Priority: P2 Component: mod_jk AssignedTo: dev@tomcat.apache.org ReportedBy: ch...@christopherschultz.net Classification: Unclassified In both trunk and 1.2.32: $ svn checkout https://svn.apache.org/repos/asf/tomcat/jk/tags/JK_1_2_32 $ cd JK_1_2_32/native $ ./buildconf.sh (you don't need to do this if you didn't use svn) $ which apxs2 /usr/bin/apxs2 $ ./configure --with-apxs=/usr/bin/apxs2 ... config.status: creating common/config.h config.status: executing depfiles commands config.status: executing libtool commands /bin/rm: cannot remove `libtoolT': No such file or directory Running make at this point for me results in a complete build, so it doesn't look like anything truly important is being skipped. For complete details see http://markmail.org/message/rofubigkpw73bi4a -- 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: r1162149 - in /tomcat/trunk: java/org/apache/catalina/startup/Tomcat.java test/org/apache/catalina/startup/TestTomcat.java
Author: markt Date: Fri Aug 26 16:03:57 2011 New Revision: 1162149 URL: http://svn.apache.org/viewvc?rev=1162149view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51558 No need to force the use of the StandardManager with addWebapp() since StandardContext will add it if it is not set. Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.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=1162149r1=1162148r2=1162149view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Fri Aug 26 16:03:57 2011 @@ -55,7 +55,6 @@ import org.apache.catalina.core.Standard import org.apache.catalina.deploy.LoginConfig; import org.apache.catalina.realm.GenericPrincipal; import org.apache.catalina.realm.RealmBase; -import org.apache.catalina.session.StandardManager; // TODO: lazy init for the temp dir - only when a JSP is compiled or // get temp dir is called we need to create it. This will avoid the @@ -747,7 +746,6 @@ public class Tomcat { ctx.addServletMapping(*.jspx, jsp); // Sessions -ctx.setManager( new StandardManager()); ctx.setSessionTimeout(30); // MIME mappings Modified: tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java?rev=1162149r1=1162148r2=1162149view=diff == --- tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java (original) +++ tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java Fri Aug 26 16:03:57 2011 @@ -35,6 +35,7 @@ import javax.naming.NamingException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -51,7 +52,7 @@ import org.apache.tomcat.util.buf.ByteCh public class TestTomcat extends TomcatBaseTest { /** - * Simple servlet to test in-line registration + * Simple servlet to test in-line registration. */ public static class HelloWorld extends HttpServlet { @@ -65,6 +66,22 @@ public class TestTomcat extends TomcatBa } /** + * Simple servlet to test the default session manager. + */ +public static class HelloWorldSession extends HttpServlet { + +private static final long serialVersionUID = 1L; + +@Override +public void doGet(HttpServletRequest req, HttpServletResponse res) +throws IOException { +HttpSession s = req.getSession(true); +s.getId(); +res.getWriter().write(Hello world); +} +} + +/** * Simple servlet to test JNDI */ public static class HelloWorldJndi extends HttpServlet { @@ -238,6 +255,25 @@ public class TestTomcat extends TomcatBa } @Test +public void testSession() throws Exception { +Tomcat tomcat = getTomcatInstance(); + +// Must have a real docBase - just use temp +org.apache.catalina.Context ctx = +tomcat.addContext(, System.getProperty(java.io.tmpdir)); +// You can customize the context by calling +// its API + +Tomcat.addServlet(ctx, myServlet, new HelloWorldSession()); +ctx.addServletMapping(/, myServlet); + +tomcat.start(); + +ByteChunk res = getUrl(http://localhost:; + getPort() + /); +assertEquals(Hello world, res.toString()); +} + +@Test public void testLaunchTime() throws Exception { Tomcat tomcat = getTomcatInstance(); long t0 = System.currentTimeMillis(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1162152 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/Tomcat.java test/org/apache/catalina/startup/TestTomcat.java webapps/docs/changelog.xml
Author: markt Date: Fri Aug 26 16:09:44 2011 New Revision: 1162152 URL: http://svn.apache.org/viewvc?rev=1162152view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51558 No need to force the use of the StandardManager with addWebapp() since StandardContext will add it if it is not set. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Aug 26 16:09:44 2011 @@ -1 +1 @@ -/tomcat/trunk:1156171,1156276,1156304,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082 +/tomcat/trunk:1156171,1156276,1156304,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1162152r1=1162151r2=1162152view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tomcat.java Fri Aug 26 16:09:44 2011 @@ -55,7 +55,6 @@ import org.apache.catalina.core.Standard import org.apache.catalina.deploy.LoginConfig; import org.apache.catalina.realm.GenericPrincipal; import org.apache.catalina.realm.RealmBase; -import org.apache.catalina.session.StandardManager; // TODO: lazy init for the temp dir - only when a JSP is compiled or // get temp dir is called we need to create it. This will avoid the @@ -747,7 +746,6 @@ public class Tomcat { ctx.addServletMapping(*.jspx, jsp); // Sessions -ctx.setManager( new StandardManager()); ctx.setSessionTimeout(30); // MIME mappings Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java?rev=1162152r1=1162151r2=1162152view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java Fri Aug 26 16:09:44 2011 @@ -35,6 +35,7 @@ import javax.naming.NamingException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -51,7 +52,7 @@ import org.apache.tomcat.util.buf.ByteCh public class TestTomcat extends TomcatBaseTest { /** - * Simple servlet to test in-line registration + * Simple servlet to test in-line registration. */ public static class HelloWorld extends HttpServlet { @@ -65,6 +66,22 @@ public class TestTomcat extends TomcatBa } /** + * Simple servlet to test the default session manager. + */ +public static class HelloWorldSession extends HttpServlet { + +private static final long serialVersionUID = 1L; + +@Override +public void doGet(HttpServletRequest req, HttpServletResponse res) +throws IOException { +HttpSession s = req.getSession(true); +s.getId(); +res.getWriter().write(Hello world); +} +} + +/** * Simple servlet to test JNDI */ public static class HelloWorldJndi extends HttpServlet { @@ -238,6 +255,25 @@ public class TestTomcat extends TomcatBa } @Test +public void testSession() throws Exception { +Tomcat tomcat = getTomcatInstance(); + +// Must have a real docBase - just use temp +org.apache.catalina.Context ctx = +tomcat.addContext(, System.getProperty(java.io.tmpdir)); +// You can customize the context by calling +// its API + +Tomcat.addServlet(ctx, myServlet, new HelloWorldSession()); +ctx.addServletMapping(/, myServlet); + +
DO NOT REPLY [Bug 51558] Tomcat Embedded: using tomcat.addWebapp always overrides programmatic context-settings with default values for the context at start of tomcat server
https://issues.apache.org/bugzilla/show_bug.cgi?id=51558 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Comment #6 from Mark Thomas ma...@apache.org 2011-08-26 16:09:52 UTC --- StandardContext already conditionally adds a StandardManager if one is not set. Since the offending code is meant to be replicating conf/web.xml (which can't set internal Tomcat components) I have simply removed this code from the listener. The fix has been applied to trunk and 7.0.x and will be included in 7.0.21 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
Re: Possible bug in Tomcat Date header handling
Mark and Mick, On 8/26/2011 11:45 AM, Mark Thomas wrote: The fix is to address the root cause which appears to be a poorly configured system clock. I am loath to add a work-around at any point in the Tomcat source code to handle time apparently going backwards rather than forwards. +1 This is not something that should happen on a stable server. DST adjustments will not cause Tomcat to report the same Date header for an hour (or whatever it is in your time zone) after DST rolls back. -chris signature.asc Description: OpenPGP digital signature
DO NOT REPLY [Bug 51682] j_spring_security_check action is not available
https://issues.apache.org/bugzilla/show_bug.cgi?id=51682 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEEDINFO|RESOLVED Resolution||INVALID --- Comment #3 from Mark Thomas ma...@apache.org 2011-08-26 16:23:39 UTC --- I spoke with the Spring Security team and they are not aware of any reports of this issue. They doubled checked Spring Security 3.1.0 on Tomcat 7.0.20 and everything worked as expected. This looks like an application issue and therefore is being resolved as invalid. -- 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: Possible bug in Tomcat Date header handling
I agree that a poorly configured system clock is not something Tomcat is responsible for, per se. However, there is a problem in the following code as I see it, which can be easily fixed by checking also for a negative number. This is a small fix that caters for people being dumb: /** * Get the current date in HTTP format. */ public static final String getCurrentDate() { long now = System.currentTimeMillis(); if ((now - currentDateGenerated) 1000) { synchronized (format) { if ((now - currentDateGenerated) 1000) { currentDate = format.format(new Date(now)); currentDateGenerated = now; } } } return currentDate; } I also think that looking at this code, if clocks go back at, say, 2am in a given time zone, Tomcat will report 2am in an HTTP header continually for 1 hour. Am I wrong? Thanks, Mick On 26/08/2011 17:10, Christopher Schultz ch...@christopherschultz.net wrote: Mark and Mick, On 8/26/2011 11:45 AM, Mark Thomas wrote: The fix is to address the root cause which appears to be a poorly configured system clock. I am loath to add a work-around at any point in the Tomcat source code to handle time apparently going backwards rather than forwards. +1 This is not something that should happen on a stable server. DST adjustments will not cause Tomcat to report the same Date header for an hour (or whatever it is in your time zone) after DST rolls back. -chris - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Possible bug in Tomcat Date header handling
2011/8/26 Mick Sear mick.s...@succeed.co.uk: I also think that looking at this code, if clocks go back at, say, 2am in a given time zone, Tomcat will report 2am in an HTTP header continually for 1 hour. Am I wrong? The header is in GMT. It does not matter what timezone your OS uses. [[[ static { format.setTimeZone(gmtZone); formats[0].setTimeZone(gmtZone); formats[1].setTimeZone(gmtZone); formats[2].setTimeZone(gmtZone); } ]]] wget.exe --save-headers http://localhost:8080/ HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/html;charset=ISO-8859-1 Date: Fri, 26 Aug 2011 16:40:02 GMT Connection: close Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1162169 - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/catalina/loader/ java/org/apache/catalina/manager/ java/org/apache/catalina/manager/host/ java/org/apache/catali
Author: markt Date: Fri Aug 26 17:08:17 2011 New Revision: 1162169 URL: http://svn.apache.org/viewvc?rev=1162169view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51704 Make calls to File.mkdirs() more robust and handle errors in a few places where they were ignored and should not have been. Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java tomcat/trunk/java/org/apache/catalina/session/FileStore.java tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/startup/ExpandWar.java tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java tomcat/trunk/java/org/apache/juli/FileHandler.java tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1162169r1=1162168r2=1162169view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Fri Aug 26 17:08:17 2011 @@ -6057,7 +6057,7 @@ public class StandardContext extends Con workDir, catalinaHomePath, getName()), e); } } -if (!dir.exists() !dir.mkdirs()) { +if (!dir.mkdirs() !dir.isDirectory()) { log.warn(sm.getString(standardContext.workCreateFail, dir, getName())); } Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1162169r1=1162168r2=1162169view=diff == --- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Fri Aug 26 17:08:17 2011 @@ -3011,8 +3011,11 @@ public class WebappClassLoader throw new IllegalArgumentException( sm.getString(webappClassLoader.validationErrorJarPath, jarEntry2.getName()), ioe); -} -resourceFile.getParentFile().mkdirs(); +} +File parentFile = resourceFile.getParentFile(); +if (!parentFile.mkdirs() !parentFile.exists()) { +// Ignore the error (like the IOExceptions below) +} FileOutputStream os = null; InputStream is = null; try { Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java?rev=1162169r1=1162168r2=1162169view=diff == --- tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java (original) +++ tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java Fri Aug 26 17:08:17 2011 @@ -883,10 +883,10 @@ public class WebappLoader extends Lifecy } else { classRepository = new File(workDir, classesPath); -if (!classRepository.isDirectory()) { -if (!classRepository.mkdirs()) -throw new IOException( -sm.getString(webappLoader.mkdirFailure)); +if (!classRepository.mkdirs() +!classRepository.isDirectory()) { +throw new IOException(
svn commit: r1162172 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ java/org/apache/catalina/loader/ java/org/apache/catalina/manager/ java/org/apache/catalina/manager/host/ java/org/ap
Author: markt Date: Fri Aug 26 17:12:33 2011 New Revision: 1162172 URL: http://svn.apache.org/viewvc?rev=1162172view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51704 Make calls to File.mkdirs() more robust and handle errors in a few places where they were ignored and should not have been. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappLoader.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/servlets/CGIServlet.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/FileStore.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/LocalStrings.properties tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ExpandWar.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/JspCompilationContext.java tomcat/tc7.0.x/trunk/java/org/apache/juli/FileHandler.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Aug 26 17:12:33 2011 @@ -1 +1 @@ -/tomcat/trunk:1156171,1156276,1156304,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149 +/tomcat/trunk:1156171,1156276,1156304,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1162172r1=1162171r2=1162172view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Fri Aug 26 17:12:33 2011 @@ -6078,7 +6078,7 @@ public class StandardContext extends Con workDir, catalinaHomePath, getName()), e); } } -if (!dir.exists() !dir.mkdirs()) { +if (!dir.mkdirs() !dir.isDirectory()) { log.warn(sm.getString(standardContext.workCreateFail, dir, getName())); } Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1162172r1=1162171r2=1162172view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Fri Aug 26 17:12:33 2011 @@ -3011,8 +3011,11 @@ public class WebappClassLoader throw new IllegalArgumentException( sm.getString(webappClassLoader.validationErrorJarPath, jarEntry2.getName()), ioe); -} -resourceFile.getParentFile().mkdirs(); +} +File parentFile = resourceFile.getParentFile(); +if (!parentFile.mkdirs()
DO NOT REPLY [Bug 51704] Dubious use of mkdirs() return code in juli FileHandler
https://issues.apache.org/bugzilla/show_bug.cgi?id=51704 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #1 from Mark Thomas ma...@apache.org 2011-08-26 17:12:51 UTC --- There were ~25 uses of mkdirs() throughout the codebase. All have been reviewed and fixed as appropriate. If we are being this pedantic then if (!dir.mkdirs() !dir.isDirectory()) { is a better test since it ensures the file that exists is a directory rather than a regular file. This has been fixed in trunk and 7.0.x and will be included in 7.0.21 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: r1162181 - /tomcat/tc5.5.x/trunk/STATUS.txt
Author: kkolinko Date: Fri Aug 26 17:39:23 2011 New Revision: 1162181 URL: http://svn.apache.org/viewvc?rev=1162181view=rev Log: vote 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=1162181r1=1162180r2=1162181view=diff == --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Fri Aug 26 17:39:23 2011 @@ -69,6 +69,15 @@ PATCHES PROPOSED TO BACKPORT: * Update Eclipse compiler and switch to using ecj.jar http://people.apache.org/~markt/patches/2011-08-25-lib-update-tc5-v2.patch +1: markt + +1: kkolinko: ++ update build/resources/License.rtf to match LICENSE file ++ in class-loader-howto.xml sort the JARs list alphabetically +I've run jarcheck tool against the archive. Results are in + http://people.apache.org/~kkolinko/patches/jarcheck/ +Most classes are JDK 1.2 compatible. Some are JDK 1.6 (esp. annotations processor), +but it is the same in ecj 3.3.1 that is currently used. +Those classes are absent in jasper-compiler-jdt.jar that we would +generate, so their presence does not matter. -1: * Align jpda settings with catalina.sh, tc6.0.x, tc7.0.x and trunk - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51727] New: Manager deploy cannot be invoked without path parameter
https://issues.apache.org/bugzilla/show_bug.cgi?id=51727 Bug #: 51727 Summary: Manager deploy cannot be invoked without path parameter Product: Tomcat 6 Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Documentation AssignedTo: dev@tomcat.apache.org ReportedBy: jer...@netmesh.us Classification: Unclassified Section Deploy using a Context configuration .xml file in http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html says this should work: curl http://localhost:8080/manager/deploy?config=file:/tmp/mycontext.xml --basic -u user:pass However, it fails with error: FAIL - Invalid context path null was specified Instead, path needs to be specified like this: curl http://localhost:8080/manager/deploy?config=file:/tmp/mycontext.xml\path=/foo --basic -u user:pass This bug was filed previously against the manager app (#46115 and #49451) and closed as RESOLVED FIXED, however, the documentation is still inconsistent. -- 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 51728] New: error parsing valid EL expression
https://issues.apache.org/bugzilla/show_bug.cgi?id=51728 Bug #: 51728 Summary: error parsing valid EL expression Product: Tomcat 7 Version: 7.0.20 Platform: PC OS/Version: Mac OS X 10.4 Status: NEW Severity: major Priority: P2 Component: Jasper AssignedTo: dev@tomcat.apache.org ReportedBy: adolfo.benede...@gmail.com Classification: Unclassified Jasper fails parsing a valid EL the expression; c:when test=${documentBean.class.simpleName == 'FaqBean'} . Caused by: org.apache.jasper.JasperException: /WEB-INF/tags/canonicalPath.tag (line: 24, column: 4) ${documentBean.class.simpleName == 'FaqBean'} contains invalid expression(s): javax.el.ELException: Failed to parse the expression [${documentBean.class.simpleName == 'FaqBean'}] at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198) at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1218) at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:870) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:889) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434) at org.apache.jasper.compiler.Node$Root.accept(Node.java:475) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1790) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:644) at org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:241) at org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:578) at org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:49) at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:655) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:659) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:659) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:659) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:659) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:659) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434) at org.apache.jasper.compiler.Node$Root.accept(Node.java:475) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) at org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcessor.java:673) at
DO NOT REPLY [Bug 51728] error parsing valid EL expression
https://issues.apache.org/bugzilla/show_bug.cgi?id=51728 Adolfo Benedetti adolfo.benede...@gmail.com changed: What|Removed |Added Platform|PC |Macintosh -- 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 51728] error parsing valid EL expression
https://issues.apache.org/bugzilla/show_bug.cgi?id=51728 --- Comment #1 from Konstantin Kolinko knst.koli...@gmail.com 2011-08-26 21:56:49 UTC --- You have not provided the full error message (have you looked into the logs?) [[[ ... with root cause javax.el.ELException: The identifier [class] is not a valid Java identifier as required by section 1.19 of the EL specification (Identifier ::= Java language identifier). This check can be disabled by setting the system property org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true. ]]] Anyway, your EL expression is invalid, You can use the following equivalent one instead: ${documentBean['class'].simpleName == 'FaqBean'} -- 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 51728] error parsing valid EL expression
https://issues.apache.org/bugzilla/show_bug.cgi?id=51728 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID -- 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 49217] Accepting java keyword in EL
https://issues.apache.org/bugzilla/show_bug.cgi?id=49217 Konstantin Kolinko knst.koli...@gmail.com changed: What|Removed |Added CC||adolfo.benede...@gmail.com --- Comment #15 from Konstantin Kolinko knst.koli...@gmail.com 2011-08-26 21:59:15 UTC --- *** Bug 51728 has been marked as a duplicate of this bug. *** -- 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 51728] error parsing valid EL expression
https://issues.apache.org/bugzilla/show_bug.cgi?id=51728 Konstantin Kolinko knst.koli...@gmail.com changed: What|Removed |Added Resolution|INVALID |DUPLICATE --- Comment #2 from Konstantin Kolinko knst.koli...@gmail.com 2011-08-26 21:59:15 UTC --- *** This bug has been marked as a duplicate of bug 49217 *** -- 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: svn commit: r1157874 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
Thank you! On 8/26/2011 7:31 AM, Konstantin Kolinko wrote: 2011/8/25 Konstantin Kolinkoknst.koli...@gmail.com: URL: http://svn.apache.org/viewvc?rev=1157874view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51583 1) I think that because of this change the while (con != null) { loop may run infinitely, because when pool.size() is 0 the con variable is never set to null. You'll repeatedly release the same connection. 2) Note that this change is in changelog for 7.0.21, but actually it is not in TC7, because svn:externals property on tc7.0.x/trunk/modules has not been updated. I fixed the loop and updated externals in TC7. 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: r1162280 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Fri Aug 26 22:46:53 2011 New Revision: 1162280 URL: http://svn.apache.org/viewvc?rev=1162280view=rev Log: Remove a point. There is no i18n in org/apache/jk/** 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=1162280r1=1162279r2=1162280view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Aug 26 22:46:53 2011 @@ -92,8 +92,6 @@ PATCHES PROPOSED TO BACKPORT: It seems though that 1) MemoryProtocolHandler#process() should now try/catch(Throwable). The MemoryProtocolHandler is created in Embedded.java line 424. - Maybe also -2) i18n the message in JkCoyoteHandler. -1: * Fix two typos in tomcat.nsi (uppercase vs. lowercase in a macro call and in a message) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1162281 - /tomcat/tc5.5.x/trunk/STATUS.txt
Author: kkolinko Date: Fri Aug 26 22:49:40 2011 New Revision: 1162281 URL: http://svn.apache.org/viewvc?rev=1162281view=rev Log: Remove points. There is no i18n in org/apache/jk/**, so there is no much need to add it. In TC6 CoyoteAdapter does not log.info() as in 5.5, but log,error(), so let's go with error(). 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=1162281r1=1162280r2=1162281view=diff == --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Fri Aug 26 22:49:40 2011 @@ -52,10 +52,6 @@ PATCHES PROPOSED TO BACKPORT: It seems though that 1) MemoryProtocolHandler#process() should now try/catch(Throwable). The MemoryProtocolHandler is created in Embedded.java line 424. - Maybe also -2) i18n the message in JkCoyoteHandler. -3) s/log.error()/log.info()/ in processors, because CoyoteAdapter -used info() for its exception handling. -1: * Detect incomplete AJP messages and reject the associated request if one is - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1162282 - in /tomcat: tc5.5.x/trunk/STATUS.txt tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Fri Aug 26 23:00:38 2011 New Revision: 1162282 URL: http://svn.apache.org/viewvc?rev=1162282view=rev Log: Remove a point regarding MemoryProtocolHandler. 1. MemoryProtocolHandler#process() is not part of any interface. It is just a method. 2. We do not have callers for this method, so it is hard to justify how it is used. 3. The method is already declared with generic throws Exception, so those have to be handled. So the only missing point is whether the caller handles other Throwables. It is justified to hope that it handles them. Modified: tomcat/tc5.5.x/trunk/STATUS.txt tomcat/tc6.0.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=1162282r1=1162281r2=1162282view=diff == --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Fri Aug 26 23:00:38 2011 @@ -49,9 +49,6 @@ PATCHES PROPOSED TO BACKPORT: markt: See reply to kkolinko above. +1: kkolinko: OK with the updated patch. - It seems though that -1) MemoryProtocolHandler#process() should now try/catch(Throwable). - The MemoryProtocolHandler is created in Embedded.java line 424. -1: * Detect incomplete AJP messages and reject the associated request if one is Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1162282r1=1162281r2=1162282view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Aug 26 23:00:38 2011 @@ -87,11 +87,7 @@ PATCHES PROPOSED TO BACKPORT: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51550 Display error page rather than an empty response for an IllegalStateException https://issues.apache.org/bugzilla/attachment.cgi?id=27434 - +1: markt - +1: kkolinko - It seems though that -1) MemoryProtocolHandler#process() should now try/catch(Throwable). - The MemoryProtocolHandler is created in Embedded.java line 424. + +1: markt, kkolinko -1: * Fix two typos in tomcat.nsi (uppercase vs. lowercase in a macro call and in a message) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1162283 - /tomcat/tc5.5.x/trunk/STATUS.txt
Author: kkolinko Date: Fri Aug 26 23:03:30 2011 New Revision: 1162283 URL: http://svn.apache.org/viewvc?rev=1162283view=rev Log: simplify the vote. I think the updated Mark's patch addresses the concerns. 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=1162283r1=1162282r2=1162283view=diff == --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Fri Aug 26 23:03:30 2011 @@ -28,27 +28,7 @@ PATCHES PROPOSED TO BACKPORT: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51550 Display error page rather than an empty response for an IllegalStateException https://issues.apache.org/bugzilla/attachment.cgi?id=27421 - +1: markt - - kkolinko: I do not like removing the catch from CoyoteAdapter. It - looks safer the old way. JkCoyoteHandler does not handle Errors, just - Exceptions. It seems from the patch that all you need to fix this bug is -ep.setStatus(MsgContext.JK_STATUS_ERROR); - Can't it be done by CoyoteAdapter itself? -markt: In short, no. To correctly handle the error the associated - processor needs to set the error flag and catching the exception - in the CoyoteAdaptor prevents that. The processors catch - Throwable so nothing extra will slip through. - The JkCoyoteHandler is a special case since it is a completely - different implementation. However, JkCoyoteHandler does need to - be changed to catch Throwable rather than Exception. I have - updated the proposed patch to do exactly that. - -0: schultz: I tend to agree with Konstantin's assertion that the catch - block is important. I understand the change to the status, but could - you explain why the catch(Throwable) block has been removed? -markt: See reply to kkolinko above. - - +1: kkolinko: OK with the updated patch. + +1: markt, kkolinko -1: * Detect incomplete AJP messages and reject the associated request if one is - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org