[Bug 56158] New: Socket.send kills JVM
https://issues.apache.org/bugzilla/show_bug.cgi?id=56158 Bug ID: 56158 Summary: Socket.send kills JVM Product: Tomcat Native Version: 1.1.24 Hardware: PC OS: Linux Status: NEW Severity: critical Priority: P2 Component: Library Assignee: dev@tomcat.apache.org Reporter: mailtoa...@gmail.com Created attachment 31328 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31328&action=edit The error log. I am using Tomcat 7.0.35 with Tomcat Native 1.1.24 and APR 1.4.6. My application uses websockets. When testing on an openSuse 12.3 Linux 64bit system the JVM crashes. I can reproduce the crashes but only the time when they occur is unpredictable. I have attached the error log. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55837] ServletContext.getRealPath() returns null
https://issues.apache.org/bugzilla/show_bug.cgi?id=55837 --- Comment #7 from Mark Thomas --- (In reply to Patrick Mi from comment #6) > Should the method return the CanonicalPath or AbsolutePath? > > I used this method in Tomcat 4 and it returned AbsolutePath and now I found > that it returns CanonicalPath which means the I couldn't locate my file > anymore due to symbolic link is used for my docBase. Bugzilla is not a support forum. Please use the Apache Tomcat users' mailing list. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56158] Socket.send kills JVM
https://issues.apache.org/bugzilla/show_bug.cgi?id=56158 --- Comment #1 from Mark Thomas --- Upgrade to 1.1.29. There have been various fixes since 1.1.24 related to issues identified by testing with WebSocket. -- 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
Reg: Availability of Tomcat 7.0.51 for download
Hello, We are using Tomcat in one of the Symantec product. I would like to know by when Tomcat 7.0.51 will be available for download? Currently we are using Tomcat 7.0.42. Because of CVE-2014-0050, a DoS vulnerability, we have to update Tomcat to 7.0.51. We presume later version would have fix for this vulnerability. Note that we cannot update to Tomcat 8.0.3 (beta) that has fix for above vulnerability. I would appreciate if you can share Tomcat 7.0.51 release dates. Thank you. Regards, Tushar
Re: Reg: Availability of Tomcat 7.0.51 for download
Hi, AFAIK, Tomcat 7.0.51 won't get published. The 7.0.52 hit Apache repo and the download page should be updated soon I guess. JLouis 2014-02-19 10:57 GMT+01:00 Tushar Agrawal : > Hello, > > We are using Tomcat in one of the Symantec product. I would like to know > by when Tomcat 7.0.51 will be available for download? > > Currently we are using Tomcat 7.0.42. Because of CVE-2014-0050, a DoS > vulnerability, we have to update Tomcat to 7.0.51. We presume later version > would have fix for this vulnerability. > Note that we cannot update to Tomcat 8.0.3 (beta) that has fix for above > vulnerability. > > I would appreciate if you can share Tomcat 7.0.51 release dates. > > Thank you. > > Regards, > Tushar > > -- Jean-Louis
svn commit: r1569681 - in /tomcat/site/trunk: ./ docs/ xdocs/
Author: violetagg Date: Wed Feb 19 11:00:05 2014 New Revision: 1569681 URL: http://svn.apache.org/r1569681 Log: Updates (excluding docs) for 7.0.52 release. Modified: tomcat/site/trunk/build.properties.default tomcat/site/trunk/docs/doap_Tomcat.rdf tomcat/site/trunk/docs/download-70.html tomcat/site/trunk/docs/index.html tomcat/site/trunk/docs/migration-7.html tomcat/site/trunk/docs/oldnews.html tomcat/site/trunk/docs/whichversion.html tomcat/site/trunk/xdocs/doap_Tomcat.rdf tomcat/site/trunk/xdocs/download-70.xml tomcat/site/trunk/xdocs/index.xml tomcat/site/trunk/xdocs/migration-7.xml tomcat/site/trunk/xdocs/oldnews.xml tomcat/site/trunk/xdocs/whichversion.xml Modified: tomcat/site/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/site/trunk/build.properties.default?rev=1569681&r1=1569680&r2=1569681&view=diff == --- tomcat/site/trunk/build.properties.default (original) +++ tomcat/site/trunk/build.properties.default Wed Feb 19 11:00:05 2014 @@ -37,7 +37,7 @@ tomcat.loc=http://www.apache.org/dist/to # - Tomcat versions - tomcat60=6.0.39 -tomcat70=7.0.50 +tomcat70=7.0.52 tomcat80=8.0.3 Modified: tomcat/site/trunk/docs/doap_Tomcat.rdf URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/doap_Tomcat.rdf?rev=1569681&r1=1569680&r2=1569681&view=diff == --- tomcat/site/trunk/docs/doap_Tomcat.rdf (original) +++ tomcat/site/trunk/docs/doap_Tomcat.rdf Wed Feb 19 11:00:05 2014 @@ -64,8 +64,8 @@ Latest Stable 7.0.x Release -2014-01-08 -7.0.50 +2014-02-17 +7.0.52 Modified: tomcat/site/trunk/docs/download-70.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-70.html?rev=1569681&r1=1569680&r2=1569681&view=diff == --- tomcat/site/trunk/docs/download-70.html (original) +++ tomcat/site/trunk/docs/download-70.html Wed Feb 19 11:00:05 2014 @@ -204,8 +204,8 @@ https://www.apache.org/dist/tomcat/tomcat-7/KEYS";>KEYS | -7.0.50 | -Browse | +7.0.52 | +Browse | http://archive.apache.org/dist/tomcat/tomcat-7";>Archives @@ -251,12 +251,12 @@ -7.0.50 +7.0.52 Please see the - README + README file for packaging information. It explains what every distribution contains. @@ -272,44 +272,44 @@ -zip -(https://www.apache.org/dist/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50.zip.asc";>pgp, -https://www.apache.org/dist/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50.zip.md5";>md5) +zip +(https://www.apache.org/dist/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52.zip.asc";>pgp, +https://www.apache.org/dist/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52.zip.md5";>md5) -tar.gz -(https://www.apache.org/dist/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50.tar.gz.asc";>pgp, -https://www.apache.org/dist/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50.tar.gz.md5";>md5) +tar.gz +(https://www.apache.org/dist/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52.tar.gz.asc";>pgp, +https://www.apache.org/dist/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52.tar.gz.md5";>md5) -32-bit Windows zip -(https://www.apache.org/dist/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50-windows-x86.zip.asc";>pgp, -https://www.apache.org/dist/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50-windows-x86.zip.md5";>md5) +32-bit Windows zip +(https://www.apache.org/dist/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52-windows-x86.zip.asc";>pgp, +https://www.apache.org/dist/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52-windows-x86.zip.md5";>md5) -64-bit Windows zip -(https://www.apache.org/dist/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50-windows-x64.zip.asc";>pgp, -https://www.apache.org/dist/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50-windows-x64.zip.md5";>md5) +64-bit Windows zip +(https://www.apache.org/dist/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52-windows-x64.zip.asc";>pgp, +https://www.apache.org/dist/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52-windows-x64.zip.md5";>md5) -64-bit Itanium Windows zip -(https://www.apache.org/dist/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50-windows-i64.zip.asc";>pgp, -https://www.apache.org/dist/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.
svn commit: r1569689 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Author: violetagg Date: Wed Feb 19 11:18:14 2014 New Revision: 1569689 URL: http://svn.apache.org/r1569689 Log: Add release date for 7.0.52 Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml 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=1569689&r1=1569688&r2=1569689&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Feb 19 11:18:14 2014 @@ -123,7 +123,7 @@ - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r4441 - /release/tomcat/tomcat-7/v7.0.50/
Author: violetagg Date: Wed Feb 19 11:20:33 2014 New Revision: 4441 Log: Remove 7.0.50 Removed: release/tomcat/tomcat-7/v7.0.50/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1569698 - in /tomcat/site/trunk/docs: ./ tomcat-7.0-doc/ tomcat-7.0-doc/api/ tomcat-7.0-doc/api/org/apache/catalina/ tomcat-7.0-doc/api/org/apache/catalina/ant/ tomcat-7.0-doc/api/org/apa
Author: violetagg Date: Wed Feb 19 11:52:41 2014 New Revision: 1569698 URL: http://svn.apache.org/r1569698 Log: Update docs for Apache Tomcat 7.0.52 release. [This commit notification would consist of 80 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[ANN] Apache Tomcat 7.0.52 released
The Apache Tomcat team announces the immediate availability of Apache Tomcat 7.0.52. Apache Tomcat is an open source software implementation of the Java Servlet, JavaServer Pages and Java Expression Language technologies. This release contains a number of bug fixes and improvements compared to version 7.0.50. Please refer to the change log for the complete list of changes: http://tomcat.apache.org/tomcat-7.0-doc/changelog.html Note: This version has 4 zip binaries: a generic one and three bundled with Tomcat native binaries for Windows operating systems running on different CPU architectures. Note: Use of the JSR-356 Java WebSocket 1.0 implementation requires Java 7. Note: If you use the APR/native AJP or HTTP connector you *must* upgrade to version 1.1.29 or later of the APR/native library. Downloads: http://tomcat.apache.org/download-70.cgi Migration guides from Apache Tomcat 5.5.x and 6.0.x: http://tomcat.apache.org/migration.html
Re: Reg: Availability of Tomcat 7.0.51 for download
2014-02-19 11:59 GMT+02:00 Jean-Louis MONTEIRO : > > Hi, > > AFAIK, Tomcat 7.0.51 won't get published. > The 7.0.52 hit Apache repo and the download page should be updated soon I > guess. Tomcat 7.0.52 is available on the download page. Enjoy. Regards Violeta > JLouis > > > 2014-02-19 10:57 GMT+01:00 Tushar Agrawal : > > > Hello, > > > > We are using Tomcat in one of the Symantec product. I would like to know > > by when Tomcat 7.0.51 will be available for download? > > > > Currently we are using Tomcat 7.0.42. Because of CVE-2014-0050, a DoS > > vulnerability, we have to update Tomcat to 7.0.51. We presume later version > > would have fix for this vulnerability. > > Note that we cannot update to Tomcat 8.0.3 (beta) that has fix for above > > vulnerability. > > > > I would appreciate if you can share Tomcat 7.0.51 release dates. > > > > Thank you. > > > > Regards, > > Tushar > > > > > > > -- > Jean-Louis
Re: Reg: Availability of Tomcat 7.0.51 for download
Do you plan to also update the http://tomcat.apache.org/tomcat-7.0-doc/changelog.html page And of course the home page http://tomcat.apache.org/ Thanks anyway for the release and the great job. JLouis 2014-02-19 13:43 GMT+01:00 Violeta Georgieva : > 2014-02-19 11:59 GMT+02:00 Jean-Louis MONTEIRO : > > > > Hi, > > > > AFAIK, Tomcat 7.0.51 won't get published. > > The 7.0.52 hit Apache repo and the download page should be updated soon I > > guess. > > Tomcat 7.0.52 is available on the download page. > > Enjoy. > > Regards > Violeta > > > JLouis > > > > > > 2014-02-19 10:57 GMT+01:00 Tushar Agrawal : > > > > > Hello, > > > > > > We are using Tomcat in one of the Symantec product. I would like to > know > > > by when Tomcat 7.0.51 will be available for download? > > > > > > Currently we are using Tomcat 7.0.42. Because of CVE-2014-0050, a DoS > > > vulnerability, we have to update Tomcat to 7.0.51. We presume later > version > > > would have fix for this vulnerability. > > > Note that we cannot update to Tomcat 8.0.3 (beta) that has fix for > above > > > vulnerability. > > > > > > I would appreciate if you can share Tomcat 7.0.51 release dates. > > > > > > Thank you. > > > > > > Regards, > > > Tushar > > > > > > > > > > > > -- > > Jean-Louis > -- Jean-Louis
Re: Reg: Availability of Tomcat 7.0.51 for download
2014-02-19 14:53 GMT+02:00 Jean-Louis MONTEIRO : > > Do you plan to also update the > http://tomcat.apache.org/tomcat-7.0-doc/changelog.html page > And of course the home page http://tomcat.apache.org/ They are updated, just refresh them. Regards Violeta > Thanks anyway for the release and the great job. > > JLouis > > > 2014-02-19 13:43 GMT+01:00 Violeta Georgieva : > > > 2014-02-19 11:59 GMT+02:00 Jean-Louis MONTEIRO : > > > > > > Hi, > > > > > > AFAIK, Tomcat 7.0.51 won't get published. > > > The 7.0.52 hit Apache repo and the download page should be updated soon I > > > guess. > > > > Tomcat 7.0.52 is available on the download page. > > > > Enjoy. > > > > Regards > > Violeta > > > > > JLouis > > > > > > > > > 2014-02-19 10:57 GMT+01:00 Tushar Agrawal : > > > > > > > Hello, > > > > > > > > We are using Tomcat in one of the Symantec product. I would like to > > know > > > > by when Tomcat 7.0.51 will be available for download? > > > > > > > > Currently we are using Tomcat 7.0.42. Because of CVE-2014-0050, a DoS > > > > vulnerability, we have to update Tomcat to 7.0.51. We presume later > > version > > > > would have fix for this vulnerability. > > > > Note that we cannot update to Tomcat 8.0.3 (beta) that has fix for > > above > > > > vulnerability. > > > > > > > > I would appreciate if you can share Tomcat 7.0.51 release dates. > > > > > > > > Thank you. > > > > > > > > Regards, > > > > Tushar > > > > > > > > > > > > > > > > > -- > > > Jean-Louis > > > > > > -- > Jean-Louis
Re: Reg: Availability of Tomcat 7.0.51 for download
Awesome! JLouis 2014-02-19 13:55 GMT+01:00 Violeta Georgieva : > 2014-02-19 14:53 GMT+02:00 Jean-Louis MONTEIRO : > > > > Do you plan to also update the > > http://tomcat.apache.org/tomcat-7.0-doc/changelog.html page > > And of course the home page http://tomcat.apache.org/ > > They are updated, just refresh them. > > Regards > Violeta > > > Thanks anyway for the release and the great job. > > > > JLouis > > > > > > 2014-02-19 13:43 GMT+01:00 Violeta Georgieva : > > > > > 2014-02-19 11:59 GMT+02:00 Jean-Louis MONTEIRO : > > > > > > > > Hi, > > > > > > > > AFAIK, Tomcat 7.0.51 won't get published. > > > > The 7.0.52 hit Apache repo and the download page should be updated > soon I > > > > guess. > > > > > > Tomcat 7.0.52 is available on the download page. > > > > > > Enjoy. > > > > > > Regards > > > Violeta > > > > > > > JLouis > > > > > > > > > > > > 2014-02-19 10:57 GMT+01:00 Tushar Agrawal < > tushar_agra...@symantec.com > >: > > > > > > > > > Hello, > > > > > > > > > > We are using Tomcat in one of the Symantec product. I would like to > > > know > > > > > by when Tomcat 7.0.51 will be available for download? > > > > > > > > > > Currently we are using Tomcat 7.0.42. Because of CVE-2014-0050, a > DoS > > > > > vulnerability, we have to update Tomcat to 7.0.51. We presume later > > > version > > > > > would have fix for this vulnerability. > > > > > Note that we cannot update to Tomcat 8.0.3 (beta) that has fix for > > > above > > > > > vulnerability. > > > > > > > > > > I would appreciate if you can share Tomcat 7.0.51 release dates. > > > > > > > > > > Thank you. > > > > > > > > > > Regards, > > > > > Tushar > > > > > > > > > > > > > > > > > > > > > > -- > > > > Jean-Louis > > > > > > > > > > > -- > > Jean-Louis > -- Jean-Louis
[jira] [Updated] (MTOMCAT-238) Parameter staticContextDocbase cant be used
[ https://issues.apache.org/jira/browse/MTOMCAT-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Laurent GARCIA updated MTOMCAT-238: --- Attachment: AbstractRunMojo.java Like I said, it's juste a line in comment, but I add the source file too. The binary file is usefull if you really need this to works quickly (just overwrite the one in your personal repo in .m2\repository\org\apache\tomcat\maven\tomcat7-maven-plugin\2.2) > Parameter staticContextDocbase cant be used > --- > > Key: MTOMCAT-238 > URL: https://issues.apache.org/jira/browse/MTOMCAT-238 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat6, tomcat7 >Affects Versions: 2.0-beta-1, 2.1 >Reporter: Michal Franc >Assignee: Olivier Lamy (*$^¨%`£) > Fix For: moreinfo > > Attachments: AbstractRunMojo.java, tomcat7-maven-plugin-2.2.jar.zip > > > Attribute staticContextDocbase leads to IllegalArgumentException > org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo#createStaticContext > is context created from container and at the and added again to server which > leads to java.lang.IllegalArgumentException: addChild: Child name '/' is not > unique -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: false in filter?
On 18/02/2014 17:43, Konstantin Kolinko wrote: > 2014-02-18 20:05 GMT+04:00 Mark Thomas : >> On 18/02/2014 13:07, Romain Manni-Bucau wrote: >>> 2014-02-18 13:10 GMT+01:00 Mark Thomas : >> >> >> Looks like there might be a couple of problems here. Any chance you could debug this and provide the full text of the merged web.xml? >>> >>> https://gist.github.com/rmannibucau/38292f66783c0d49965b >> >> OK. The error is valid. You have a 2.5 web.xml using 3.0 syntax. >> However, if the base web.xml is using 2.5, then there should not have >> been any merging. Hmm. >> >> What schema does /WEB-INF/web.xml declare in your app and where is >> TestFilter declared not to support async? >> > > In WebXml.toXml() lines 715-716 (in trunk) > [[[ > appendElement(sb, INDENT4, "async-supported", > filterDef.getAsyncSupported()); > ]]] > > needs to be wrapped by an if(version>=...). > > I tested that default conf/web.xml serializes/parses correctly but it > has no s in it, so apparently it slipped. There are two issues here. One is the issue cited above although it is much wider than just async-supported. I'm working though the specs now and I'll extend the test cases as I go. The second issue is why tldValidation is controlling this. That I'll look at once validation is fixed. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1569735 - in /tomcat/trunk: java/org/apache/tomcat/util/descriptor/web/WebXml.java test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
Author: markt Date: Wed Feb 19 13:22:10 2014 New Revision: 1569735 URL: http://svn.apache.org/r1569735 Log: Update tests to check correct handling of all elements added between 2.2 and 2.3. Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java?rev=1569735&r1=1569734&r2=1569735&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Wed Feb 19 13:22:10 2014 @@ -633,6 +633,9 @@ public class WebXml { // TODO - Various, icon, description etc elements are skipped - mainly //because they are ignored when web.xml is parsed - see above +// NOTE - Elements need to be written in the order defined in the 2.3 +//DTD else validation of the merged web.xml will fail + // Declaration sb.append("\n"); @@ -701,61 +704,71 @@ public class WebXml { } sb.append('\n'); -for (Map.Entry entry : filters.entrySet()) { -FilterDef filterDef = entry.getValue(); -sb.append(" \n"); -appendElement(sb, INDENT4, "description", -filterDef.getDescription()); -appendElement(sb, INDENT4, "display-name", -filterDef.getDisplayName()); -appendElement(sb, INDENT4, "filter-name", -filterDef.getFilterName()); -appendElement(sb, INDENT4, "filter-class", -filterDef.getFilterClass()); -appendElement(sb, INDENT4, "async-supported", -filterDef.getAsyncSupported()); -for (Map.Entry param : -filterDef.getParameterMap().entrySet()) { -sb.append("\n"); -appendElement(sb, INDENT6, "param-name", param.getKey()); -appendElement(sb, INDENT6, "param-value", param.getValue()); -sb.append("\n"); +// Filters were introduced in Servlet 2.3 +// Note versions are validated and start at 2.2 so this test takes that +// into account +if (getMajorVersion() > 2 || getMinorVersion() > 2) { +for (Map.Entry entry : filters.entrySet()) { +FilterDef filterDef = entry.getValue(); +sb.append(" \n"); +appendElement(sb, INDENT4, "description", +filterDef.getDescription()); +appendElement(sb, INDENT4, "display-name", +filterDef.getDisplayName()); +appendElement(sb, INDENT4, "filter-name", +filterDef.getFilterName()); +appendElement(sb, INDENT4, "filter-class", +filterDef.getFilterClass()); +appendElement(sb, INDENT4, "async-supported", +filterDef.getAsyncSupported()); +for (Map.Entry param : +filterDef.getParameterMap().entrySet()) { +sb.append("\n"); +appendElement(sb, INDENT6, "param-name", param.getKey()); +appendElement(sb, INDENT6, "param-value", param.getValue()); +sb.append("\n"); +} +sb.append(" \n"); } -sb.append(" \n"); -} -sb.append('\n'); +sb.append('\n'); -for (FilterMap filterMap : filterMaps) { -sb.append(" \n"); -appendElement(sb, INDENT4, "filter-name", -filterMap.getFilterName()); -if (filterMap.getMatchAllServletNames()) { -sb.append("*\n"); -} else { -for (String servletName : filterMap.getServletNames()) { -appendElement(sb, INDENT4, "servlet-name", servletName); +for (FilterMap filterMap : filterMaps) { +sb.append(" \n"); +appendElement(sb, INDENT4, "filter-name", +filterMap.getFilterName()); +if (filterMap.getMatchAllServletNames()) { +sb.append("*\n"); +} else { +for (String servletName : filterMap.getServletNames()) { +appendElement(sb, INDENT4, "servlet-name", servletName); +} } -} -if (filterMap.getMatchAllUrlPatterns()) { -sb.append("*\n"); -} else { -for (String urlPattern : filterMap.getURLPatterns()) { -
Re: false in filter?
2014-02-19 17:21 GMT+04:00 Mark Thomas : > On 18/02/2014 17:43, Konstantin Kolinko wrote: >> 2014-02-18 20:05 GMT+04:00 Mark Thomas : >>> On 18/02/2014 13:07, Romain Manni-Bucau wrote: 2014-02-18 13:10 GMT+01:00 Mark Thomas : >>> >>> >>> > Looks like there might be a couple of problems here. Any chance you > could debug this and provide the full text of the merged web.xml? > https://gist.github.com/rmannibucau/38292f66783c0d49965b >>> >>> OK. The error is valid. You have a 2.5 web.xml using 3.0 syntax. >>> However, if the base web.xml is using 2.5, then there should not have >>> been any merging. Hmm. >>> >>> What schema does /WEB-INF/web.xml declare in your app and where is >>> TestFilter declared not to support async? >>> >> >> In WebXml.toXml() lines 715-716 (in trunk) >> [[[ >> appendElement(sb, INDENT4, "async-supported", >> filterDef.getAsyncSupported()); >> ]]] >> >> needs to be wrapped by an if(version>=...). >> >> I tested that default conf/web.xml serializes/parses correctly but it >> has no s in it, so apparently it slipped. > > There are two issues here. > > One is the issue cited above although it is much wider than just > async-supported. I'm working though the specs now and I'll extend the > test cases as I go. > It it becomes too complicated, Alternative ways: a) Write out only those elements that are read by Jasper. b) Re-implement asking this info from container, but keep web.xml parser for standalone JspC. http://svn.apache.org/viewvc?view=revision&revision=1377511 c) Just turn off validation. > The second issue is why tldValidation is controlling this. That I'll > look at once validation is fixed. > >From a quick look, a) there is no separate option to control this. (neither in catalina's Globals, nor in jasper's Constants, nor in JspC) b) The parsing itself occurs in jasper.compiler.JspConfig#processWebDotXml() 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: r1569755 - in /tomcat/trunk: java/org/apache/tomcat/util/descriptor/web/WebXml.java test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
Author: markt Date: Wed Feb 19 14:30:24 2014 New Revision: 1569755 URL: http://svn.apache.org/r1569755 Log: Update tests to check correct handling of all attributes added between 2.2 and 2.3. Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java?rev=1569755&r1=1569754&r2=1569755&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Wed Feb 19 14:30:24 2014 @@ -793,10 +793,15 @@ public class WebXml { appendElement(sb, INDENT4, "enabled", servletDef.getEnabled()); appendElement(sb, INDENT4, "async-supported", servletDef.getAsyncSupported()); -if (servletDef.getRunAs() != null) { -sb.append("\n"); -appendElement(sb, INDENT6, "role-name", servletDef.getRunAs()); -sb.append("\n"); +// servlet/run-as was introduced in Servlet 2.3 +// Note versions are validated and start at 2.2 so this test takes that +// into account +if (getMajorVersion() > 2 || getMinorVersion() > 2) { +if (servletDef.getRunAs() != null) { +sb.append("\n"); +appendElement(sb, INDENT6, "role-name", servletDef.getRunAs()); +sb.append("\n"); +} } for (SecurityRoleRef roleRef : servletDef.getSecurityRoleRefs()) { sb.append("\n"); @@ -960,8 +965,13 @@ public class WebXml { appendElement(sb, INDENT4, "res-ref-name", resourceRef.getName()); appendElement(sb, INDENT4, "res-type", resourceRef.getType()); appendElement(sb, INDENT4, "res-auth", resourceRef.getAuth()); -appendElement(sb, INDENT4, "res-sharing-scope", -resourceRef.getScope()); +// resource-ref/res-sharing-scope was introduced in Servlet 2.3 +// Note versions are validated and start at 2.2 so this test takes +// that into account +if (getMajorVersion() > 2 || getMinorVersion() > 2) { +appendElement(sb, INDENT4, "res-sharing-scope", +resourceRef.getScope()); +} // TODO mapped-name for (InjectionTarget target : resourceRef.getInjectionTargets()) { sb.append("\n"); @@ -978,8 +988,13 @@ public class WebXml { for (SecurityConstraint constraint : securityConstraints) { sb.append(" \n"); -appendElement(sb, INDENT4, "display-name", -constraint.getDisplayName()); +// security-constraint/display-name was introduced in Servlet 2.3 +// Note versions are validated and start at 2.2 so this test takes +// that into account +if (getMajorVersion() > 2 || getMinorVersion() > 2) { +appendElement(sb, INDENT4, "display-name", +constraint.getDisplayName()); +} for (SecurityCollection collection : constraint.findCollections()) { sb.append("\n"); appendElement(sb, INDENT6, "web-resource-name", Modified: tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java?rev=1569755&r1=1569754&r2=1569755&view=diff == --- tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java (original) +++ tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Wed Feb 19 14:30:24 2014 @@ -236,7 +236,7 @@ public class TestWebXml { webXmlDefaultFragment.addFilterMapping(filterMap); // Listeners were added in 2.3 so should be excluded in 2.2 -webXmlDefaultFragment.addListener("org.apache.tomcar.DummyListener"); +webXmlDefaultFragment.addListener("org.apache.tomcat.DummyListener"); // resource-env-ref was added in 2.3 so should be excluded in 2.2 ContextResourceEnvRef resourceEnvRef = new ContextResourceEnvRef(); @@ -253,6 +253,35 @@ public class TestWebXml { ejbLocalRef.setHome("dummy"); webXmlDefaultFragment.addEjbLocalRef(ejbLocalRef); +// Servlet/run-as was added in 2.3 so should be excluded in 2.2 +ServletDef servletDef = new ServletDef(); +servletDef.setServletName("Dummy"); +servletDef.setServletClass("or
svn commit: r1569807 - in /tomcat/trunk: java/org/apache/tomcat/util/descriptor/web/WebXml.java test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
Author: markt Date: Wed Feb 19 16:14:40 2014 New Revision: 1569807 URL: http://svn.apache.org/r1569807 Log: Update tests to check correct handling of all top-level elements added between 2.3 and 2.4. Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java?rev=1569807&r1=1569806&r2=1569807&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Wed Feb 19 16:14:40 2014 @@ -891,43 +891,49 @@ public class WebXml { } sb.append('\n'); +// jsp-config was added in Servlet 2.4. Prior to that, tag-libs was used +// directly and jsp-property-group did not exist if (taglibs.size() > 0 || jspPropertyGroups.size() > 0) { -sb.append(" \n"); +if (getMajorVersion() > 2 || getMinorVersion() > 3) { +sb.append(" \n"); +} for (Map.Entry entry : taglibs.entrySet()) { sb.append("\n"); appendElement(sb, INDENT6, "taglib-uri", entry.getKey()); appendElement(sb, INDENT6, "taglib-location", entry.getValue()); sb.append("\n"); } -for (JspPropertyGroup jpg : jspPropertyGroups) { -sb.append("\n"); -for (String urlPattern : jpg.getUrlPatterns()) { -appendElement(sb, INDENT6, "url-pattern", urlPattern); +if (getMajorVersion() > 2 || getMinorVersion() > 3) { +for (JspPropertyGroup jpg : jspPropertyGroups) { +sb.append("\n"); +for (String urlPattern : jpg.getUrlPatterns()) { +appendElement(sb, INDENT6, "url-pattern", urlPattern); +} +appendElement(sb, INDENT6, "el-ignored", jpg.getElIgnored()); +appendElement(sb, INDENT6, "page-encoding", +jpg.getPageEncoding()); +appendElement(sb, INDENT6, "scripting-invalid", +jpg.getScriptingInvalid()); +appendElement(sb, INDENT6, "is-xml", jpg.getIsXml()); +for (String prelude : jpg.getIncludePreludes()) { +appendElement(sb, INDENT6, "include-prelude", prelude); +} +for (String coda : jpg.getIncludeCodas()) { +appendElement(sb, INDENT6, "include-coda", coda); +} +appendElement(sb, INDENT6, "deferred-syntax-allowed-as-literal", +jpg.getDeferredSyntax()); +appendElement(sb, INDENT6, "trim-directive-whitespaces", +jpg.getTrimWhitespace()); +appendElement(sb, INDENT6, "default-content-type", +jpg.getDefaultContentType()); +appendElement(sb, INDENT6, "buffer", jpg.getBuffer()); +appendElement(sb, INDENT6, "error-on-undeclared-namespace", +jpg.getErrorOnUndeclaredNamespace()); +sb.append("\n"); } -appendElement(sb, INDENT6, "el-ignored", jpg.getElIgnored()); -appendElement(sb, INDENT6, "page-encoding", -jpg.getPageEncoding()); -appendElement(sb, INDENT6, "scripting-invalid", -jpg.getScriptingInvalid()); -appendElement(sb, INDENT6, "is-xml", jpg.getIsXml()); -for (String prelude : jpg.getIncludePreludes()) { -appendElement(sb, INDENT6, "include-prelude", prelude); -} -for (String coda : jpg.getIncludeCodas()) { -appendElement(sb, INDENT6, "include-coda", coda); -} -appendElement(sb, INDENT6, "deferred-syntax-allowed-as-literal", -jpg.getDeferredSyntax()); -appendElement(sb, INDENT6, "trim-directive-whitespaces", -jpg.getTrimWhitespace()); -appendElement(sb, INDENT6, "default-content-type", -jpg.getDefaultContentType()); -appendElement(sb, INDENT6, "buffer", jpg.getBuffer()); -appendElement(sb, INDENT6, "error-on-undeclared-namespace", -jpg.getErrorOnUndeclaredNamespace()); -sb.append("\n"); +sb.append(" \n\n"); } -
svn commit: r1569809 - in /tomcat/trunk: java/org/apache/tomcat/util/descriptor/web/WebXml.java test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
Author: markt Date: Wed Feb 19 16:22:04 2014 New Revision: 1569809 URL: http://svn.apache.org/r1569809 Log: Update tests to check correct handling of all other elements added between 2.3 and 2.4. Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java?rev=1569809&r1=1569808&r2=1569809&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Wed Feb 19 16:22:04 2014 @@ -636,6 +636,11 @@ public class WebXml { // NOTE - Elements need to be written in the order defined in the 2.3 //DTD else validation of the merged web.xml will fail +// NOTE - Some elements need to be skipped based on the version of the +//specification being used. Version is validated and starts at +//2.2. The version tests used in this method take advantage of +//this. + // Declaration sb.append("\n"); @@ -705,8 +710,6 @@ public class WebXml { sb.append('\n'); // Filters were introduced in Servlet 2.3 -// Note versions are validated and start at 2.2 so this test takes that -// into account if (getMajorVersion() > 2 || getMinorVersion() > 2) { for (Map.Entry entry : filters.entrySet()) { FilterDef filterDef = entry.getValue(); @@ -750,8 +753,11 @@ public class WebXml { appendElement(sb, INDENT4, "url-pattern", urlPattern); } } -for (String dispatcher : filterMap.getDispatcherNames()) { -appendElement(sb, INDENT4, "dispatcher", dispatcher); +// dispatcher was added in Servlet 2.4 +if (getMajorVersion() > 2 || getMinorVersion() > 3) { +for (String dispatcher : filterMap.getDispatcherNames()) { +appendElement(sb, INDENT4, "dispatcher", dispatcher); +} } sb.append(" \n"); } @@ -759,8 +765,6 @@ public class WebXml { } // Listeners were introduced in Servlet 2.3 -// Note versions are validated and start at 2.2 so this test takes that -// into account if (getMajorVersion() > 2 || getMinorVersion() > 2) { for (String listener : listeners) { sb.append(" \n"); @@ -794,8 +798,6 @@ public class WebXml { appendElement(sb, INDENT4, "async-supported", servletDef.getAsyncSupported()); // servlet/run-as was introduced in Servlet 2.3 -// Note versions are validated and start at 2.2 so this test takes that -// into account if (getMajorVersion() > 2 || getMinorVersion() > 2) { if (servletDef.getRunAs() != null) { sb.append("\n"); @@ -937,8 +939,6 @@ public class WebXml { } // resource-env-ref was introduced in Servlet 2.3 -// Note versions are validated and start at 2.2 so this test takes that -// into account if (getMajorVersion() > 2 || getMinorVersion() > 2) { for (ContextResourceEnvRef resourceEnvRef : resourceEnvRefs.values()) { sb.append(" \n"); @@ -972,8 +972,6 @@ public class WebXml { appendElement(sb, INDENT4, "res-type", resourceRef.getType()); appendElement(sb, INDENT4, "res-auth", resourceRef.getAuth()); // resource-ref/res-sharing-scope was introduced in Servlet 2.3 -// Note versions are validated and start at 2.2 so this test takes -// that into account if (getMajorVersion() > 2 || getMinorVersion() > 2) { appendElement(sb, INDENT4, "res-sharing-scope", resourceRef.getScope()); @@ -995,8 +993,6 @@ public class WebXml { for (SecurityConstraint constraint : securityConstraints) { sb.append(" \n"); // security-constraint/display-name was introduced in Servlet 2.3 -// Note versions are validated and start at 2.2 so this test takes -// that into account if (getMajorVersion() > 2 || getMinorVersion() > 2) { appendElement(sb, INDENT4, "display-name", constraint.getDisplayName()); @@ -1103,8 +1099,6 @@ public class WebXml { sb.append('\n'); // ejb-local-ref was introduced in Servlet 2.3 -// Note versions are validated and start at 2.2 so this te
svn commit: r1569818 - in /tomcat/trunk: java/org/apache/tomcat/util/descriptor/web/WebXml.java test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
Author: markt Date: Wed Feb 19 17:01:46 2014 New Revision: 1569818 URL: http://svn.apache.org/r1569818 Log: Update tests to check correct handling elements added between 2.5 and 3.0. Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java?rev=1569818&r1=1569817&r2=1569818&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Wed Feb 19 17:01:46 2014 @@ -30,6 +30,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; +import javax.servlet.DispatcherType; import javax.servlet.ServletContext; import javax.servlet.SessionTrackingMode; import javax.servlet.descriptor.JspConfigDescriptor; @@ -722,8 +723,11 @@ public class WebXml { filterDef.getFilterName()); appendElement(sb, INDENT4, "filter-class", filterDef.getFilterClass()); -appendElement(sb, INDENT4, "async-supported", -filterDef.getAsyncSupported()); +// Async support was introduced for Servlet 3.0 onwards +if (getMajorVersion() != 2) { +appendElement(sb, INDENT4, "async-supported", +filterDef.getAsyncSupported()); +} for (Map.Entry param : filterDef.getParameterMap().entrySet()) { sb.append("\n"); @@ -756,6 +760,10 @@ public class WebXml { // dispatcher was added in Servlet 2.4 if (getMajorVersion() > 2 || getMinorVersion() > 3) { for (String dispatcher : filterMap.getDispatcherNames()) { +if (getMajorVersion() == 2 && + DispatcherType.ASYNC.name().equals(dispatcher)) { +continue; +} appendElement(sb, INDENT4, "dispatcher", dispatcher); } } @@ -795,8 +803,11 @@ public class WebXml { appendElement(sb, INDENT4, "load-on-startup", servletDef.getLoadOnStartup()); appendElement(sb, INDENT4, "enabled", servletDef.getEnabled()); -appendElement(sb, INDENT4, "async-supported", -servletDef.getAsyncSupported()); +// Async support was introduced for Servlet 3.0 onwards +if (getMajorVersion() != 2) { +appendElement(sb, INDENT4, "async-supported", +servletDef.getAsyncSupported()); +} // servlet/run-as was introduced in Servlet 2.3 if (getMajorVersion() > 2 || getMinorVersion() > 2) { if (servletDef.getRunAs() != null) { @@ -811,18 +822,21 @@ public class WebXml { appendElement(sb, INDENT6, "role-link", roleRef.getLink()); sb.append("\n"); } -MultipartDef multipartDef = servletDef.getMultipartDef(); -if (multipartDef != null) { -sb.append("\n"); -appendElement(sb, INDENT6, "location", -multipartDef.getLocation()); -appendElement(sb, INDENT6, "max-file-size", -multipartDef.getMaxFileSize()); -appendElement(sb, INDENT6, "max-request-size", -multipartDef.getMaxRequestSize()); -appendElement(sb, INDENT6, "file-size-threshold", -multipartDef.getFileSizeThreshold()); -sb.append("\n"); +// multipart-config was added in Servlet 3.0 +if (getMajorVersion() != 2) { +MultipartDef multipartDef = servletDef.getMultipartDef(); +if (multipartDef != null) { +sb.append("\n"); +appendElement(sb, INDENT6, "location", +multipartDef.getLocation()); +appendElement(sb, INDENT6, "max-file-size", +multipartDef.getMaxFileSize()); +appendElement(sb, INDENT6, "max-request-size", +multipartDef.getMaxRequestSize()); +appendElement(sb, INDENT6, "file-size-threshold", +multipartDef.getFileSizeThreshold()); +sb.append("\n"); +} } sb.append(" \n"); } @@ -880,13 +894,19 @@ public class WebXml { }
Crash in java.util.zip.Deflater.deflateBytes
Hi, I work in the JDK team and have a few reports of the JVM crashing in lead on calls from the Apache Coyote stack. A typical trace looks like : # Problematic frame: # C [libzip.so+0x5712] double+0x42 .. Stack: [0x47949000,0x47a4a000], sp=0x47a48600, free space=1021k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libzip.so+0x5712] double+0x42 .. Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) J java.util.zip.Deflater.deflateBytes(J[BII)I J java.util.zip.GZIPOutputStream.finish()V J org.apache.coyote.http11.filters.FlushableGZIPOutputStream.finish()V J org.apache.coyote.http11.filters.GzipOutputFilter.end()J J org.apache.coyote.http11.InternalOutputBuffer.endRequest()V J org.apache.coyote.http11.AbstractHttp11Processor.action(Lorg/apache/coyote/ActionCode;Ljava/lang/Object;)V J org.apache.catalina.connector.OutputBuffer.close()V J org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V J org.apache.coyote.http11.AbstractHttp11Processor.process(Lorg/apache/tomcat/util/net/SocketWrapper;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState; It looks like the FlushableGZIPOutputStream class was designed to overcome limitations in the JDK 6 API : http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.html. The subclass gets a handle on the protected Deflater Object and is then in a position to flush the underlying stream when needed. The crash occurs deep in the bowls of zlib code (deflate_slow function) - Reports I've seen suggest it occurs on heavy multi-threaded operations. I've no root cause for the SEGV yet. Is anyone on this list aware of similar issues ? The above issue was seen with JDK 6 and Tomcat 7.0.29.A. Was there any instances of multiple threads accessing the same stream concurrently ? regards, Sean.
svn commit: r1569834 - in /tomcat/trunk: java/org/apache/tomcat/util/descriptor/web/WebXml.java test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
Author: markt Date: Wed Feb 19 17:26:36 2014 New Revision: 1569834 URL: http://svn.apache.org/r1569834 Log: Update tests to check correct handling elements added between 3.0 and 3.1 Add missing deny-uncovered-http-methods element from merged web.xml Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java?rev=1569834&r1=1569833&r2=1569834&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Wed Feb 19 17:26:36 2014 @@ -1284,6 +1284,15 @@ public class WebXml { } } +// deny-uncovered-http-methods was introduced in Servlet 3.1 +if (getMajorVersion() > 3 || +(getMajorVersion() == 3 && getMinorVersion() > 0)) { +if (denyUncoveredHttpMethods) { +sb.append("\n"); +sb.append(" "); +} +} + sb.append(""); return sb.toString(); } Modified: tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java?rev=1569834&r1=1569833&r2=1569834&view=diff == --- tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java (original) +++ tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Wed Feb 19 17:26:36 2014 @@ -338,6 +338,9 @@ public class TestWebXml { MultipartDef multiPart = new MultipartDef(); servletDef.setMultipartDef(multiPart); +// deny-uncovered-http-methods added in Servlet 3.1 +webXmlDefaultFragment.setDenyUncoveredHttpMethods(true); + return webXmlDefaultFragment; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1569836 - /tomcat/trunk/webapps/docs/changelog.xml
Author: markt Date: Wed Feb 19 17:29:05 2014 New Revision: 1569836 URL: http://svn.apache.org/r1569836 Log: Update changelog Modified: tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1569836&r1=1569835&r2=1569836&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed Feb 19 17:29:05 2014 @@ -65,6 +65,15 @@ modify the javaseClassLoader attribute of the WebappClassLoader. (markt) + +Add missing support for+element when merging web.xml files. (markt) + + +Improve merging process for web.xml files to take account of the +elements and attributes supported by the Servlet version of the merged +file. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Crash in java.util.zip.Deflater.deflateBytes
On 19/02/2014 17:03, Seán Coffey wrote: > Hi, > > I work in the JDK team and have a few reports of the JVM crashing in > lead on calls from the Apache Coyote stack. A typical trace looks like : Good to see Oracle taking an interest in this bug. > Is anyone on this list aware of similar issues ? >From memory, there have been a number of reports over several years. A quick search of the archives found this which looks to be the same issue: http://tomcat.markmail.org/thread/i5u4sokqczmryzql This might be related: https://issues.apache.org/bugzilla/show_bug.cgi?id=55737 There are probably more. As far as I recall bugs in the FlushableGZIPOutputStream have resulted in corrupted output rather than a JVM crash: https://issues.apache.org/bugzilla/show_bug.cgi?id=52121 https://issues.apache.org/bugzilla/show_bug.cgi?id=53725 To re-iterate a point I have made elsewhere on this topic, FlushableGZIPOutputStream is not doing anything it shouldn't. It isn't playing games with reflection to access internals. It is a straight sub-class of GZIPOutputStream and everything it is doing is via the published API for GZIPOutputStream. There is no way that anything that that sub-class does should be capable of triggering a JVM crash. FlushableGZIPOutputStream may have a bug that may be triggering the crash but the fact that a crash occurs at all is a clear JVM bug. > The above issue was > seen with JDK 6 and Tomcat 7.0.29.A. Was there any instances of multiple > threads accessing the same stream concurrently ? In all of the instances I have seen there shouldn't have been more than one thread accessing the stream but it is possible for an application to retain a reference to a stream which can result in multiple threads accessing the same stream. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: false in filter?
On 19/02/2014 14:15, Konstantin Kolinko wrote: > 2014-02-19 17:21 GMT+04:00 Mark Thomas : >> There are two issues here. >> >> One is the issue cited above although it is much wider than just >> async-supported. I'm working though the specs now and I'll extend the >> test cases as I go. >> > > It it becomes too complicated, I think I am done for 8.0.x. It is a little verbose but it isn't too bad considering. >> The second issue is why tldValidation is controlling this. That I'll >> look at once validation is fixed. >> > > From a quick look, > a) there is no separate option to control this. > (neither in catalina's Globals, nor in jasper's Constants, nor in JspC) > > b) The parsing itself occurs in > jasper.compiler.JspConfig#processWebDotXml() Agreed. I think something got missed / mis-translated in the back-port. The context level xml validation option needs to be passed through to Jasper. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: false in filter?
Le 19 févr. 2014 19:01, "Mark Thomas" a écrit : > > On 19/02/2014 14:15, Konstantin Kolinko wrote: > > 2014-02-19 17:21 GMT+04:00 Mark Thomas : > >> There are two issues here. > >> > >> One is the issue cited above although it is much wider than just > >> async-supported. I'm working though the specs now and I'll extend the > >> test cases as I go. > >> > > > > It it becomes too complicated, > > I think I am done for 8.0.x. It is a little verbose but it isn't too bad > considering. Will you backport it on v7? > > >> The second issue is why tldValidation is controlling this. That I'll > >> look at once validation is fixed. > >> > > > > From a quick look, > > a) there is no separate option to control this. > > (neither in catalina's Globals, nor in jasper's Constants, nor in JspC) > > > > b) The parsing itself occurs in > > jasper.compiler.JspConfig#processWebDotXml() > > Agreed. I think something got missed / mis-translated in the back-port. > The context level xml validation option needs to be passed through to > Jasper. > Any idea when a relase fixing this issues could be out? TomEE needs a security release and would be better to not introduce hacks like the ones we use ATM inside patch versions IMO. > Mark > > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org >
Re: false in filter?
On 19/02/2014 18:16, Romain Manni-Bucau wrote: > Le 19 févr. 2014 19:01, "Mark Thomas" a écrit : >> I think I am done for 8.0.x. It is a little verbose but it isn't too bad >> considering. > > Will you backport it on v7? Yes. > Any idea when a relase fixing this issues could be out? TomEE needs a > security release and would be better to not introduce hacks like the ones > we use ATM inside patch versions IMO. No fixed date I am aware of but I suspect fairly soon. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1569903 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/deploy/WebXml.java test/org/apache/catalina/deploy/TestWebXml.java
Author: markt Date: Wed Feb 19 20:28:20 2014 New Revision: 1569903 URL: http://svn.apache.org/r1569903 Log: Update tests to check correct handling of all elements added between 2.2 and 2.3. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1569735,1569755 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java?rev=1569903&r1=1569902&r2=1569903&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java Wed Feb 19 20:28:20 2014 @@ -594,6 +594,9 @@ public class WebXml { // TODO - Various, icon, description etc elements are skipped - mainly //because they are ignored when web.xml is parsed - see above +// NOTE - Elements need to be written in the order defined in the 2.3 +//DTD else validation of the merged web.xml will fail + // Declaration sb.append("\n"); @@ -658,61 +661,71 @@ public class WebXml { } sb.append('\n'); -for (Map.Entry entry : filters.entrySet()) { -FilterDef filterDef = entry.getValue(); -sb.append(" \n"); -appendElement(sb, INDENT4, "description", -filterDef.getDescription()); -appendElement(sb, INDENT4, "display-name", -filterDef.getDisplayName()); -appendElement(sb, INDENT4, "filter-name", -filterDef.getFilterName()); -appendElement(sb, INDENT4, "filter-class", -filterDef.getFilterClass()); -appendElement(sb, INDENT4, "async-supported", -filterDef.getAsyncSupported()); -for (Map.Entry param : -filterDef.getParameterMap().entrySet()) { -sb.append("\n"); -appendElement(sb, INDENT6, "param-name", param.getKey()); -appendElement(sb, INDENT6, "param-value", param.getValue()); -sb.append("\n"); +// Filters were introduced in Servlet 2.3 +// Note versions are validated and start at 2.2 so this test takes that +// into account +if (getMajorVersion() > 2 || getMinorVersion() > 2) { +for (Map.Entry entry : filters.entrySet()) { +FilterDef filterDef = entry.getValue(); +sb.append(" \n"); +appendElement(sb, INDENT4, "description", +filterDef.getDescription()); +appendElement(sb, INDENT4, "display-name", +filterDef.getDisplayName()); +appendElement(sb, INDENT4, "filter-name", +filterDef.getFilterName()); +appendElement(sb, INDENT4, "filter-class", +filterDef.getFilterClass()); +appendElement(sb, INDENT4, "async-supported", +filterDef.getAsyncSupported()); +for (Map.Entry param : +filterDef.getParameterMap().entrySet()) { +sb.append("\n"); +appendElement(sb, INDENT6, "param-name", param.getKey()); +appendElement(sb, INDENT6, "param-value", param.getValue()); +sb.append("\n"); +} +sb.append(" \n"); } -sb.append(" \n"); -} -sb.append('\n'); +sb.append('\n'); -for (FilterMap filterMap : filterMaps) { -sb.append(" \n"); -appendElement(sb, INDENT4, "filter-name", -filterMap.getFilterName()); -if (filterMap.getMatchAllServletNames()) { -sb.append("*\n"); -} else { -for (String servletName : filterMap.getServletNames()) { -appendElement(sb, INDENT4, "servlet-name", servletName); +for (FilterMap filterMap : filterMaps) { +sb.append(" \n"); +appendElement(sb, INDENT4, "filter-name", +filterMap.getFilterName()); +if (filterMap.getMatchAllServletNames()) { +sb.append("*\n"); +} else { +for (String servletName : filterMap.getServletNames()) { +appendElement(sb, INDENT4, "servlet-name", servletName); +} } -} -if (fil
Re: false in filter?
2014-02-19 21:12 GMT+01:00 Mark Thomas : > On 19/02/2014 18:16, Romain Manni-Bucau wrote: >> Le 19 févr. 2014 19:01, "Mark Thomas" a écrit : > >>> I think I am done for 8.0.x. It is a little verbose but it isn't too bad >>> considering. >> >> Will you backport it on v7? > > Yes. > >> Any idea when a relase fixing this issues could be out? TomEE needs a >> security release and would be better to not introduce hacks like the ones >> we use ATM inside patch versions IMO. > > No fixed date I am aware of but I suspect fairly soon. > > Mark > Thank you (again ;) > > - > 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
[Bug 56166] New: Suggestions for exception handling (avoid potential bugs)
https://issues.apache.org/bugzilla/show_bug.cgi?id=56166 Bug ID: 56166 Summary: Suggestions for exception handling (avoid potential bugs) Product: Tomcat 8 Version: trunk Hardware: All OS: All Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: y...@eecg.utoronto.ca Created attachment 31337 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31337&action=edit Patch addressing the mentioned problems. Reporting a few potential bugs or improvements on some exception handling code. For what it is worth, attaching a patch to address these problems. Category 1: The exception caught is too general: = Case 1: Line: 180, File: "org/apache/catalina/core/ApplicationFilterFactory.java" 178: try { 179: isCometFilter = filterConfig.getFilter() instanceof CometFilter; 180: } catch (Exception e) { 181: // Note: The try catch is there because getFilter has a lot of 182: // declared exceptions. However, the filter is allocated much 183: // earlier 184: } This try block can throw many exceptions, including: 1. ClassCastException 2. ClassNotFoundException 3. IllegalAccessException 4. InstantiationException 5. ServletException 6. NamingException 7. InvocationTargetException All of them will be silently swallowed by the catch block. In particular, earlier in the same function, the same exception is handled in the following manner: try { isCometFilter = filterConfig.getFilter() instanceof CometFilter; } catch (Exception e) { // Note: The try catch is there because getFilter has a lot of // declared exceptions. However, the filter is allocated much // earlier Throwable t = ExceptionUtils.unwrapInvocationTargetException(e); ExceptionUtils.handleThrowable(t); } Fixed in the patch by handling the exception in the same way as the above. == = Case 2: Line: 234, File: "org/apache/tomcat/util/modeler/BaseModelMBean.java" 232: try { 233: response.add(new Attribute(names[i],getAttribute(names[i]))); 234: } catch (Exception e) { 235: // Not having a particular attribute in the response 236: // is the indication of a getter problem 237: } The try block could throw: 1. AttributeNotFoundException 2. MBeanException 3. ReflectionException Fixed by ignoring the AttributeNotFoundException and log the other exceptions. == = Case 3: Line: 298, File: "org/apache/catalina/manager/StatusTransformer.java" 294: try { 295: Object value = mBeanServer.getAttribute(tpName, "keepAliveCount"); 296: writer.print(" Keeped alive sockets count: "); 297: writer.print(value); 298: } catch (Exception e) { 299: // Ignore 300: } This might be problematic since the catch block is too general. getAttribute() can throw: 1. RuntimeOperationsException 2. MBeanException 3. AttributeNotFoundException 4. InstanceNotFoundException 5. ReflectionException All of them will be swallowed. Fixed by only ignoring AttributeNotFoundException. == = Case 4: Line: 215, File: "org/apache/catalina/storeconfig/StoreLoader.java" 206:try { 207:File home = new File(getCatalinaBase()); 208:File conf = new File(home, "conf"); 209:File reg = new File(conf, "server-registry.xml"); 210:is = new FileInputStream(reg); 211:if (log.isInfoEnabled()) 212:log.info("Find registry server-registry.xml at file " 213:+ reg.getCanonicalPath()); 214:registryResource = reg.toURI().toURL(); 215:} catch (Throwable t) { 216:// Ignore 217:} The catch block might be too general. The try block could throw: 1. NullPointerException by new File 2. FileNotFoundException by new FileInputStream 3. SecurityException by new FileInputStream and reg.toURL 4. IllegalArgumentException by reg.toURL().toURL 5. MalformedURLException by reg.toURL().toURL Now with the implementation above, all of them will be ignored. Fixed by ignoring FileNotFoundException while logging the others. == = Case 5: Line: 307, File: "org/apache/tomcat/util/modeler/ManagedBean.java" 305: try { 306: clazz = Class.forName(getClassName()); 307: } catch (Exception e) { 308: } Should probably just ignore ClassNotFoundException. Fixed by ignoring ClassNotFoundException. == = Case 6: Line: 202, File: "org/apache/catalina/storeconfig/StoreLoader.java" 193: try { 194: String configUrl = getConfigUrl(); 195: if (configUrl != null) { 196: is = (new URL(configUr
[Bug 56166] Suggestions for exception handling (avoid potential bugs)
https://issues.apache.org/bugzilla/show_bug.cgi?id=56166 Konstantin Kolinko changed: What|Removed |Added Attachment #31337|0 |1 is patch|| -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org