svn commit: r1431922 - in /tomcat/tc7.0.x/trunk: ./ res/maven/tomcat-embed-jasper.pom
Author: kkolinko Date: Fri Jan 11 07:31:51 2013 New Revision: 1431922 URL: http://svn.apache.org/viewvc?rev=1431922&view=rev Log: Merged revision 1431920 from tomcat/trunk: Correct version of Eclipse Java Compiler dependency Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-jasper.pom Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1431920 Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-jasper.pom URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-jasper.pom?rev=1431922&r1=1431921&r2=1431922&view=diff == --- tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-jasper.pom (original) +++ tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-jasper.pom Fri Jan 11 07:31:51 2013 @@ -39,7 +39,7 @@ org.eclipse.jdt.core.compiler ecj - 3.7.2 + 4.2.1 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431920 - /tomcat/trunk/res/maven/tomcat-embed-jasper.pom
Author: kkolinko Date: Fri Jan 11 07:26:21 2013 New Revision: 1431920 URL: http://svn.apache.org/viewvc?rev=1431920&view=rev Log: Correct version of Eclipse Java Compiler dependency Modified: tomcat/trunk/res/maven/tomcat-embed-jasper.pom Modified: tomcat/trunk/res/maven/tomcat-embed-jasper.pom URL: http://svn.apache.org/viewvc/tomcat/trunk/res/maven/tomcat-embed-jasper.pom?rev=1431920&r1=1431919&r2=1431920&view=diff == --- tomcat/trunk/res/maven/tomcat-embed-jasper.pom (original) +++ tomcat/trunk/res/maven/tomcat-embed-jasper.pom Fri Jan 11 07:26:21 2013 @@ -39,7 +39,7 @@ org.eclipse.jdt.core.compiler ecj - 3.7.2 + 4.2.1 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[VOTE] Release Apache Tomcat 7.0.35
The proposed Apache Tomcat 7.0.35 release is now available for voting. It can be obtained from: https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.35/ The Maven staging repo is: https://repository.apache.org/content/repositories/orgapachetomcat-123/ The svn tag is: http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_35/ The proposed 7.0.35 release is: [ ] Broken - do not release [ ] Stable - go ahead and release as 7.0.35 Stable Cheers, Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a restored build on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1014 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1431669 Blamelist: kkolinko Build succeeded! sincerely, -The Buildbot
svn commit: r1431704 - in /tomcat/tc7.0.x/trunk: build.properties.default res/maven/mvn.properties.default
Author: markt Date: Thu Jan 10 22:23:17 2013 New Revision: 1431704 URL: http://svn.apache.org/viewvc?rev=1431704&view=rev Log: Bump version ready for next release Modified: tomcat/tc7.0.x/trunk/build.properties.default tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default Modified: tomcat/tc7.0.x/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.properties.default?rev=1431704&r1=1431703&r2=1431704&view=diff == --- tomcat/tc7.0.x/trunk/build.properties.default (original) +++ tomcat/tc7.0.x/trunk/build.properties.default Thu Jan 10 22:23:17 2013 @@ -27,7 +27,7 @@ # - Version Control Flags - version.major=7 version.minor=0 -version.build=35 +version.build=36 version.patch=0 version.suffix=-dev Modified: tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default?rev=1431704&r1=1431703&r2=1431704&view=diff == --- tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default (original) +++ tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default Thu Jan 10 22:23:17 2013 @@ -35,7 +35,7 @@ maven.asf.release.repo.url=https://repos maven.asf.release.repo.repositoryId=apache.releases # Release version info -maven.asf.release.deploy.version=7.0.35 +maven.asf.release.deploy.version=7.0.36 #Where do we load the libraries from tomcat.lib.path=../../output/build/lib - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/3767 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1431665 Blamelist: kkolinko Build succeeded! sincerely, -The Buildbot
[jira] [Commented] (MTOMCAT-119) tomcat7:run-war fails because it expects META-INF\context.xml
[ https://issues.apache.org/jira/browse/MTOMCAT-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13550496#comment-13550496 ] Glen Mazza commented on MTOMCAT-119: Patch attached. Note one slight potential drawback, is that now both tomcat7:run & tomcat7:run-war will check for the default META-INF/context.xml if contextFile is not explicitly configured (and use that file), however neither will report anything if that file is not present (as it doesn't need to be). In the past only tomcat7:run-war checks for that file if contextFile is not set. This patch fixes the exception because now if META-INF/context.xml is not present (and contextFile not explicitly configured for another file), no file is sent to Tomcat and hence the latter will use whatever context defaults it uses. However, if you explicitly configure any file via contextFile that doesn't exist Tomcat will continue to throw a File Not Found exception (as it should), alerting the developer to the problem. Unrelated issue fixed, in AbstractRunWarMojo the @Parameter property "maven.tomcat.warDirectory" was not defined, making users unable to provide a setting via the CLI -Dmaven.tomcat.warDirectory option (although it is defined in that class' parent AbstractRunMojo, I've found there's no inheritance of individual @Parameter values, just the @Parameter tag itself.) > tomcat7:run-war fails because it expects META-INF\context.xml > - > > Key: MTOMCAT-119 > URL: https://issues.apache.org/jira/browse/MTOMCAT-119 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0-beta-1 >Reporter: Antelink >Assignee: Olivier Lamy (*$^¨%`£) > Fix For: 2.1 > > Attachments: MTOMCAT119.patch, web_service_tutorial.zip > > > run-war and run-war-only goals fail on tomcat7 plugin, looking for the file > =META-INF\context.xml= > How to reproduce: > * Use the archetype to create a project > mvn archetype:generate -DarchetypeGroupId=org.apache.tomcat.maven > -DarchetypeArtifactId=tomcat-maven-archetype -DarchetypeVersion=2.0-beta-1 > * Build it > * cd basic-webapp > * mvn org.apache.tomcat.maven:tomcat6-maven-plugin:run-war > => works fine > * mvn org.apache.tomcat.maven:tomcat7-maven-plugin:run > => works fine > * mvn org.apache.tomcat.maven:tomcat7-maven-plugin:run-war > -> kaboom > {code} > [INFO] --- tomcat7-maven-plugin:2.0-beta-1:run-war (default-cli) @ > basic-webapp --- > [INFO] Running war on http://localhost:9090/ > [INFO] Using existing Tomcat server configuration at > C:\Users\SAMUEL~1.LAN\AppData\Local\Temp\com.antelink.toto\basic-webapp\target\tomcat > févr. 16, 2012 6:56:24 PM org.apache.coyote.AbstractProtocol init > Infos: Initializing ProtocolHandler ["http-bio-9090"] > févr. 16, 2012 6:56:24 PM org.apache.catalina.core.StandardService > startInternal > Infos: Starting service Tomcat > févr. 16, 2012 6:56:24 PM org.apache.catalina.core.StandardEngine > startInternal > Infos: Starting Servlet Engine: Apache Tomcat/7.0.25 > févr. 16, 2012 6:56:24 PM org.apache.catalina.startup.ContextConfig > processContextConfig > Grave: Missing context.xml: > file:/C:/Users/SAMUEL~1.LAN/AppData/Local/Temp/com.antelink.toto/basic-webapp/target/basic-webapp-1.0-SNAPSHOT/META-INF/context.xml > java.io.FileNotFoundException: > C:\Users\SAMUEL~1.LAN\AppData\Local\Temp\com.antelink.toto\basic-webapp\target\basic-webapp-1.0-SNAPSHOT\META-INF\context.xml > (Le fichier spécifié est introuvable) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.(FileInputStream.java:138) > at java.io.FileInputStream.(FileInputStream.java:97) > at > sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) > at > sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) > at java.net.URL.openStream(URL.java:1035) > at > org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:565) > at > org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:546) > at > org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:784) > at > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:318) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > at > org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java
svn commit: r1431695 - in /tomcat/tc7.0.x/tags/TOMCAT_7_0_35: ./ build.properties.default
Author: markt Date: Thu Jan 10 22:12:08 2013 New Revision: 1431695 URL: http://svn.apache.org/viewvc?rev=1431695&view=rev Log: Tag 7.0.35 Added: tomcat/tc7.0.x/tags/TOMCAT_7_0_35/ (props changed) - copied from r1431694, tomcat/tc7.0.x/trunk/ Modified: tomcat/tc7.0.x/tags/TOMCAT_7_0_35/build.properties.default Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_35/ -- bugtraq:append = false Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_35/ -- bugtraq:label = Bugzilla ID (optional) Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_35/ -- --- bugtraq:message (added) +++ bugtraq:message Thu Jan 10 22:12:08 2013 @@ -0,0 +1 @@ +Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_35/ -- bugtraq:number = true Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_35/ -- bugtraq:url = https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_35/ -- bugtraq:warnifnoissue = false Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_35/ -- --- svn:ignore (added) +++ svn:ignore Thu Jan 10 22:12:08 2013 @@ -0,0 +1,7 @@ +.* +build.properties +logs +nbproject +output +work +*.iml Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_35/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Thu Jan 10 22:12:08 2013 @@ -0,0 +1 @@ +/tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222328,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112 ,1240114,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342 320,1342476,1342498,1342503,1342717,1342795,1342805,1343044-1343046,1343335,1343394,1343400,1343629,1343708,1343718,1343895,1344063,1344068,1344250,1344266,1344515,1344528,1344612,1344629,1344725,1344868,1344890,1344893,1344896,1344901,1345020,1345029,1345039,1345287-1345290,1345294,1345309,1345325,1345357,1345367,1345579-1345580,1345582,1345688,1345699,1345704,1345731-1345732,1345737,1345744,1345752,1345754,1345779,1345781,1345846,1346107,1346376,1346404,1346510,1346514,1346519,1346581,1346635,1346644,1346683,1346794,1346885,1346932,1347034,1347047,1347087,1347108-1347109,1347583,1347737,1348105,1348357,1348398,1348425,1348461-1348495,1348498,1348752,1348762,1348772,1348776,1348859,1348968,1348973,1348989,1349007,1349237,1349298,1349317,1349410,1349473,1349539,1349879,1349887,1349893,1349922,1349984,1350124,1350241,1350243,1350294-1350295,1350299,1350864,1350900,1351010,1351054,1351056,1351068,1351134-1351135,1351148,1351259,1351604,1351636-1351640,1351991,1351993,1352011,1 352056,1352059,1352661,1352663,1352788,1352799,1353087,1353125,1353240,1353261,1353414,1353468,13
[jira] [Updated] (MTOMCAT-119) tomcat7:run-war fails because it expects META-INF\context.xml
[ https://issues.apache.org/jira/browse/MTOMCAT-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Glen Mazza updated MTOMCAT-119: --- Attachment: MTOMCAT119.patch > tomcat7:run-war fails because it expects META-INF\context.xml > - > > Key: MTOMCAT-119 > URL: https://issues.apache.org/jira/browse/MTOMCAT-119 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0-beta-1 >Reporter: Antelink >Assignee: Olivier Lamy (*$^¨%`£) > Fix For: 2.1 > > Attachments: MTOMCAT119.patch, web_service_tutorial.zip > > > run-war and run-war-only goals fail on tomcat7 plugin, looking for the file > =META-INF\context.xml= > How to reproduce: > * Use the archetype to create a project > mvn archetype:generate -DarchetypeGroupId=org.apache.tomcat.maven > -DarchetypeArtifactId=tomcat-maven-archetype -DarchetypeVersion=2.0-beta-1 > * Build it > * cd basic-webapp > * mvn org.apache.tomcat.maven:tomcat6-maven-plugin:run-war > => works fine > * mvn org.apache.tomcat.maven:tomcat7-maven-plugin:run > => works fine > * mvn org.apache.tomcat.maven:tomcat7-maven-plugin:run-war > -> kaboom > {code} > [INFO] --- tomcat7-maven-plugin:2.0-beta-1:run-war (default-cli) @ > basic-webapp --- > [INFO] Running war on http://localhost:9090/ > [INFO] Using existing Tomcat server configuration at > C:\Users\SAMUEL~1.LAN\AppData\Local\Temp\com.antelink.toto\basic-webapp\target\tomcat > févr. 16, 2012 6:56:24 PM org.apache.coyote.AbstractProtocol init > Infos: Initializing ProtocolHandler ["http-bio-9090"] > févr. 16, 2012 6:56:24 PM org.apache.catalina.core.StandardService > startInternal > Infos: Starting service Tomcat > févr. 16, 2012 6:56:24 PM org.apache.catalina.core.StandardEngine > startInternal > Infos: Starting Servlet Engine: Apache Tomcat/7.0.25 > févr. 16, 2012 6:56:24 PM org.apache.catalina.startup.ContextConfig > processContextConfig > Grave: Missing context.xml: > file:/C:/Users/SAMUEL~1.LAN/AppData/Local/Temp/com.antelink.toto/basic-webapp/target/basic-webapp-1.0-SNAPSHOT/META-INF/context.xml > java.io.FileNotFoundException: > C:\Users\SAMUEL~1.LAN\AppData\Local\Temp\com.antelink.toto\basic-webapp\target\basic-webapp-1.0-SNAPSHOT\META-INF\context.xml > (Le fichier spécifié est introuvable) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.(FileInputStream.java:138) > at java.io.FileInputStream.(FileInputStream.java:97) > at > sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) > at > sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) > at java.net.URL.openStream(URL.java:1035) > at > org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:565) > at > org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:546) > at > org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:784) > at > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:318) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > at > org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431669 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/core/TestStandardContextResources.java
Author: kkolinko Date: Thu Jan 10 21:43:25 2013 New Revision: 1431669 URL: http://svn.apache.org/viewvc?rev=1431669&view=rev Log: Merged revision 1431661 from tomcat/trunk: Relax the test. Relative ordering can pick more JARs than those two that belong to the web application. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1431661 Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java?rev=1431669&r1=1431668&r2=1431669&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Thu Jan 10 21:43:25 2013 @@ -23,6 +23,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.URL; import java.util.Arrays; +import java.util.List; import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -86,8 +87,16 @@ public class TestStandardContextResource "resourceG.jsp in WEB-INF/classes", 404); // For BZ 54391. Relative ordering is specified in resources2.jar. -assertEquals(Arrays.asList("resources.jar", "resources2.jar"), ctx - .getServletContext().getAttribute(ServletContext.ORDERED_LIBS)); +// It is not absolute-ordering, so there may be other jars in the list +List orderedLibs = (List) ctx.getServletContext() +.getAttribute(ServletContext.ORDERED_LIBS); +if (orderedLibs.size() > 2) { +log.warn("testResources(): orderedLibs: " + orderedLibs); +} +int index = orderedLibs.indexOf("resources.jar"); +int index2 = orderedLibs.indexOf("resources2.jar"); +assertTrue(orderedLibs.toString(), index >= 0 && index2 >= 0 +&& index < index2); } @Test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431665 - /tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Author: kkolinko Date: Thu Jan 10 21:31:17 2013 New Revision: 1431665 URL: http://svn.apache.org/viewvc?rev=1431665&view=rev Log: Followup to r1431556 - remove trailing whitespace, as reminded by Checkstyle Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1431665&r1=1431664&r2=1431665&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Thu Jan 10 21:31:17 2013 @@ -649,7 +649,7 @@ public class CoyoteAdapter implements Ad // protocol handler, we have to assume the URL has been properly // decoded already decodedURI.toChars(); -// Remove all path parameters; any needed path parameter should be set +// Remove all path parameters; any needed path parameter should be set // using the request object rather than passing it in the URL CharChunk uriCC = decodedURI.getCharChunk(); int semicolon = uriCC.indexOf(';'); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431661 - /tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java
Author: kkolinko Date: Thu Jan 10 21:29:42 2013 New Revision: 1431661 URL: http://svn.apache.org/viewvc?rev=1431661&view=rev Log: Relax the test. Relative ordering can pick more JARs than those two that belong to the web application. E.g., Tomcat 8 has npn-8.1.2.v20120308.jar (Jetty NPN). Running with other JDKs may pick other JARs that are not on our jarsToSkip list. Modified: tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Modified: tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java?rev=1431661&r1=1431660&r2=1431661&view=diff == --- tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java (original) +++ tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Thu Jan 10 21:29:42 2013 @@ -23,6 +23,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.URL; import java.util.Arrays; +import java.util.List; import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -86,8 +87,16 @@ public class TestStandardContextResource "resourceG.jsp in WEB-INF/classes", 404); // For BZ 54391. Relative ordering is specified in resources2.jar. -assertEquals(Arrays.asList("resources.jar", "resources2.jar"), ctx - .getServletContext().getAttribute(ServletContext.ORDERED_LIBS)); +// It is not absolute-ordering, so there may be other jars in the list +List orderedLibs = (List) ctx.getServletContext() +.getAttribute(ServletContext.ORDERED_LIBS); +if (orderedLibs.size() > 2) { +log.warn("testResources(): orderedLibs: " + orderedLibs); +} +int index = orderedLibs.indexOf("resources.jar"); +int index2 = orderedLibs.indexOf("resources2.jar"); +assertTrue(orderedLibs.toString(), index >= 0 && index2 >= 0 +&& index < index2); } @Test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54406] New: NIO and BIO connectors handle unsupported SSL ciphers and sslEnabledProtocols differently
https://issues.apache.org/bugzilla/show_bug.cgi?id=54406 Bug ID: 54406 Summary: NIO and BIO connectors handle unsupported SSL ciphers and sslEnabledProtocols differently Product: Tomcat 7 Version: trunk Hardware: PC OS: Mac OS X 10.4 Status: NEW Severity: major Priority: P2 Component: Connectors Assignee: dev@tomcat.apache.org Reporter: t...@apache.org Classification: Unclassified The NIO and BIO connectors share (most of) a JSSE based SSLImplementation, but differ in their handling of the ciphers and sslEnabledProtocols attributes. The NIO connector sets the configured values for both attributes directly on the SSLEngine, which will fail immediately if any of them are unsupported. This makes creating a portable/superset collection of ciphers impossible - i.e. IBM JDKs do not support many of the cipher suite names used by JSSE and vice versa (usually TLS_ vs SSL_ prefixes differ) and the supported options differ between Java 6/7 etc. The BIO connector attempts to filter the specified values down to those supported by the SSL implementation, but has issues as well: if none of the specified ciphers/protocols are supported it will silently use the defaults of the SSL implementation, which can lead to unexpectedly (and unwittingly) insecure configurations. I propose to: - modify the NIO connector to use the same logic as the BIO connector to filter requested ciphers/protocols to supported values (by placing these operations on the SSLUtil interface). - modify the ciphers/protocols filtering logic to treat an explicit list of unsupported options as setting no supported ciphers/protocols and warn when this is done (it will also fail visibly with errors if SSL connections are attempted). -- 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: r1431556 - /tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Author: remm Date: Thu Jan 10 18:51:16 2013 New Revision: 1431556 URL: http://svn.apache.org/viewvc?rev=1431556&view=rev Log: Clarify that when using an API call to process a "virtual" request, the URL should not be used to pass parameters. Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1431556&r1=1431555&r2=1431556&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Thu Jan 10 18:51:16 2013 @@ -649,7 +649,8 @@ public class CoyoteAdapter implements Ad // protocol handler, we have to assume the URL has been properly // decoded already decodedURI.toChars(); -// Remove any path parameters +// Remove all path parameters; any needed path parameter should be set +// using the request object rather than passing it in the URL CharChunk uriCC = decodedURI.getCharChunk(); int semicolon = uriCC.indexOf(';'); if (semicolon > 0) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54405] Overlap sessions
https://issues.apache.org/bugzilla/show_bug.cgi?id=54405 --- Comment #3 from Chuck Caldarale --- (In reply to comment #2) To repeat: bugzilla is NOT a support forum. Post your queries on the 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 54405] Overlap sessions
https://issues.apache.org/bugzilla/show_bug.cgi?id=54405 --- Comment #2 from Tony --- An application can access to the information from differents sessions of Tomcat, or it is possible to swap sessions? How? Since i have changed the configuration of the Tomcat, the number of "overlaping sessions" has decreased, but the problem still persists. I have been using Tomcat during several years, and this problem only occurs with versions 7.0.27 and 7.0.34. I have looked for something similar in google. There were only a few references, and all of them pointed to a memory problem. Thanks (In reply to comment #1) > Bugzilla is not a support forum. > > Issues such as the ones you describe are nearly always application issues, > not Tomcat issues. > > You should use the Tomcat users mailing list to debug this issue further. > > If, and only if, that debugging identifies a Tomcat bug as the root cause > should you re-open this issue. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54405] Overlap sessions
https://issues.apache.org/bugzilla/show_bug.cgi?id=54405 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Mark Thomas --- Bugzilla is not a support forum. Issues such as the ones you describe are nearly always application issues, not Tomcat issues. You should use the Tomcat users mailing list to debug this issue further. If, and only if, that debugging identifies a Tomcat bug as the root cause should you re-open this issue. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54405] New: Overlap sessions
https://issues.apache.org/bugzilla/show_bug.cgi?id=54405 Bug ID: 54405 Summary: Overlap sessions Product: Tomcat 7 Version: 7.0.34 Hardware: PC OS: Windows Server 2003 Status: NEW Severity: major Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: antonio_paloma...@yahoo.es Classification: Unclassified Hi I have implemented a web application, and it runs on Apache Tomcat 7.0.34. It works with differents databases (DB2), using JDBC connections. I have noticed that there is a "sessions overlaping". Sometimes, a user that is working with my program retrieves the information from other user's session, even if they are working with differents databases. I have changed the Tomcat configuration, but the problem is still persisting. The machine is a Windows server 2003, Service Pack 2, with 2 GB RAM. It has no more application servers installed. Thank in advance -- 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: r1431444 - in /tomcat/trunk/java/org/apache/catalina/connector: CoyoteAdapter.java Request.java
On 10/01/2013 15:45, r...@apache.org wrote: > Author: remm > Date: Thu Jan 10 15:45:47 2013 > New Revision: 1431444 > > URL: http://svn.apache.org/viewvc?rev=1431444&view=rev > +// The URL is chars or String, and has been sent using an > in-memory > +// protocol handler, we have to assume the URL has been properly > +// decoded already > +decodedURI.toChars(); > +// Remove any path parameters > +CharChunk uriCC = decodedURI.getCharChunk(); > +int semicolon = uriCC.indexOf(';'); > +if (semicolon > 0) { > +decodedURI.setChars > +(uriCC.getBuffer(), uriCC.getStart(), semicolon); > +} The code is based on the assumption that path parameters will only ever appear at the end of the URL. While that is the typically case, it is not guaranteed to be the case. While I would prefer to see correct path parameter parsing, as a minimum there needs to be a something along the lines of a TODO comment at that point in the code to highlight the short-cut that is being taken. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431444 - in /tomcat/trunk/java/org/apache/catalina/connector: CoyoteAdapter.java Request.java
Author: remm Date: Thu Jan 10 15:45:47 2013 New Revision: 1431444 URL: http://svn.apache.org/viewvc?rev=1431444&view=rev Log: - Add the ability to invoke the main service method as an API call, without having to fallback to bytes. - Add some utility get/set (one of which got removed after deprecation but is not necessarily that useless). - Both changes to make using the rewrite valve possible. Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java tomcat/trunk/java/org/apache/catalina/connector/Request.java Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1431444&r1=1431443&r2=1431444&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Thu Jan 10 15:45:47 2013 @@ -609,39 +609,53 @@ public class CoyoteAdapter implements Ad MessageBytes decodedURI = req.decodedURI(); decodedURI.duplicate(req.requestURI()); -// Parse the path parameters. This will: -// - strip out the path parameters -// - convert the decodedURI to bytes -parsePathParameters(req, request); +if (decodedURI.getType() == MessageBytes.T_BYTES) { +// Parse the path parameters. This will: +// - strip out the path parameters +// - convert the decodedURI to bytes +parsePathParameters(req, request); -// URI decoding -// %xx decoding of the URL -try { -req.getURLDecoder().convert(decodedURI, false); -} catch (IOException ioe) { -res.setStatus(400); -res.setMessage("Invalid URI: " + ioe.getMessage()); -connector.getService().getContainer().logAccess( -request, response, 0, true); -return false; -} -// Normalization -if (!normalize(req.decodedURI())) { -res.setStatus(400); -res.setMessage("Invalid URI"); -connector.getService().getContainer().logAccess( -request, response, 0, true); -return false; -} -// Character decoding -convertURI(decodedURI, request); -// Check that the URI is still normalized -if (!checkNormalize(req.decodedURI())) { -res.setStatus(400); -res.setMessage("Invalid URI character encoding"); -connector.getService().getContainer().logAccess( -request, response, 0, true); -return false; +// URI decoding +// %xx decoding of the URL +try { +req.getURLDecoder().convert(decodedURI, false); +} catch (IOException ioe) { +res.setStatus(400); +res.setMessage("Invalid URI: " + ioe.getMessage()); +connector.getService().getContainer().logAccess( +request, response, 0, true); +return false; +} +// Normalization +if (!normalize(req.decodedURI())) { +res.setStatus(400); +res.setMessage("Invalid URI"); +connector.getService().getContainer().logAccess( +request, response, 0, true); +return false; +} +// Character decoding +convertURI(decodedURI, request); +// Check that the URI is still normalized +if (!checkNormalize(req.decodedURI())) { +res.setStatus(400); +res.setMessage("Invalid URI character encoding"); +connector.getService().getContainer().logAccess( +request, response, 0, true); +return false; +} +} else { +// The URL is chars or String, and has been sent using an in-memory +// protocol handler, we have to assume the URL has been properly +// decoded already +decodedURI.toChars(); +// Remove any path parameters +CharChunk uriCC = decodedURI.getCharChunk(); +int semicolon = uriCC.indexOf(';'); +if (semicolon > 0) { +decodedURI.setChars +(uriCC.getBuffer(), uriCC.getStart(), semicolon); +} } // Set the remote principal Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1431444&r1=1431443&r2=1431444&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/Request.java (orig
[jira] [Updated] (MTOMCAT-119) tomcat7:run-war fails because it expects META-INF\context.xml
[ https://issues.apache.org/jira/browse/MTOMCAT-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Glen Mazza updated MTOMCAT-119: --- Attachment: web_service_tutorial.zip I'm attaching perhaps a simpler example to replicate the matter. This attached sample works fine, because in webapps/META-INF I have a context.xml file with this content: To test the sample, from the base root, run: mvn clean install tomcat:run-war Then check from a browser: http://localhost:8080/doubleit/services/doubleit?wsdl that you can see a WSDL document (i.e., working). If I remove the context.xml file, I get the similar file-not-found exception as the original poster. > tomcat7:run-war fails because it expects META-INF\context.xml > - > > Key: MTOMCAT-119 > URL: https://issues.apache.org/jira/browse/MTOMCAT-119 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0-beta-1 >Reporter: Antelink >Assignee: Olivier Lamy (*$^¨%`£) > Fix For: 2.1 > > Attachments: web_service_tutorial.zip > > > run-war and run-war-only goals fail on tomcat7 plugin, looking for the file > =META-INF\context.xml= > How to reproduce: > * Use the archetype to create a project > mvn archetype:generate -DarchetypeGroupId=org.apache.tomcat.maven > -DarchetypeArtifactId=tomcat-maven-archetype -DarchetypeVersion=2.0-beta-1 > * Build it > * cd basic-webapp > * mvn org.apache.tomcat.maven:tomcat6-maven-plugin:run-war > => works fine > * mvn org.apache.tomcat.maven:tomcat7-maven-plugin:run > => works fine > * mvn org.apache.tomcat.maven:tomcat7-maven-plugin:run-war > -> kaboom > {code} > [INFO] --- tomcat7-maven-plugin:2.0-beta-1:run-war (default-cli) @ > basic-webapp --- > [INFO] Running war on http://localhost:9090/ > [INFO] Using existing Tomcat server configuration at > C:\Users\SAMUEL~1.LAN\AppData\Local\Temp\com.antelink.toto\basic-webapp\target\tomcat > févr. 16, 2012 6:56:24 PM org.apache.coyote.AbstractProtocol init > Infos: Initializing ProtocolHandler ["http-bio-9090"] > févr. 16, 2012 6:56:24 PM org.apache.catalina.core.StandardService > startInternal > Infos: Starting service Tomcat > févr. 16, 2012 6:56:24 PM org.apache.catalina.core.StandardEngine > startInternal > Infos: Starting Servlet Engine: Apache Tomcat/7.0.25 > févr. 16, 2012 6:56:24 PM org.apache.catalina.startup.ContextConfig > processContextConfig > Grave: Missing context.xml: > file:/C:/Users/SAMUEL~1.LAN/AppData/Local/Temp/com.antelink.toto/basic-webapp/target/basic-webapp-1.0-SNAPSHOT/META-INF/context.xml > java.io.FileNotFoundException: > C:\Users\SAMUEL~1.LAN\AppData\Local\Temp\com.antelink.toto\basic-webapp\target\basic-webapp-1.0-SNAPSHOT\META-INF\context.xml > (Le fichier spécifié est introuvable) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.(FileInputStream.java:138) > at java.io.FileInputStream.(FileInputStream.java:97) > at > sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) > at > sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) > at java.net.URL.openStream(URL.java:1035) > at > org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:565) > at > org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:546) > at > org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:784) > at > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:318) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > at > org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431398 - /tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
Author: markt Date: Thu Jan 10 14:54:30 2013 New Revision: 1431398 URL: http://svn.apache.org/viewvc?rev=1431398&view=rev Log: Remove unused code identified by FindBugs Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java?rev=1431398&r1=1431397&r2=1431398&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java Thu Jan 10 14:54:30 2013 @@ -27,7 +27,6 @@ import java.util.Vector; import javax.el.MethodExpression; import javax.el.ValueExpression; import javax.servlet.jsp.tagext.TagAttributeInfo; -import javax.servlet.jsp.tagext.TagExtraInfo; import javax.servlet.jsp.tagext.TagFileInfo; import javax.servlet.jsp.tagext.TagInfo; import javax.servlet.jsp.tagext.TagLibraryInfo; @@ -99,8 +98,6 @@ class TagFileProcessor { private String path = null; -private TagExtraInfo tei = null; - private String bodycontent = null; private String description = null; @@ -371,7 +368,7 @@ class TagFileProcessor { attributeVector.copyInto(tagAttributeInfo); return new JasperTagInfo(name, tagClassName, bodycontent, -description, tagLibInfo, tei, tagAttributeInfo, +description, tagLibInfo, null, tagAttributeInfo, displayName, smallIcon, largeIcon, tagVariableInfos, dynamicAttrsMapName); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431397 - /tomcat/trunk/res/findbugs/filter-false-positives.xml
Author: markt Date: Thu Jan 10 14:54:07 2013 New Revision: 1431397 URL: http://svn.apache.org/viewvc?rev=1431397&view=rev Log: Another false positive Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/res/findbugs/filter-false-positives.xml?rev=1431397&r1=1431396&r2=1431397&view=diff == --- tomcat/trunk/res/findbugs/filter-false-positives.xml (original) +++ tomcat/trunk/res/findbugs/filter-false-positives.xml Thu Jan 10 14:54:07 2013 @@ -193,6 +193,12 @@ + + + + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431395 - /tomcat/trunk/res/findbugs/filter-false-positives.xml
Author: markt Date: Thu Jan 10 14:42:59 2013 New Revision: 1431395 URL: http://svn.apache.org/viewvc?rev=1431395&view=rev Log: False positive Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/res/findbugs/filter-false-positives.xml?rev=1431395&r1=1431394&r2=1431395&view=diff == --- tomcat/trunk/res/findbugs/filter-false-positives.xml (original) +++ tomcat/trunk/res/findbugs/filter-false-positives.xml Thu Jan 10 14:42:59 2013 @@ -193,6 +193,12 @@ + + + + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Time for tcnative 1.1.25?
On 12/21/2012 09:54 PM, Christopher Schultz wrote: All, There is a particular fix in tcnative-trunk ant the 1.1.x branch to the ssl.c::hasOp function that I'd like to get out there in the wild: there are now two Tomcat enhancements (one committed, one not yet committed) that rely upon it: https://issues.apache.org/bugzilla/show_bug.cgi?id=53481 https://issues.apache.org/bugzilla/show_bug.cgi?id=54324 Once another version of tcnative 1.1.x is released, Tomcat can truly support these SSL-related features. Would anyone (Mladen?) be willing to roll another release in the near future? I could do it if you want. Cheers Jean-Frederic - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431353 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Thu Jan 10 13:44:31 2013 New Revision: 1431353 URL: http://svn.apache.org/viewvc?rev=1431353&view=rev Log: Vote 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=1431353&r1=1431352&r2=1431353&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Jan 10 13:44:31 2013 @@ -76,14 +76,14 @@ PATCHES PROPOSED TO BACKPORT: Make sure getMembers() returns available member when TcpFailureDetector works in static cluster. http://svn.apache.org/viewvc?view=revision&revision=1402110 - +1: kfujino, kkolinko + +1: kfujino, kkolinko, markt -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54080 "Comma related bug in org.apache.catalina.valves.RemoteIpValve" Documentation-only patch: https://issues.apache.org/bugzilla/attachment.cgi?id=29545 - +1: schultz + +1: schultz, markt -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54044 @@ -91,7 +91,7 @@ PATCHES PROPOSED TO BACKPORT: that meant entries could be made with an earlier timestamp than the true timestamp. (The test was added to tomcat6-testing branch in r1408453) http://svn.apache.org/viewvc?view=revision&revision=1408459 - +1: kkolinko + +1: kkolinko, markt -1: * Fix memory leak of servlet instances when running with a @@ -99,7 +99,7 @@ PATCHES PROPOSED TO BACKPORT: or the servlet is a SingleThreadModel one. It is based on r1429186 http://people.apache.org/~kkolinko/patches/2013-01-05_tc6_SecurityUtil_remove.patch - +1: kkolinko, schultz + +1: kkolinko, schultz, markt -1: * Improve method cache handling in SecurityUtil class. @@ -120,14 +120,14 @@ PATCHES PROPOSED TO BACKPORT: Use /usr/libexec/java_home to determine JAVA_HOME on Mac OS X Back-port r1430567: http://svn.apache.org/viewvc?view=revision&revision=r1430567 Also adaptation of r1430599 for changelog.xml update. - +1: schultz, kkolinko + +1: schultz, kkolinko, markt -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54382 Avoid NPE with an empty SSI directive http://svn.apache.org/viewvc?view=revision&revision=1430553 (r1430550 in trunk) - +1: kkolinko + +1: kkolinko, markt -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431349 - /tomcat/trunk/java/org/apache/catalina/webresources/CachedResource.java
Author: markt Date: Thu Jan 10 13:32:02 2013 New Revision: 1431349 URL: http://svn.apache.org/viewvc?rev=1431349&view=rev Log: Invalidate the cache entry if a previously missing resource is now present. Modified: tomcat/trunk/java/org/apache/catalina/webresources/CachedResource.java Modified: tomcat/trunk/java/org/apache/catalina/webresources/CachedResource.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/CachedResource.java?rev=1431349&r1=1431348&r2=1431349&view=diff == --- tomcat/trunk/java/org/apache/catalina/webresources/CachedResource.java (original) +++ tomcat/trunk/java/org/apache/catalina/webresources/CachedResource.java Thu Jan 10 13:32:02 2013 @@ -72,6 +72,11 @@ public class CachedResource implements W return true; } +if (!webResource.exists() && +root.getResourceInternal(webAppPath).exists()) { +return false; +} + // If modified date or length change - resource has changed / been // removed etc. if (webResource.getLastModified() != getLastModified() || - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431344 - /tomcat/trunk/java/org/apache/catalina/webresources/AbstractResource.java
Author: markt Date: Thu Jan 10 13:20:06 2013 New Revision: 1431344 URL: http://svn.apache.org/viewvc?rev=1431344&view=rev Log: Fix resource leak that led to locked files. Modified: tomcat/trunk/java/org/apache/catalina/webresources/AbstractResource.java Modified: tomcat/trunk/java/org/apache/catalina/webresources/AbstractResource.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/AbstractResource.java?rev=1431344&r1=1431343&r2=1431344&view=diff == --- tomcat/trunk/java/org/apache/catalina/webresources/AbstractResource.java (original) +++ tomcat/trunk/java/org/apache/catalina/webresources/AbstractResource.java Thu Jan 10 13:20:06 2013 @@ -104,14 +104,14 @@ public abstract class AbstractResource i int size = (int) len; byte[] result = new byte[size]; -InputStream is = getInputStream(); -if (is == null) { -return null; -} int pos = 0; -try { +try (InputStream is = getInputStream()) { +if (is == null) { +return null; +} + while (pos < size) { int n = is.read(result, pos, size - pos); if (n < 0) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431337 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/core/TestStandardContext.java test/org/apache/catalina/startup/TomcatBaseTest.java
Author: kkolinko Date: Thu Jan 10 13:15:50 2013 New Revision: 1431337 URL: http://svn.apache.org/viewvc?rev=1431337&view=rev Log: Merged revision 1431298 from tomcat/trunk: Remove unnecessary warnings (It was me who added those @SuppressWarnings several days ago. These are unneeded if "Potential resource leaks" warning is turned off in IDE). Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1431298 Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java?rev=1431337&r1=1431336&r2=1431337&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java Thu Jan 10 13:15:50 2013 @@ -161,7 +161,6 @@ public class TestStandardContext extends @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { -@SuppressWarnings("resource") // No need to close this writer PrintWriter out = response.getWriter(); out.print(getClass().getName()); chain.doFilter(request, response); @@ -648,7 +647,6 @@ public class TestStandardContext extends resp.setContentType("text/plain"); resp.setCharacterEncoding("UTF-8"); -@SuppressWarnings("resource") // No need to close this writer PrintWriter out = resp.getWriter(); out.println("parts=" + (null == req.getParts() Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1431337&r1=1431336&r2=1431337&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Thu Jan 10 13:15:50 2013 @@ -180,7 +180,6 @@ public abstract class TomcatBaseTest ext @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { -@SuppressWarnings("resource") // No need to close this writer PrintWriter out = resp.getWriter(); out.print(RESPONSE_TEXT); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431332 - /tomcat/trunk/res/ide-support/eclipse/java-compiler-errors-warnings.txt
Author: kkolinko Date: Thu Jan 10 13:07:48 2013 New Revision: 1431332 URL: http://svn.apache.org/viewvc?rev=1431332&view=rev Log: Turn off "Potential resource leak" warning, as it gives too many false positives Modified: tomcat/trunk/res/ide-support/eclipse/java-compiler-errors-warnings.txt Modified: tomcat/trunk/res/ide-support/eclipse/java-compiler-errors-warnings.txt URL: http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/eclipse/java-compiler-errors-warnings.txt?rev=1431332&r1=1431331&r2=1431332&view=diff == --- tomcat/trunk/res/ide-support/eclipse/java-compiler-errors-warnings.txt (original) +++ tomcat/trunk/res/ide-support/eclipse/java-compiler-errors-warnings.txt Thu Jan 10 13:07:48 2013 @@ -35,13 +35,15 @@ Code style - Method with a constructor name - W - Method can be static - I - Method can potentially be static - I -Potential programming errors + +Potential programming problems - All - W except the following: - - Incomplete 'switch' cases on enum- W - [ ] Signal even if 'default' case exists - - 'switch' is missing 'default' case - I + - Incomplete 'switch' cases on enum- W + [ ] Signal even if 'default' case exists + - 'switch' is missing 'default' case - I + - Potential resource leak - I Name shadowing and conflicts - Field declaration hides another... - I @@ -49,24 +51,28 @@ Name shadowing and conflicts - Type parameter hides another type- W - Method does not override... - W - Interface method conflicts...- W + Deprecated and restricted API - Deprecated API - W ([ ] on all additional check boxes) - Forbidden references - E - Discouraged reference- W + Unnecessary code - All - W ([x] on all additional check boxes) except the following: - - Unnecessary else - I + - Unnecessary else - I Generic types - All - W [x] Ignore unavoidable generic type problems + Annotations - All - W ([x] on all additional check boxes) + Null analysis - Null pointer access - W - Potential null pointer access- W - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1431298 - in /tomcat/trunk/test/org/apache/catalina: core/TestStandardContext.java startup/TomcatBaseTest.java
On 10/01/2013 12:40, Konstantin Kolinko wrote: > 2013/1/10 : >> Author: markt >> Date: Thu Jan 10 11:45:12 2013 >> New Revision: 1431298 >> >> URL: http://svn.apache.org/viewvc?rev=1431298&view=rev >> Log: >> Remove unnecessary warnings >> > > What settings do you have in > Java -> Compiler -> Errors/Warnings > section "Potential programming problems", > items > * "Resource leak", > * "Potential resource leak" > > Mine are both set on "Warning". > > From this fix I guess you have "Ignore" for "potential resource leak" setting. Correct. > I'd agree that there are too many "non-closed" writers in web applications. > I am going to update my configuration and docs. +1 Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431324 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/core/TestStandardContextResources.java
Author: kkolinko Date: Thu Jan 10 12:44:25 2013 New Revision: 1431324 URL: http://svn.apache.org/viewvc?rev=1431324&view=rev Log: Merged revision 1431310 from tomcat/trunk: Tests for https://issues.apache.org/bugzilla/show_bug.cgi?id=54391 Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1431310 Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java?rev=1431324&r1=1431323&r2=1431324&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Thu Jan 10 12:44:25 2013 @@ -22,6 +22,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URL; +import java.util.Arrays; import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -34,6 +35,7 @@ import static org.junit.Assert.assertTru import org.junit.Test; +import org.apache.catalina.Context; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; @@ -66,7 +68,7 @@ public class TestStandardContextResource File appDir = new File("test/webapp-3.0-fragments"); // app dir is relative to server home -tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); +Context ctx = tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); tomcat.start(); @@ -82,6 +84,10 @@ public class TestStandardContextResource "resourceE.jsp in the web application"); assertPageContains("/test/resourceG.jsp", "resourceG.jsp in WEB-INF/classes", 404); + +// For BZ 54391. Relative ordering is specified in resources2.jar. +assertEquals(Arrays.asList("resources.jar", "resources2.jar"), ctx + .getServletContext().getAttribute(ServletContext.ORDERED_LIBS)); } @Test @@ -144,6 +150,10 @@ public class TestStandardContextResource assertPageContains("/test/getresource?path=/resourceB.jsp", "resourceB.jsp in resources.jar"); +// Check ordering, for BZ 54391 +assertEquals(Arrays.asList("resources.jar", "resources2.jar"), ctx + .getServletContext().getAttribute(ServletContext.ORDERED_LIBS)); + ctx.stop(); LifecycleListener[] listener1 = ctx.findLifecycleListeners(); @@ -173,6 +183,9 @@ public class TestStandardContextResource assertPageContains("/test/getresource?path=/resourceB.jsp", "resourceB.jsp in resources2.jar"); +// Check ordering, for BZ 54391 +assertEquals(Arrays.asList("resources2.jar", "resources.jar"), ctx + .getServletContext().getAttribute(ServletContext.ORDERED_LIBS)); } @Test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431323 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/servlet/JspServlet.java test/webapp-3.0-fragments/WEB-INF/web.xml
Author: kkolinko Date: Thu Jan 10 12:42:39 2013 New Revision: 1431323 URL: http://svn.apache.org/viewvc?rev=1431323&view=rev Log: Merged revision 1431302 from tomcat/trunk: Add name of JSP file to an error message in JspServlet. Fix misconfiguration that caused org.apache.catalina.core.TestStandardContextResources test to log this message, javax.servlet.ServletException: missing jspFile at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:123) Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java tomcat/tc7.0.x/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1431302 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java?rev=1431323&r1=1431322&r2=1431323&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java Thu Jan 10 12:42:39 2013 @@ -120,7 +120,7 @@ public class JspServlet extends HttpServ jspFile = config.getInitParameter("jspFile"); try { if (null == context.getResource(jspFile)) { -throw new ServletException("missing jspFile"); +throw new ServletException("missing jspFile: [" + jspFile + "]"); } } catch (MalformedURLException e) { throw new ServletException("Can not locate jsp file", e); Modified: tomcat/tc7.0.x/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml?rev=1431323&r1=1431322&r2=1431323&view=diff == --- tomcat/tc7.0.x/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml (original) +++ tomcat/tc7.0.x/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml Thu Jan 10 12:42:39 2013 @@ -46,7 +46,7 @@ bug51396 -/bug5/bug51396.jsp +/bug51396.jsp - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1431298 - in /tomcat/trunk/test/org/apache/catalina: core/TestStandardContext.java startup/TomcatBaseTest.java
2013/1/10 : > Author: markt > Date: Thu Jan 10 11:45:12 2013 > New Revision: 1431298 > > URL: http://svn.apache.org/viewvc?rev=1431298&view=rev > Log: > Remove unnecessary warnings > What settings do you have in Java -> Compiler -> Errors/Warnings section "Potential programming problems", items * "Resource leak", * "Potential resource leak" Mine are both set on "Warning". >From this fix I guess you have "Ignore" for "potential resource leak" setting. I'd agree that there are too many "non-closed" writers in web applications. I am going to update my configuration and docs. > Modified: > tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java > tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java > > Modified: tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java?rev=1431298&r1=1431297&r2=1431298&view=diff > == > --- tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java > (original) > +++ tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java Thu > Jan 10 11:45:12 2013 > @@ -161,7 +161,6 @@ public class TestStandardContext extends > @Override > public void doFilter(ServletRequest request, ServletResponse > response, > FilterChain chain) throws IOException, ServletException { > -@SuppressWarnings("resource") // No need to close this writer > PrintWriter out = response.getWriter(); > out.print(getClass().getName()); > chain.doFilter(request, response); > @@ -648,7 +647,6 @@ public class TestStandardContext extends > resp.setContentType("text/plain"); > resp.setCharacterEncoding("UTF-8"); > > -@SuppressWarnings("resource") // No need to close this writer > PrintWriter out = resp.getWriter(); > > out.println("parts=" + (null == req.getParts() > > Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1431298&r1=1431297&r2=1431298&view=diff > == > --- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java > (original) > +++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Thu Jan > 10 11:45:12 2013 > @@ -182,7 +182,6 @@ public abstract class TomcatBaseTest ext > @Override > protected void doGet(HttpServletRequest req, HttpServletResponse > resp) > throws ServletException, IOException { > -@SuppressWarnings("resource") // No need to close this writer > PrintWriter out = resp.getWriter(); > out.print(RESPONSE_TEXT); > } > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431321 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/StandardContext.java
Author: markt Date: Thu Jan 10 12:36:17 2013 New Revision: 1431321 URL: http://svn.apache.org/viewvc?rev=1431321&view=rev Log: Follow-up to r1431300. Fix error on reload when postConstruct and preDestroy entries are present in weeb.xml Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1431320 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=1431321&r1=1431320&r2=1431321&view=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 Thu Jan 10 12:36:17 2013 @@ -5622,6 +5622,9 @@ public class StandardContext extends Con createdServlets.clear(); +postConstructMethods.clear(); +preDestroyMethods.clear(); + if(log.isDebugEnabled()) log.debug("resetContext " + getObjectName()); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431320 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
Author: markt Date: Thu Jan 10 12:34:45 2013 New Revision: 1431320 URL: http://svn.apache.org/viewvc?rev=1431320&view=rev Log: Follow-up to r1431293. Fix error on reload when postConstruct and preDestroy entries are present in weeb.xml Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.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=1431320&r1=1431319&r2=1431320&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Thu Jan 10 12:34:45 2013 @@ -5513,6 +5513,9 @@ public class StandardContext extends Con createdServlets.clear(); +postConstructMethods.clear(); +preDestroyMethods.clear(); + if(log.isDebugEnabled()) log.debug("resetContext " + getObjectName()); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1010 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1431300 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/3759 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1431293 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
Re: Time for 7.0.35
> Apart from a couple of bugs where we are still waiting for further > information, the Tomcat 7 bug list is empty. Therefore, I intend to run > the unit tests and TCKs against 7.0.x/trunk and if everything passes I > will tag that as 7.0.35. > Good news. Thanks Mark, I'll test 7.0.35 on a set of internal and public apps as soon as available
Re: svn commit: r1431302 - in /tomcat/trunk: java/org/apache/jasper/servlet/JspServlet.java test/webapp-3.0-fragments/WEB-INF/web.xml
2013/1/10 : > Author: kkolinko > Date: Thu Jan 10 11:54:51 2013 > New Revision: 1431302 > > URL: http://svn.apache.org/viewvc?rev=1431302&view=rev > Log: > Add name of JSP file to an error message in JspServlet. > Fix misconfiguration that caused > org.apache.catalina.core.TestStandardContextResources test to log this > message, > javax.servlet.ServletException: missing jspFile > at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:123) > at > org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1228) > at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1141) > at > org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1037) > at > org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4851) > I am a bit wondering that the test for BZ 51396 did not fail. The JspServlet failed to load at startup due to misconfiguration (with the above exception), but the test passed because JspServlet loaded successfully when bug51396.jsp was requested at run time. > Modified: > tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java > tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml > > Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java?rev=1431302&r1=1431301&r2=1431302&view=diff > == > --- tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java (original) > +++ tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java Thu Jan 10 > 11:54:51 2013 > @@ -120,7 +120,7 @@ public class JspServlet extends HttpServ > jspFile = config.getInitParameter("jspFile"); > try { > if (null == context.getResource(jspFile)) { > -throw new ServletException("missing jspFile"); > +throw new ServletException("missing jspFile: [" + > jspFile + "]"); > } > } catch (MalformedURLException e) { > throw new ServletException("Can not locate jsp file", e); > > Modified: tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml > URL: > http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml?rev=1431302&r1=1431301&r2=1431302&view=diff > == > --- tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml (original) > +++ tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml Thu Jan 10 > 11:54:51 2013 > @@ -46,7 +46,7 @@ > > > bug51396 > -/bug5/bug51396.jsp > +/bug51396.jsp > > > > > > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1431293 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/deploy/ java/org/apache/catalina/startup/ java/org/apache/catalina/util/
On 10/01/2013 12:16, Konstantin Kolinko wrote: > 2013/1/10 : >> Author: markt >> Date: Thu Jan 10 11:39:46 2013 >> New Revision: 1431293 >> >> URL: http://svn.apache.org/viewvc?rev=1431293&view=rev >> Log: >> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54379 >> Implement support for post-construct and pre-destroy elements in web.xml >> Patch by Violeta Georgieva. >> > > I observe a failure in org.apache.catalina.core.TestStandardContextResources > Failing test: testResourcesAbsoluteOrdering > > Testcase: testResourcesAbsoluteOrdering took 0,984 sec > Caused an ERROR > Failed to start component > [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/test]] > org.apache.catalina.LifecycleException: Failed to start component > [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/test]] > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) > at > org.apache.catalina.core.TestStandardContextResources.testResourcesAbsoluteOrdering(TestStandardContextResources.java:179) > Caused by: java.lang.IllegalArgumentException: Duplicate post > construct method definition for class > org.apache.catalina.startup.TesterServletWithLifeCycleMethods > at > org.apache.catalina.core.StandardContext.addPostConstructMethod(StandardContext.java:5857) > at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1424) > at > org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1219) > at > org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:814) > at > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:321) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > at > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5008) > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > > > I have not found the cause yet, but > if I hide / elements in > webapp-3.0-fragments/WEB-INF/web.xml in a comment, the test passes. Hmm. Strange. I'll look as well. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1431293 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/deploy/ java/org/apache/catalina/startup/ java/org/apache/catalina/util/
2013/1/10 : > Author: markt > Date: Thu Jan 10 11:39:46 2013 > New Revision: 1431293 > > URL: http://svn.apache.org/viewvc?rev=1431293&view=rev > Log: > Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54379 > Implement support for post-construct and pre-destroy elements in web.xml > Patch by Violeta Georgieva. > I observe a failure in org.apache.catalina.core.TestStandardContextResources Failing test: testResourcesAbsoluteOrdering Testcase: testResourcesAbsoluteOrdering took 0,984 sec Caused an ERROR Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/test]] org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/test]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.TestStandardContextResources.testResourcesAbsoluteOrdering(TestStandardContextResources.java:179) Caused by: java.lang.IllegalArgumentException: Duplicate post construct method definition for class org.apache.catalina.startup.TesterServletWithLifeCycleMethods at org.apache.catalina.core.StandardContext.addPostConstructMethod(StandardContext.java:5857) at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1424) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1219) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:814) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5008) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) I have not found the cause yet, but if I hide / elements in webapp-3.0-fragments/WEB-INF/web.xml in a comment, the test passes. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Time for 7.0.35
On 02/01/2013 13:38, Mark Thomas wrote: > Another month, time for another release. > > There are quite a few bugs open against Tomcat 7 (well, 17 and that is > more than there usually is at the start of a month) and as usual I > intend to close as many as possible before the next 7.0.x release. > > For folks looking to get involved with Tomcat development, this is an > ideal opportunity. Pick a bug, add a comment that you are going to work > on it and update it with your progress. If you need help or pointers, > ask on the dev list. Keep in mind that the bug report might be invalid ;) Thank you very much to everyone who helped by working on the open bugs. Apart from a couple of bugs where we are still waiting for further information, the Tomcat 7 bug list is empty. Therefore, I intend to run the unit tests and TCKs against 7.0.x/trunk and if everything passes I will tag that as 7.0.35. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431312 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Author: markt Date: Thu Jan 10 12:11:18 2013 New Revision: 1431312 URL: http://svn.apache.org/viewvc?rev=1431312&view=rev Log: Fix typo 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=1431312&r1=1431311&r2=1431312&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jan 10 12:11:18 2013 @@ -71,7 +71,7 @@ exception. (markt) -Allow web applications to be stopped cleanly even if filters shown +Allow web applications to be stopped cleanly even if filters throw exceptions when their destroy() method is called. (markt/kkolinko) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431311 - /tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java
Author: markt Date: Thu Jan 10 12:11:01 2013 New Revision: 1431311 URL: http://svn.apache.org/viewvc?rev=1431311&view=rev Log: Java 6 not 7 Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java?rev=1431311&r1=1431310&r2=1431311&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java Thu Jan 10 12:11:01 2013 @@ -235,7 +235,7 @@ public class TestWebXml { WebXml f1 = new WebXml(); WebXml f2 = new WebXml(); -HashSet fragments = new HashSet<>(); +HashSet fragments = new HashSet(); fragments.add(f1); fragments.add(f2); @@ -253,7 +253,7 @@ public class TestWebXml { WebXml f1 = new WebXml(); WebXml f2 = new WebXml(); -HashSet fragments = new HashSet<>(); +HashSet fragments = new HashSet(); fragments.add(f1); fragments.add(f2); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431310 - /tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java
Author: kkolinko Date: Thu Jan 10 12:10:50 2013 New Revision: 1431310 URL: http://svn.apache.org/viewvc?rev=1431310&view=rev Log: Tests for https://issues.apache.org/bugzilla/show_bug.cgi?id=54391 Modified: tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Modified: tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java?rev=1431310&r1=1431309&r2=1431310&view=diff == --- tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java (original) +++ tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Thu Jan 10 12:10:50 2013 @@ -22,6 +22,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URL; +import java.util.Arrays; import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -34,6 +35,7 @@ import static org.junit.Assert.assertTru import org.junit.Test; +import org.apache.catalina.Context; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; @@ -66,7 +68,7 @@ public class TestStandardContextResource File appDir = new File("test/webapp-3.0-fragments"); // app dir is relative to server home -tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); +Context ctx = tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); tomcat.start(); @@ -82,6 +84,10 @@ public class TestStandardContextResource "resourceE.jsp in the web application"); assertPageContains("/test/resourceG.jsp", "resourceG.jsp in WEB-INF/classes", 404); + +// For BZ 54391. Relative ordering is specified in resources2.jar. +assertEquals(Arrays.asList("resources.jar", "resources2.jar"), ctx + .getServletContext().getAttribute(ServletContext.ORDERED_LIBS)); } @Test @@ -144,6 +150,10 @@ public class TestStandardContextResource assertPageContains("/test/getresource?path=/resourceB.jsp", "resourceB.jsp in resources.jar"); +// Check ordering, for BZ 54391 +assertEquals(Arrays.asList("resources.jar", "resources2.jar"), ctx + .getServletContext().getAttribute(ServletContext.ORDERED_LIBS)); + ctx.stop(); LifecycleListener[] listener1 = ctx.findLifecycleListeners(); @@ -173,6 +183,9 @@ public class TestStandardContextResource assertPageContains("/test/getresource?path=/resourceB.jsp", "resourceB.jsp in resources2.jar"); +// Check ordering, for BZ 54391 +assertEquals(Arrays.asList("resources2.jar", "resources.jar"), ctx + .getServletContext().getAttribute(ServletContext.ORDERED_LIBS)); } @Test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54387] Having servlets with same url should at least cause warning
https://issues.apache.org/bugzilla/show_bug.cgi?id=54387 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Mark Thomas --- This has been fixed in trunk and 7.0.x and will be included in 7.0.35 onwards. -- 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: r1431309 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/deploy/LocalStrings.properties java/org/apache/catalina/deploy/WebXml.java test/org/apache/catalina/deploy/TestWebXml.java
Author: markt Date: Thu Jan 10 12:09:13 2013 New Revision: 1431309 URL: http://svn.apache.org/viewvc?rev=1431309&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54387 Multiple servlets may not be mapped to the same url-pattern Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/LocalStrings.properties tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1431308 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/LocalStrings.properties?rev=1431309&r1=1431308&r2=1431309&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/LocalStrings.properties (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/LocalStrings.properties Thu Jan 10 12:09:13 2013 @@ -22,6 +22,7 @@ webXml.duplicateMessageDestination=Dupli webXml.duplicateMessageDestinationRef=Duplicate message-destination-ref name [{0}] webXml.duplicateResourceEnvRef=Duplicate resource-env-ref name [{0}] webXml.duplicateResourceRef=Duplicate resource-ref name [{0}] +webXml.duplicateServletMapping=The servlets named [{0}] and [{1}] are both mapped to the url-pattern [{2}] which is not permitted webXml.duplicateTaglibUri=Duplicate tag library URI [{0}] webXml.reservedName=A web.xml file was detected using a reserved name [{0}]. The name element will be ignored for this fragment. webXml.mergeConflictDisplayName=The display name was defined in multiple fragments with different values including fragment with name [{0}] located at [{1}] 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=1431309&r1=1431308&r2=1431309&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 Thu Jan 10 12:09:13 2013 @@ -328,7 +328,14 @@ public class WebXml { private Map servletMappings = new HashMap(); private Set servletMappingNames = new HashSet(); public void addServletMapping(String urlPattern, String servletName) { -servletMappings.put(urlPattern, servletName); +String oldServletName = servletMappings.put(urlPattern, servletName); +if (oldServletName != null) { +// Duplicate mapping. As per clarification from the Servlet EG, +// deployment should fail. +throw new IllegalArgumentException(sm.getString( +"webXml.duplicateServletMapping", oldServletName, +servletName, urlPattern)); +} servletMappingNames.add(servletName); } public Map getServletMappings() { return servletMappings; } Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java?rev=1431309&r1=1431308&r2=1431309&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java Thu Jan 10 12:09:13 2013 @@ -219,4 +219,48 @@ public class TestWebXml { Assert.assertEquals(0, webxml.getPreDestroyMethods().size()); } + +@Test(expected=IllegalArgumentException.class) +public void testBug54387a() { +// Multiple servlets may not be mapped to the same url-pattern +WebXml webxml = new WebXml(); +webxml.addServletMapping("/foo", "a"); +webxml.addServletMapping("/foo", "b"); +} + +@Test(expected=IllegalArgumentException.class) +public void testBug54387b() { +// Multiple servlets may not be mapped to the same url-pattern +WebXml webxml = new WebXml(); +WebXml f1 = new WebXml(); +WebXml f2 = new WebXml(); + +HashSet fragments = new HashSet<>(); +fragments.add(f1); +fragments.add(f2); + +f1.addServletMapping("/foo", "a"); +f2.addServletMapping("/foo", "b"); + +webxml.merge(fragments); +} + +@Test +public void testBug54387c() { +// Multiple servlets may not be mapped to the same url-pattern but main +// web.xml takes priority +WebXml webxml = new WebXml(); +WebXml f1 = new WebXml(); +WebXml f2 = new
svn commit: r1431308 - in /tomcat/trunk: java/org/apache/catalina/deploy/LocalStrings.properties java/org/apache/catalina/deploy/WebXml.java test/org/apache/catalina/deploy/TestWebXml.java
Author: markt Date: Thu Jan 10 12:06:50 2013 New Revision: 1431308 URL: http://svn.apache.org/viewvc?rev=1431308&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54387 Multiple servlets may not be mapped to the same url-pattern Modified: tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java Modified: tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties?rev=1431308&r1=1431307&r2=1431308&view=diff == --- tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties Thu Jan 10 12:06:50 2013 @@ -22,6 +22,7 @@ webXml.duplicateMessageDestination=Dupli webXml.duplicateMessageDestinationRef=Duplicate message-destination-ref name [{0}] webXml.duplicateResourceEnvRef=Duplicate resource-env-ref name [{0}] webXml.duplicateResourceRef=Duplicate resource-ref name [{0}] +webXml.duplicateServletMapping=The servlets named [{0}] and [{1}] are both mapped to the url-pattern [{2}] which is not permitted webXml.duplicateTaglibUri=Duplicate tag library URI [{0}] webXml.reservedName=A web.xml file was detected using a reserved name [{0}]. The name element will be ignored for this fragment. webXml.mergeConflictDisplayName=The display name was defined in multiple fragments with different values including fragment with name [{0}] located at [{1}] Modified: tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java?rev=1431308&r1=1431307&r2=1431308&view=diff == --- tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java (original) +++ tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java Thu Jan 10 12:06:50 2013 @@ -327,7 +327,14 @@ public class WebXml { private final Map servletMappings = new HashMap<>(); private final Set servletMappingNames = new HashSet<>(); public void addServletMapping(String urlPattern, String servletName) { -servletMappings.put(urlPattern, servletName); +String oldServletName = servletMappings.put(urlPattern, servletName); +if (oldServletName != null) { +// Duplicate mapping. As per clarification from the Servlet EG, +// deployment should fail. +throw new IllegalArgumentException(sm.getString( +"webXml.duplicateServletMapping", oldServletName, +servletName, urlPattern)); +} servletMappingNames.add(servletName); } public Map getServletMappings() { return servletMappings; } Modified: tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java?rev=1431308&r1=1431307&r2=1431308&view=diff == --- tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java (original) +++ tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java Thu Jan 10 12:06:50 2013 @@ -219,4 +219,48 @@ public class TestWebXml { Assert.assertEquals(0, webxml.getPreDestroyMethods().size()); } + +@Test(expected=IllegalArgumentException.class) +public void testBug54387a() { +// Multiple servlets may not be mapped to the same url-pattern +WebXml webxml = new WebXml(); +webxml.addServletMapping("/foo", "a"); +webxml.addServletMapping("/foo", "b"); +} + +@Test(expected=IllegalArgumentException.class) +public void testBug54387b() { +// Multiple servlets may not be mapped to the same url-pattern +WebXml webxml = new WebXml(); +WebXml f1 = new WebXml(); +WebXml f2 = new WebXml(); + +HashSet fragments = new HashSet<>(); +fragments.add(f1); +fragments.add(f2); + +f1.addServletMapping("/foo", "a"); +f2.addServletMapping("/foo", "b"); + +webxml.merge(fragments); +} + +@Test +public void testBug54387c() { +// Multiple servlets may not be mapped to the same url-pattern but main +// web.xml takes priority +WebXml webxml = new WebXml(); +WebXml f1 = new WebXml(); +WebXml f2 = new WebXml(); + +HashSet fragments = new HashSet<>(); +fragments.add(f1); +fragments.add(f2); + +f1.addServletMapping("/foo", "a"); +f2.addServletMapping("/foo", "b"); +webxml.addServletMapping("/foo", "main"); + +webxml.merge(fragments); +} } --
svn commit: r1431302 - in /tomcat/trunk: java/org/apache/jasper/servlet/JspServlet.java test/webapp-3.0-fragments/WEB-INF/web.xml
Author: kkolinko Date: Thu Jan 10 11:54:51 2013 New Revision: 1431302 URL: http://svn.apache.org/viewvc?rev=1431302&view=rev Log: Add name of JSP file to an error message in JspServlet. Fix misconfiguration that caused org.apache.catalina.core.TestStandardContextResources test to log this message, javax.servlet.ServletException: missing jspFile at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:123) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1228) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1141) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1037) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4851) Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java?rev=1431302&r1=1431301&r2=1431302&view=diff == --- tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java (original) +++ tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java Thu Jan 10 11:54:51 2013 @@ -120,7 +120,7 @@ public class JspServlet extends HttpServ jspFile = config.getInitParameter("jspFile"); try { if (null == context.getResource(jspFile)) { -throw new ServletException("missing jspFile"); +throw new ServletException("missing jspFile: [" + jspFile + "]"); } } catch (MalformedURLException e) { throw new ServletException("Can not locate jsp file", e); Modified: tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml?rev=1431302&r1=1431301&r2=1431302&view=diff == --- tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml (original) +++ tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml Thu Jan 10 11:54:51 2013 @@ -46,7 +46,7 @@ bug51396 -/bug5/bug51396.jsp +/bug51396.jsp - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54379] Implement support for post-construct and pre-destroy elements in web.xml
https://issues.apache.org/bugzilla/show_bug.cgi?id=54379 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Mark Thomas --- Fixed in 7.0.x and will be included in 7.0.35 onwards. Thanks again for the 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
svn commit: r1431300 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/deploy/ java/org/apache/catalina/startup/ java/org/apache/catalina
Author: markt Date: Thu Jan 10 11:47:49 2013 New Revision: 1431300 URL: http://svn.apache.org/viewvc?rev=1431300&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54379 Implement support for post-construct and pre-destroy elements in web.xml Patch by Violeta Georgieva. Added: tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TesterServletWithLifeCycleMethods.java - copied unchanged from r1431293, tomcat/trunk/test/org/apache/catalina/startup/TesterServletWithLifeCycleMethods.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/web-1lifecyclecallback.xml - copied unchanged from r1431293, tomcat/trunk/test/org/apache/catalina/startup/web-1lifecyclecallback.xml tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/web-2lifecyclecallback.xml - copied unchanged from r1431293, tomcat/trunk/test/org/apache/catalina/startup/web-2lifecyclecallback.xml Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/LocalStrings.properties tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/FailedContext.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/WebRuleSet.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/Introspection.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestContextConfig.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java tomcat/tc7.0.x/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1431293 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java?rev=1431300&r1=1431299&r2=1431300&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java Thu Jan 10 11:47:49 2013 @@ -21,6 +21,7 @@ package org.apache.catalina; import java.net.URL; import java.util.Locale; +import java.util.Map; import java.util.Set; import javax.servlet.ServletContainerInitializer; @@ -1424,5 +1425,101 @@ public interface Context extends Contain * part of a redirect response. */ public boolean getSendRedirectBody(); -} +/** + * Add a post construct method definition for the given class, if there is + * an existing definition for the specified class - IllegalArgumentException + * will be thrown. + * + * @param clazz Fully qualified class name + * @param method + *Post construct method name + * @throws IllegalArgumentException + * if the fully qualified class name or method name are + * NULL; if there is already post construct method + * definition for the given class + */ +public void addPostConstructMethod(String clazz, String method); + +/** + * Add a pre destroy method definition for the given class, if there is an + * existing definition for the specified class - IllegalArgumentException + * will be thrown. + * + * @param clazz Fully qualified class name + * @param method + *Post construct method name + * @throws IllegalArgumentException + * if the fully qualified class name or method name are + * NULL; if there is already pre destroy method + * definition for the given class + */ +public void addPreDestroyMethod(String clazz, String method); + +/** + * Removes the post construct method definition for the given class, if it + * exists; otherwise, no action is taken. + * + * @param clazz + *Fully qualified class name + */ +public void removePostConstructMethod(String clazz); + +/** + * Removes the pre destroy method definition for the given class, if it + * exists; otherwise, no action is taken. + * + * @param clazz + *Fully qualified class name + */ +public void removePreDestroyMethod(String clazz); + +/** + * Returns the method name that is specified as post construct method for + * the given class, if it exists; otherwise NULL will be
svn commit: r1431298 - in /tomcat/trunk/test/org/apache/catalina: core/TestStandardContext.java startup/TomcatBaseTest.java
Author: markt Date: Thu Jan 10 11:45:12 2013 New Revision: 1431298 URL: http://svn.apache.org/viewvc?rev=1431298&view=rev Log: Remove unnecessary warnings Modified: tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Modified: tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java?rev=1431298&r1=1431297&r2=1431298&view=diff == --- tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java (original) +++ tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java Thu Jan 10 11:45:12 2013 @@ -161,7 +161,6 @@ public class TestStandardContext extends @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { -@SuppressWarnings("resource") // No need to close this writer PrintWriter out = response.getWriter(); out.print(getClass().getName()); chain.doFilter(request, response); @@ -648,7 +647,6 @@ public class TestStandardContext extends resp.setContentType("text/plain"); resp.setCharacterEncoding("UTF-8"); -@SuppressWarnings("resource") // No need to close this writer PrintWriter out = resp.getWriter(); out.println("parts=" + (null == req.getParts() Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1431298&r1=1431297&r2=1431298&view=diff == --- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original) +++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Thu Jan 10 11:45:12 2013 @@ -182,7 +182,6 @@ public abstract class TomcatBaseTest ext @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { -@SuppressWarnings("resource") // No need to close this writer PrintWriter out = resp.getWriter(); out.print(RESPONSE_TEXT); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54379] Implement support for post-construct and pre-destroy elements in web.xml
https://issues.apache.org/bugzilla/show_bug.cgi?id=54379 --- Comment #6 from Mark Thomas --- Many thanks for the patch. That was a much bigger job than I realised. I have applied the patch to trunk with just a few minor tweaks: - fixed various IDE / Checkstyle warnings (Java 7 <>, whitespace etc) - removed unnecessary use of this (just a style thing) - removed syncs from new maps in StandardContext (deployment is always single threaded for an app) - renamed a test class for consistency - correct a few indents - Used Tomcat.enableNaming() rather than system property I'll back-port to 7.0.x shortly. -- 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: r1431293 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/deploy/ java/org/apache/catalina/startup/ java/org/apache/catalina/util/ test
Author: markt Date: Thu Jan 10 11:39:46 2013 New Revision: 1431293 URL: http://svn.apache.org/viewvc?rev=1431293&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54379 Implement support for post-construct and pre-destroy elements in web.xml Patch by Violeta Georgieva. Added: tomcat/trunk/test/org/apache/catalina/startup/TesterServletWithLifeCycleMethods.java (with props) tomcat/trunk/test/org/apache/catalina/startup/web-1lifecyclecallback.xml (with props) tomcat/trunk/test/org/apache/catalina/startup/web-2lifecyclecallback.xml (with props) Modified: tomcat/trunk/java/org/apache/catalina/Context.java tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java tomcat/trunk/java/org/apache/catalina/util/Introspection.java tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java tomcat/trunk/test/org/apache/catalina/core/TesterContext.java tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java tomcat/trunk/test/org/apache/catalina/startup/TestContextConfig.java tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml Modified: tomcat/trunk/java/org/apache/catalina/Context.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1431293&r1=1431292&r2=1431293&view=diff == --- tomcat/trunk/java/org/apache/catalina/Context.java (original) +++ tomcat/trunk/java/org/apache/catalina/Context.java Thu Jan 10 11:39:46 2013 @@ -18,6 +18,7 @@ package org.apache.catalina; import java.net.URL; import java.util.Locale; +import java.util.Map; import java.util.Set; import javax.servlet.ServletContainerInitializer; @@ -1420,5 +1421,101 @@ public interface Context extends Contain * JAR. */ public boolean getAddWebinfClassesResources(); -} +/** + * Add a post construct method definition for the given class, if there is + * an existing definition for the specified class - IllegalArgumentException + * will be thrown. + * + * @param clazz Fully qualified class name + * @param method + *Post construct method name + * @throws IllegalArgumentException + * if the fully qualified class name or method name are + * NULL; if there is already post construct method + * definition for the given class + */ +public void addPostConstructMethod(String clazz, String method); + +/** + * Add a pre destroy method definition for the given class, if there is an + * existing definition for the specified class - IllegalArgumentException + * will be thrown. + * + * @param clazz Fully qualified class name + * @param method + *Post construct method name + * @throws IllegalArgumentException + * if the fully qualified class name or method name are + * NULL; if there is already pre destroy method + * definition for the given class + */ +public void addPreDestroyMethod(String clazz, String method); + +/** + * Removes the post construct method definition for the given class, if it + * exists; otherwise, no action is taken. + * + * @param clazz + *Fully qualified class name + */ +public void removePostConstructMethod(String clazz); + +/** + * Removes the pre destroy method definition for the given class, if it + * exists; otherwise, no action is taken. + * + * @param clazz + *Fully qualified class name + */ +public void removePreDestroyMethod(String clazz); + +/** + * Returns the method name that is specified as post construct method for + * the given class, if it exists; otherwise NULL will be + * returned. + * + * @param clazz + *Fully qualified class name + * + * @return the method name that is specified as post construct method for + * the given class, if it exists; otherwise NULL will + * be returned. + */ +public String findPostConstructMethod(String clazz); + +/** + * Returns the method name that is specified as pre destroy method for the + * given class, if it exists; otherwise NULL will be returned. + * + * @param clazz + *Fully qualified class name + * + * @return the method name that is specified as pre destroy method for the +
buildbot success in ASF Buildbot on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/3758 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1431260 Blamelist: markt Build succeeded! sincerely, -The Buildbot
Re: Rewrite functionality for 8
On Wed, 2013-01-09 at 13:16 -0500, Christopher Schultz wrote: > I haven't looked at the code but my first reaction was "why not use > url-rewrite?" When you say that it can re-start request processing, you > mean that you can essentially perform internal rewrites/forwards/etc. > without having to use the request dispatcher? Certainly reducing stack > size is not a bad idea and should improve performance. It may improve performance, but most importantly the application's state is untouched. It will not see any of the original request in its filters, only the modified one, etc. > The fact that it is mostly compatible with mod_rewrite configuration > syntax is definitely a plus, though url-rewrite 4 can read > mod_rewrite-style configuration files, too. > > Finally, there is the spec-versus-implementation issue. It's great that > Tomcat could provide this kind of capability, but since it is > out-of-spec we might be doing a disservice to our users. I know I'm > always irritated when someone posts to the users' list that they are > switching from JBoss/Sun/Jetty/Whatever and Tomcat doesn't mirror some > out-of-spec capability and they are all mad about it. That's what I like > about url-rewrite: you make it a part of your webapp and it should work > everywhere. The valve works at the vhost level as well (as I mentioned in my previous email), there were [minor] user requests for "creative" vhost mapping. So it should be able to do a lot of things that are quite complex to do otherwise, and is generally useful for customer support [since it can do anything except proxying]. Rémy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1431260 - /tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
Author: markt Date: Thu Jan 10 10:28:43 2013 New Revision: 1431260 URL: http://svn.apache.org/viewvc?rev=1431260&view=rev Log: Adding test/webapp-3.0/WEB-INF/classes means there are 3 resources not 2 in this test. Modified: tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java Modified: tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java?rev=1431260&r1=1431259&r2=1431260&view=diff == --- tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java (original) +++ tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java Thu Jan 10 10:28:43 2013 @@ -63,16 +63,16 @@ public class TestVirtualWebappLoader ext loader.start(); String[] repos = loader.getLoaderRepositories(); -assertEquals(2,repos.length); +assertEquals(3,repos.length); loader.stop(); // ToDo: Why doesn't remove repositories? repos = loader.getLoaderRepositories(); -assertEquals(2, repos.length); +assertEquals(3, repos.length); // no leak loader.start(); repos = loader.getLoaderRepositories(); -assertEquals(2,repos.length); +assertEquals(3,repos.length); // clear loader ctx.setLoader(null); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/3757 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1431221 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
[Bug 54240] Configurable system level tagPlugins.xml
https://issues.apache.org/bugzilla/show_bug.cgi?id=54240 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #12 from Mark Thomas --- Thanks for the patch and test case. This has been applied to trunk and 7.0.x and will be included in 7.0.35 onwards. -- 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: r1431228 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ test/org/apache/jasper/compiler/ test/webapp-3.0/WEB-INF/classes/ webapps/docs/
Author: markt Date: Thu Jan 10 09:32:39 2013 New Revision: 1431228 URL: http://svn.apache.org/viewvc?rev=1431228&view=rev Log: Add support for auto-detection and configuration of JARs on the classpath that provide tag plug-in implementations. Based on a patch by Sheldon Shao. Added: tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestTagPluginManager.java - copied unchanged from r1431221, tomcat/trunk/test/org/apache/jasper/compiler/TestTagPluginManager.java tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TesterTag.java - copied unchanged from r1431221, tomcat/trunk/test/org/apache/jasper/compiler/TesterTag.java tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TesterTagPlugin.java - copied unchanged from r1431221, tomcat/trunk/test/org/apache/jasper/compiler/TesterTagPlugin.java tomcat/tc7.0.x/trunk/test/webapp-3.0/WEB-INF/classes/ - copied from r1431221, tomcat/trunk/test/webapp-3.0/WEB-INF/classes/ Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/TagPluginManager.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1431221 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/TagPluginManager.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/TagPluginManager.java?rev=1431228&r1=1431227&r2=1431228&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/TagPluginManager.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/TagPluginManager.java Thu Jan 10 09:32:39 2013 @@ -14,10 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.jasper.compiler; +import java.io.IOException; import java.io.InputStream; +import java.net.URL; +import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; @@ -33,9 +35,10 @@ import org.apache.jasper.xmlparser.TreeN * Manages tag plugin optimizations. * @author Kin-man Chung */ - public class TagPluginManager { +private static final String META_INF_JASPER_TAG_PLUGINS_XML = +"META-INF/org.apache.jasper/tagPlugins.xml"; private static final String TAG_PLUGINS_XML = "/WEB-INF/tagPlugins.xml"; private static final String TAG_PLUGINS_ROOT_ELEM = "tag-plugins"; @@ -73,12 +76,62 @@ public class TagPluginManager { if (initialized) return; -InputStream is = ctxt.getResourceAsStream(TAG_PLUGINS_XML); -if (is == null) -return; +tagPlugins = new HashMap(); + +Enumeration urls = null; +try { +urls = ctxt.getClassLoader().getResources( +META_INF_JASPER_TAG_PLUGINS_XML); +} catch (IOException ioe) { +throw new JasperException(ioe); +} + +if (urls != null) { +while(urls.hasMoreElements()) { +URL url = urls.nextElement(); +InputStream is = null; +try { +is = url.openStream(); +loadTagPlugins(err, is); +} catch(IOException ioe) { +throw new JasperException(ioe); +} finally { +if (is != null) { +try { +is.close(); +} catch (IOException ioe) { +throw new JasperException(ioe); +} +} +} +} +} + +InputStream is = null; +try { +is = ctxt.getResourceAsStream(TAG_PLUGINS_XML); +if (is != null) { +loadTagPlugins(err, is); +} +} finally { +try { +if (is != null) { +is.close(); +} +} catch (IOException ioe) { +throw new JasperException(ioe); +} +} + +initialized = true; +} + + +private void loadTagPlugins(ErrorDispatcher err, InputStream is) +throws JasperException { -TreeNode root = (new ParserUtils()).parseXMLDocument(TAG_PLUGINS_XML, - is); +TreeNode root = +(new ParserUtils()).parseXMLDocument(TAG_PLUGINS_XML, is); if (root == null) { return; } 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=1431228&r1=1431227&r2=1431228&view=diff
svn commit: r1431221 - in /tomcat/trunk: java/org/apache/jasper/compiler/ test/org/apache/jasper/compiler/ test/webapp-3.0/WEB-INF/classes/ test/webapp-3.0/WEB-INF/classes/META-INF/ test/webapp-3.0/WE
Author: markt Date: Thu Jan 10 09:22:11 2013 New Revision: 1431221 URL: http://svn.apache.org/viewvc?rev=1431221&view=rev Log: Add support for auto-detection and configuration of JARs on the classpath that provide Tag Plugin implementations. Based on a patch by Sheldon Shao. Added: tomcat/trunk/test/org/apache/jasper/compiler/TestTagPluginManager.java (with props) tomcat/trunk/test/org/apache/jasper/compiler/TesterTag.java (with props) tomcat/trunk/test/org/apache/jasper/compiler/TesterTagPlugin.java (with props) tomcat/trunk/test/webapp-3.0/WEB-INF/classes/ tomcat/trunk/test/webapp-3.0/WEB-INF/classes/META-INF/ tomcat/trunk/test/webapp-3.0/WEB-INF/classes/META-INF/org.apache.jasper/ tomcat/trunk/test/webapp-3.0/WEB-INF/classes/META-INF/org.apache.jasper/tagPlugins.xml (with props) Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java?rev=1431221&r1=1431220&r2=1431221&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java Thu Jan 10 09:22:11 2013 @@ -14,10 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.jasper.compiler; +import java.io.IOException; import java.io.InputStream; +import java.net.URL; +import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; @@ -33,9 +35,10 @@ import org.apache.jasper.xmlparser.TreeN * Manages tag plugin optimizations. * @author Kin-man Chung */ - public class TagPluginManager { +private static final String META_INF_JASPER_TAG_PLUGINS_XML = +"META-INF/org.apache.jasper/tagPlugins.xml"; private static final String TAG_PLUGINS_XML = "/WEB-INF/tagPlugins.xml"; private static final String TAG_PLUGINS_ROOT_ELEM = "tag-plugins"; @@ -73,12 +76,44 @@ public class TagPluginManager { if (initialized) return; -InputStream is = ctxt.getResourceAsStream(TAG_PLUGINS_XML); -if (is == null) -return; +tagPlugins = new HashMap<>(); + +Enumeration urls = null; +try { +urls = ctxt.getClassLoader().getResources( +META_INF_JASPER_TAG_PLUGINS_XML); +} catch (IOException ioe) { +throw new JasperException(ioe); +} + +if (urls != null) { +while(urls.hasMoreElements()) { +URL url = urls.nextElement(); +try (InputStream is = url.openStream()){ +loadTagPlugins(err, is); +} catch(IOException ioe) { +throw new JasperException(ioe); +} +} +} + +try (InputStream is = ctxt.getResourceAsStream(TAG_PLUGINS_XML)) { +if (is != null) { +loadTagPlugins(err, is); +} +} catch (IOException ioe) { +throw new JasperException(ioe); +} + +initialized = true; +} + + +private void loadTagPlugins(ErrorDispatcher err, InputStream is) +throws JasperException { -TreeNode root = (new ParserUtils()).parseXMLDocument(TAG_PLUGINS_XML, - is); +TreeNode root = +(new ParserUtils()).parseXMLDocument(TAG_PLUGINS_XML, is); if (root == null) { return; } Added: tomcat/trunk/test/org/apache/jasper/compiler/TestTagPluginManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestTagPluginManager.java?rev=1431221&view=auto == --- tomcat/trunk/test/org/apache/jasper/compiler/TestTagPluginManager.java (added) +++ tomcat/trunk/test/org/apache/jasper/compiler/TestTagPluginManager.java Thu Jan 10 09:22:11 2013 @@ -0,0 +1,75 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License fo
[Bug 54240] Configurable system level tagPlugins.xml
https://issues.apache.org/bugzilla/show_bug.cgi?id=54240 --- Comment #11 from Mark Thomas --- I like the idea of using the existing mechanisms (such as ServletContainerInitializer) but that would require other changes since: - TagPluginManager is not created at the point where the SCI runs - There is no mechanism to expose the TagPluginManager to the SCI Given that changes would have to be made and that Tag plug-ins are a Tomcat specific extension, I don't have an issue with a Tomcat specific mechanism to configure these plug-ins. I like the META-INF/japser approach as it means a plug-in JAR can be dropped into CATALINA_BASE/lib and be used by all web applications on that instance. I'll be working on applying this patch for 7.0.35. -- 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 54387] Having servlets with same url should at least cause warning
https://issues.apache.org/bugzilla/show_bug.cgi?id=54387 Mark Thomas changed: What|Removed |Added Status|NEEDINFO|NEW --- Comment #2 from Mark Thomas --- The EG has confirmed that deployment should fail. -- 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