svn commit: r1712912 - in /tomcat/trunk: conf/web.xml webapps/docs/jasper-howto.xml

2015-11-06 Thread markt
Author: markt
Date: Fri Nov  6 08:13:29 2015
New Revision: 1712912

URL: http://svn.apache.org/viewvc?rev=1712912&view=rev
Log:
Document the new quoteAttributeEL option.

Modified:
tomcat/trunk/conf/web.xml
tomcat/trunk/webapps/docs/jasper-howto.xml

Modified: tomcat/trunk/conf/web.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/conf/web.xml?rev=1712912&r1=1712911&r2=1712912&view=diff
==
--- tomcat/trunk/conf/web.xml (original)
+++ tomcat/trunk/conf/web.xml Fri Nov  6 08:13:29 2015
@@ -246,6 +246,11 @@
   
   
   
+  
+  
+  
+  
+
 
 
 jsp

Modified: tomcat/trunk/webapps/docs/jasper-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/jasper-howto.xml?rev=1712912&r1=1712911&r2=1712912&view=diff
==
--- tomcat/trunk/webapps/docs/jasper-howto.xml (original)
+++ tomcat/trunk/webapps/docs/jasper-howto.xml Fri Nov  6 08:13:29 2015
@@ -202,8 +202,13 @@ default false.
 for attribute values, should the rules in JSP.1.6 for the escaping of quote
 characters be strictly applied? true or false, 
default
 true.
-
 
+quoteAttributeEL - When EL is used in JSP attribute 
values,
+should the rules for quoting of attributes described in JSP.1.6 be applied to
+the expression? true or false, default
+true.
+
+  
 The Java compiler from Eclipse JDT in included as the default compiler. It 
is
 an advanced Java compiler which will load all dependencies from the Tomcat 
class
 loader, which will help tremendously when compiling on large installations with



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1712913 - in /tomcat/tc8.0.x/trunk: ./ conf/web.xml webapps/docs/jasper-howto.xml

2015-11-06 Thread markt
Author: markt
Date: Fri Nov  6 08:15:09 2015
New Revision: 1712913

URL: http://svn.apache.org/viewvc?rev=1712913&view=rev
Log:
Document the new quoteAttributeEL option.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/conf/web.xml
tomcat/tc8.0.x/trunk/webapps/docs/jasper-howto.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov  6 08:15: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,1649973,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,1655351,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,1657
 
609,1657682,1657907,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,1
 
37,149,1666757,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,1681697,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,1685556,1685591,1685739,1685744,168577
 
2,1685816,1685826,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1693088,1693105,1693429,1693461,1694058,1694111,1694290,1694501,1694548,1694658,1694660,1694788,1694872,1694878,1695006,1695354,1695371,1695379,1695459,1695582,1695706,1695778,1696199,1696272,1696280,

[Bug 57136] EL Parser escaping dollar sign not ${ or ${...}

2015-11-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57136

--- Comment #29 from Mark Thomas  ---
That isn't the option you want. You want this one:
quoteAttributeEL

Thanks for the reminder, I'd forgotten to document it.

-- 
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-tc7.0.x-test-nio (in module tomcat-7.0.x) failed

2015-11-06 Thread Bill Barker
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-tc7.0.x-test-nio 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-tc7.0.x-test-nio :  Tomcat 7.x, a web server implementing Java 
Servlet 3.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test-nio/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -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.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/logs-NIO
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-NIO/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test-nio/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test-nio.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test-nio (Type: Build)
Work ended in a state of : Failed
Elapsed: 32 mins 17 secs
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 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151106-native-src.tar.gz
 -Dtest.reports=output/logs-NIO 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151106-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20151106.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dtest.excludePerformance=true -Dtest.accesslog=true 
-Dcommons-pool.home=/srv/gump/pub
 lic/workspace/commons-pool-1.x 
-Dcommons-dbcp.home=/srv/gump/public/workspace/commons-dbcp-1.x 
-Dexecute.test.apr=false -Dexecute.test.bio=false -Dexecute.test.nio=true 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20151106.jar
 -Dtest.temp=output/test-tmp-NIO 
-Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.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-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build

svn commit: r1712925 - /tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java

2015-11-06 Thread remm
Author: remm
Date: Fri Nov  6 09:33:34 2015
New Revision: 1712925

URL: http://svn.apache.org/viewvc?rev=1712925&view=rev
Log:
Follow up to r1712529: AJP should return false to comet rather than throwing an 
unsupported exception.

Modified:
tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java

Modified: 
tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1712925&r1=1712924&r2=1712925&view=diff
==
--- tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java 
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java 
Fri Nov  6 09:33:34 2015
@@ -619,8 +619,9 @@ public abstract class AbstractAjpProcess
 }
 case IS_COMET: {
 // HTTP connections only. Unsupported for AJP.
-throw new UnsupportedOperationException(
-sm.getString("ajpprocessor.comet.notsupported"));
+AtomicBoolean result = (AtomicBoolean) param;
+result.set(false);
+break;
 }
 case AVAILABLE: {
 if (available()) {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1712926 - in /tomcat/tc8.0.x/trunk: conf/web.xml webapps/docs/jasper-howto.xml

2015-11-06 Thread remm
Author: remm
Date: Fri Nov  6 09:38:26 2015
New Revision: 1712926

URL: http://svn.apache.org/viewvc?rev=1712926&view=rev
Log:
Checkstyle [whatever...].

Modified:
tomcat/tc8.0.x/trunk/conf/web.xml
tomcat/tc8.0.x/trunk/webapps/docs/jasper-howto.xml

Modified: tomcat/tc8.0.x/trunk/conf/web.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/conf/web.xml?rev=1712926&r1=1712925&r2=1712926&view=diff
==
--- tomcat/tc8.0.x/trunk/conf/web.xml (original)
+++ tomcat/tc8.0.x/trunk/conf/web.xml Fri Nov  6 09:38:26 2015
@@ -253,7 +253,7 @@
   
   
   
-
+  
 
 
 jsp

Modified: tomcat/tc8.0.x/trunk/webapps/docs/jasper-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/jasper-howto.xml?rev=1712926&r1=1712925&r2=1712926&view=diff
==
--- tomcat/tc8.0.x/trunk/webapps/docs/jasper-howto.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/jasper-howto.xml Fri Nov  6 09:38:26 2015
@@ -210,7 +210,7 @@ should the rules for quoting of attribut
 the expression? true or false, default
 true.
 
-  
+
 The Java compiler from Eclipse JDT in included as the default compiler. It 
is
 an advanced Java compiler which will load all dependencies from the Tomcat 
class
 loader, which will help tremendously when compiling on large installations with



-
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-8-trunk

2015-11-06 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-8-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-8-trunk/builds/250

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1712926
Blamelist: remm

Build succeeded!

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1712925 - /tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java

2015-11-06 Thread Mark Thomas
On 06/11/2015 09:33, r...@apache.org wrote:
> Author: remm
> Date: Fri Nov  6 09:33:34 2015
> New Revision: 1712925
> 
> URL: http://svn.apache.org/viewvc?rev=1712925&view=rev
> Log:
> Follow up to r1712529: AJP should return false to comet rather than throwing 
> an unsupported exception.

Tx.

Mark

> 
> Modified:
> tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
> 
> Modified: 
> tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1712925&r1=1712924&r2=1712925&view=diff
> ==
> --- tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java 
> (original)
> +++ tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java 
> Fri Nov  6 09:33:34 2015
> @@ -619,8 +619,9 @@ public abstract class AbstractAjpProcess
>  }
>  case IS_COMET: {
>  // HTTP connections only. Unsupported for AJP.
> -throw new UnsupportedOperationException(
> -sm.getString("ajpprocessor.comet.notsupported"));
> +AtomicBoolean result = (AtomicBoolean) param;
> +result.set(false);
> +break;
>  }
>  case AVAILABLE: {
>  if (available()) {
> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 58592] New: Org.apache.coyote.request scheme is null

2015-11-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58592

Bug ID: 58592
   Summary: Org.apache.coyote.request scheme is null
   Product: Tomcat 7
   Version: 7.0.54
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: rashmikatag...@in.ibm.com

I work at IBM for IBM Integration Bus product. We use Tomcat 7 as servlet
container. When we receive request from client, the org.apache.coyote.request
object has "null" scheme. So when we try to get the scheme as req.scheme(), we
end up getting null.

The service looks like:
 public void service(
  org.apache.coyote.Request req,
  org.apache.coyote.Response res) throws Exception

We print the debug info as:

private void debugRequest(org.apache.coyote.Request req) 
{
  System.out.println("BEGIN TOMCAT DEBUG
INFO===");
  System.out.println("scheme:" + req.scheme().toString() + ":");
  System.out.println("method:" + req.method().toString() + ":");
  System.out.println("unparsedURI:" + req.unparsedURI().toString() + ":");
  System.out.println("requestURI:" + req.requestURI().toString() + ":");
  System.out.println("decodedURI:" + req.decodedURI().toString() + ":");
  System.out.println("queryString:" + req.queryString().toString() + ":");
  System.out.println("protocol:" + req.protocol().toString() + ":");
  System.out.println("serverName:" + req.serverName().toString() + ":");
  System.out.println("remoteAddr:" + req.remoteAddr().toString() + ":");
  System.out.println("remoteHost:" + req.remoteHost().toString() + ":");
  System.out.println("localName:" + req.localName().toString() + ":");
  System.out.println("localAddr:" + req.localAddr().toString() + ":");
  System.out.println("getServerPort:" + req.getServerPort() + ":");
  System.out.println("getRemotePort:" + req.getRemotePort() + ":");
  System.out.println("getLocalPort:" + req.getLocalPort() + ":");
  System.out.println("getCharacterEncoding:" + req.getCharacterEncoding() +
":");
  System.out.println("getContentLength:" + req.getContentLength() + ":");
  System.out.println("getContentType:" + req.getContentType() + ":");
  System.out.println("getCookies:" + req.getCookies().toString() + ":");
 
//System.out.println("getParameters:"+req.getParameters().paramsAsString()+":");
  System.out.println("--END TOMCAT DEBUG
INFO===");
}


The debug output is:

2015-11-06 14:31:27.919 35 BEGIN TOMCAT DEBUG
INFO===
2015-11-06 14:31:27.919 35 scheme:null:
2015-11-06 14:31:27.920 35 method:POST:
2015-11-06 14:31:27.920 35 unparsedURI:/httpservice:
2015-11-06 14:31:27.920 35 requestURI:/httpservice:
2015-11-06 14:31:27.921 35 decodedURI:null:
2015-11-06 14:31:27.921 35 queryString:null:
2015-11-06 14:31:27.921 35 protocol:HTTP/1.1:
2015-11-06 14:31:27.922 35 serverName:localhost:
2015-11-06 14:31:27.922 35 remoteAddr:127.0.0.1:
2015-11-06 14:31:27.922 35 remoteHost:null:
2015-11-06 14:31:27.923 35 localName:null:
2015-11-06 14:31:27.923 35 localAddr:null:
2015-11-06 14:31:27.923 35 getServerPort:7800:
2015-11-06 14:31:27.924 35 getRemotePort:54064:
2015-11-06 14:31:27.924 35 getLocalPort:-1:
2015-11-06 14:31:27.924 35 getCharacterEncoding:null:
2015-11-06 14:31:27.925 35 getContentLength:2:
2015-11-06 14:31:27.925 35 getContentType:null:
2015-11-06 14:31:27.926 35 getCookies:=== Cookies ===
:
2015-11-06 14:31:27.926 35 --END TOMCAT DEBUG
INFO===

-- 
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: On escaping of EL in attributes (BZ 57136)

2015-11-06 Thread Christopher Schultz
Mark,

On 11/5/15 4:34 AM, Mark Thomas wrote:
> On 05/11/2015 08:48, Mark Thomas wrote:
>> On 05/11/2015 05:05, Konstantin Kolinko wrote:
>>> Hi!
>>>
>>> I happened to stumble on the following entry in changelog for 6.0.19:
>>>
>>>   
>>> Fix various edge-cases when parsing EL, particularly inside 
>>> attribute
>>> values. Note that the Expert Group has confirmed that JSP.1.6 takes
>>> precedence over JSP.1.3.10. Therefore EL in attributes must be 
>>> escaped
>>> twice. (markt)
>>>   
>>
>> Wow. I have absolutely no memory of that at all.
>>
>> Let me see if I can dig up the discussion that provided that confirmation.
> 
> OK, found it. Having a precise date range to work with made it a lot
> easier. Apologies in advance as I have the feeling that this is e-mail
> is going to be on the long side.
> 
> Back in 2009, I, acting on behalf of the Tomcat community, raised this
> via a challenge to the JSP 2.1 TCK using the following examples:
> 
>   <-- The spec requires this
> <-- The TCK expects this
> 
> To put this in the current context, the fix for BZ 57136 implements the
> first form.
> 
> Our TCK contact discussed it with the JSP lead and the conclusion was
> that the second form was the correct one. The reason given was that the
> second form is valid XML whereas the first form is not.
> 
> I queried this on the grounds that the grammar is explicit that the
> second form is correct and that the spec also states that the grammar
> takes precedence.
> 
> The response was that a request would be made to clarify the spec.
> 
> No such clarification was made in JSP 2.2 or JSP 2.3.
> 
> Which brings us to where we are today. The spec says one thing, I assume
> the TCK tests for something else (I don't have access to the later JSP
> TCK versions), we have a private clarification from 7 years ago that the
> spec is wrong and the two versions of the spec since then have not
> included any related correction.
> 
> In the past we have used the following order of precedence when the
> specs have been unclear:
> - what the EG intended based on their discussions
> - what the TCK tests for
> - spec language
> 
> However, this order has only been used where we required clarification
> rather than when there were inconsistencies. Also, more recently, I have
> seen the view expressed with the EGs that it doesn't matter what the EG
> discussed, the specification language always takes priority even if the
> language does not reflect what the EG intended.
> 
> To summarise:
> 
> In favour of form 1:
> - it is consistent with the spec
> - EGs have recently expressed the spec takes precedence
> - There have been two releases of the JSP spec since the issue was
>   raised and the spec has not been updated
> 
> In favour of form 2:
> - it is well-formed XML
> - it is what the TCK tested (tests?) for
> - the spec lead expressed the view this was the intended behaviour
> - Up until the BZ 57136 fix, Tomcat did it this way

Neither of these are well-formed XML due to the presence of the embedded
quote characters in the attribute value. Or, are you talking about
attribute values *after* XML-un-escaping occurs (in which case they
would both be valid XML)? XML does not recognize the common \ character
as an escape.

(This doesn't get us any closer to a decision, but it eliminates one of
the slight advantages to form 2.)

> At this point, I don't see a clear argument one way or the other.
> 
> I've looked through the open JSP spec issues:
> https://java.net/jira/browse/JSP_SPEC_PUBLIC
> 
> and I don't see anything for this. I do see a lot of very old issues
> that don't appear to have been looked at for some time.
> 
> Given the lack of clarity of the which behaviour is correct, I think we
> have little choice but to make this optional and that we should get this
> done before the next 8.0.x release. I intend to start working on that in
> trunk today.

Well, the TCK behavior simply must be implemented or we won't pass it.
Are we actually under any obligation to pass the TCK?

On the other hand, nobody ready the TCK... only the spec. So most users
will expect form 2. So I guess we need to have a mode-switcher? It's
either that, or fail the TCK and/or anger some significant subset of users.

-chris

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 58590] org.apache.catalina.realm.MemoryRealm can use backgroundProcess() to reload tomcat-users.xml when it changes

2015-11-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58590

--- Comment #3 from Christopher Schultz  ---
Two things:

1. If possible, look at the UserDatabase class to see if you can get that to
reload instead of the Realm. If you think about e.g. DatsSourceRealm, it makes
more sense to "reload" the data source and not the realm itself.

2. Instead of calling _lastUpdate.getTime() each time, why not just store the
native long value returned by it? (Also, you can then simply store the value of
_usersFile.lastModified instead of creating a new Date object).

As for Konstantin being picky about your implementation... we get to be as
picky about patch submissions as the submitters are willing to tolerate. Since
you are motivated to get your patch accepted, we just want to make sure it's as
high-quality as possible.

Thanks for your contributions!

-- 
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: r1712951 - in /tomcat/trunk: conf/web.xml webapps/docs/jasper-howto.xml

2015-11-06 Thread remm
Author: remm
Date: Fri Nov  6 12:00:17 2015
New Revision: 1712951

URL: http://svn.apache.org/viewvc?rev=1712951&view=rev
Log:
Checkstyle.

Modified:
tomcat/trunk/conf/web.xml
tomcat/trunk/webapps/docs/jasper-howto.xml

Modified: tomcat/trunk/conf/web.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/conf/web.xml?rev=1712951&r1=1712950&r2=1712951&view=diff
==
--- tomcat/trunk/conf/web.xml (original)
+++ tomcat/trunk/conf/web.xml Fri Nov  6 12:00:17 2015
@@ -250,7 +250,7 @@
   
   
   
-
+  
 
 
 jsp

Modified: tomcat/trunk/webapps/docs/jasper-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/jasper-howto.xml?rev=1712951&r1=1712950&r2=1712951&view=diff
==
--- tomcat/trunk/webapps/docs/jasper-howto.xml (original)
+++ tomcat/trunk/webapps/docs/jasper-howto.xml Fri Nov  6 12:00:17 2015
@@ -208,7 +208,7 @@ should the rules for quoting of attribut
 the expression? true or false, default
 true.
 
-  
+
 The Java compiler from Eclipse JDT in included as the default compiler. It 
is
 an advanced Java compiler which will load all dependencies from the Tomcat 
class
 loader, which will help tremendously when compiling on large installations with



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 58592] Org.apache.coyote.request scheme is null

2015-11-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58592

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID
 OS||All

--- Comment #1 from Konstantin Kolinko  ---
Users do not usually deal with o.a.coyote Request, Response objects.

You do not provide enough information on your use case (no reproduction
recipe), but from my understanding this is expected behaviour.

Scheme is a configurable attribute of a .
See the first few lines of CoyoteAdapter.postParseRequest()

-- 
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: On escaping of EL in attributes (BZ 57136)

2015-11-06 Thread Mark Thomas
On 06/11/2015 11:47, Christopher Schultz wrote:
> Mark,
> 
> On 11/5/15 4:34 AM, Mark Thomas wrote:
>> On 05/11/2015 08:48, Mark Thomas wrote:
>>> On 05/11/2015 05:05, Konstantin Kolinko wrote:
 Hi!

 I happened to stumble on the following entry in changelog for 6.0.19:

   
 Fix various edge-cases when parsing EL, particularly inside 
 attribute
 values. Note that the Expert Group has confirmed that JSP.1.6 takes
 precedence over JSP.1.3.10. Therefore EL in attributes must be 
 escaped
 twice. (markt)
   
>>>
>>> Wow. I have absolutely no memory of that at all.
>>>
>>> Let me see if I can dig up the discussion that provided that confirmation.
>>
>> OK, found it. Having a precise date range to work with made it a lot
>> easier. Apologies in advance as I have the feeling that this is e-mail
>> is going to be on the long side.
>>
>> Back in 2009, I, acting on behalf of the Tomcat community, raised this
>> via a challenge to the JSP 2.1 TCK using the following examples:
>>
>>   <-- The spec requires this
>> <-- The TCK expects this
>>
>> To put this in the current context, the fix for BZ 57136 implements the
>> first form.
>>
>> Our TCK contact discussed it with the JSP lead and the conclusion was
>> that the second form was the correct one. The reason given was that the
>> second form is valid XML whereas the first form is not.
>>
>> I queried this on the grounds that the grammar is explicit that the
>> second form is correct and that the spec also states that the grammar
>> takes precedence.
>>
>> The response was that a request would be made to clarify the spec.
>>
>> No such clarification was made in JSP 2.2 or JSP 2.3.
>>
>> Which brings us to where we are today. The spec says one thing, I assume
>> the TCK tests for something else (I don't have access to the later JSP
>> TCK versions), we have a private clarification from 7 years ago that the
>> spec is wrong and the two versions of the spec since then have not
>> included any related correction.
>>
>> In the past we have used the following order of precedence when the
>> specs have been unclear:
>> - what the EG intended based on their discussions
>> - what the TCK tests for
>> - spec language
>>
>> However, this order has only been used where we required clarification
>> rather than when there were inconsistencies. Also, more recently, I have
>> seen the view expressed with the EGs that it doesn't matter what the EG
>> discussed, the specification language always takes priority even if the
>> language does not reflect what the EG intended.
>>
>> To summarise:
>>
>> In favour of form 1:
>> - it is consistent with the spec
>> - EGs have recently expressed the spec takes precedence
>> - There have been two releases of the JSP spec since the issue was
>>   raised and the spec has not been updated
>>
>> In favour of form 2:
>> - it is well-formed XML
>> - it is what the TCK tested (tests?) for
>> - the spec lead expressed the view this was the intended behaviour
>> - Up until the BZ 57136 fix, Tomcat did it this way
> 
> Neither of these are well-formed XML due to the presence of the embedded
> quote characters in the attribute value. Or, are you talking about
> attribute values *after* XML-un-escaping occurs (in which case they
> would both be valid XML)? XML does not recognize the common \ character
> as an escape.
> 
> (This doesn't get us any closer to a decision, but it eliminates one of
> the slight advantages to form 2.)

Fair point. I was just repeating a response I got back from Oracle. I
suspect the test case was slightly different.

>> At this point, I don't see a clear argument one way or the other.
>>
>> I've looked through the open JSP spec issues:
>> https://java.net/jira/browse/JSP_SPEC_PUBLIC
>>
>> and I don't see anything for this. I do see a lot of very old issues
>> that don't appear to have been looked at for some time.
>>
>> Given the lack of clarity of the which behaviour is correct, I think we
>> have little choice but to make this optional and that we should get this
>> done before the next 8.0.x release. I intend to start working on that in
>> trunk today.
> 
> Well, the TCK behavior simply must be implemented or we won't pass it.
> Are we actually under any obligation to pass the TCK?

No, because Oracle and the ASF have yet to agree a new license agreement
for the TCK,

If we did have the TCK we could challenge it again (on the grounds the
spec was never updated so surely that must mean the spec is right and
the TCK is wrong)

> On the other hand, nobody ready the TCK... only the spec.

Indeed.

> So most users will expect form 2. 

If they read the spec carefully enough (and to be fair it took me
several days of reading and re-reading the relevant bits to get to the
point I was happy that I understood what it meant) they should expect
form 1.

> So I guess we need to have a mode-switcher? It's
> either that, or fail the TCK and/or an

svn commit: r1712952 - in /tomcat/trunk/java/org/apache: catalina/connector/ coyote/ coyote/http11/ coyote/http11/upgrade/ coyote/http2/

2015-11-06 Thread remm
Author: remm
Date: Fri Nov  6 12:14:21 2015
New Revision: 1712952

URL: http://svn.apache.org/viewvc?rev=1712952&view=rev
Log:
Add an instance manager field to the token, it's safer than going through the 
bindings, and it can be used to determine if it needs the CL environment.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
tomcat/trunk/java/org/apache/coyote/UpgradeToken.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

tomcat/trunk/java/org/apache/coyote/http11/upgrade/UpgradeProcessorInternal.java
tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java

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=1712952&r1=1712951&r2=1712952&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Fri Nov  6 
12:14:21 2015
@@ -84,6 +84,7 @@ import org.apache.coyote.UpgradeToken;
 import org.apache.coyote.http11.upgrade.InternalHttpUpgradeHandler;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.InstanceManager;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.buf.B2CConverter;
 import org.apache.tomcat.util.buf.ByteChunk;
@@ -1844,17 +1845,20 @@ public class Request implements HttpServ
 public  T upgrade(
 Class httpUpgradeHandlerClass) throws java.io.IOException, 
ServletException {
 T handler;
+InstanceManager instanceManager = null;
 try {
 // Do not go through the instance manager for internal Tomcat 
classes since they don't need injection
 if 
(InternalHttpUpgradeHandler.class.isAssignableFrom(httpUpgradeHandlerClass)) {
 handler = (T) httpUpgradeHandlerClass.newInstance();
 } else {
-handler = (T) 
getContext().getInstanceManager().newInstance(httpUpgradeHandlerClass);
+instanceManager = getContext().getInstanceManager();
+handler = (T) 
instanceManager.newInstance(httpUpgradeHandlerClass);
 }
 } catch (InstantiationException | IllegalAccessException | 
InvocationTargetException | NamingException e) {
 throw new ServletException(e);
 }
-UpgradeToken upgradeToken = new UpgradeToken(handler, 
getContext().getLoader().getClassLoader());
+UpgradeToken upgradeToken = new UpgradeToken(handler,
+getContext().getLoader().getClassLoader(), instanceManager);
 
 coyoteRequest.action(ActionCode.UPGRADE, upgradeToken);
 

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1712952&r1=1712951&r2=1712952&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Fri Nov  6 
12:14:21 2015
@@ -35,9 +35,8 @@ import javax.management.ObjectName;
 import javax.servlet.http.HttpUpgradeHandler;
 import javax.servlet.http.WebConnection;
 
-import org.apache.coyote.http11.upgrade.InternalHttpUpgradeHandler;
 import org.apache.juli.logging.Log;
-import org.apache.tomcat.InstanceManagerBindings;
+import org.apache.tomcat.InstanceManager;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.collections.SynchronizedStack;
 import org.apache.tomcat.util.modeler.Registry;
@@ -759,7 +758,7 @@ public abstract class AbstractProtocolhttp://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/UpgradeToken.java?rev=1712952&r1=1712951&r2=1712952&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/UpgradeToken.java (original)
+++ tomcat/trunk/java/org/apache/coyote/UpgradeToken.java Fri Nov  6 12:14:21 
2015
@@ -19,6 +19,8 @@ package org.apache.coyote;
 
 import javax.servlet.http.HttpUpgradeHandler;
 
+import org.apache.tomcat.InstanceManager;
+
 /**
  * Token used during the upgrade process.
  */
@@ -26,11 +28,13 @@ public final class UpgradeToken {
 
 private final ClassLoader applicationClassLoader;
 private final HttpUpgradeHandler httpUpgradeHandler;
+private final InstanceManager instanceManager;
 
 public UpgradeToken(HttpUpgradeHandler httpUpgradeHandler,
-ClassLoader applicationClassLoader) {
+ClassLoader applicationClassLoader, InstanceManager 
instanceManager) {
 this.applicationClassLoader = applicationClassLoader;
 this.httpUpgradeHandler = httpUpgradeHandler;
+this.inst

Re: Tomcat Native 1.2.2

2015-11-06 Thread Christopher Schultz
Huxing,

On 11/5/15 7:08 PM, Huxing Zhang wrote:
> Hi All,
> 
> I have solved the problem building tcnative on Mac OSX.
> 
> The message worth noticing is:
> ld: warning: ld: warning: ignoring file /usr/local/openssl/lib/libcrypto.a, 
> file was built for archive which is not the architecture being linked 
> (x86_64): /usr/local/openssl/lib/libcrypto.aignoring file 
> /usr/local/openssl/lib/libssl.a, file was built for archive which is not the 
> architecture being linked (x86_64): /usr/local/openssl/lib/libssl.a

I'm sorry I hadn't noticed that before. It's obviously the problem.

> The root cause is openssl is not correctly compiled with the right 
> architecture.
> 
> Recompile openssl with the following configuration will solve this problem.

That openssl is one that you must have provided yourself in the past...
Mac OS has been 64-bit-only for quite a while, now, and the OpenSSL
binaries shipped with Mac OS X are dual-architecture:

$ file /usr/lib/libssl.dylib
/usr/lib/libssl.dylib: Mach-O universal binary with 2 architectures
/usr/lib/libssl.dylib (for architecture i386):  Mach-O dynamically linked
shared library i386
/usr/lib/libssl.dylib (for architecture x86_64):Mach-O 64-bit
dynamically linked shared library x86_64

On Mac OS X, consider using something like Brew for things like newer
versions of OpenSSL.

-chris

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: On escaping of EL in attributes (BZ 57136)

2015-11-06 Thread Christopher Schultz
Mark,

On 11/6/15 7:12 AM, Mark Thomas wrote:
> On 06/11/2015 11:47, Christopher Schultz wrote:
>> Mark,
>>
>> On 11/5/15 4:34 AM, Mark Thomas wrote:
>>> On 05/11/2015 08:48, Mark Thomas wrote:
 On 05/11/2015 05:05, Konstantin Kolinko wrote:
> Hi!
>
> I happened to stumble on the following entry in changelog for 6.0.19:
>
>   
> Fix various edge-cases when parsing EL, particularly inside 
> attribute
> values. Note that the Expert Group has confirmed that JSP.1.6 
> takes
> precedence over JSP.1.3.10. Therefore EL in attributes must be 
> escaped
> twice. (markt)
>   

 Wow. I have absolutely no memory of that at all.

 Let me see if I can dig up the discussion that provided that confirmation.
>>>
>>> OK, found it. Having a precise date range to work with made it a lot
>>> easier. Apologies in advance as I have the feeling that this is e-mail
>>> is going to be on the long side.
>>>
>>> Back in 2009, I, acting on behalf of the Tomcat community, raised this
>>> via a challenge to the JSP 2.1 TCK using the following examples:
>>>
>>>   <-- The spec requires this
>>> <-- The TCK expects this
>>>
>>> To put this in the current context, the fix for BZ 57136 implements the
>>> first form.
>>>
>>> Our TCK contact discussed it with the JSP lead and the conclusion was
>>> that the second form was the correct one. The reason given was that the
>>> second form is valid XML whereas the first form is not.
>>>
>>> I queried this on the grounds that the grammar is explicit that the
>>> second form is correct and that the spec also states that the grammar
>>> takes precedence.
>>>
>>> The response was that a request would be made to clarify the spec.
>>>
>>> No such clarification was made in JSP 2.2 or JSP 2.3.
>>>
>>> Which brings us to where we are today. The spec says one thing, I assume
>>> the TCK tests for something else (I don't have access to the later JSP
>>> TCK versions), we have a private clarification from 7 years ago that the
>>> spec is wrong and the two versions of the spec since then have not
>>> included any related correction.
>>>
>>> In the past we have used the following order of precedence when the
>>> specs have been unclear:
>>> - what the EG intended based on their discussions
>>> - what the TCK tests for
>>> - spec language
>>>
>>> However, this order has only been used where we required clarification
>>> rather than when there were inconsistencies. Also, more recently, I have
>>> seen the view expressed with the EGs that it doesn't matter what the EG
>>> discussed, the specification language always takes priority even if the
>>> language does not reflect what the EG intended.
>>>
>>> To summarise:
>>>
>>> In favour of form 1:
>>> - it is consistent with the spec
>>> - EGs have recently expressed the spec takes precedence
>>> - There have been two releases of the JSP spec since the issue was
>>>   raised and the spec has not been updated
>>>
>>> In favour of form 2:
>>> - it is well-formed XML
>>> - it is what the TCK tested (tests?) for
>>> - the spec lead expressed the view this was the intended behaviour
>>> - Up until the BZ 57136 fix, Tomcat did it this way
>>
>> Neither of these are well-formed XML due to the presence of the embedded
>> quote characters in the attribute value. Or, are you talking about
>> attribute values *after* XML-un-escaping occurs (in which case they
>> would both be valid XML)? XML does not recognize the common \ character
>> as an escape.
>>
>> (This doesn't get us any closer to a decision, but it eliminates one of
>> the slight advantages to form 2.)
> 
> Fair point. I was just repeating a response I got back from Oracle. I
> suspect the test case was slightly different.

I'm surprised Oracle claimed that was valid XML. :/

>>> At this point, I don't see a clear argument one way or the other.
>>>
>>> I've looked through the open JSP spec issues:
>>> https://java.net/jira/browse/JSP_SPEC_PUBLIC
>>>
>>> and I don't see anything for this. I do see a lot of very old issues
>>> that don't appear to have been looked at for some time.
>>>
>>> Given the lack of clarity of the which behaviour is correct, I think we
>>> have little choice but to make this optional and that we should get this
>>> done before the next 8.0.x release. I intend to start working on that in
>>> trunk today.
>>
>> Well, the TCK behavior simply must be implemented or we won't pass it.
>> Are we actually under any obligation to pass the TCK?
> 
> No, because Oracle and the ASF have yet to agree a new license agreement
> for the TCK,

I just wasn't sure about whether we have to pass it in order to even
claim support for the various specs.

> If we did have the TCK we could challenge it again (on the grounds the
> spec was never updated so surely that must mean the spec is right and
> the TCK is wrong)
> 
>> On the other hand, nobody ready the TCK... only the spec.
> 
> Indeed.

Obvious

Re: On escaping of EL in attributes (BZ 57136)

2015-11-06 Thread Mark Thomas
On 06/11/2015 12:24, Christopher Schultz wrote:
> On 11/6/15 7:12 AM, Mark Thomas wrote:



>> Things are sufficiently messy between the spec, the TCK, 'clarification'
>> from Oracle and Tomcat's previous behaviour that I agree both forms need
>> to be supported. The new quoteAttributeEL init param for the JSP servlet
>> does exactly that.
> 
> Perfect. I wasn't able to follow the various acrobatics that you
> performed with the switches... it looks like you actually removed
> options that would have supported this. What have I missed?

The old STRICT_QUOTE_ESCAPING system property was converted to an init
param for the JSP servlet with the system property defining the default
for 8.0.x and trunk.

I then removed the STRICT_QUOTE_ESCAPING system property entirely from
trunk and deprecated it in 8.0.x. This was part of my general loathing
of system properties for configuration that should be per Context/Host/etc.

I then added the new JSP init param quoteAttributeEL to 8.0.x and trunk.

HTH,

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.2

2015-11-06 Thread Violeta Georgieva
Hi,

2015-11-04 22:15 GMT+02:00 Mark Thomas :
>
> OK. Here we go again :)
>
> Thanks to everyone who has helped test 1.2.x so far. I'm hopeful that
> this one will be good enough for the 9.0.0 RCs and - fingers crossed -
> to replace 1.1.x as well.
>
> Version 1.2.2 includes the following changes:
> - Forward port some OpenSSL I/O changes from 1.1.x that fixed a
>   number of unit tests failures
>
> The proposed release artefacts can be found at [1],
> and the build was done using tag [2].
>
> The Apache Tomcat Native 1.2.2 is
>  [ ] Stable, go ahead and release
>  [ ] Broken because of ...

Websocket examples are not working:
https://localhost:8443/examples/websocket/index.xhtml

Stockticker never ends
https://localhost:8443/examples/async/stockticker

If I access them through *http* everything is OK.

Windows 8, jdk 1.8.0_66, Tomcat 9 trunk
Loaded APR based Apache Tomcat Native library 1.2.2 using APR version 1.5.1.
OpenSSL successfully initialized (OpenSSL 1.0.2d 9 Jul 2015)








localhost-key.pem, localhost-cert.pem copied from tests.


Also I experience the exceptions below while testing examples.

06-Nov-2015 14:55:57.469 SEVERE [https-apr-8443-exec-2]
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process Error
reading request, ignored
 java.lang.IllegalStateException
at
org.apache.coyote.http2.Http2UpgradeHandler.fill(Http2UpgradeHandler.java:1064)
at
org.apache.coyote.http2.Http2Parser$Input.fill(Http2Parser.java:565)
at
org.apache.coyote.http2.Http2Parser.readConnectionPreface(Http2Parser.java:519)
at
org.apache.coyote.http2.Http2UpgradeHandler.init(Http2UpgradeHandler.java:233)
at
org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch(Http2UpgradeHandler.java:281)
at
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:55)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:56)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:738)
at
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2296)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

06-Nov-2015 15:00:47.252 INFO [Ticker Thread]
org.apache.coyote.AbstractProcessor.setErrorState An error occurred in
processing while on a non-container thread.
 The connection will be closed immediately
 java.io.IOException: Connection [1], Stream [51], This stream is not
writable
at
org.apache.coyote.http2.Http2UpgradeHandler.reserveWindowSize(Http2UpgradeHandler.java:669)
at
org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:495)
at
org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:462)
at org.apache.coyote.http2.Stream.flushData(Stream.java:266)
at
org.apache.coyote.http2.StreamProcessor.action(StreamProcessor.java:131)
at org.apache.coyote.Response.action(Response.java:167)
at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:334)
at
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:302)
at
org.apache.catalina.connector.CoyoteWriter.flush(CoyoteWriter.java:94)
at async.AsyncStockServlet.writeStock(AsyncStockServlet.java:96)
at async.AsyncStockServlet.tick(AsyncStockServlet.java:76)
at async.Stockticker.run(Stockticker.java:84)
at java.lang.Thread.run(Thread.java:745)

06-Nov-2015 15:00:49.152 SEVERE [https-apr-8443-exec-4]
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process Error
reading request, ignored
 java.lang.IllegalStateException
at
org.apache.coyote.http2.Http2UpgradeHandler.fill(Http2UpgradeHandler.java:1064)
at
org.apache.coyote.http2.Http2Parser$Input.fill(Http2Parser.java:565)
at
org.apache.coyote.http2.Http2Parser.readConnectionPreface(Http2Parser.java:519)
at
org.apache.coyote.http2.Http2UpgradeHandler.init(Http2UpgradeHandler.java:233)
at
org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch(Http2UpgradeHandler.java:281)
at
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:55)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:56)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:738)
at
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2296)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker

[Bug 58481] JAX WS Request fails with "Premature end of file"

2015-11-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58481

--- Comment #1 from immo.schulz-gerl...@fernuni-hagen.de ---
I've got the same problem (I assume): 
Tested with
* Tomcat 8.0.26 and 8.0.28 
* Webapp using the JAX-WS Servlet of jax-ws-ri 2.2.10 (or older)
* Apache HTTPD 2.4.12, 2.4.8 and 2.2.11 with mod_proxy and AJP connection.
* Java 1.8.0_45
* Solaris 10

Each combination produces SOAP errors on every second SOAP call (while all
other HTTP calls to other servlets work fine).

This problem was introduced with the switch to Tomcat 8. In Tomcat 7, the SOAP
webservices work fine.
Also this is an AJP only problem: Calling the SOAP Webservices via the HTTP
connector (Port 8080) directly also works fine in Tomcat 8.

Stack Trace:

06-Nov-2015 13:54:18.938 SEVERE [ajp-nio-8011-exec-3]
com.sun.xml.ws.transport.http.HttpAdapter.invokeAsync SOAP-Nachricht konnte
wegen folgender Ausnahme nicht erstellt wer
den: Fehler bei XML-Reader: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,1]
Message: Vorzeitiges Dateiende.
 com.sun.xml.ws.protocol.soap.MessageCreationException: SOAP-Nachricht konnte
wegen folgender Ausnahme nicht erstellt werden: Fehler bei XML-Reader:
javax.xml.stream.XMLStre
amException: ParseError at [row,col]:[1,1]
Message: Vorzeitiges Dateiende.
at
com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:319)
at
com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:503)
at
com.sun.xml.ws.transport.http.HttpAdapter.invokeAsync(HttpAdapter.java:713)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(ServletAdapter.java:212)
at
com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:161)
at
com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:197)
at
com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at
org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:844)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:663)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.xml.ws.streaming.XMLStreamReaderException: Fehler bei
XML-Reader: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Vorzeitiges Dateiende.
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:326)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:99)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:169)
at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:104)
at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:215)
at
com.oracle.webservices.impl.encoding.StreamDecoderImpl.decode(StreamDecoderImpl.java:64)
at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:249)
at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:166)
at
com.sun.xml.ws.

Re: [VOTE] Release Apache Tomcat Native 1.2.2

2015-11-06 Thread Rémy Maucherat
2015-11-06 14:09 GMT+01:00 Violeta Georgieva :

> 06-Nov-2015 14:55:57.469 SEVERE [https-apr-8443-exec-2]
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process Error
> reading request, ignored
>  java.lang.IllegalStateException
> at
>
> org.apache.coyote.http2.Http2UpgradeHandler.fill(Http2UpgradeHandler.java:1064)
>

IMO, see r1709423.

Rémy


Re: [VOTE] Release Apache Tomcat Native 1.2.2

2015-11-06 Thread Mark Thomas
On 06/11/2015 13:09, Violeta Georgieva wrote:
> Hi,
> 
> 2015-11-04 22:15 GMT+02:00 Mark Thomas :
>>
>> OK. Here we go again :)
>>
>> Thanks to everyone who has helped test 1.2.x so far. I'm hopeful that
>> this one will be good enough for the 9.0.0 RCs and - fingers crossed -
>> to replace 1.1.x as well.
>>
>> Version 1.2.2 includes the following changes:
>> - Forward port some OpenSSL I/O changes from 1.1.x that fixed a
>>   number of unit tests failures
>>
>> The proposed release artefacts can be found at [1],
>> and the build was done using tag [2].
>>
>> The Apache Tomcat Native 1.2.2 is
>>  [ ] Stable, go ahead and release
>>  [ ] Broken because of ...
> 
> Websocket examples are not working:
> https://localhost:8443/examples/websocket/index.xhtml
> 
> Stockticker never ends
> https://localhost:8443/examples/async/stockticker
> 
> If I access them through *http* everything is OK.
> 
> Windows 8, jdk 1.8.0_66, Tomcat 9 trunk

Hmm. I've just run the 8.0.x unit test on Windows with native 1.2.2 and
they all passed.

If you disable HTTP/2 do the above examples work?

Looking at the strak traces below these look more like issues with
HTTP/2 than with native 1.2.2.

Mark


> Loaded APR based Apache Tomcat Native library 1.2.2 using APR version 1.5.1.
> OpenSSL successfully initialized (OpenSSL 1.0.2d 9 Jul 2015)
> 
>  protocol="org.apache.coyote.http11.Http11AprProtocol"
>maxThreads="150" SSLEnabled="true" >
>  />
> 
>   certificateFile="conf/localhost-cert.pem"
>  type="RSA" />
> 
> 
> 
> localhost-key.pem, localhost-cert.pem copied from tests.
> 
> 
> Also I experience the exceptions below while testing examples.
> 
> 06-Nov-2015 14:55:57.469 SEVERE [https-apr-8443-exec-2]
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process Error
> reading request, ignored
>  java.lang.IllegalStateException
> at
> org.apache.coyote.http2.Http2UpgradeHandler.fill(Http2UpgradeHandler.java:1064)
> at
> org.apache.coyote.http2.Http2Parser$Input.fill(Http2Parser.java:565)
> at
> org.apache.coyote.http2.Http2Parser.readConnectionPreface(Http2Parser.java:519)
> at
> org.apache.coyote.http2.Http2UpgradeHandler.init(Http2UpgradeHandler.java:233)
> at
> org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch(Http2UpgradeHandler.java:281)
> at
> org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:55)
> at
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:56)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:738)
> at
> org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2296)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> at java.lang.Thread.run(Thread.java:745)
> 
> 06-Nov-2015 15:00:47.252 INFO [Ticker Thread]
> org.apache.coyote.AbstractProcessor.setErrorState An error occurred in
> processing while on a non-container thread.
>  The connection will be closed immediately
>  java.io.IOException: Connection [1], Stream [51], This stream is not
> writable
> at
> org.apache.coyote.http2.Http2UpgradeHandler.reserveWindowSize(Http2UpgradeHandler.java:669)
> at
> org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:495)
> at
> org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:462)
> at org.apache.coyote.http2.Stream.flushData(Stream.java:266)
> at
> org.apache.coyote.http2.StreamProcessor.action(StreamProcessor.java:131)
> at org.apache.coyote.Response.action(Response.java:167)
> at
> org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:334)
> at
> org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:302)
> at
> org.apache.catalina.connector.CoyoteWriter.flush(CoyoteWriter.java:94)
> at async.AsyncStockServlet.writeStock(AsyncStockServlet.java:96)
> at async.AsyncStockServlet.tick(AsyncStockServlet.java:76)
> at async.Stockticker.run(Stockticker.java:84)
> at java.lang.Thread.run(Thread.java:745)
> 
> 06-Nov-2015 15:00:49.152 SEVERE [https-apr-8443-exec-4]
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process Error
> reading request, ignored
>  java.lang.IllegalStateException
> at
> org.apache.coyote.http2.Http2UpgradeHandler.fill(Http2UpgradeHandler.java:1064)
> at
> org.apache.coyote.http2.Http2Parser$Input.fill(Http2Parser.java:565)
> at
> org.apache.coyote.http2.Http2Parser.readConnectionPreface(Http2Parser.java:519)
> at
> org.apac

Re: [VOTE] Release Apache Tomcat Native 1.2.2

2015-11-06 Thread Rémy Maucherat
2015-11-04 21:15 GMT+01:00 Mark Thomas :

> OK. Here we go again :)
>
> Thanks to everyone who has helped test 1.2.x so far. I'm hopeful that
> this one will be good enough for the 9.0.0 RCs and - fingers crossed -
> to replace 1.1.x as well.
>
> Version 1.2.2 includes the following changes:
> - Forward port some OpenSSL I/O changes from 1.1.x that fixed a
>   number of unit tests failures
>
> The proposed release artefacts can be found at [1],
> and the build was done using tag [2].
>
> The Apache Tomcat Native 1.2.2 is
>  [X] Stable, go ahead and release
>  [ ] Broken because of ...
>
> Tested with OpenSSL engine for NIOx with ALPN+HTTP/2, APR with ALPN+HTTP/2
and HTTP/1.1 with SSL and non SSL.

r1709423 doesn't seem to be needed for me (Linux).

Rémy


Re: [VOTE] Release Apache Tomcat Native 1.2.2

2015-11-06 Thread Mark Thomas
On 04/11/2015 20:15, Mark Thomas wrote:
> OK. Here we go again :)
> 
> Thanks to everyone who has helped test 1.2.x so far. I'm hopeful that
> this one will be good enough for the 9.0.0 RCs and - fingers crossed -
> to replace 1.1.x as well.
> 
> Version 1.2.2 includes the following changes:
> - Forward port some OpenSSL I/O changes from 1.1.x that fixed a
>   number of unit tests failures
> 
> The proposed release artefacts can be found at [1],
> and the build was done using tag [2].
> 
> The Apache Tomcat Native 1.2.2 is
>  [X] Stable, go ahead and release
>  [ ] Broken because of ...

APR unit tests pass on OSX for:
trunk, 8.0.x, 7.0.x

APR unit tests pass on Windows 7 for:
8.0.x

No other combinations tested.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.2

2015-11-06 Thread Violeta Georgieva
2015-11-06 16:11 GMT+02:00 Mark Thomas :
>
> On 06/11/2015 13:09, Violeta Georgieva wrote:
> > Hi,
> >
> > 2015-11-04 22:15 GMT+02:00 Mark Thomas :
> >>
> >> OK. Here we go again :)
> >>
> >> Thanks to everyone who has helped test 1.2.x so far. I'm hopeful that
> >> this one will be good enough for the 9.0.0 RCs and - fingers crossed -
> >> to replace 1.1.x as well.
> >>
> >> Version 1.2.2 includes the following changes:
> >> - Forward port some OpenSSL I/O changes from 1.1.x that fixed a
> >>   number of unit tests failures
> >>
> >> The proposed release artefacts can be found at [1],
> >> and the build was done using tag [2].
> >>
> >> The Apache Tomcat Native 1.2.2 is
> >>  [ ] Stable, go ahead and release
> >>  [ ] Broken because of ...
> >
> > Websocket examples are not working:
> > https://localhost:8443/examples/websocket/index.xhtml
> >
> > Stockticker never ends
> > https://localhost:8443/examples/async/stockticker
> >
> > If I access them through *http* everything is OK.
> >
> > Windows 8, jdk 1.8.0_66, Tomcat 9 trunk
>
> Hmm. I've just run the 8.0.x unit test on Windows with native 1.2.2 and
> they all passed.
>
> If you disable HTTP/2 do the above examples work?
>
> Looking at the strak traces below these look more like issues with
> HTTP/2 than with native 1.2.2.
>

I disabled  HTTP/2 and everything is OK

So +1

Regards,
Violeta

> Mark
>
>
> > Loaded APR based Apache Tomcat Native library 1.2.2 using APR version
1.5.1.
> > OpenSSL successfully initialized (OpenSSL 1.0.2d 9 Jul 2015)
> >
> >  > protocol="org.apache.coyote.http11.Http11AprProtocol"
> >maxThreads="150" SSLEnabled="true" >
> >  > />
> > 
> >  >  certificateFile="conf/localhost-cert.pem"
> >  type="RSA" />
> > 
> > 
> >
> > localhost-key.pem, localhost-cert.pem copied from tests.
> >
> >
> > Also I experience the exceptions below while testing examples.
> >
> > 06-Nov-2015 14:55:57.469 SEVERE [https-apr-8443-exec-2]
> > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process
Error
> > reading request, ignored
> >  java.lang.IllegalStateException
> > at
> >
org.apache.coyote.http2.Http2UpgradeHandler.fill(Http2UpgradeHandler.java:1064)
> > at
> > org.apache.coyote.http2.Http2Parser$Input.fill(Http2Parser.java:565)
> > at
> >
org.apache.coyote.http2.Http2Parser.readConnectionPreface(Http2Parser.java:519)
> > at
> >
org.apache.coyote.http2.Http2UpgradeHandler.init(Http2UpgradeHandler.java:233)
> > at
> >
org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch(Http2UpgradeHandler.java:281)
> > at
> >
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:55)
> > at
> >
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:56)
> > at
> >
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:738)
> > at
> >
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2296)
> > at
> >
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> > at
> >
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> > at
> >
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> > at java.lang.Thread.run(Thread.java:745)
> >
> > 06-Nov-2015 15:00:47.252 INFO [Ticker Thread]
> > org.apache.coyote.AbstractProcessor.setErrorState An error occurred in
> > processing while on a non-container thread.
> >  The connection will be closed immediately
> >  java.io.IOException: Connection [1], Stream [51], This stream is not
> > writable
> > at
> >
org.apache.coyote.http2.Http2UpgradeHandler.reserveWindowSize(Http2UpgradeHandler.java:669)
> > at
> > org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:495)
> > at
> > org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:462)
> > at org.apache.coyote.http2.Stream.flushData(Stream.java:266)
> > at
> > org.apache.coyote.http2.StreamProcessor.action(StreamProcessor.java:131)
> > at org.apache.coyote.Response.action(Response.java:167)
> > at
> >
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:334)
> > at
> > org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:302)
> > at
> > org.apache.catalina.connector.CoyoteWriter.flush(CoyoteWriter.java:94)
> > at async.AsyncStockServlet.writeStock(AsyncStockServlet.java:96)
> > at async.AsyncStockServlet.tick(AsyncStockServlet.java:76)
> > at async.Stockticker.run(Stockticker.java:84)
> > at java.lang.Thread.run(Thread.java:745)
> >
> > 06-Nov-2015 15:00:49.152 SEVERE [https-apr-8443-exec-4]
> > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process
Error
> > reading request, ig

Re: [VOTE] Release Apache Tomcat Native 1.2.2

2015-11-06 Thread Mark Thomas
On 06/11/2015 14:20, Violeta Georgieva wrote:
> 2015-11-06 16:11 GMT+02:00 Mark Thomas :
>>
>> On 06/11/2015 13:09, Violeta Georgieva wrote:
>>> Hi,
>>>
>>> 2015-11-04 22:15 GMT+02:00 Mark Thomas :

 OK. Here we go again :)

 Thanks to everyone who has helped test 1.2.x so far. I'm hopeful that
 this one will be good enough for the 9.0.0 RCs and - fingers crossed -
 to replace 1.1.x as well.

 Version 1.2.2 includes the following changes:
 - Forward port some OpenSSL I/O changes from 1.1.x that fixed a
   number of unit tests failures

 The proposed release artefacts can be found at [1],
 and the build was done using tag [2].

 The Apache Tomcat Native 1.2.2 is
  [ ] Stable, go ahead and release
  [ ] Broken because of ...
>>>
>>> Websocket examples are not working:
>>> https://localhost:8443/examples/websocket/index.xhtml
>>>
>>> Stockticker never ends
>>> https://localhost:8443/examples/async/stockticker
>>>
>>> If I access them through *http* everything is OK.
>>>
>>> Windows 8, jdk 1.8.0_66, Tomcat 9 trunk
>>
>> Hmm. I've just run the 8.0.x unit test on Windows with native 1.2.2 and
>> they all passed.
>>
>> If you disable HTTP/2 do the above examples work?
>>
>> Looking at the strak traces below these look more like issues with
>> HTTP/2 than with native 1.2.2.
>>
> 
> I disabled  HTTP/2 and everything is OK
> 
> So +1

Great. Thanks for checking that.

I'll take a look at HTTP/2 on Windows while I wait for the 1.2.2 native
vote to complete.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.2

2015-11-06 Thread Violeta Georgieva
2015-11-06 16:24 GMT+02:00 Mark Thomas :
>
> On 06/11/2015 14:20, Violeta Georgieva wrote:
> > 2015-11-06 16:11 GMT+02:00 Mark Thomas :
> >>
> >> On 06/11/2015 13:09, Violeta Georgieva wrote:
> >>> Hi,
> >>>
> >>> 2015-11-04 22:15 GMT+02:00 Mark Thomas :
> 
>  OK. Here we go again :)
> 
>  Thanks to everyone who has helped test 1.2.x so far. I'm hopeful that
>  this one will be good enough for the 9.0.0 RCs and - fingers crossed
-
>  to replace 1.1.x as well.
> 
>  Version 1.2.2 includes the following changes:
>  - Forward port some OpenSSL I/O changes from 1.1.x that fixed a
>    number of unit tests failures
> 
>  The proposed release artefacts can be found at [1],
>  and the build was done using tag [2].
> 
>  The Apache Tomcat Native 1.2.2 is
>   [ ] Stable, go ahead and release
>   [ ] Broken because of ...
> >>>
> >>> Websocket examples are not working:
> >>> https://localhost:8443/examples/websocket/index.xhtml
> >>>
> >>> Stockticker never ends
> >>> https://localhost:8443/examples/async/stockticker
> >>>
> >>> If I access them through *http* everything is OK.
> >>>
> >>> Windows 8, jdk 1.8.0_66, Tomcat 9 trunk
> >>
> >> Hmm. I've just run the 8.0.x unit test on Windows with native 1.2.2 and
> >> they all passed.
> >>
> >> If you disable HTTP/2 do the above examples work?
> >>
> >> Looking at the strak traces below these look more like issues with
> >> HTTP/2 than with native 1.2.2.
> >>
> >
> > I disabled  HTTP/2 and everything is OK
> >
> > So +1
>
> Great. Thanks for checking that.
>
> I'll take a look at HTTP/2 on Windows while I wait for the 1.2.2 native
> vote to complete.

Some more info
The above results were with Chrome Version 46.0.2490.80 m
With Firefox v. 42.0 only stockticker has problem, websockets are OK

>
> Mark
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>


svn commit: r1712974 - in /tomcat/trunk/java/org/apache/catalina/core: LocalStrings.properties StandardHostValve.java

2015-11-06 Thread markt
Author: markt
Date: Fri Nov  6 15:04:46 2015
New Revision: 1712974

URL: http://svn.apache.org/viewvc?rev=1712974&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58581
If custom error page fails, fall back to standard error page rather than 
throwing an NPE.
Based on a patch by Huxing Zhang.

Modified:
tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java

Modified: tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties?rev=1712974&r1=1712973&r2=1712974&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties Fri Nov  
6 15:04:46 2015
@@ -185,6 +185,7 @@ standardHost.noContext=No Context config
 standardHost.notContext=Child of a Host must be a Context
 standardHost.nullName=Host name is required
 standardHost.problematicAppBase=Using an empty string for appBase on host 
[{0}] will set it to CATALINA_BASE, which is a bad idea
+standardHostValue.customStatusFailed=Custom error page [{0}] could not be 
dispatched correctly
 standardServer.accept.timeout=The socket listening for the shutdown command 
experienced an unexpected timeout [{0}] milliseconds after the call to 
accept(). Is this an instance of bug 56684?
 standardServer.shutdownViaPort=A valid shutdown command was received via the 
shutdown port. Stopping the Server instance.
 standardServer.storeConfig.notAvailable=No StoreConfig implementation was 
registered as an MBean named [{0}] so no configuration could be saved. A 
suitable MBean is normally registered via the StoreConfigLifecyleListener.

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java?rev=1712974&r1=1712973&r2=1712974&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java Fri Nov  
6 15:04:46 2015
@@ -231,7 +231,7 @@ final class StandardHostValve extends Va
 // Look for a default error page
 errorPage = context.findErrorPage(0);
 }
-if (errorPage != null && response.setErrorReported()) {
+if (errorPage != null && response.isErrorReportRequired()) {
 response.setAppCommitted(false);
 request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE,
   Integer.valueOf(statusCode));
@@ -255,6 +255,7 @@ final class StandardHostValve extends Va
 request.setAttribute(RequestDispatcher.ERROR_REQUEST_URI,
  request.getRequestURI());
 if (custom(request, response, errorPage)) {
+response.setErrorReported();
 try {
 response.finishResponse();
 } catch (ClientAbortException e) {
@@ -379,6 +380,12 @@ final class StandardHostValve extends Va
 RequestDispatcher rd =
 servletContext.getRequestDispatcher(errorPage.getLocation());
 
+if (rd == null) {
+container.getLogger().error(
+sm.getString("standardHostValue.customStatusFailed", 
errorPage.getLocation()));
+return false;
+}
+
 if (response.isCommitted()) {
 // Response is committed - including the error page is the
 // best we can do



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1712975 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/core/LocalStrings.properties java/org/apache/catalina/core/StandardHostValve.java webapps/docs/changelog.xml

2015-11-06 Thread markt
Author: markt
Date: Fri Nov  6 15:09:55 2015
New Revision: 1712975

URL: http://svn.apache.org/viewvc?rev=1712975&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58581
If custom error page fails, fall back to standard error page rather than 
throwing an NPE.
Based on a patch by Huxing Zhang.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/core/LocalStrings.properties
tomcat/tc8.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov  6 15:09:55 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,1649973,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,1655351,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,1657
 
609,1657682,1657907,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,1
 
37,149,1666757,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,1681697,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,1685556,1685591,1685739,1685744,168577
 
2,1685816,1685826,1685891,1687242,1687261,1687268,1687340,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,

svn commit: r1712977 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/LocalStrings.properties java/org/apache/catalina/core/StandardHostValve.java webapps/docs/changelog.xml

2015-11-06 Thread markt
Author: markt
Date: Fri Nov  6 15:13:50 2015
New Revision: 1712977

URL: http://svn.apache.org/viewvc?rev=1712977&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58581
If custom error page fails, fall back to standard error page rather than 
throwing an NPE.
Based on a patch by Huxing Zhang.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/LocalStrings.properties
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardHostValve.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov  6 15:13:50 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,1659907,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,1692850,1693093,1693108,1693324,1694060,1694115,1694291,1694427,1694431,1694503,1694549,1694789,1694873,1694881,1695356,1695372,1695823-1695825,1696200,1696281,1696379,1696468,1700608,1700871,1700897,1700978,1701094,1701124,1701608,1701668,1701676,1701766,1701944,1702248,1702252,1702314,1702390,1702723,1702725,1702728,1702730,1702733,1702735,1702737,1702739,1702742,1702744,1702
 
748,1702751,1702754,1702758,1702760,1702763,1702766,1708779,1708782,1708806,1709314,1709670,1710347,1710442,1710448,1710490,1710574,1710578,1712226,1712229,1712235,1712255,1712618,1712649,1712655,1712899,1712903
-/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,13425

[Bug 58581] StandardHostValve#custom throws NPE if custom error page is incorrectly configured

2015-11-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58581

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #1 from Mark Thomas  ---
Thanks for the report and the patch. I've applied the patch (with an additional
fix that enabled thre default error page to be displayed if the custom page is
not available) to trunk, 8.0.x (for 8.0.29) and 7.0.x (for 7.0.66).

-- 
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: r1712993 - in /tomcat/trunk/java/org/apache/coyote: Request.java Response.java

2015-11-06 Thread markt
Author: markt
Date: Fri Nov  6 17:50:51 2015
New Revision: 1712993

URL: http://svn.apache.org/viewvc?rev=1712993&view=rev
Log:
Javadoc

Modified:
tomcat/trunk/java/org/apache/coyote/Request.java
tomcat/trunk/java/org/apache/coyote/Response.java

Modified: tomcat/trunk/java/org/apache/coyote/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Request.java?rev=1712993&r1=1712992&r2=1712993&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/Request.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Request.java Fri Nov  6 17:50:51 2015
@@ -225,11 +225,11 @@ public final class Request {
 }
 
 /**
- * Return the buffer holding the server name, if
- * any. Use isNull() to check if there is no value
- * set.
- * This is the "virtual host", derived from the
- * Host: header.
+ * Get the "virtual host", derived from the Host: header associated with
+ * this request.
+ *
+ * @return The buffer holding the server name, if any. Use isNull() to 
check
+ * if there is no value set.
  */
 public MessageBytes serverName() {
 return serverNameMB;
@@ -280,6 +280,10 @@ public final class Request {
 
 /**
  * Get the character encoding used for this request.
+ *
+ * @return The value set via {@link #setCharacterEncoding(String)} or if no
+ * call has been made to that method try to obtain if from the
+ * content type.
  */
 public String getCharacterEncoding() {
 
@@ -483,11 +487,18 @@ public final class Request {
 /**
  * Read data from the input buffer and put it into a byte chunk.
  *
- * The buffer is owned by the protocol implementation - it will be reused 
on the next read.
- * The Adapter must either process the data in place or copy it to a 
separate buffer if it needs
- * to hold it. In most cases this is done during byte->char conversions 
or via InputStream. Unlike
- * InputStream, this interface allows the app to process data in place, 
without copy.
+ * The buffer is owned by the protocol implementation - it will be reused 
on
+ * the next read. The Adapter must either process the data in place or copy
+ * it to a separate buffer if it needs to hold it. In most cases this is
+ * done during byte->char conversions or via InputStream. Unlike
+ * InputStream, this interface allows the app to process data in place,
+ * without copy.
+ *
+ * @param chunk The destination to which to copy the data
  *
+ * @return The number of bytes copied
+ *
+ * @throws IOException If an I/O error occurs during the copy
  */
 public int doRead(ByteChunk chunk) throws IOException {
 int n = inputBuffer.doRead(chunk);
@@ -522,10 +533,6 @@ public final class Request {
  * be faster than ThreadLocal for very frequent operations.
  *
  *  Example use:
- *   Jk:
- * HandlerRequest.HOSTBUFFER = 10 CharChunk, buffer for Host decoding
- * WorkerEnv: SSL_CERT_NOTE=16 - MessageBytes containing the cert
- *
  *   Catalina CoyoteAdapter:
  *  ADAPTER_NOTES = 1 - stores the HttpServletRequest object ( req/res)
  *
@@ -534,6 +541,9 @@ public final class Request {
  *   for connector use.
  *
  *   17-31 range is not allocated or used.
+ *
+ * @param pos Index to use to store the note
+ * @param value The value to store at that index
  */
 public final void setNote(int pos, Object value) {
 notes[pos] = value;

Modified: tomcat/trunk/java/org/apache/coyote/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Response.java?rev=1712993&r1=1712992&r2=1712993&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/Response.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Response.java Fri Nov  6 17:50:51 2015
@@ -180,15 +180,19 @@ public final class Response {
 
 
 /**
- * Set the response status
+ * Set the response status.
+ *
+ * @param status The status value to set
  */
-public void setStatus( int status ) {
+public void setStatus(int status) {
 this.status = status;
 }
 
 
 /**
  * Get the status message.
+ *
+ * @return The message associated with the current status
  */
 public String getMessage() {
 return message;
@@ -197,6 +201,8 @@ public final class Response {
 
 /**
  * Set the status message.
+ *
+ * @param message The status message to set
  */
 public void setMessage(String message) {
 this.message = message;
@@ -228,8 +234,9 @@ public final class Response {
 
 
 /**
- * Set the error Exception that occurred during
- * request processing.
+ * Set the error Exception that occurred during

svn commit: r1713000 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

2015-11-06 Thread markt
Author: markt
Date: Fri Nov  6 17:59:09 2015
New Revision: 1713000

URL: http://svn.apache.org/viewvc?rev=1713000&view=rev
Log:
Javadoc

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1713000&r1=1712999&r2=1713000&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Fri Nov  6 
17:59:09 2015
@@ -316,6 +316,9 @@ public class Http11Processor extends Abs
  * Set compressible mime-type list (this method is best when used with
  * a large number of connectors, where it would be better to have all of
  * them referenced a single array).
+ *
+ * @param compressableMimeTypes MIME types for which compression should be
+ *  enabled
  */
 public void setCompressableMimeTypes(String[] compressableMimeTypes) {
 this.compressableMimeTypes = compressableMimeTypes;
@@ -324,6 +327,8 @@ public class Http11Processor extends Abs
 
 /**
  * Return compression level.
+ *
+ * @return The current compression level in string form (off/on/force)
  */
 public String getCompression() {
 switch (compressionLevel) {
@@ -361,7 +366,9 @@ public class Http11Processor extends Abs
  * Set restricted user agent list (which will downgrade the connector
  * to HTTP/1.0 mode). Regular expression as supported by {@link Pattern}.
  *
- * ie: "gorilla|desesplorer|tigrus"
+ * @param restrictedUserAgents The regular expression as supported by
+ * {@link Pattern} for the user agents e.g.
+ * "gorilla|desesplorer|tigrus"
  */
 public void setRestrictedUserAgents(String restrictedUserAgents) {
 if (restrictedUserAgents == null ||



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: On escaping of EL in attributes (BZ 57136)

2015-11-06 Thread Christopher Schultz
Mark,

On 11/6/15 7:32 AM, Mark Thomas wrote:
> On 06/11/2015 12:24, Christopher Schultz wrote:
>> On 11/6/15 7:12 AM, Mark Thomas wrote:
> 
> 
> 
>>> Things are sufficiently messy between the spec, the TCK, 'clarification'
>>> from Oracle and Tomcat's previous behaviour that I agree both forms need
>>> to be supported. The new quoteAttributeEL init param for the JSP servlet
>>> does exactly that.
>>
>> Perfect. I wasn't able to follow the various acrobatics that you
>> performed with the switches... it looks like you actually removed
>> options that would have supported this. What have I missed?
> 
> The old STRICT_QUOTE_ESCAPING system property was converted to an init
> param for the JSP servlet with the system property defining the default
> for 8.0.x and trunk.
> 
> I then removed the STRICT_QUOTE_ESCAPING system property entirely from
> trunk and deprecated it in 8.0.x. This was part of my general loathing
> of system properties for configuration that should be per Context/Host/etc.
> 
> I then added the new JSP init param quoteAttributeEL to 8.0.x and trunk.

Great, thanks for clearing that up. It didn't click to me that you were
exchanging a system property (bad) for a configuration setting (good).

-chris

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 56108] Allow user-defined Diffie-Hellman parameters (secure DH-Cipher)

2015-11-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=56108

--- Comment #4 from Robert Paasche  ---
Is this part of tcnativ 1.2.x ?

-- 
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: r1713052 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ java/org/apache/catalina/realm/ java/org/apache/catalina/servlets/ java/org/apache/jasper/compiler/ java/org/apache/j

2015-11-06 Thread kkolinko
Author: kkolinko
Date: Fri Nov  6 23:18:22 2015
New Revision: 1713052

URL: http://svn.apache.org/viewvc?rev=1713052&view=rev
Log:
For https://bz.apache.org/bugzilla/show_bug.cgi?id=58541
String.lastIndexOf(String) -> String.lastIndexOf(char) where possible

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/RealmBase.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/servlets/CGIServlet.java

tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ParserController.java
tomcat/tc7.0.x/trunk/java/org/apache/juli/JdkLoggerFormatter.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/XercesParser.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/URL.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov  6 23:18:22 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,1659907,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,1692850,1693093,1693108,1693324,1694060,1694115,1694291,1694427,1694431,1694503,1694549,1694789,1694873,1694881,1695356,1695372,1695823-1695825,1696200,1696281,1696379,1696468,1700608,1700871,1700897,1700978,1701094,1701124,1701608,1701668,1701676,1701766,1701944,1702248,1702252,1702314,1702390,1702723,1702725,1702728,1702730,1702733,1702735,1702737,1702739,1702742,1702744,1702
 
748,1702751,1702754,1702758,1702760,1702763,1702766,1708779,1708782,1708806,1709314,1709670,1710347,1710442,1710448,1710490,1710574,1710578,1712226,1712229,1712235,1712255,1712618,1712649,1712655,1712899,1712903,1712975
-/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,

[Bug 58431] AccessLogValve default values for prefix and suffix not coherent with other log files

2015-11-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58431

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Konstantin Kolinko  ---
1. Changing the naming in the default servlet.xml is a bad idea.

I am sure that the default naming is mentioned in many places, that will be
broken / obsoleted by this change: books, documentations, FAQs, discussions,
etc.

2. Access Log and java.util.logging logs are different beasts, serving
different purpose and having different format. It is good to keep them
separate.

I do not know whether this naming was a conscious decision 10+ years ago, or it
just happened this way, but I find this feature useful.


3. Apache HTTPD [1] uses "logs/access_log" in its examples. I think that if
that log is rotated it will grow a date suffix.

[1] http://httpd.apache.org/docs/2.4/mod/mod_log_config.html#customlog


I do not see enough reasons for making the proposed change.

-- 
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: r1713054 - /tomcat/tc6.0.x/trunk/test/javax/el/TestArrayELResolver.java

2015-11-06 Thread kkolinko
Author: kkolinko
Date: Sat Nov  7 00:29:11 2015
New Revision: 1713054

URL: http://svn.apache.org/viewvc?rev=1713054&view=rev
Log:
Convert test class to JUnit4

Modified:
tomcat/tc6.0.x/trunk/test/javax/el/TestArrayELResolver.java

Modified: tomcat/tc6.0.x/trunk/test/javax/el/TestArrayELResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/javax/el/TestArrayELResolver.java?rev=1713054&r1=1713053&r2=1713054&view=diff
==
--- tomcat/tc6.0.x/trunk/test/javax/el/TestArrayELResolver.java (original)
+++ tomcat/tc6.0.x/trunk/test/javax/el/TestArrayELResolver.java Sat Nov  7 
00:29:11 2015
@@ -16,30 +16,26 @@
  */
 package javax.el;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Test;
 
 import org.apache.jasper.el.ELContextImpl;
 
-public class TestArrayELResolver extends TestCase {
+public class TestArrayELResolver {
 
 /**
  * Tests that a null context results in an NPE as per EL Javadoc.
  */
-public void testGetType01() throws Exception {
-Exception expected = null;
-try {
-ArrayELResolver resolver = new ArrayELResolver();
-resolver.getType(null, new Object(), new Object());
-} catch (Exception e) {
-expected = e;
-}
-Assert.assertTrue(expected instanceof NullPointerException);
+@Test(expected = NullPointerException.class)
+public void testGetType01() {
+ArrayELResolver resolver = new ArrayELResolver();
+resolver.getType(null, new Object(), new Object());
 }
 
 /**
  * Tests that a valid property is not resolved if base is not an array.
  */
+@Test
 public void testGetType02() {
 doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_TYPE,
 true);
@@ -48,6 +44,7 @@ public class TestArrayELResolver extends
 /**
  * Tests that a valid property is resolved.
  */
+@Test
 public void testGetType03() {
 ArrayELResolver resolver = new ArrayELResolver();
 ELContext context = new ELContextImpl();
@@ -62,37 +59,28 @@ public class TestArrayELResolver extends
 /**
  * Tests that the key is out of bounds and exception will be thrown.
  */
+@Test(expected = PropertyNotFoundException.class)
 public void testGetType04() {
-Exception expected = null;
-try {
-ArrayELResolver resolver = new ArrayELResolver();
-ELContext context = new ELContextImpl();
-
-String[] base = new String[] { "element" };
-resolver.getType(context, base, new Integer(1));
-} catch (Exception e) {
-expected = e;
-}
-Assert.assertTrue(expected instanceof PropertyNotFoundException);
+ArrayELResolver resolver = new ArrayELResolver();
+ELContext context = new ELContextImpl();
+
+String[] base = new String[] { "element" };
+resolver.getType(context, base, new Integer(1));
 }
 
 /**
  * Tests that a null context results in an NPE as per EL Javadoc.
  */
+@Test(expected = NullPointerException.class)
 public void testGetValue01() {
-Exception expected = null;
-try {
-ArrayELResolver resolver = new ArrayELResolver();
-resolver.getValue(null, new Object(), new Object());
-} catch (Exception e) {
-expected = e;
-}
-Assert.assertTrue(expected instanceof NullPointerException);
+ArrayELResolver resolver = new ArrayELResolver();
+resolver.getValue(null, new Object(), new Object());
 }
 
 /**
  * Tests that a valid property is not resolved if base is not an array.
  */
+@Test
 public void testGetValue02() {
 doNegativeTest(new Object(), new Object(), MethodUnderTest.GET_VALUE,
 true);
@@ -101,6 +89,7 @@ public class TestArrayELResolver extends
 /**
  * Tests that a valid property is resolved.
  */
+@Test
 public void testGetValue03() {
 ArrayELResolver resolver = new ArrayELResolver();
 ELContext context = new ELContextImpl();
@@ -115,23 +104,19 @@ public class TestArrayELResolver extends
 /**
  * Tests a coercion cannot be performed as the key is not integer.
  */
+@Test(expected = IllegalArgumentException.class)
 public void testGetValue04() {
-Exception expected = null;
-try {
-ArrayELResolver resolver = new ArrayELResolver();
-ELContext context = new ELContextImpl();
-
-String[] base = new String[] { "element" };
-resolver.getValue(context, base, "key");
-} catch (Exception e) {
-expected = e;
-}
-Assert.assertTrue(expected instanceof IllegalArgumentException);
+ArrayELResolver resolver = new ArrayELResolver();
+ELContext 

svn commit: r1713056 - in /tomcat/tc6.0.x/trunk/test/org/apache/catalina/ha/session: TestPrincipal.java TestSerializablePrincipal.java TesterPrincipal.java

2015-11-06 Thread kkolinko
Author: kkolinko
Date: Sat Nov  7 00:42:56 2015
New Revision: 1713056

URL: http://svn.apache.org/viewvc?rev=1713056&view=rev
Log:
Convert test class to JUnit4 and sync with Tomcat 7

Added:

tomcat/tc6.0.x/trunk/test/org/apache/catalina/ha/session/TesterPrincipal.java
  - copied, changed from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/ha/session/TestPrincipal.java
Removed:
tomcat/tc6.0.x/trunk/test/org/apache/catalina/ha/session/TestPrincipal.java
Modified:

tomcat/tc6.0.x/trunk/test/org/apache/catalina/ha/session/TestSerializablePrincipal.java

Modified: 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/ha/session/TestSerializablePrincipal.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/ha/session/TestSerializablePrincipal.java?rev=1713056&r1=1713055&r2=1713056&view=diff
==
--- 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/ha/session/TestSerializablePrincipal.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/ha/session/TestSerializablePrincipal.java
 Sat Nov  7 00:42:56 2015
@@ -27,66 +27,101 @@ import java.io.ObjectOutputStream;
 import java.util.ArrayList;
 import java.util.List;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.fail;
+
+import org.junit.Test;
+
 import org.apache.catalina.realm.GenericPrincipal;
 
-import junit.framework.TestCase;
 
-public class TestSerializablePrincipal extends TestCase {
+public class TestSerializablePrincipal  {
 
 /**
  * Simple serialization / de-serialization test for bug 43840.
  */
+@SuppressWarnings("null")
+@Test
 public void testWriteReadPrincipal() {
-// Get a temporary file to use for the serialization test
-File file = null;
-try {
-file = File.createTempFile("ser", null);
-file.deleteOnExit();
-} catch (IOException e) {
-e.printStackTrace();
-fail("ioe creating temporary file");
+
+File tempDir = new File(System.getProperty("tomcat.test.temp", 
"output/tmp"));
+if (!tempDir.mkdirs() && !tempDir.isDirectory()) {
+fail("Unable to create temporary directory for test");
 }
-
+
 // Create the Principal to serialize
 List roles = new ArrayList();
 roles.add("RoleA");
 roles.add("RoleB");
-TestPrincipal tpOriginal = new TestPrincipal("inner");
+TesterPrincipal tpOriginal = new TesterPrincipal("inner");
 GenericPrincipal gpOriginal =
 new GenericPrincipal(null, "usr", "pwd", roles, tpOriginal);
-
-// Do the serialization
+
+// Get a temporary file to use for the serialization test
+File file = null;
 try {
-FileOutputStream fos = new FileOutputStream(file);
-ObjectOutputStream oos = new ObjectOutputStream(fos);
-SerializablePrincipal.writePrincipal(gpOriginal, oos);
-oos.close();
-fos.close();
-} catch (FileNotFoundException e) {
-e.printStackTrace();
-fail("fnfe creating object output stream");
+file = File.createTempFile("ser", null, tempDir);
 } catch (IOException e) {
 e.printStackTrace();
-fail("ioe serializing principal");
+fail("ioe creating temporary file");
 }
-
-// De-serialize the Principal
+
 GenericPrincipal gpNew = null;
 try {
-FileInputStream fis = new FileInputStream(file);
-ObjectInputStream ois = new ObjectInputStream(fis);
-gpNew = SerializablePrincipal.readPrincipal(ois, null);
-} catch (FileNotFoundException e) {
-e.printStackTrace();
-fail("fnfe reading object output stream");
-} catch (IOException e) {
-e.printStackTrace();
-fail("ioe de-serializing principal");
-} catch (ClassNotFoundException e) {
-e.printStackTrace();
-fail("cnfe de-serializing principal");
+// Do the serialization
+FileOutputStream fos = null;
+try {
+fos = new FileOutputStream(file);
+ObjectOutputStream oos = new ObjectOutputStream(fos);
+SerializablePrincipal.writePrincipal(gpOriginal, oos);
+oos.close();
+} catch (FileNotFoundException e) {
+e.printStackTrace();
+fail("fnfe creating object output stream");
+} catch (IOException e) {
+e.printStackTrace();
+fail("ioe serializing principal");
+} finally {
+if (fos != null) {
+try {
+fos.close();
+} catch (IOException ignored) {
+   

svn commit: r1713059 - in /tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes: group/ group/interceptors/ test/ test/channel/ test/interceptors/ test/io/ test/membership/

2015-11-06 Thread kkolinko
Author: kkolinko
Date: Sat Nov  7 01:06:31 2015
New Revision: 1713059

URL: http://svn.apache.org/viewvc?rev=1713059&view=rev
Log:
Move and rename tests to align with Tomcat 7

Added:
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java
  - copied, changed from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestMemberArrival.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java
  - copied, changed from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestChannelOptionFlag.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java
  - copied, changed from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/io/TestSenderConnections.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelStartStop.java
  - copied, changed from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/ChannelStartStop.java
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/
  - copied from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/interceptors/
Removed:

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/ChannelStartStop.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestChannelOptionFlag.java
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/interceptors/

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/io/TestSenderConnections.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestMemberArrival.java
Modified:

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestOrderInterceptor.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/TribesTestSuite.java

Copied: 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java
 (from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestMemberArrival.java)
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java?p2=tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java&p1=tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestMemberArrival.java&r1=1713051&r2=1713059&rev=1713059&view=diff
==
--- 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestMemberArrival.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java
 Sat Nov  7 01:06:31 2015
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.catalina.tribes.test.membership;
+package org.apache.catalina.tribes.group;
 
 import java.util.ArrayList;
 
@@ -22,10 +22,9 @@ import org.apache.catalina.tribes.Channe
 import org.apache.catalina.tribes.ManagedChannel;
 import org.apache.catalina.tribes.Member;
 import org.apache.catalina.tribes.MembershipListener;
-import org.apache.catalina.tribes.group.GroupChannel;
 import junit.framework.TestCase;
 
-public class TestMemberArrival
+public class TestGroupChannelMemberArrival
 extends TestCase {
 private static int count = 10;
 private ManagedChannel[] channels = new ManagedChannel[count];

Copied: 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java
 (from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestChannelOptionFlag.java)
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java?p2=tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java&p1=tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestChannelOptionFlag.java&r1=1713051&r2=1713059&rev=1713059&view=diff
==
--- 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestChannelOptionFlag.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelOptionFlag.java
 Sat Nov  7 01:06:31 2015
@@ -14,10 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.catalina.tribes.test.channel;
+package org.apache.catalina.tribes.group;
 
 import junit.framework.*;
-import org.apache.catalina.tribes.group.*;
 import org.apache.catalina.tribes.ChannelInterc

svn commit: r1713062 - in /tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes: group/interceptors/ io/ membership/ test/ test/io/ test/membership/

2015-11-06 Thread kkolinko
Author: kkolinko
Date: Sat Nov  7 01:20:45 2015
New Revision: 1713062

URL: http://svn.apache.org/viewvc?rev=1713062&view=rev
Log:
Move and rename tests to align with Tomcat 7

Added:

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestDomainFilterInterceptor.java
  - copied, changed from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestDomainFilter.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java
  - copied, changed from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestTcpFailureDetector.java
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/io/
  - copied from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/io/
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/io/TestXByteBuffer.java
  - copied, changed from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/io/TestSerialization.java
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/membership/

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/membership/TestMemberImplSerialization.java
  - copied, changed from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/MemberSerialization.java
Removed:

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/io/TestSenderConnections.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/io/TestSerialization.java
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/io/

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/MemberSerialization.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestDomainFilter.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestTcpFailureDetector.java
Modified:

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/TribesTestSuite.java

Copied: 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestDomainFilterInterceptor.java
 (from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestDomainFilter.java)
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestDomainFilterInterceptor.java?p2=tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestDomainFilterInterceptor.java&p1=tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestDomainFilter.java&r1=1713051&r2=1713062&rev=1713062&view=diff
==
--- 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestDomainFilter.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestDomainFilterInterceptor.java
 Sat Nov  7 01:20:45 2015
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.catalina.tribes.test.membership;
+package org.apache.catalina.tribes.group.interceptors;
 
 import java.util.ArrayList;
 
@@ -24,10 +24,9 @@ import org.apache.catalina.tribes.Member
 import org.apache.catalina.tribes.MembershipListener;
 import org.apache.catalina.tribes.group.GroupChannel;
 import junit.framework.TestCase;
-import org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor;
 import org.apache.catalina.tribes.util.UUIDGenerator;
 
-public class TestDomainFilter
+public class TestDomainFilterInterceptor
 extends TestCase {
 private static int count = 10;
 private ManagedChannel[] channels = new ManagedChannel[count];

Copied: 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java
 (from r1713051, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestTcpFailureDetector.java)
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java?p2=tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java&p1=tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestTcpFailureDetector.java&r1=1713051&r2=1713062&rev=1713062&view=diff
==
--- 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/TestTcpFailureDetector.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestTcpFailureDetector.java
 Sat Nov  7 01:20:45 2015
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.catalina.tribes.test.membership;
+package org.apache.catalina.tribes.group.interceptors;
 
 import java.util.ArrayList;
 
@@ -25,7 +25,6 @@ import org.apache.catalina.tribes.Manage
 import org.apache.c

svn commit: r1713063 - in /tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test: NioSenderTest.java TestNioSender.java membership/

2015-11-06 Thread kkolinko
Author: kkolinko
Date: Sat Nov  7 01:29:04 2015
New Revision: 1713063

URL: http://svn.apache.org/viewvc?rev=1713063&view=rev
Log:
Rename a test class to align with Tomcat 7. Remove an empty directory.

Added:
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/NioSenderTest.java
  - copied, changed from r1713062, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/TestNioSender.java
Removed:
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/TestNioSender.java
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/membership/

Copied: 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/NioSenderTest.java 
(from r1713062, 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/TestNioSender.java)
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/NioSenderTest.java?p2=tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/NioSenderTest.java&p1=tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/TestNioSender.java&r1=1713062&r2=1713063&rev=1713063&view=diff
==
--- 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/TestNioSender.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/NioSenderTest.java 
Sat Nov  7 01:29:04 2015
@@ -16,10 +16,10 @@
  */
 package org.apache.catalina.tribes.test;
 
-import java.io.IOException;
 import java.nio.channels.SelectionKey;
 import java.util.Iterator;
 import java.nio.channels.Selector;
+
 import org.apache.catalina.tribes.transport.nio.NioSender;
 import org.apache.catalina.tribes.membership.MemberImpl;
 import org.apache.catalina.tribes.io.ChannelData;
@@ -37,13 +37,13 @@ import org.apache.catalina.tribes.Channe
  * @author not attributable
  * @version 1.0
  */
-public class TestNioSender {
+public class NioSenderTest {
 private Selector selector = null;
 private int counter = 0;
 MemberImpl mbr;
 private static int testOptions = Channel.SEND_OPTIONS_DEFAULT;
-public TestNioSender()  {
-
+public NioSenderTest()  {
+// Default constructor
 }
 
 public synchronized int inc() {
@@ -113,7 +113,7 @@ public class TestNioSender {
 }
 
 public static void main(String[] args) throws Exception {
-TestNioSender sender = new TestNioSender();
+NioSenderTest sender = new NioSenderTest();
 sender.init();
 sender.run();
 }



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1713064 - /tomcat/tc6.0.x/trunk/test/org/apache/catalina/valves/TestRemoteIpValve.java

2015-11-06 Thread kkolinko
Author: kkolinko
Date: Sat Nov  7 01:44:50 2015
New Revision: 1713064

URL: http://svn.apache.org/viewvc?rev=1713064&view=rev
Log:
Update test class aligning with Tomcat 7.

Modified:
tomcat/tc6.0.x/trunk/test/org/apache/catalina/valves/TestRemoteIpValve.java

Modified: 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/valves/TestRemoteIpValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/valves/TestRemoteIpValve.java?rev=1713064&r1=1713063&r2=1713064&view=diff
==
--- tomcat/tc6.0.x/trunk/test/org/apache/catalina/valves/TestRemoteIpValve.java 
(original)
+++ tomcat/tc6.0.x/trunk/test/org/apache/catalina/valves/TestRemoteIpValve.java 
Sat Nov  7 01:44:50 2015
@@ -5,9 +5,9 @@
  * 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.
@@ -24,32 +24,37 @@ import java.util.List;
 
 import javax.servlet.ServletException;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
 
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
-import org.apache.catalina.valves.ValveBase;
 
 /**
  * {@link RemoteIpValve} Tests
  */
-public class TestRemoteIpValve extends TestCase {
-
+public class TestRemoteIpValve {
+
 static class RemoteAddrAndHostTrackerValve extends ValveBase {
 private String remoteAddr;
 private String remoteHost;
 private String scheme;
 private boolean secure;
 private int serverPort;
-
+
 public String getRemoteAddr() {
 return remoteAddr;
 }
-
+
 public String getRemoteHost() {
 return remoteHost;
 }
-
+
 public String getScheme() {
 return scheme;
 }
@@ -61,7 +66,7 @@ public class TestRemoteIpValve extends T
 public boolean isSecure() {
 return secure;
 }
-
+
 @Override
 public void invoke(Request request, Response response) throws 
IOException, ServletException {
 this.remoteHost = request.getRemoteHost();
@@ -71,24 +76,40 @@ public class TestRemoteIpValve extends T
 this.serverPort = request.getServerPort();
 }
 }
-
-public void testCommaDelimitedListToStringArray() {
+
+public static class MockRequest extends Request {
+@Override
+public void setAttribute(String name, Object value) {
+getCoyoteRequest().getAttributes().put(name, value);
+}
+
+@Override
+public Object getAttribute(String name) {
+return getCoyoteRequest().getAttribute(name);
+}
+}
+
+@Test
+public void testListToCommaDelimitedString() {
 List elements = Arrays.asList("element1", "element2", 
"element3");
 String actual = RemoteIpValve.listToCommaDelimitedString(elements);
 assertEquals("element1, element2, element3", actual);
 }
-
-public void testCommaDelimitedListToStringArrayEmptyList() {
+
+@Test
+public void testListToCommaDelimitedStringEmptyList() {
 List elements = new ArrayList();
 String actual = RemoteIpValve.listToCommaDelimitedString(elements);
 assertEquals("", actual);
 }
-
+
+@Test
 public void testCommaDelimitedListToStringArrayNullList() {
 String actual = RemoteIpValve.listToCommaDelimitedString(null);
 assertEquals("", actual);
 }
-
+
+@Test
 public void testInvokeAllowedRemoteAddrWithNullRemoteIpHeader() throws 
Exception {
 // PREPARE
 RemoteIpValve remoteIpValve = new RemoteIpValve();
@@ -98,38 +119,39 @@ public class TestRemoteIpValve extends T
 remoteIpValve.setProxiesHeader("x-forwarded-by");
 RemoteAddrAndHostTrackerValve remoteAddrAndHostTrackerValve = new 
RemoteAddrAndHostTrackerValve();
 remoteIpValve.setNext(remoteAddrAndHostTrackerValve);
-
-Request request = new Request();
+
+Request request = new MockRequest();
 request.setCoyoteRequest(new org.apache.coyote.Request());
 request.setRemoteAddr("192.168.0.10");
 request.setRemoteHost("remote-host-original-value");
-
+
 // TEST
 remoteIpValve.invoke(request, null);
-
+
  

svn commit: r1713067 - /tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

2015-11-06 Thread kkolinko
Author: kkolinko
Date: Sat Nov  7 01:54:06 2015
New Revision: 1713067

URL: http://svn.apache.org/viewvc?rev=1713067&view=rev
Log:
Add a changelog entry. Work in progress.

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1713067&r1=1713066&r2=1713067&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sat Nov  7 01:54:06 2015
@@ -123,6 +123,9 @@
 the LogFactoryImpl[$*] classes. Based on patch provided by
 Benjamin Gandon. (kkolinko)
   
+  
+Convert some test classes to JUnit 4. (kkolinko)
+  
 
   
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1713068 - in /tomcat/tc6.0.x/trunk/test/org/apache: juli/TestClassLoaderLogManager.java tomcat/util/res/TestStringManager.java

2015-11-06 Thread kkolinko
Author: kkolinko
Date: Sat Nov  7 02:04:00 2015
New Revision: 1713068

URL: http://svn.apache.org/viewvc?rev=1713068&view=rev
Log:
Update test classes, aligning them with Tomcat 7.

Modified:
tomcat/tc6.0.x/trunk/test/org/apache/juli/TestClassLoaderLogManager.java
tomcat/tc6.0.x/trunk/test/org/apache/tomcat/util/res/TestStringManager.java

Modified: 
tomcat/tc6.0.x/trunk/test/org/apache/juli/TestClassLoaderLogManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/juli/TestClassLoaderLogManager.java?rev=1713068&r1=1713067&r2=1713068&view=diff
==
--- tomcat/tc6.0.x/trunk/test/org/apache/juli/TestClassLoaderLogManager.java 
(original)
+++ tomcat/tc6.0.x/trunk/test/org/apache/juli/TestClassLoaderLogManager.java 
Sat Nov  7 02:04:00 2015
@@ -16,51 +16,44 @@
  */
 package org.apache.juli;
 
-import junit.framework.TestCase;
-
+import java.io.File;
 import java.util.Collections;
 import java.util.Random;
 import java.util.logging.LogManager;
 import java.util.logging.Logger;
 
 import org.junit.Assert;
+import org.junit.Test;
 
 /**
  * Test cases for {@link ClassLoaderLogManager}.
  */
-public class TestClassLoaderLogManager extends TestCase {
+public class TestClassLoaderLogManager {
 
+@Test
 public void testReplace() {
 ClassLoaderLogManager logManager = new ClassLoaderLogManager();
 Assert.assertEquals("", logManager.replace(""));
 Assert.assertEquals("${", logManager.replace("${"));
-Assert.assertEquals("${undefinedproperty}",
-logManager.replace("${undefinedproperty}"));
+Assert.assertEquals("${undefinedproperty}", 
logManager.replace("${undefinedproperty}"));
 Assert.assertEquals(
-System.getProperty("line.separator")
-+ System.getProperty("path.separator")
-+ System.getProperty("file.separator"),
-logManager
-
.replace("${line.separator}${path.separator}${file.separator}"));
+System.getProperty("line.separator") + File.pathSeparator + 
File.separator,
+
logManager.replace("${line.separator}${path.separator}${file.separator}"));
 Assert.assertEquals(
-"foo" + System.getProperty("file.separator") + "bar"
-+ System.getProperty("line.separator")
-+ System.getProperty("path.separator") + "baz",
-logManager
-
.replace("foo${file.separator}bar${line.separator}${path.separator}baz"));
+"foo" + File.separator + "bar" + 
System.getProperty("line.separator")
++ File.pathSeparator + "baz",
+
logManager.replace("foo${file.separator}bar${line.separator}${path.separator}baz"));
 // BZ 51249
 Assert.assertEquals(
-"%{file.separator}" + System.getProperty("file.separator"),
+"%{file.separator}" + File.separator,
 logManager.replace("%{file.separator}${file.separator}"));
 Assert.assertEquals(
-System.getProperty("file.separator") + "${undefinedproperty}"
-+ System.getProperty("file.separator"),
-logManager
-
.replace("${file.separator}${undefinedproperty}${file.separator}"));
-Assert.assertEquals("${}" + System.getProperty("path.separator"),
-logManager.replace("${}${path.separator}"));
+File.separator + "${undefinedproperty}" + File.separator,
+
logManager.replace("${file.separator}${undefinedproperty}${file.separator}"));
+Assert.assertEquals("${}" + File.pathSeparator, 
logManager.replace("${}${path.separator}"));
 }
 
+@Test
 public void testBug56082() {
 ClassLoaderLogManager logManager = new ClassLoaderLogManager();
 
@@ -75,14 +68,10 @@ public class TestClassLoaderLogManager e
 listThread.setName("LoggerList");
 listThread.start();
 
-int count = 0;
-while (count < 4 && listThread.isAlive()) {
-try {
-Thread.sleep(500);
-} catch (InterruptedException e) {
-// Ignore
-}
-count++;
+try {
+listThread.join(2000);
+} catch (InterruptedException e) {
+// Ignore
 }
 
 for (int i = 0; i < createThreads.length; i ++) {

Modified: 
tomcat/tc6.0.x/trunk/test/org/apache/tomcat/util/res/TestStringManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/tomcat/util/res/TestStringManager.java?rev=1713068&r1=1713067&r2=1713068&view=diff
==
--- tomcat/tc6.0.x/trunk/test/org/apache/tomcat/util/res/TestStringManager.java 
(original)
+++ tomcat/tc6.0.x/tr