DO NOT REPLY [Bug 50054] New: When the AJP connector is used, minSpareThreads cannot be used.

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50054

   Summary: When the AJP connector is used, minSpareThreads cannot
be used.
   Product: Tomcat 7
   Version: trunk
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
AssignedTo: dev@tomcat.apache.org
ReportedBy: kfuj...@apache.org


I found following warnning messages. 

==
Oct 7, 2010 2:25:27 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'minSpareThreads' to '31' did not find a matching property.
==

The AJP connector's configs are the following. 


When I used the Http connector, minSpareThreads was able to be used. 

org.apache.coyote.ajp.AjpProtocol doesn't set the minSpareThreads to
org.apache.tomcat.util.net.JIoEndpoint.

I made a patch.
This patch was made based on AbstractHttp11Protocol. 

Best regards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 50054] When the AJP connector is used, minSpareThreads cannot be used.

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50054

--- Comment #1 from Keiichi Fujino  2010-10-07 04:24:56 EDT 
---
Created an attachment (id=26132)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26132)
I made a patch.

This patch was made based on AbstractHttp11Protocol.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



Re: DO NOT REPLY [Bug 50054] New: When the AJP connector is used, minSpareThreads cannot be used.

2010-10-07 Thread Rudhra Rajeshwari



svn commit: r1005367 - in /tomcat/trunk: java/org/apache/coyote/ajp/AbstractAjpProtocol.java java/org/apache/coyote/ajp/AjpAprProtocol.java java/org/apache/coyote/ajp/AjpProtocol.java webapps/docs/cha

2010-10-07 Thread kfujino
Author: kfujino
Date: Thu Oct  7 08:54:51 2010
New Revision: 1005367

URL: http://svn.apache.org/viewvc?rev=1005367&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50054
Correctly handle the setting of minSpareThreads in AJP connector.
Other attributes (acceptorThreadCount etc.) are correctly set by this fix. 

Added:
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java   (with 
props)
Modified:
tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
tomcat/trunk/webapps/docs/changelog.xml

Added: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1005367&view=auto
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (added)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Thu Oct  7 
08:54:51 2010
@@ -0,0 +1,282 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.coyote.ajp;
+
+import java.net.InetAddress;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.concurrent.Executor;
+
+import javax.management.MBeanRegistration;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.coyote.Adapter;
+import org.apache.coyote.ProtocolHandler;
+import org.apache.juli.logging.Log;
+import org.apache.tomcat.util.modeler.Registry;
+import org.apache.tomcat.util.net.AbstractEndpoint;
+import org.apache.tomcat.util.res.StringManager;
+
+public abstract class AbstractAjpProtocol implements ProtocolHandler, 
MBeanRegistration {
+/**
+ * The string manager for this package.
+ */
+protected static final StringManager sm = 
StringManager.getManager(Constants.Package);
+
+protected abstract Log getLog();
+
+protected ObjectName tpOname = null;
+protected ObjectName rgOname = null;
+
+protected AbstractEndpoint endpoint = null;
+
+/**
+ * The adapter, used to call the connector.
+ */
+protected Adapter adapter;
+
+protected HashMap attributes = new HashMap();
+
+/** 
+ * Pass config info
+ */
+@Override
+public void setAttribute(String name, Object value) {
+if (getLog().isTraceEnabled()) {
+getLog().trace(sm.getString("ajpprotocol.setattribute", name, 
value));
+}
+attributes.put(name, value);
+}
+
+@Override
+public Object getAttribute(String key) {
+if (getLog().isTraceEnabled()) {
+getLog().trace(sm.getString("ajpprotocol.getattribute", key));
+}
+return attributes.get(key);
+}
+
+
+@Override
+public Iterator getAttributeNames() {
+return attributes.keySet().iterator();
+}
+
+/**
+ * Set a property.
+ */
+public boolean setProperty(String name, String value) {
+setAttribute(name, value); //store all settings
+if ( name!=null && (name.startsWith("socket.") 
||name.startsWith("selectorPool.")) ){
+return endpoint.setProperty(name, value);
+} else {
+return endpoint.setProperty(name,value); //make sure we at least 
try to set all properties
+}
+
+}
+
+/**
+ * Get a property
+ */
+public String getProperty(String name) {
+return (String)getAttribute(name);
+}
+
+/**
+ * The adapter, used to call the connector
+ */
+@Override
+public void setAdapter(Adapter adapter) {
+this.adapter = adapter;
+}
+
+
+@Override
+public Adapter getAdapter() {
+return adapter;
+}
+
+@Override
+public void pause() throws Exception {
+try {
+endpoint.pause();
+} catch (Exception ex) {
+getLog().error(sm.getString("ajpprotocol.endpoint.pauseerror"), 
ex);
+throw ex;
+}
+if (getLog().isInfoEnabled())
+getLog().info(sm.getString("ajpprotocol.pause", getName()));
+}
+
+@Override
+public

svn commit: r1005379 - in /tomcat/trunk: java/org/apache/tomcat/util/net/AbstractEndpoint.java webapps/docs/changelog.xml

2010-10-07 Thread kfujino
Author: kfujino
Date: Thu Oct  7 09:19:00 2010
New Revision: 1005379

URL: http://svn.apache.org/viewvc?rev=1005379&view=rev
Log:
Set not maxThreads  but minSpareThreads to corePoolSize, if 
AbstractEndpoint.setMinSpareThreads is called.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1005379&r1=1005378&r2=1005379&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Thu Oct  
7 09:19:00 2010
@@ -233,7 +233,7 @@ public abstract class AbstractEndpoint {
 this.minSpareThreads = minSpareThreads;
 if (running && executor!=null) {
 if (executor instanceof java.util.concurrent.ThreadPoolExecutor) {
-
((java.util.concurrent.ThreadPoolExecutor)executor).setCorePoolSize(maxThreads);
+
((java.util.concurrent.ThreadPoolExecutor)executor).setCorePoolSize(minSpareThreads);
 } else if (executor instanceof ResizableExecutor) {
 ((ResizableExecutor)executor).resizePool(minSpareThreads, 
maxThreads);
 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1005379&r1=1005378&r2=1005379&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Oct  7 09:19:00 2010
@@ -87,6 +87,10 @@
 50054: Correctly handle the setting of minSpareThreads in 
 AJP connector. (kfujino) 
   
+  
+Set not maxThreads  but minSpareThreads to corePoolSize, if 
+AbstractEndpoint.setMinSpareThreads is called. (kfujino) 
+  
 
   
   



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



DO NOT REPLY [Bug 50054] When the AJP connector is used, minSpareThreads cannot be used.

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50054

Keiichi Fujino  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Keiichi Fujino  2010-10-07 05:24:47 EDT 
---
Fixed in trunk and will be in 7.0.4 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r1005400 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/Context.java

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 10:35:52 2010
New Revision: 1005400

URL: http://svn.apache.org/viewvc?rev=1005400&view=rev
Log:
CTR: Fix comments.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/Context.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/Context.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/Context.java?rev=1005400&r1=1005399&r2=1005400&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/Context.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/Context.java Thu Oct  7 
10:35:52 2010
@@ -1095,10 +1095,6 @@ public interface Context extends Contain
  * @param xmlNamespaceAware true to enable namespace awareness
  */
 public void setXmlNamespaceAware(boolean xmlNamespaceAware);
-/**
- * Get the server.xml  attribute's xmlValidation.
- * @return true if validation is enabled.
- */
  
 
 /**
@@ -1110,9 +1106,9 @@ public interface Context extends Contain
 
 
 /**
- * Get the server.xml  attribute's webXmlValidation.
+ * Get the validation feature of the XML parser used when
+ * parsing tlds files. 
  * @return true if validation is enabled.
- *
  */
 public boolean getTldValidation();
 
@@ -1130,7 +1126,5 @@ public interface Context extends Contain
  * @param tldNamespaceAware true to enable namespace awareness
  */
 public void setTldNamespaceAware(boolean tldNamespaceAware);
-
-
 }
 



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



DO NOT REPLY [Bug 49811] [PATCH] Disable UrlRewriting

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49811

Mark Thomas  changed:

   What|Removed |Added

  Attachment #26018|0   |1
is obsolete||

--- Comment #15 from Mark Thomas  2010-10-07 06:56:09 EDT ---
Created an attachment (id=26135)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26135)
Updated patch

I have reviewed the patch and made a couple of changes. The updated patch is
attached. I'll propose this updated patch for 6.0x. shortly.

The changes include: tabs -> 4 spaces, corrected mbean descriptor (also place
in alphabetical order), shortened very long lines, "specifications" ->
"specification" in the JavaDoc, in-lined a couple of methods where I felt it
aided clarity.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r1005407 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 10:57:24 2010
New Revision: 1005407

URL: http://svn.apache.org/viewvc?rev=1005407&view=rev
Log:
Proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1005407&r1=1005406&r2=1005407&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Oct  7 10:57:24 2010
@@ -245,3 +245,10 @@ PATCHES PROPOSED TO BACKPORT:
   (Port of http://svn.apache.org/viewvc?view=revision&revision=920820)
   +1: markt
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49811
+  Add context option to disable URL re-writing and session parsing from URLs
+  Based on a patch by Wesley.
+  https://issues.apache.org/bugzilla/attachment.cgi?id=26135
+  +1: markt
+  -1:



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



svn commit: r1005411 - in /tomcat/tc6.0.x/trunk: ./ STATUS.txt java/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java java/org/apache/catalina/tribes/util/TcclThreadFacto

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 11:06:38 2010
New Revision: 1005411

URL: http://svn.apache.org/viewvc?rev=1005411&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49905
Prevent memory leak when using async session replication

Added:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/util/TcclThreadFactory.java
  - copied, changed from r1003572, 
tomcat/trunk/java/org/apache/catalina/tribes/util/TcclThreadFactory.java
Modified:
tomcat/tc6.0.x/trunk/   (props changed)
tomcat/tc6.0.x/trunk/STATUS.txt

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc6.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct  7 11:06:38 2010
@@ -1 +1 @@
-/tomcat/trunk:601180,606992,612607,630314,640888,652744,653247,666232,673796,673820,677910,683969,683982,684001,684081,684234,684269-684270,685177,687503,687645,689402,690781,691392,691805,692748,693378,694992,695053,695311,696780,696782,698012,698227,698236,698613,699427,699634,701355,709294,709811,709816,710063,710066,710125,710205,711126,711600,712461,712467,713953,714002,718360,719119,719124,719602,719626,719628,720046,720069,721040,721286,721708,721886,723404,723738,726052,727303,728032,728768,728947,729057,729567,729569,729571,729681,729809,729815,729934,730250,730590,731651,732859,732863,734734,740675,740684,742677,742697,742714,744160,744238,746321,746384,746425,747834,747863,748344,750258,750291,750921,751286-751287,751289,751295,752323,753039,757335,757774,758249,758365,758596,758616,758664,759074,761601,762868,762929,762936-762937,763166,763183,763193,763228,763262,763298,763302,763325,763599,763611,763654,763681,763706,764985,764997,765662,768335,769979,770716,77
 
0809,770876,772872,776921,776924,776935,776945,777464,777466,777576,777625,778379,778523-778524,781528,781779,782145,782791,783316,783696,783724,783756,783762,783766,783863,783934,784453,784602,784614,785381,785688,785768,785859,786468,786487,786490,786496,786667,787627,787770,787985,789389,790405,791041,791184,791194,791224,791243,791326,791328,791789,792740,793372,793757,793882,793981,794082,794673,794822,795043,795152,795210,795457,795466,797168,797425,797596,797607,802727,802940,804462,804544,804734,805153,809131,809603,810916,810977,812125,812137,812432,813001,813013,813866,814180,814708,814876,815972,816252,817442,817822,819339,819361,820110,820132,820874,820954,821397,828196,828201,828210,828225,828759,830378-830379,830999,831106,831774,831785,831828,831850,831860,832214,832218,833121,833545,834047,835036,835336,836405,881396,881412,883130,883134,883146,883165,883177,883362,883565,884341,885038,885231,885241,885260,885901,885991,886019,888072,889363,889606,889716,8901
 
39,890265,890349-890350,890417,891185-891187,891583,892198,892341,892415,892464,892555,892812,892814,892817,892843,892887,893321,893493,894580,894586,894805,894831,895013,895045,895057,895191,895392,895703,896370,896384,897380-897381,897776,898126,898256,898468,898527,898555,898558,898718,898836,898906,899284,899348,899420,899653,899769-899770,899783,899788,899792,899916,899918-899919,899935,899949,903916,905020,905151,905722,905728,905735,907311,907513,907538,907652,907819,907825,907864,908002,908721,908754,908759,909097,909206,909212,909525,909636,909869,909875,909887,910266,910370,910442,910471,910485,910974,915226,915737,915861,916097,916141,916157,916170,917598,917633,918093,918489,918594,918684,918787,918792,918799,918803,918885,919851,919914,920025,920055,920298,920449,920596,920824,920840,921444,922010,926716,927062,927621,928482,928695,928732,928798,931709,932357,932967,935105,935983,939491,939551,940064,941356,941463,944409,944416,945231,945808,945835,945841,946686
 
,948057,950164,950596,950614,950851,950905,951615,953434,954435,955648,955655,956832,957130,957830,958192,960701,963868,964614,966177-966178,966292,966692,981815,991837,993042,1002185,1002263,1002349,1002359,1002362,1002481,1002514,1003481,1003488,1003556,1003581,1003861
+/tomcat/trunk:601180,606992,612607,630314,640888,652744,653247,666232,673796,673820,677910,683969,683982,684001,684081,684234,684269-684270,685177,687503,687645,689402,690781,691392,691805,692748,693378,694992,695053,695311,696780,696782,698012,698227,698236,698613,699427,699634,701355,709294,709811,709816,710063,710066,710125,710205,711126,711600,712461,712467,713953,714002,718360,719119,719124,719602,719626,719628,720046,720069,721040,721286,721708,721886,723404,723738,726052,727303,728032,728768,728947,729057,729567,729569,729571,729681,729809,729815,729934,730250,730590,731651,732859,732863,734734,740675,740684,742677,742697,742714,744160,744238,746321,746384,746425,747834,747863,748344,750258,750291,750921,751286-751287,751289,751295,752323,753039,757335,757774,758249,758365,758596,758616,758664,759074,761601,762868,762929,76293

DO NOT REPLY [Bug 49905] In cluster, when using DeltaManager memory leak can occur

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49905

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Mark Thomas  2010-10-07 07:06:56 EDT ---
This has been fixed in 6.0.x and will be included in 6.0.30 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 48716] Embedded Tomcat JULI aggressively resetting default logging configuration

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48716

--- Comment #13 from Richard Evans  2010-10-07 
08:29:10 EDT ---
I agree with the analysis in the previous comment.  All the loggers in the VM
are being reset.

There is a property clearReferencesLogFactoryRelease in the WebappClassLoader
but I cannot find any way to set it in server.xml.  It is not recognized on the
Context or Loader elements.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 48716] Embedded Tomcat JULI aggressively resetting default logging configuration

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48716

--- Comment #14 from Mark Thomas  2010-10-07 09:27:45 EDT ---
The standard LogManager can't be used with Tomcat. If it is used, then a range
of problems will occur including logger mix-ups and memory leaks. The
expectation is that JULI's LogManager is used.

The assumption is that in the rare scenarios where it is safe to use the
standard LogManager (and I suspect there are very, very few of these) they
would be embedded scenarios where clearReferencesLogFactoryRelease could be set
this directly on the class loader. In a standard Tomcat install setting this
option will cause nothing but problems.

The property could be exposed on the Context but I'm reluctant to expose an
option that has no upside. If there was a valid use case for setting this in a
standard Tomcat install then an enhancement request to that effect would be
considered but right now I don't see a valid use case.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 50057] New: jstl implement 1.1.2 functions endsWith logic wrong

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50057

   Summary: jstl implement 1.1.2 functions endsWith logic wrong
   Product: Taglibs
   Version: 1.1.0
  Platform: PC
Status: NEW
  Severity: minor
  Priority: P2
 Component: Standard Taglib
AssignedTo: dev@tomcat.apache.org
ReportedBy: bingqi...@126.com


the endsWith function's logic causes ${fn:endsWith('00', '0')} returns false.
It's obviously wrong.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



[Tomcat Wiki] Update of "PoweredBy" by Prosch

2010-10-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "PoweredBy" page has been changed by Prosch.
http://wiki.apache.org/tomcat/PoweredBy?action=diff&rev1=268&rev2=269

--

  
  === TheServerSide.com ===
  {{http://www.theserverside.com/skin/images/header_logotype.gif}} 
[[http://www.theserverside.com/tss?service=direct/0/NewsThread/threadViewer.markNoisy.link&sp=l28395&sp=l136428|Tomcat
 is among the market leaders]] in this survey by 
[[http://www.theserverside.com|TheServerSide.com]].
+ 
+ === Translation agency ===
+ [[http://www.profischnell.com|Übersetzung Polnisch Deutsch]] Translation 
agency for all languages e. g. spanish, french. (Multilanguages)
  
  <>
  

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



svn commit: r1005452 - /tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 14:05:51 2010
New Revision: 1005452

URL: http://svn.apache.org/viewvc?rev=1005452&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49972
Address potential thread safety issues.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java?rev=1005452&r1=1005451&r2=1005452&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/FastHttpDateFormat.java Thu 
Oct  7 14:05:51 2010
@@ -36,28 +36,28 @@ public final class FastHttpDateFormat {
 // -- Variables
 
 
-protected static final int CACHE_SIZE = 
+private static final int CACHE_SIZE = 
 
Integer.parseInt(System.getProperty("org.apache.tomcat.util.http.FastHttpDateFormat.CACHE_SIZE",
 "1000"));
 
 
 /**
  * HTTP date format.
  */
-protected static final SimpleDateFormat format = 
+private static final SimpleDateFormat format = 
 new SimpleDateFormat("EEE, dd MMM  HH:mm:ss zzz", Locale.US);
 
 
 /**
  * The set of SimpleDateFormat formats to use in getDateHeader().
  */
-protected static final SimpleDateFormat formats[] = {
+private static final SimpleDateFormat formats[] = {
 new SimpleDateFormat("EEE, dd MMM  HH:mm:ss zzz", Locale.US),
 new SimpleDateFormat("EE, dd-MMM-yy HH:mm:ss zzz", Locale.US),
 new SimpleDateFormat("EEE  d HH:mm:ss ", Locale.US)
 };
 
 
-protected final static TimeZone gmtZone = TimeZone.getTimeZone("GMT");
+private static final TimeZone gmtZone = TimeZone.getTimeZone("GMT");
 
 
 /**
@@ -77,26 +77,26 @@ public final class FastHttpDateFormat {
 /**
  * Instant on which the currentDate object was generated.
  */
-protected static long currentDateGenerated = 0L;
+private static volatile long currentDateGenerated = 0L;
 
 
 /**
  * Current formatted date.
  */
-protected static String currentDate = null;
+private static String currentDate = null;
 
 
 /**
  * Formatter cache.
  */
-protected static final ConcurrentHashMap formatCache = 
+private static final ConcurrentHashMap formatCache = 
 new ConcurrentHashMap(CACHE_SIZE);
 
 
 /**
  * Parser cache.
  */
-protected static final ConcurrentHashMap parseCache = 
+private static final ConcurrentHashMap parseCache = 
 new ConcurrentHashMap(CACHE_SIZE);
 
 
@@ -112,8 +112,8 @@ public final class FastHttpDateFormat {
 if ((now - currentDateGenerated) > 1000) {
 synchronized (format) {
 if ((now - currentDateGenerated) > 1000) {
-currentDateGenerated = now;
 currentDate = format.format(new Date(now));
+currentDateGenerated = now;
 }
 }
 }



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



svn commit: r1005453 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 14:07:07 2010
New Revision: 1005453

URL: http://svn.apache.org/viewvc?rev=1005453&view=rev
Log:
Proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1005453&r1=1005452&r2=1005453&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Oct  7 14:07:07 2010
@@ -246,3 +246,9 @@ PATCHES PROPOSED TO BACKPORT:
   https://issues.apache.org/bugzilla/attachment.cgi?id=26135
   +1: markt
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49972
+  Potential thread safety issues in FastHttpDateFormat
+  http://svn.apache.org/viewvc?rev=1005452&view=rev
+  +1: markt
+  -1:



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



DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972

--- Comment #9 from Mark Thomas  2010-10-07 10:07:22 EDT ---
Fixed in trunk and proposed for 6.0.x

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r1005457 - /tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 14:13:44 2010
New Revision: 1005457

URL: http://svn.apache.org/viewvc?rev=1005457&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49978
Don't try to create directories that already exist

Modified:
tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java

Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java?rev=1005457&r1=1005456&r2=1005457&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java (original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java Thu Oct  7 
14:13:44 2010
@@ -884,9 +884,11 @@ public class WebappLoader extends Lifecy
 } else {
 
 classRepository = new File(workDir, classesPath);
-if (!classRepository.mkdirs())
-throw new IOException(
-sm.getString("webappLoader.mkdirFailure"));
+if (!classRepository.isDirectory()) {
+if (!classRepository.mkdirs())
+throw new IOException(
+sm.getString("webappLoader.mkdirFailure"));
+}
 if (!copyDir(classes, classRepository)) {
 throw new IOException(
 sm.getString("webappLoader.copyFailure"));
@@ -934,9 +936,11 @@ public class WebappLoader extends Lifecy
 } else {
 copyJars = true;
 destDir = new File(workDir, libPath);
-if (!destDir.mkdirs())
-throw new IOException(
-sm.getString("webappLoader.mkdirFailure"));
+if (!destDir.isDirectory()) {
+if (!destDir.mkdirs())
+throw new IOException(
+sm.getString("webappLoader.mkdirFailure"));
+}
 }
 
 // Looking up directory /WEB-INF/lib in the context



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



svn commit: r1005458 - in /tomcat/trunk/java/org/apache/coyote/ajp: AjpAprProtocol.java AjpProtocol.java

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 14:21:11 2010
New Revision: 1005458

URL: http://svn.apache.org/viewvc?rev=1005458&view=rev
Log:
Fix import order

Modified:
tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1005458&r1=1005457&r2=1005458&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Thu Oct  7 
14:21:11 2010
@@ -31,9 +31,9 @@ import org.apache.juli.logging.LogFactor
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.net.AprEndpoint;
+import org.apache.tomcat.util.net.AprEndpoint.Handler;
 import org.apache.tomcat.util.net.SocketStatus;
 import org.apache.tomcat.util.net.SocketWrapper;
-import org.apache.tomcat.util.net.AprEndpoint.Handler;
 
 
 /**

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=1005458&r1=1005457&r2=1005458&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Thu Oct  7 
14:21:11 2010
@@ -31,11 +31,11 @@ import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.modeler.Registry;
+import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.net.JIoEndpoint;
+import org.apache.tomcat.util.net.JIoEndpoint.Handler;
 import org.apache.tomcat.util.net.SocketStatus;
 import org.apache.tomcat.util.net.SocketWrapper;
-import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
-import org.apache.tomcat.util.net.JIoEndpoint.Handler;
 
 
 /**



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



svn commit: r1005459 - /tomcat/trunk/webapps/docs/changelog.xml

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 14:21:55 2010
New Revision: 1005459

URL: http://svn.apache.org/viewvc?rev=1005459&view=rev
Log:
Couple of updates.

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1005459&r1=1005458&r2=1005459&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Oct  7 14:21:55 2010
@@ -75,6 +75,12 @@
 cleared all work directories (with compiled JSPs and persisted 
sessions)
 when Tomcat was stopped. (markt)
   
+  
+49978: Correctly handle the case when a directory expected
+to be created during web application start is already present. Rather
+than throwing an exception and failing to start, allow thw web
+application to start normally. (mark)
+  
 
   
   
@@ -84,11 +90,15 @@
 to ensure APR connector shuts down properly. (mturk) 
   
   
+49972: Fix potential thread safe issue when formatting dates
+for us in HTTP headers. (markt)
+  
+  
 50054: Correctly handle the setting of minSpareThreads in 
 AJP connector. (kfujino) 
   
   
-Set not maxThreads  but minSpareThreads to corePoolSize, if 
+Set not maxThreads but minSpareThreads to corePoolSize, if 
 AbstractEndpoint.setMinSpareThreads is called. (kfujino) 
   
 



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



DO NOT REPLY [Bug 49978] WebappLoader throws exception if workDir already exists (when unpackWARs=false)

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49978

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mark Thomas  2010-10-07 10:22:32 EDT ---
Fixed in trunk and will be in 7.0.4 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r1005461 - /tomcat/trunk/webapps/docs/changelog.xml

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 14:25:43 2010
New Revision: 1005461

URL: http://svn.apache.org/viewvc?rev=1005461&view=rev
Log:
Add bug reference - looks like this one was reported and fixed independently.

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1005461&r1=1005460&r2=1005461&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Oct  7 14:25:43 2010
@@ -94,12 +94,13 @@
 for us in HTTP headers. (markt)
   
   
-50054: Correctly handle the setting of minSpareThreads in 
-AJP connector. (kfujino) 
+50003: Set not maxThreads but minSpareThreads to
+corePoolSize, if AbstractEndpoint.setMinSpareThreads is called.
+(kfujino) 
   
   
-Set not maxThreads but minSpareThreads to corePoolSize, if 
-AbstractEndpoint.setMinSpareThreads is called. (kfujino) 
+50054: Correctly handle the setting of minSpareThreads in 
+AJP connector. (kfujino) 
   
 
   



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



DO NOT REPLY [Bug 50003] AbstractEndpoint.setMinSpareThreads calls executor.setCorePoolSize with incorrect parameter

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50003

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Mark Thomas  2010-10-07 10:26:31 EDT ---
This was spotted and fixed as part of work on another issue. The fix will be in
7.0.4 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r1005465 - in /tomcat/trunk/java/org/apache/jasper/servlet: JspCServletContext.java JspServlet.java

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 14:32:29 2010
New Revision: 1005465

URL: http://svn.apache.org/viewvc?rev=1005465&view=rev
Log:
Fix warnings

Modified:
tomcat/trunk/java/org/apache/jasper/servlet/JspCServletContext.java
tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java

Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspCServletContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspCServletContext.java?rev=1005465&r1=1005464&r2=1005465&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/servlet/JspCServletContext.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/servlet/JspCServletContext.java Thu Oct 
 7 14:32:29 2010
@@ -104,6 +104,7 @@ public class JspCServletContext implemen
  *
  * @param name Name of the requested attribute
  */
+@Override
 public Object getAttribute(String name) {
 
 return (myAttributes.get(name));
@@ -114,6 +115,7 @@ public class JspCServletContext implemen
 /**
  * Return an enumeration of context attribute names.
  */
+@Override
 public Enumeration getAttributeNames() {
 
 return (myAttributes.keys());
@@ -126,6 +128,7 @@ public class JspCServletContext implemen
  *
  * @param uripath Server-relative path starting with '/'
  */
+@Override
 public ServletContext getContext(String uripath) {
 
 return (null);
@@ -136,6 +139,7 @@ public class JspCServletContext implemen
 /**
  * Return the context path.
  */
+@Override
 public String getContextPath() {
 
 return (null);
@@ -148,6 +152,7 @@ public class JspCServletContext implemen
  *
  * @param name Name of the requested parameter
  */
+@Override
 public String getInitParameter(String name) {
 
 return (null);
@@ -159,6 +164,7 @@ public class JspCServletContext implemen
  * Return an enumeration of the names of context initialization
  * parameters.
  */
+@Override
 public Enumeration getInitParameterNames() {
 
 return (new Vector().elements());
@@ -169,6 +175,7 @@ public class JspCServletContext implemen
 /**
  * Return the Servlet API major version number.
  */
+@Override
 public int getMajorVersion() {
 
 return (3);
@@ -181,6 +188,7 @@ public class JspCServletContext implemen
  *
  * @param file Filename whose MIME type is requested
  */
+@Override
 public String getMimeType(String file) {
 
 return (null);
@@ -191,6 +199,7 @@ public class JspCServletContext implemen
 /**
  * Return the Servlet API minor version number.
  */
+@Override
 public int getMinorVersion() {
 
 return (0);
@@ -203,6 +212,7 @@ public class JspCServletContext implemen
  *
  * @param name Name of the requested servlet
  */
+@Override
 public RequestDispatcher getNamedDispatcher(String name) {
 
 return (null);
@@ -216,6 +226,7 @@ public class JspCServletContext implemen
  *
  * @param path The context-relative virtual path to resolve
  */
+@Override
 public String getRealPath(String path) {
 
 if (!myResourceBaseURL.getProtocol().equals("file"))
@@ -238,6 +249,7 @@ public class JspCServletContext implemen
  *
  * @param path Context-relative path for which to acquire a dispatcher
  */
+@Override
 public RequestDispatcher getRequestDispatcher(String path) {
 
 return (null);
@@ -254,6 +266,7 @@ public class JspCServletContext implemen
  * @exception MalformedURLException if the resource path is
  *  not properly formed
  */
+@Override
 public URL getResource(String path) throws MalformedURLException {
 
 if (!path.startsWith("/"))
@@ -286,6 +299,7 @@ public class JspCServletContext implemen
  *
  * @param path Context-relative path of the desired resource
  */
+@Override
 public InputStream getResourceAsStream(String path) {
 
 try {
@@ -304,6 +318,7 @@ public class JspCServletContext implemen
  *
  * @param path Context-relative base path
  */
+@Override
 public Set getResourcePaths(String path) {
 
 Set thePaths = new HashSet();
@@ -331,6 +346,7 @@ public class JspCServletContext implemen
 /**
  * Return descriptive information about this server.
  */
+@Override
 public String getServerInfo() {
 
 return ("JspCServletContext/1.0");
@@ -345,6 +361,7 @@ public class JspCServletContext implemen
  *
  * @deprecated This method has been deprecated with no replacement
  */
+@Override
 @Deprecated
 public Servlet getServlet(String name) throws ServletException {
 
@@ -356,6 +373,7 @@ public class JspCServletContext implemen
 /**
  * Return the name of this servlet context.
  */
+@Override
 public String getServletContextName() {
 
 

svn commit: r1005467 - /tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 14:34:29 2010
New Revision: 1005467

URL: http://svn.apache.org/viewvc?rev=1005467&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49986
Thread safety issues in JSP reload process. (timw)

Modified:
tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java

Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java?rev=1005467&r1=1005466&r2=1005467&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java Thu Oct  
7 14:34:29 2010
@@ -79,11 +79,13 @@ public class JspServletWrapper {
 private ServletConfig config;
 private Options options;
 private boolean firstTime = true;
-private boolean reload = true;
+/** Whether the servlet needs reloading on next access */
+private volatile boolean reload = true;
 private boolean isTagFile;
 private int tripCount;
 private JasperException compileException;
-private long servletClassLastModifiedTime;
+/** Timestamp of last time servlet resource was modified */
+private volatile long servletClassLastModifiedTime;
 private long lastModificationTest = 0L;
 private Entry ticket;
 
@@ -131,6 +133,9 @@ public class JspServletWrapper {
 }
 
 public Servlet getServlet() throws ServletException {
+// DCL on 'reload' requires that 'reload' be volatile
+// (this also forces a read memory barrier, ensuring the 
+// new servlet object is read consistently)
 if (reload) {
 synchronized (this) {
 // Synchronizing on jsw enables simultaneous loading
@@ -139,7 +144,7 @@ public class JspServletWrapper {
 // This is to maintain the original protocol.
 destroy();
 
-Servlet servlet = null;
+final Servlet servlet;
 
 try {
 InstanceManager instanceManager = 
InstanceManagerFactory.getInstanceManager(config);
@@ -160,6 +165,7 @@ public class JspServletWrapper {
 
 theServlet = servlet;
 reload = false;
+// Volatile 'reload' forces in order write of 'theServlet' 
and new servlet object
 }
 }
 }
@@ -186,6 +192,9 @@ public class JspServletWrapper {
  * @param lastModified Last-modified time of servlet class
  */
 public void setServletClassLastModifiedTime(long lastModified) {
+// DCL requires servletClassLastModifiedTime be volatile
+// to force read and write barriers on access/set
+// (and to get atomic write of long)
 if (this.servletClassLastModifiedTime < lastModified) {
 synchronized (this) {
 if (this.servletClassLastModifiedTime < lastModified) {



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



svn commit: r1005468 - /tomcat/trunk/webapps/docs/changelog.xml

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 14:35:27 2010
New Revision: 1005468

URL: http://svn.apache.org/viewvc?rev=1005468&view=rev
Log:
Add latest fix

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1005468&r1=1005467&r2=1005468&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Oct  7 14:35:27 2010
@@ -107,6 +107,9 @@
   
 
   
+49986: Fix thread safety issue for JSP reload. (timw)
+  
+  
 49998: Make jsp:root detection work with single quoted
 attributes as well. (timw)
   



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



svn commit: r1005469 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 14:36:32 2010
New Revision: 1005469

URL: http://svn.apache.org/viewvc?rev=1005469&view=rev
Log:
Proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1005469&r1=1005468&r2=1005469&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Oct  7 14:36:32 2010
@@ -252,3 +252,9 @@ PATCHES PROPOSED TO BACKPORT:
   http://svn.apache.org/viewvc?rev=1005452&view=rev
   +1: markt
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49986
+  Thread safety for JSP reload.
+  http://svn.apache.org/viewvc?rev=1005467&view=rev (timw)
+  +1: markt
+  -1:



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



DO NOT REPLY [Bug 49986] Double-check locking. Possible data-race in JspServletWrapper

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49986

Mark Thomas  changed:

   What|Removed |Added

  Component|Jasper  |Jasper
Version|trunk   |6.0.29
Product|Tomcat 7|Tomcat 6
   Target Milestone|--- |default

--- Comment #5 from Mark Thomas  2010-10-07 10:37:07 EDT ---
Fixed in trunk and will be in 7.0.4 onwards.

Proposed for 6.0.x.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 48716] Embedded Tomcat JULI aggressively resetting default logging configuration

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48716

--- Comment #15 from Henning Blohm  2010-10-07 
10:41:50 EDT ---
(In reply to comment #14)
> The standard LogManager can't be used with Tomcat. If it is used, then a range
> of problems will occur including logger mix-ups and memory leaks. The
> expectation is that JULI's LogManager is used.
> 
> The assumption is that in the rare scenarios where it is safe to use the
> standard LogManager (and I suspect there are very, very few of these) they
> would be embedded scenarios where clearReferencesLogFactoryRelease could be 
> set
> this directly on the class loader. In a standard Tomcat install setting this
> option will cause nothing but problems.
> 
> The property could be exposed on the Context but I'm reluctant to expose an
> option that has no upside. If there was a valid use case for setting this in a
> standard Tomcat install then an enhancement request to that effect would be
> considered but right now I don't see a valid use case.

Mark, 

your comments on this issue are truely irritating. There are people that really
want to use the standard log manager. I want to. Registering application level
log handlers is the exception. Let people handle it.

The way it is handled now breaks the use of the standard LogManager - which is
none of Tomcat's business. We will certainly not make JULI the underpinning of
our infrastructure (that could - but as it stands will not - embed Tomcat) just
because you don't like the standard LogManager.

Those mixups and memory leaks are mostly insignifcant to the development
scenario and much less so in production scenarios - supposing you hit the
problem at all. Imposing JULI on the world just to be right is not reasonable.

Henning

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



Re: Missing AL headers in tomcat-trunk

2010-10-07 Thread sebb
On 7 October 2010 01:51, Tim Whittington  wrote:
>> res/ide-support/eclipse/start.launch
>> res/ide-support/eclipse/stop.launch
>
> These 2 files have licenses in them, the same as the eclipse.* files
> in the same directory. Detection fail?

Sorry, these were left-over files from my testing (they aren't
actually in SVN - the files there are called
(start|stop)-tomcat.launch)

>> test/org/apache/coyote/http11/TestAbstractHttp11Processor.java
>> test/org/apache/coyote/http11/TestGzipOutputFilter.java
>> test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java
>
> Fixed
>
>> [Also, tomcat-lite has lots of missing headers]
>
> Eeek
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

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



svn commit: r1005486 - /tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 15:12:21 2010
New Revision: 1005486

URL: http://svn.apache.org/viewvc?rev=1005486&view=rev
Log:
Fix some failing tests. No regression in Tomcat/Jasper, just need to take 
account of changes in test framework.

Modified:
tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java

Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java?rev=1005486&r1=1005485&r2=1005486&view=diff
==
--- tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java Thu Oct  7 
15:12:21 2010
@@ -24,6 +24,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagData;
 import javax.servlet.jsp.tagext.TagExtraInfo;
@@ -75,15 +77,10 @@ public class TestGenerator extends Tomca
 
 tomcat.start();
 
-Exception e = null;
-try {
-getUrl("http://localhost:"; + getPort() + 
"/test/bug45nnn/bug45015b.jsp");
-} catch (IOException ioe) {
-e = ioe;
-}
-
-// Failure is expected
-assertNotNull(e);
+int rc = getUrl("http://localhost:"; + getPort() +
+"/test/bug45nnn/bug45015b.jsp", new ByteChunk(), null);
+
+assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
 }
 
 public void testBug45015c() throws Exception {
@@ -96,15 +93,10 @@ public class TestGenerator extends Tomca
 
 tomcat.start();
 
-Exception e = null;
-try {
-getUrl("http://localhost:"; + getPort() + 
"/test/bug45nnn/bug45015c.jsp");
-} catch (IOException ioe) {
-e = ioe;
-}
-
-// Failure is expected
-assertNotNull(e);
+int rc = getUrl("http://localhost:"; + getPort() +
+"/test/bug45nnn/bug45015c.jsp", new ByteChunk(), null);
+
+assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
 }
 
 public void testBug48701Fail() throws Exception {
@@ -122,15 +114,10 @@ public class TestGenerator extends Tomca
 
 tomcat.start();
 
-Exception e = null;
-try {
-getUrl("http://localhost:"; + getPort() + 
"/test/bug48nnn/bug48701-fail.jsp");
-} catch (IOException ioe) {
-e = ioe;
-}
-
-// Failure is expected
-assertNotNull(e);
+int rc = getUrl("http://localhost:"; + getPort() +
+"/test/bug48nnn/bug48701-fail.jsp", new ByteChunk(), null);
+
+assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
 }
 
 public void testBug48701UseBean() throws Exception {



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



svn commit: r1005493 - in /tomcat/trunk/test/org/apache/jasper/compiler: TestJspDocumentParser.java TestValidator.java

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 15:33:46 2010
New Revision: 1005493

URL: http://svn.apache.org/viewvc?rev=1005493&view=rev
Log:
Fix some failing tests. No regression in Tomcat/Jasper, just need to take 
account of changes in test framework.

Modified:
tomcat/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java
tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java

Modified: 
tomcat/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java?rev=1005493&r1=1005492&r2=1005493&view=diff
==
--- tomcat/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java 
(original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java Thu 
Oct  7 15:33:46 2010
@@ -20,8 +20,11 @@ package org.apache.jasper.compiler;
 import java.io.File;
 import java.io.IOException;
 
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.tomcat.util.buf.ByteChunk;
 
 public class TestJspDocumentParser extends TomcatBaseTest {
 
@@ -35,15 +38,10 @@ public class TestJspDocumentParser exten
 
 tomcat.start();
 
-Exception e = null;
-try {
-getUrl("http://localhost:"; + getPort() + "/test/bug47977.jspx");
-} catch (IOException ioe) {
-e = ioe;
-}
-
-// Failure is expected
-assertNotNull(e);
+int rc = getUrl("http://localhost:"; + getPort() +
+"/test/bug47977.jspx", new ByteChunk(), null);
+
+assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
 }
 
 public void testBug48827() throws Exception {

Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java?rev=1005493&r1=1005492&r2=1005493&view=diff
==
--- tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java Thu Oct  7 
15:33:46 2010
@@ -20,6 +20,7 @@ package org.apache.jasper.compiler;
 import java.io.File;
 import java.io.IOException;
 
+import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
 
@@ -39,15 +40,10 @@ public class TestValidator extends Tomca
 
 tomcat.start();
 
-Exception e = null;
-try {
-getUrl("http://localhost:"; + getPort() + "/test/bug47331.jsp");
-} catch (IOException ioe) {
-e = ioe;
-}
-
-// Failure is expected
-assertNotNull(e);
+int rc = getUrl("http://localhost:"; + getPort() +
+"/test/bug47331.jsp", new ByteChunk(), null);
+
+assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
 }
 
 



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



DO NOT REPLY [Bug 48716] Embedded Tomcat JULI aggressively resetting default logging configuration

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48716

--- Comment #16 from S. Ali Tokmen  2010-10-07 
14:27:23 EDT ---
(In reply to comment #15)
> Imposing JULI on the world just to be right is not reasonable.

I cannot agree more. Tomcat, as a Java application like any other, should NOT
be imposing a logger but rather reuse the existing logger.

(Bis repetita) The correct implementation for this memory leak avoiding
mechanism would, I guess, look like that:

To clean up all of the current Web application's loggers:

get all loggers' names
for each logger
get all handlers
for each handler
if the handler's class can be loaded using the WebAppClassLoader
   AND cannot be loaded using the WebAppClassLoader's parent
then
  remove this handler
else don't touch
  // that logger belongs to some other application
  // or to Tomcat itself

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 48716] Embedded Tomcat JULI aggressively resetting default logging configuration

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48716

--- Comment #17 from Mark Thomas  2010-10-07 17:21:52 EDT ---
(In reply to comment #16)
> (In reply to comment #15)
> > Imposing JULI on the world just to be right is not reasonable.
> 
> I cannot agree more. Tomcat, as a Java application like any other, should NOT
> be imposing a logger but rather reuse the existing logger.

That simply isn't an option.

This isn't about being right, neither is it about not liking the standard
LogManger, it is the result of long - and in some cases bitter - experience of
committers, contributors and users of the issues (memory leaks, locked JARs,
mixed up log messages) associated with log managers of all forms in the complex
class loader environment that is a Servlet container.

This isn't limited to the default LogManager implementation, if you look back
in the archives you'll find similar issues associated with commons logging and
- if memory server me correctly - log4j as well.

JULI was the Tomcat community's solution to these problems and it has worked
very well. There are far less class loader / memory leak / logging type issues
reported to the users list now than there were when I first got started on this
project. Like any code, JULI has had some bugs along the way but is now very
stable.

Like any requirement, support for working with the standard LogManager is going
be considered based on:
- how invasive any change is
- how many users are likely to use it
- the likelihood of it causing problems for users that turn into questions on
the users list.

This last point is a real concern in this case. Not using JULI would cause
potentially hard to diagnose problems for many users. The user's mailing list
doesn't need the extra questions.

Despite the tone of the previous comments (please try and remember the
committers are doing this because they enjoy it - people don't do things by
choice that aren't fun and this bug is heading rapidly towards not being fun),
I have been giving this some more thought.

A previous suggestion was to only call reset() if JULI was the LogManager. My
objection to that approach remains - it doesn't allow for alternative class
loader aware LogManager implementations. However, a slight variation of that
idea could work - call reset() unless the current LogManager is the standard
java.util.logging.LogManager. The downside is that unless exactly that
LogManager is used, reset() is still going to get called.

Would a change to LogFactory.release() that checked for
java.util.logging.LogManager and logged a warning rather than called reset() in
that case meet your requirements?

(Might have to skip logging a message - could get into circular dependency
issues)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r1005647 - in /tomcat/trunk: java/org/apache/catalina/core/ApplicationContext.java java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 21:53:55 2010
New Revision: 1005647

URL: http://svn.apache.org/viewvc?rev=1005647&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49987
Fix thread safety issue with population of servlet context initialization 
parameters.

Modified:
tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1005647&r1=1005646&r2=1005647&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Thu Oct  
7 21:53:55 2010
@@ -66,7 +66,6 @@ import org.apache.catalina.LifecycleStat
 import org.apache.catalina.Service;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.connector.Connector;
-import org.apache.catalina.deploy.ApplicationParameter;
 import org.apache.catalina.deploy.FilterDef;
 import org.apache.catalina.util.Enumerator;
 import org.apache.catalina.util.RequestUtil;
@@ -173,7 +172,8 @@ public class ApplicationContext
 /**
  * The merged context initialization parameters for this Context.
  */
-private Map parameters = null;
+private Map parameters =
+new ConcurrentHashMap();
 
 
 /**
@@ -317,10 +317,7 @@ public class ApplicationContext
  * @param name Name of the initialization parameter to retrieve
  */
 public String getInitParameter(final String name) {
-
-mergeParameters();
 return parameters.get(name);
-
 }
 
 
@@ -329,10 +326,7 @@ public class ApplicationContext
  * empty enumeration if the context has no initialization parameters.
  */
 public Enumeration getInitParameterNames() {
-
-mergeParameters();
 return (new Enumerator(parameters.keySet()));
-
 }
 
 
@@ -1215,9 +1209,6 @@ public class ApplicationContext
 
 @Override
 public boolean setInitParameter(String name, String value) {
-
-mergeParameters();
-
 if (parameters.containsKey(name)) {
 return false;
 }
@@ -1509,38 +1500,6 @@ public class ApplicationContext
 this.newServletContextListenerAllowed = allowed;
 }
 
-//  Private Methods
-
-
-/**
- * Merge the context initialization parameters specified in the application
- * deployment descriptor with the application parameters described in the
- * server configuration, respecting the override property of
- * the application parameters appropriately.
- */
-private void mergeParameters() {
-
-if (parameters != null)
-return;
-Map results = new ConcurrentHashMap();
-String names[] = context.findParameters();
-for (int i = 0; i < names.length; i++)
-results.put(names[i], context.findParameter(names[i]));
-ApplicationParameter params[] =
-context.findApplicationParameters();
-for (int i = 0; i < params.length; i++) {
-if (params[i].getOverride()) {
-if (results.get(params[i].getName()) == null)
-results.put(params[i].getName(), params[i].getValue());
-} else {
-results.put(params[i].getName(), params[i].getValue());
-}
-}
-parameters = results;
-
-}
-
-
 /**
  * List resource paths (recursively), and store all of them in the given
  * Set.

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1005647&r1=1005646&r2=1005647&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Thu Oct  7 
21:53:55 2010
@@ -4770,6 +4770,9 @@ public class StandardContext extends Con
 postWelcomeFiles();
 }
 
+// Set up the context init params
+mergeParameters();
+
 // Call ServletContainerInitializers
 for (Map.Entry>> entry :
 initializers.entrySet()) {
@@ -4896,6 +4899,36 @@ public class StandardContext extends Con
 }
 }
 
+
+
+/**
+ * Merge the context initialization parameters specified in the application
+ * deployment descriptor with the application parameters described in the
+ * server configuration, respecting the override property of
+ * the application parameters appropriately

svn commit: r1005649 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-10-07 Thread markt
Author: markt
Date: Thu Oct  7 21:55:48 2010
New Revision: 1005649

URL: http://svn.apache.org/viewvc?rev=1005649&view=rev
Log:
Proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1005649&r1=1005648&r2=1005649&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Oct  7 21:55:48 2010
@@ -258,3 +258,12 @@ PATCHES PROPOSED TO BACKPORT:
   http://svn.apache.org/viewvc?rev=1005467&view=rev (timw)
   +1: markt
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49987
+  Thread safety issue with population of servlet context initialization
+  parameters.
+  http://svn.apache.org/viewvc?rev=1005647&view=rev
+  +1: markt
+  -1:
+
+  
\ No newline at end of file



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



DO NOT REPLY [Bug 49987] Data race in ApplicationContext

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49987

--- Comment #2 from Mark Thomas  2010-10-07 17:56:06 EDT ---
Fixed in trunk and will be included in 7.0.4 onwards.

Proposed for 6.0.x

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



Re: svn commit: r1005647 - in /tomcat/trunk: java/org/apache/catalina/core/ApplicationContext.java java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml

2010-10-07 Thread sebb
On 7 October 2010 22:53,   wrote:
> Author: markt
> Date: Thu Oct  7 21:53:55 2010
> New Revision: 1005647
>
> URL: http://svn.apache.org/viewvc?rev=1005647&view=rev
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49987
> Fix thread safety issue with population of servlet context initialization 
> parameters.
>
> Modified:
>    tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java
>    tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
>    tomcat/trunk/webapps/docs/changelog.xml
>
> Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1005647&r1=1005646&r2=1005647&view=diff
> ==
> --- tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java 
> (original)
> +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Thu 
> Oct  7 21:53:55 2010
> @@ -66,7 +66,6 @@ import org.apache.catalina.LifecycleStat
>  import org.apache.catalina.Service;
>  import org.apache.catalina.Wrapper;
>  import org.apache.catalina.connector.Connector;
> -import org.apache.catalina.deploy.ApplicationParameter;
>  import org.apache.catalina.deploy.FilterDef;
>  import org.apache.catalina.util.Enumerator;
>  import org.apache.catalina.util.RequestUtil;
> @@ -173,7 +172,8 @@ public class ApplicationContext
>     /**
>      * The merged context initialization parameters for this Context.
>      */
> -    private Map parameters = null;
> +    private Map parameters =
> +        new ConcurrentHashMap();
>

Could/Should be final to ensure safe publication...

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



Domino Tomcat connector: I'd like to hire somebody to bring it back

2010-10-07 Thread Erik C. Brooks
Hello group,

I'd like to modernize the Domino Tomcat connector for Win64.  I've got a 
great Domino C developer here who has a lot of DSAPI experience.  I'm more 
than willing to pay, and would love to release it back to the community. 
Please contact me if interested at the email below.

Erik C. Brooks
Vice President, Lead Software Engineer
Archon Development Corp.
e...@archondev.com
T: +1 850-201-6400
F: +1 850-201-6404


DO NOT REPLY [Bug 50054] When the AJP connector is used, minSpareThreads cannot be used.

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50054

--- Comment #3 from STG  2010-10-07 19:20:07 EDT ---
(In reply to comment #2)
> Fixed in trunk and will be in 7.0.4 onwards.

i downloaded tomcat 7.0.4 lately and I still experiencing this issue. 


can someone advise me how to patch and test in my tomcat...

Oct 7, 2010 3:38:23 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false],
random [true].
Oct 7, 2010 3:38:23 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'minSpareThreads' to '25' did not find a matching property.
Oct 7, 2010 3:38:23 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'maxSpareThreads' to '75' did not find a matching property.
Oct 7, 2010 3:38:23 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'maxSpareThreads' to '75' did not find a matching property.
Oct 7, 2010 3:38:23 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'debug' to '0' did not find a matching property.
Oct 7, 2010 3:38:23 PM org.apache.coyote.http11.Http11AprProtocol init

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 50057] jstl implement 1.1.2 functions endsWith logic wrong

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50057

Jeremy Boynes  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE
 OS/Version||All

--- Comment #1 from Jeremy Boynes  2010-10-07 20:46:48 EDT 
---


*** This bug has been marked as a duplicate of bug 39284 ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 39284] fn:endsWith('abcda', 'a') returns false

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39284

Jeremy Boynes  changed:

   What|Removed |Added

 CC||bingqi...@126.com

--- Comment #4 from Jeremy Boynes  2010-10-07 20:46:48 EDT 
---
*** Bug 50057 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r1005686 - /tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/functions/TestFunctions.java

2010-10-07 Thread jboynes
Author: jboynes
Date: Fri Oct  8 00:52:27 2010
New Revision: 1005686

URL: http://svn.apache.org/viewvc?rev=1005686&view=rev
Log:
add test for bug #50057

Modified:

tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/functions/TestFunctions.java

Modified: 
tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/functions/TestFunctions.java
URL: 
http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/functions/TestFunctions.java?rev=1005686&r1=1005685&r2=1005686&view=diff
==
--- 
tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/functions/TestFunctions.java
 (original)
+++ 
tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/functions/TestFunctions.java
 Fri Oct  8 00:52:27 2010
@@ -30,6 +30,11 @@ import static org.apache.taglibs.standar
 public class TestFunctions {
 
 @Test
+public void testEndsWith() {
+Assert.assertTrue(endsWith("00", "0")); // verify bug 50057 was fixed
+}
+
+@Test
 public void testSubstring() {
 Assert.assertEquals("el", substring("Hello", 1, 3));
 Assert.assertEquals("", substring("Hello", 10, 0));



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



svn commit: r1005692 - in /tomcat/taglibs/standard/trunk/impl: ./ src/main/java/org/apache/taglibs/standard/resources/ src/test/java/org/apache/taglibs/standard/resources/

2010-10-07 Thread jboynes
Author: jboynes
Date: Fri Oct  8 01:20:19 2010
New Revision: 1005692

URL: http://svn.apache.org/viewvc?rev=1005692&view=rev
Log:
refactor Resources to use varargs

Added:

tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/resources/

tomcat/taglibs/standard/trunk/impl/src/test/java/org/apache/taglibs/standard/resources/TestResources.java
Modified:
tomcat/taglibs/standard/trunk/impl/pom.xml

tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/resources/Resources.java

tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/resources/Resources.properties

Modified: tomcat/taglibs/standard/trunk/impl/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/pom.xml?rev=1005692&r1=1005691&r2=1005692&view=diff
==
--- tomcat/taglibs/standard/trunk/impl/pom.xml (original)
+++ tomcat/taglibs/standard/trunk/impl/pom.xml Fri Oct  8 01:20:19 2010
@@ -156,6 +156,7 @@
   
 
org/apache/taglibs/standard/lang/jstl/test/StaticFunctionTests.java
 org/apache/taglibs/standard/TestVersion.java
+
org/apache/taglibs/standard/resources/TestResources.java
 
org/apache/taglibs/standard/tag/common/core/TestSetSupport.java
 
org/apache/taglibs/standard/tag/common/xml/TestTransformSupport.java
   

Modified: 
tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/resources/Resources.java
URL: 
http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/resources/Resources.java?rev=1005692&r1=1005691&r2=1005692&view=diff
==
--- 
tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/resources/Resources.java
 (original)
+++ 
tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/resources/Resources.java
 Fri Oct  8 01:20:19 2010
@@ -13,7 +13,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */ 
+ */
 
 package org.apache.taglibs.standard.resources;
 
@@ -24,104 +24,54 @@ import java.util.ResourceBundle;
 /**
  * Provides locale-neutral access to string resources.  Only the
  * documentation and code are in English. :-)
- *
+ * 
  * The major goal, aside from globalization, is convenience.
  * Access to resources with no parameters is made in the form:
  * 
  * Resources.getMessage(MESSAGE_NAME);
  * 
- *
+ * 
  * Access to resources with one parameter works like
  * 
  * Resources.getMessage(MESSAGE_NAME, arg1);
  * 
- *
+ * 
  * ... and so on.
  *
  * @author Shawn Bayern
  */
 public class Resources {
 
-//*
-// Static data
-
-/** The location of our resources. */
-private static final String RESOURCE_LOCATION
-   = "org.apache.taglibs.standard.resources.Resources";
-
-/** Our class-wide ResourceBundle. */
-private static ResourceBundle rb =
-   ResourceBundle.getBundle(RESOURCE_LOCATION);
+/**
+ * Our class-wide ResourceBundle.
+ */
+private static final ResourceBundle rb = 
ResourceBundle.getBundle(Resources.class.getName());
 
 
 //*
 // Public static methods
 
-/** Retrieves a message with no arguments. */
-public static String getMessage(String name)
-   throws MissingResourceException {
-   return rb.getString(name);
+/**
+ * Retrieves a message with no arguments.
+ *
+ * @param name the name of the message
+ * @return the localized message text
+ * @throws MissingResourceException if the message does not exist
+ */
+public static String getMessage(String name) throws 
MissingResourceException {
+return rb.getString(name);
+}
+
+/**
+ * Retrieves a message with arbitrarily many arguments.
+ *
+ * @param name the name of the message
+ * @param aarguments to be substituted into the message text
+ * @return the localized message text
+ * @throws MissingResourceException if the message does not exist
+ */
+public static String getMessage(String name, Object... a) throws 
MissingResourceException {
+String res = rb.getString(name);
+return MessageFormat.format(res, a);
 }
-
-/** Retrieves a message with arbitrarily many arguments. */
-public static String getMessage(String name, Object[] a)
-   throws MissingResourceException {
-   String res = rb.getString(name);
-   return MessageFormat.format(res, a);
-}
-
-/** Retrieves a message with one argument. */
-public static String getMessage(String na

[taglibs] How about splitting up the resource bundle?

2010-10-07 Thread Jeremy Boynes
Now that we require 1.5, I refactored Resources to use varargs rather than 
having multiple methods taking combinations of parameters. However, now that it 
is greatly simplified, i was wondering whether we should replace the single 
resource bundle containing messages for all implementations with smaller ones 
associated with each tag or tag library.

For example, moving the messages for core to 
o.a.t.s.tag.common.core.Resources.properties or for  to 
o.a.t.s.tag.common.core.importSupport.properties

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



[taglibs] Pick common format for test class names

2010-10-07 Thread Jeremy Boynes
We have different formats for test class names and need to specifically list 
them in the pom.xml file.

i'd like to propose picking a standard format and using a single wildcarded 
pattern to select them. The defaults for the surefire plugin are:
**/Test*.java
**/*Test.java
**/*TestCase.java

i would suggest one of the latter 2 to avoid conflicts with inner classes (e.g. 
TestTransformSupport$1)

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



[taglibs] Proposal to separate out 1.0 functionality

2010-10-07 Thread Jeremy Boynes
The 1.0 taglibs included their own implementation of EL. With EL now being 
provided by the JSP container and newer code using the 1.1 tag URIs, this is 
complexity that would not be needed for many newer implementation.

I've been wondering if we could refactor the library into two jars: one 
supporting 1.1 and later tags and one supporting the original 1.0 tags. Most 
users who just need the newer functionality could just use the smaller 1.1 
library and only those still using 1.0 tags would need to include the 
additional 1.0 support jar.

A further refinement would be to refactor the 1.0 code to use the JSP EL 
support from javax.el.

Thoughts?
Jeremy


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



Re: [taglibs] How about splitting up the resource bundle?

2010-10-07 Thread Rahul Akolkar
On Thu, Oct 7, 2010 at 9:29 PM, Jeremy Boynes  wrote:
> Now that we require 1.5, I refactored Resources to use varargs rather than 
> having multiple methods taking combinations of parameters. However, now that 
> it is greatly simplified, i was wondering whether we should replace the 
> single resource bundle containing messages for all implementations with 
> smaller ones associated with each tag or tag library.
>
> For example, moving the messages for core to 
> o.a.t.s.tag.common.core.Resources.properties or for  to 
> o.a.t.s.tag.common.core.importSupport.properties
>
> Thoughts?


Don't see a large win as its not a particularly busy properties file
and at times its useful to have all messages in one place (quick
checks for consistency etc.)

-Rahul


> Jeremy

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



Re: [taglibs] Pick common format for test class names

2010-10-07 Thread Rahul Akolkar
On Thu, Oct 7, 2010 at 9:37 PM, Jeremy Boynes  wrote:
> We have different formats for test class names and need to specifically list 
> them in the pom.xml file.
>
> i'd like to propose picking a standard format and using a single wildcarded 
> pattern to select them. The defaults for the surefire plugin are:
>        **/Test*.java
>        **/*Test.java
>        **/*TestCase.java
>
> i would suggest one of the latter 2 to avoid conflicts with inner classes 
> (e.g. TestTransformSupport$1)
>
> Thoughts?


If you want to do this, I'd +1 *Test.java (shorter).

-Rahul


> Jeremy

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



Re: [taglibs] Proposal to separate out 1.0 functionality

2010-10-07 Thread Rahul Akolkar
On Thu, Oct 7, 2010 at 9:48 PM, Jeremy Boynes  wrote:
> The 1.0 taglibs included their own implementation of EL. With EL now being 
> provided by the JSP container and newer code using the 1.1 tag URIs, this is 
> complexity that would not be needed for many newer implementation.
>
> I've been wondering if we could refactor the library into two jars: one 
> supporting 1.1 and later tags and one supporting the original 1.0 tags. Most 
> users who just need the newer functionality could just use the smaller 1.1 
> library and only those still using 1.0 tags would need to include the 
> additional 1.0 support jar.
>


Seems reasonable, to separate cruft from current.


> A further refinement would be to refactor the 1.0 code to use the JSP EL 
> support from javax.el.
>


1.0 code? That would preclude its use unless javax.el is provided.

-Rahul


> Thoughts?
> Jeremy
>

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



Re: svn commit: r1005367 - in /tomcat/trunk: java/org/apache/coyote/ajp/AbstractAjpProtocol.java java/org/apache/coyote/ajp/AjpAprProtocol.java java/org/apache/coyote/ajp/AjpProtocol.java webapps/docs

2010-10-07 Thread Mladen Turk

On 10/07/2010 10:54 AM, kfuj...@apache.org wrote:

+/**
+ * AJP packet size.
+ */
+protected int packetSize = Constants.MAX_PACKET_SIZE;
+public int getPacketSize() { return packetSize; }
+public void setPacketSize(int packetSize) {
+if(packetSize<  Constants.MAX_PACKET_SIZE) {
+this.packetSize = Constants.MAX_PACKET_SIZE;
+} else {
+this.packetSize = packetSize;
+}
+}
+


This would make AJP fixed to MAX_PACKET_SIZE
IMO this should be:

public void setPacketSize(int packetSize) {
if(packetSize < Constants.MIN_PACKET_SIZE) {
this.packetSize = Constants.MIN_PACKET_SIZE;

Also, 'if(foo)' -> 'if (foo)'



Regards
--
^TM

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



Re: Domino Tomcat connector: I'd like to hire somebody to bring it back

2010-10-07 Thread Mladen Turk

On 10/08/2010 12:08 AM, Erik C. Brooks wrote:

Hello group,

I'd like to modernize the Domino Tomcat connector for Win64.  I've got a
great Domino C developer here who has a lot of DSAPI experience.  I'm more
than willing to pay, and would love to release it back to the community.
Please contact me if interested at the email below.



This is not going to happen since the Lotus Domino is
proprietary software which cannot be used freely.

Solution would be that IBM donates Domino licenses
to the ASF so that development could took place, but that's
a different story.


Regards
--
^TM

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