[Bug 57129] Regression. Load WEB-INF/lib jarfiles in alphabetical order
https://bz.apache.org/bugzilla/show_bug.cgi?id=57129 --- Comment #12 from quaff --- (In reply to Christopher Schultz from comment #11) > (In reply to quaff from comment #9) > > I have the same problem, my application need to override resources of > > third-party libs, for example config files and templates even classes, It > > works fine with tomcat7 and other application servers. I hope tomcat8 could > > fix this problem for robustness and compatibility > > You can always write your own ClassLoader that mostly delegates to the > superclass (WebappClassLoader) but prioritizes whatever libraries you want. I think it is a regression bug, tomcat8 should fix it, maybe we should abandon tomcat8, stay with tomcat7 or switch to other servers. -- 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: r1689825 - in /tomcat/trunk: java/org/apache/catalina/ant/ test/deployment/ test/deployment/dir with spaces/ test/org/apache/catalina/ant/
Author: violetagg Date: Wed Jul 8 09:14:53 2015 New Revision: 1689825 URL: http://svn.apache.org/r1689825 Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58086 Rework the change made with r1688563. When the war location points to a local path the FileInputStream will be used otherwise URLConnection will be used. Added: tomcat/trunk/test/deployment/context.jar (with props) tomcat/trunk/test/deployment/dir with spaces/ (with props) tomcat/trunk/test/deployment/dir with spaces/context.jar (with props) tomcat/trunk/test/deployment/dir with spaces/context.war (with props) tomcat/trunk/test/org/apache/catalina/ant/ (with props) tomcat/trunk/test/org/apache/catalina/ant/TestDeployTask.java (with props) Modified: tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java Modified: tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java?rev=1689825&r1=1689824&r2=1689825&view=diff == --- tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java (original) +++ tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java Wed Jul 8 09:14:53 2015 @@ -26,6 +26,7 @@ import java.io.UnsupportedEncodingExcept import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; +import java.util.regex.Pattern; import org.apache.tools.ant.BuildException; @@ -38,6 +39,7 @@ import org.apache.tools.ant.BuildExcepti * @since 4.1 */ public class DeployTask extends AbstractCatalinaCommandTask { +private static final Pattern PROTOCOL_PATTERN = Pattern.compile("\\w{3,5}\\:"); // - Properties @@ -140,7 +142,7 @@ public class DeployTask extends Abstract String contentType = null; int contentLength = -1; if (war != null) { -if (!war.startsWith("file:")) { +if (PROTOCOL_PATTERN.matcher(war).lookingAt()) { try { URL url = new URL(war); URLConnection conn = url.openConnection(); @@ -151,8 +153,9 @@ public class DeployTask extends Abstract throw new BuildException(e); } } else { +FileInputStream fsInput = null; try { -FileInputStream fsInput = new FileInputStream(war); +fsInput = new FileInputStream(war); long size = fsInput.getChannel().size(); if (size > Integer.MAX_VALUE) @@ -164,6 +167,13 @@ public class DeployTask extends Abstract stream = new BufferedInputStream(fsInput, 1024); } catch (IOException e) { +if (fsInput != null) { +try { +fsInput.close(); +} catch (IOException ioe) { +// Ignore +} +} throw new BuildException(e); } } Added: tomcat/trunk/test/deployment/context.jar URL: http://svn.apache.org/viewvc/tomcat/trunk/test/deployment/context.jar?rev=1689825&view=auto == Binary file - no diff available. Propchange: tomcat/trunk/test/deployment/context.jar -- svn:mime-type = application/octet-stream Propchange: tomcat/trunk/test/deployment/dir with spaces/ -- bugtraq:append = false Propchange: tomcat/trunk/test/deployment/dir with spaces/ -- bugtraq:label = Bugzilla ID (optional) Propchange: tomcat/trunk/test/deployment/dir with spaces/ -- --- bugtraq:logregex (added) +++ bugtraq:logregex Wed Jul 8 09:14:53 2015 @@ -0,0 +1,2 @@ +(https?\://(bz|issues)\.apache\.org/bugzilla/show_bug.cgi\?id=\d+|BZ\s?\d+) +(\d+) Propchange: tomcat/trunk/test/deployment/dir with spaces/ -- bugtraq:message = Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/trunk/test/deployment/dir with spaces/ -- bugtraq:url = https://bz.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Added: tomcat/trunk/test/deployment/dir with spaces/context.jar URL: http://svn.apache.org/viewvc/tomcat/trunk/test/deployment/dir%20with%20spaces/context.jar?rev=1689825&view=auto == Binary file -
svn commit: r1689850 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/ant/DeployTask.java test/deployment/context.jar test/deployment/dir with spaces/ test/org/apache/catalina/ant/ webapps/docs
Author: violetagg Date: Wed Jul 8 11:50:38 2015 New Revision: 1689850 URL: http://svn.apache.org/r1689850 Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58086 Merged revision 1689825 from tomcat/trunk: Rework the change made with r1688563. When the war location points to a local path the FileInputStream will be used otherwise URLConnection will be used. Added: tomcat/tc8.0.x/trunk/test/deployment/context.jar - copied unchanged from r1689825, tomcat/trunk/test/deployment/context.jar tomcat/tc8.0.x/trunk/test/deployment/dir with spaces/ - copied from r1689825, tomcat/trunk/test/deployment/dir with spaces/ tomcat/tc8.0.x/trunk/test/org/apache/catalina/ant/ - copied from r1689825, tomcat/trunk/test/org/apache/catalina/ant/ Modified: tomcat/tc8.0.x/trunk/ (props changed) tomcat/tc8.0.x/trunk/java/org/apache/catalina/ant/DeployTask.java tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc8.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jul 8 11:50:38 2015 @@ -1 +1 @@ -/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892 ,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657 907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1 666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,16823
svn commit: r1689851 - /tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
Author: violetagg Date: Wed Jul 8 11:58:12 2015 New Revision: 1689851 URL: http://svn.apache.org/r1689851 Log: Correct the order in changelog Modified: tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1689851&r1=1689850&r2=1689851&view=diff == --- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Wed Jul 8 11:58:12 2015 @@ -59,13 +59,13 @@ class loader.) (markt) -58096: Classes loaded from /WEB-INF/classes/ -should use that directory as their code base. (markt) - - 58086: Correct a regression in the fix for 58086 that incorrectly handled WAR URLs. (violetagg) + +58096: Classes loaded from /WEB-INF/classes/ +should use that directory as their code base. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1689852 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/ant/DeployTask.java test/deployment/context.jar test/deployment/dir with spaces/ test/org/apache/catalina/ant/ webapps/docs
Author: violetagg Date: Wed Jul 8 11:59:37 2015 New Revision: 1689852 URL: http://svn.apache.org/r1689852 Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58086 Merged revision 1689825 from tomcat/trunk: Rework the change made with r1688563. When the war location points to a local path the FileInputStream will be used otherwise URLConnection will be used. Added: tomcat/tc7.0.x/trunk/test/deployment/context.jar - copied unchanged from r1689825, tomcat/trunk/test/deployment/context.jar tomcat/tc7.0.x/trunk/test/deployment/dir with spaces/ - copied from r1689825, tomcat/trunk/test/deployment/dir with spaces/ tomcat/tc7.0.x/trunk/test/org/apache/catalina/ant/ - copied from r1689825, tomcat/trunk/test/org/apache/catalina/ant/ Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/DeployTask.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jul 8 11:59:37 2015 @@ -1,2 +1,2 @@ /tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458,1646460-1646462,1646735,1646738-1646741,1646744,1646746,1646748-1646755,1646757,1646759-1646760,1647043,1648816,1651420-1651422,1651844,1652926,1652939-1652940,1652973,1653798,1653817,1653841,1654042,1654161,1654736,1654767,1654787,1656592,1662986,1663265,1663278,1663325,1663535,1663567,1663679,1663997,1664175,1664321,1664872,1665061,1665086,1666027,1666395,1666503,1666506,1666560,1666570,1666581,1666759,1666967,1666988,1667553-1667555 ,1667558,1667617,1667633,1667637,1667747,1667767,1667873,1668028,1668137,1668634,1669432,1669801,1669840,1669895-1669896,1670398,1670435,1670592,1670605-1670607,1670609,1670632,1670720,1670725,1670727,1670731,1671114,1672273,1672285,1673759,1674220,1674295,1675469,1675488,1675595,1675831,1676232,1676367-1676369,1676382,1676394,1676483,1676556,1676635,1678178,1679536,1679988,1680256,1681124,1681182,1681730,1681840,1681864,1681869,1682010,1682034,1682047,1682052-1682053,1682062,1682064,1682070,1682312,1682325,1682331,1682386,1684367,1684385,1685759,1685774,1685827,1685892,1687341,1688904,1689358,1689657 -/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-1222329,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,1342320,1342476,1342 498,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,1
[Bug 58086] Deploy WAR file using http:// throws FileNotFoundException
https://bz.apache.org/bugzilla/show_bug.cgi?id=58086 Violeta Georgieva changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Violeta Georgieva --- Hi, Thanks for the testing. The new fix was made available in trunk, in 8.0.x for 8.0.25 and in 7.0.x for 7.0.64 onwards. Regards, Violeta -- 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: r1689856 - /tomcat/trunk/webapps/docs/manager-howto.xml
Author: violetagg Date: Wed Jul 8 12:20:13 2015 New Revision: 1689856 URL: http://svn.apache.org/r1689856 Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58112 Add to the documentation that tomcat-util.jar is also needed when executing Manager's commands with ANT Modified: tomcat/trunk/webapps/docs/manager-howto.xml Modified: tomcat/trunk/webapps/docs/manager-howto.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/manager-howto.xml?rev=1689856&r1=1689855&r2=1689856&view=diff == --- tomcat/trunk/webapps/docs/manager-howto.xml (original) +++ tomcat/trunk/webapps/docs/manager-howto.xml Wed Jul 8 12:20:13 2015 @@ -1147,7 +1147,8 @@ commands, you must perform the following You must use version 1.4 or later. Install the Ant distribution in a convenient directory (called ANT_HOME in the remainder of these instructions). -Copy the file server/lib/catalina-ant.jar from your Tomcat +Copy the files server/lib/catalina-ant.jar and +server/lib/tomcat-util.jar from your Tomcat installation into Ant's library directory ($ANT_HOME/lib). Add the $ANT_HOME/bin directory to your PATH - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58112] o.a.c.ant.DeployTask depends on o.a.tomcat.util.* - packaging or documentation issue ?
https://bz.apache.org/bugzilla/show_bug.cgi?id=58112 --- Comment #2 from Konstantin Kolinko --- I'd say that the recommended way to enable those tasks in Ant is to use one of the following: a) bin/catalina-tasks.xml from usual Tomcat 7.0.x distribution b) build.xml from Tomcat 7.0.x deployer distribution Both import all *.jars. -- 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 58112] o.a.c.ant.DeployTask depends on o.a.tomcat.util.* - packaging or documentation issue ?
https://bz.apache.org/bugzilla/show_bug.cgi?id=58112 Violeta Georgieva changed: What|Removed |Added Component|Packaging |Documentation -- 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
[ANN] Apache Tomcat 8.0.24 available
The Apache Tomcat team announces the immediate availability of Apache Tomcat 8.0.24. Apache Tomcat 8 is an open source software implementation of the Java Servlet, JavaServer Pages, Java Unified Expression Language and Java WebSocket technologies. Apache Tomcat 8.0.24 includes numerous fixes for issues identified in 8.0.23 as well as a number of other enhancements and changes. The notable changes since 8.0.23 include: - Provide path parameters to POJO via per session javax.websocket.server.ServerEndpointConfig as they vary between different requests. - Various fixes to the SlowQueryReport in jdbc-pool - Various improvements to how Tomcat implements the requirements of SRV.10.7.2 (not loading Java SE and implemented specification classes from web applications) Please refer to the change log for the complete list of changes: http://tomcat.apache.org/tomcat-8.0-doc/changelog.html Downloads: http://tomcat.apache.org/download-80.cgi Migration guides from Apache Tomcat 5.5.x, 6.0.x and 7.0.x: http://tomcat.apache.org/migration.html Enjoy! - The Apache Tomcat team - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58095] Empty
https://bz.apache.org/bugzilla/show_bug.cgi?id=58095 --- Comment #5 from jones...@oildex.com --- Thanks for the input. Regarding Content-Type: Jasper sets the content type in the generated source file by itself, i.e: response.setContentType("text/xml;charset=UTF-8"); I havent been able to confirm if it even makes a difference... at this time we've been employing the workaround across many of our jsp documents. We have also similar found issues with a self-closing tag. We worked around it the same way as above. Ideally, I suppose, it would be possible to instruct Jasper to not coalesce tags vs. -- 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: r1689918 - in /tomcat/trunk: conf/web.xml java/org/apache/catalina/servlets/CGIServlet.java webapps/docs/cgi-howto.xml
Author: markt Date: Wed Jul 8 17:06:30 2015 New Revision: 1689918 URL: http://svn.apache.org/r1689918 Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57741 Don't disable error page support unless debug is set to 10 or more. Modified: tomcat/trunk/conf/web.xml tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java tomcat/trunk/webapps/docs/cgi-howto.xml Modified: tomcat/trunk/conf/web.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/conf/web.xml?rev=1689918&r1=1689917&r2=1689918&view=diff == --- tomcat/trunk/conf/web.xml (original) +++ tomcat/trunk/conf/web.xml Wed Jul 8 17:06:30 2015 @@ -46,8 +46,12 @@ - - + + + + + + Modified: tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java?rev=1689918&r1=1689917&r2=1689918&view=diff == --- tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java (original) +++ tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java Wed Jul 8 17:06:30 2015 @@ -242,8 +242,11 @@ public final class CGIServlet extends Ht /** * The debugging detail level for this servlet. Useful values range from 0 * to 5 where 0 means no logging and 5 means maximum logging. Values of 10 - * or more mean maximum logging plus debug info added to the HTTP response. - * Note that any value of 10 or more has the same effect. + * or more mean maximum logging and debug info added to the HTTP response. + * If an error occurs and debug is 10 or more the standard error page + * mechanism will be disabled and a response body with debug information + * will be produced. Note that any value of 10 or more has the same effect + * as a value of 10. */ private int debug = 0; @@ -586,7 +589,9 @@ public final class CGIServlet extends Ht cgi.setResponse(res); cgi.run(); } else { -res.setStatus(404); +if (setStatus(res, 404)) { +return; +} } if (debug >= 10) { @@ -626,6 +631,29 @@ public final class CGIServlet extends Ht } +/* + * Behaviour depends on the status code and the value of debug. + * + * Status < 400 - Always calls setStatus. Returns false. CGI servlet will + * provide the response body. + * Status >= 400 - Depends on debug + * debug < 10- Calls sendError(status), returns true. Standard error + * page mechanism will provide the response body. + * debug >= 10 - Calls setStatus(status), return false. CGI servlet will + * provide the response body. + */ +private boolean setStatus(HttpServletResponse response, int status) throws IOException { + +if (status >= HttpServletResponse.SC_BAD_REQUEST && debug < 10) { +response.sendError(status); +return true; +} else { +response.setStatus(status); +return false; +} +} + + /** * Encapsulates the CGI environment and rules to derive * that environment from the servlet container and request information. @@ -1638,6 +1666,12 @@ public final class CGIServlet extends Ht cgiHeaderReader = new BufferedReader(new InputStreamReader(cgiHeaderStream)); +// Need to be careful here. If sendError() is called the +// response body should be provided by the standard error page +// process. But, if the output of the CGI process isn't read +// then that process can hang. +boolean skipBody = false; + while (isRunning) { try { //set headers @@ -1648,14 +1682,14 @@ public final class CGIServlet extends Ht log("runCGI: addHeader(\"" + line + "\")"); } if (line.startsWith("HTTP")) { - response.setStatus(getSCFromHttpStatusLine(line)); +skipBody = setStatus(response, getSCFromHttpStatusLine(line)); } else if (line.indexOf(":") >= 0) { String header = line.substring(0, line.indexOf(":")).trim(); String value = line.substring(line.indexOf(":") + 1).trim(); if (header.equalsIgnoreCase("status")) { - response.setStatus(getSCFromCGIStatusHeader(value)); +skipBody = setStatus(response,
svn commit: r1689919 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/servlets/CGIServlet.java
Author: markt Date: Wed Jul 8 17:08:09 2015 New Revision: 1689919 URL: http://svn.apache.org/r1689919 Log: Clean-up code and comments Modified: tomcat/tc8.0.x/trunk/ (props changed) tomcat/tc8.0.x/trunk/java/org/apache/catalina/servlets/CGIServlet.java Propchange: tomcat/tc8.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jul 8 17:08:09 2015 @@ -1 +1 @@ -/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892 ,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657 907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1 666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685739,1685744,1685772,1685816,1685826,1685891,1687268,168734 0,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689825 +/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,16422
svn commit: r1689920 - in /tomcat/tc8.0.x/trunk: ./ conf/web.xml java/org/apache/catalina/servlets/CGIServlet.java webapps/docs/cgi-howto.xml
Author: markt Date: Wed Jul 8 17:08:36 2015 New Revision: 1689920 URL: http://svn.apache.org/r1689920 Log: Better docs for CGIServlet debug init param Modified: tomcat/tc8.0.x/trunk/ (props changed) tomcat/tc8.0.x/trunk/conf/web.xml tomcat/tc8.0.x/trunk/java/org/apache/catalina/servlets/CGIServlet.java tomcat/tc8.0.x/trunk/webapps/docs/cgi-howto.xml Propchange: tomcat/tc8.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jul 8 17:08:36 2015 @@ -1 +1 @@ -/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892 ,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657 907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1 666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685739,1685744,1685772,1685816,1685826,1685891,1687268,168734 0,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689825 +/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,16
svn commit: r1689921 - in /tomcat/tc8.0.x/trunk: ./ conf/web.xml java/org/apache/catalina/servlets/CGIServlet.java webapps/docs/cgi-howto.xml webapps/docs/changelog.xml
Author: markt Date: Wed Jul 8 17:10:54 2015 New Revision: 1689921 URL: http://svn.apache.org/r1689921 Log: Don't disable error page support unless debug is set to 10 or more. Modified: tomcat/tc8.0.x/trunk/ (props changed) tomcat/tc8.0.x/trunk/conf/web.xml tomcat/tc8.0.x/trunk/java/org/apache/catalina/servlets/CGIServlet.java tomcat/tc8.0.x/trunk/webapps/docs/cgi-howto.xml tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc8.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jul 8 17:10:54 2015 @@ -1 +1 @@ -/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892 ,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657 907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1 666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685739,1685744,1685772,1685816,1685826,1685891,1687268,168734 0,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825 +/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-164088
[Bug 57741] Add support for error-pages to CGIServlet
https://bz.apache.org/bugzilla/show_bug.cgi?id=57741 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Mark Thomas --- As of 8.0.25, the CGI servlet will use the standard error page mechanism unless the debug attribute is 10 or less. -- 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 58095] Empty
https://bz.apache.org/bugzilla/show_bug.cgi?id=58095 --- Comment #6 from Christopher Schultz --- (In reply to jonesgav from comment #5) > We have also similar found issues with a self-closing tag. I'm pretty sure a form with no child elements is not legal anyway. > We worked around it the same way as above. Ideally, I suppose, it would be > possible to instruct Jasper to not coalesce tags vs. Or you could use .jsp instead of .jspx, right? They are slightly different beasts. -- 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 48899] Guess URI charset should solve lot of problems
https://bz.apache.org/bugzilla/show_bug.cgi?id=48899 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #1 from Mark Thomas --- The current default of UTF-8 (for the later releases) is aligned with the way standards (official and unofficial) are moving. I'm also concerned that a wrong guess may have unpleasant side-effects. -- 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: r1689935 - /tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java
Author: markt Date: Wed Jul 8 18:53:44 2015 New Revision: 1689935 URL: http://svn.apache.org/r1689935 Log: Use try-with-resources Modified: tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java Modified: tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java?rev=1689935&r1=1689934&r2=1689935&view=diff == --- tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java (original) +++ tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java Wed Jul 8 18:53:44 2015 @@ -153,9 +153,7 @@ public class DeployTask extends Abstract throw new BuildException(e); } } else { -FileInputStream fsInput = null; -try { -fsInput = new FileInputStream(war); +try (FileInputStream fsInput = new FileInputStream(war)) { long size = fsInput.getChannel().size(); if (size > Integer.MAX_VALUE) @@ -167,13 +165,6 @@ public class DeployTask extends Abstract stream = new BufferedInputStream(fsInput, 1024); } catch (IOException e) { -if (fsInput != null) { -try { -fsInput.close(); -} catch (IOException ioe) { -// Ignore -} -} throw new BuildException(e); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1689935 - /tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java
Hi Mark, 2015-07-08 21:53 GMT+03:00 : > > Author: markt > Date: Wed Jul 8 18:53:44 2015 > New Revision: 1689935 > > URL: http://svn.apache.org/r1689935 > Log: > Use try-with-resources > > Modified: > tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java > > Modified: tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java > URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java?rev=1689935&r1=1689934&r2=1689935&view=diff > == > --- tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java (original) > +++ tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java Wed Jul 8 18:53:44 2015 > @@ -153,9 +153,7 @@ public class DeployTask extends Abstract > throw new BuildException(e); > } > } else { > -FileInputStream fsInput = null; > -try { > -fsInput = new FileInputStream(war); > +try (FileInputStream fsInput = new FileInputStream(war)) { The stream must stay opened. We need to close it only if there is an Exception. Regards, Violeta > long size = fsInput.getChannel().size(); > > if (size > Integer.MAX_VALUE) > @@ -167,13 +165,6 @@ public class DeployTask extends Abstract > stream = new BufferedInputStream(fsInput, 1024); > > } catch (IOException e) { > -if (fsInput != null) { > -try { > -fsInput.close(); > -} catch (IOException ioe) { > -// Ignore > -} > -} > throw new BuildException(e); > } > } > > > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org >
Re: svn commit: r1689935 - /tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java
On 08/07/2015 20:18, Violeta Georgieva wrote: > Hi Mark, > > 2015-07-08 21:53 GMT+03:00 : >> >> Author: markt >> Date: Wed Jul 8 18:53:44 2015 >> New Revision: 1689935 >> >> URL: http://svn.apache.org/r1689935 >> Log: >> Use try-with-resources >> >> Modified: >> tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java >> >> Modified: tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java >> URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java?rev=1689935&r1=1689934&r2=1689935&view=diff >> > == >> --- tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java (original) >> +++ tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java Wed Jul 8 > 18:53:44 2015 >> @@ -153,9 +153,7 @@ public class DeployTask extends Abstract >> throw new BuildException(e); >> } >> } else { >> -FileInputStream fsInput = null; >> -try { >> -fsInput = new FileInputStream(war); >> +try (FileInputStream fsInput = new FileInputStream(war)) > { > > The stream must stay opened. > We need to close it only if there is an Exception. Sorry. I'll revert. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1689941 - /tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java
Author: markt Date: Wed Jul 8 19:21:26 2015 New Revision: 1689941 URL: http://svn.apache.org/r1689941 Log: Revert r1686635 Modified: tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java Modified: tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java?rev=1689941&r1=1689940&r2=1689941&view=diff == --- tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java (original) +++ tomcat/trunk/java/org/apache/catalina/ant/DeployTask.java Wed Jul 8 19:21:26 2015 @@ -153,7 +153,9 @@ public class DeployTask extends Abstract throw new BuildException(e); } } else { -try (FileInputStream fsInput = new FileInputStream(war)) { +FileInputStream fsInput = null; +try { +fsInput = new FileInputStream(war); long size = fsInput.getChannel().size(); if (size > Integer.MAX_VALUE) @@ -165,6 +167,13 @@ public class DeployTask extends Abstract stream = new BufferedInputStream(fsInput, 1024); } catch (IOException e) { +if (fsInput != null) { +try { +fsInput.close(); +} catch (IOException ioe) { +// Ignore +} +} throw new BuildException(e); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58116] New: [PATCH] Running with SecurityManager: CometProcessor servlets throw NoSuchMethodException
https://bz.apache.org/bugzilla/show_bug.cgi?id=58116 Bug ID: 58116 Summary: [PATCH] Running with SecurityManager: CometProcessor servlets throw NoSuchMethodException Product: Tomcat 7 Version: 7.0.63 Hardware: PC OS: Windows NT Status: NEW Severity: regression Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: jo...@sulake.com Created attachment 32892 --> https://bz.apache.org/bugzilla/attachment.cgi?id=32892&action=edit CometProcessor servlets must not be cached as Servlet or NoSuchMethodException will be thrown. The fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=57281 caused a regression with Tomcat running with a SecurityManager, CometProcessor servlets throw an exception when serving a request. Please find proposed fix in patch file. -- 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
[GUMP@vmgump]: Project tomcat-tc8.0.x-test-nio2 (in module tomcat-8.0.x) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-tc8.0.x-test-nio2 has an issue affecting its community integration. This issue affects 1 projects. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-tc8.0.x-test-nio2 : Tomcat 8.x, a web server implementing the Java Servlet 3.1, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-nio2/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-8.0.x/output/logs-NIO2 -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-8.0.x/output/test-tmp-NIO2/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-nio2/gump_work/build_tomcat-8.0.x_tomcat-tc8.0.x-test-nio2.html Work Name: build_tomcat-8.0.x_tomcat-tc8.0.x-test-nio2 (Type: Build) Work ended in a state of : Failed Elapsed: 33 mins 1 sec Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar -Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar -Dtest.reports=output/logs-NIO2 -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150708-native-src.tar.gz -Dexamples.sources.skip=true -Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.4-201406061215/ecj-4.4.jar -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20150708.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150708-native-src.tar.gz -Dtest.temp=output/test-tmp-NIO2 -Dtest.accesslog=true -Dexecute.test.nio=false -Dtest.openssl.path=/srv/gump/public/workspace/openssl-1.0.2/dest-20150708/bin /openssl -Dexecute.test.bio=false -Dexecute.test.apr=false -Dtest.excludePerformance=true -Dexecute.test.nio2=true -Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.4-SNAPSHOT.jar -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test [Working Directory: /srv/gump/public/workspace/tomcat-8.0.x] CLASSPATH: /usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-8.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/servlet-api.ja r:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-8.0.x/output
[Bug 58116] [PATCH] Running with SecurityManager: CometProcessor servlets throw NoSuchMethodException
https://bz.apache.org/bugzilla/show_bug.cgi?id=58116 --- Comment #1 from Johno Crawford --- javax.servlet.ServletException: Servlet execution threw an exception java.security.AccessController.doPrivileged(Native Method) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:218) org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:333) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1753) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1712) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:745) root cause java.lang.NoSuchMethodException: javax.servlet.Servlet.event(org.apache.catalina.comet.CometEvent) java.lang.Class.getMethod(Class.java:1670) org.apache.catalina.security.SecurityUtil.createMethodAndCacheIt(SecurityUtil.java:380) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161) java.security.AccessController.doPrivileged(Native Method) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:218) org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:333) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1753) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1712) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:745) -- 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 57741] Add support for error-pages to CGIServlet
https://bz.apache.org/bugzilla/show_bug.cgi?id=57741 --- Comment #6 from jdh5...@gmail.com --- (In reply to Mark Thomas from comment #5) > As of 8.0.25, the CGI servlet will use the standard error page mechanism > unless the debug attribute is 10 or less. Thanks Mark! Appreciate the help. -- 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