DO NOT REPLY [Bug 50633] Stale cookie value obtained with getCookies() after login/logout/login

2011-01-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50633

Erik Bruchez  changed:

   What|Removed |Added

 CC||e...@bruchez.org
 OS/Version||All

-- 
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 50633] New: Stale cookie value obtained with getCookies() after login/logout/login

2011-01-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50633

   Summary: Stale cookie value obtained with getCookies() after
login/logout/login
   Product: Tomcat 6
   Version: 6.0.30
  Platform: Macintosh
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: e...@bruchez.org


Created an attachment (id=26532)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26532)
WAR to reproduce the issue

I attach a simple WAR file to illustrate this. To reproduce, follow these
steps. Obviously the cookie ids etc. will be different for you.

- deploy attached cookie-bug.war
- delete JSESSIONID browser cookie for localhost

First round:

- go to http://localhost:8080/cookie-bug/do.jsp
  - no Cookie header is sent by the browser
  - Tomcat forwards to login.jsp
  - Set-Cookie:JSESSIONID=8E5BD8A089735AEAAC1477F7F2C9A234; Path=/cookie-bug
- enter "tomcat" as password and press Login
- this POSTs to j_security_check
  - Cookie: JSESSIONID=8E5BD8A089735AEAAC1477F7F2C9A234
- do.jsp: JSESSIONID=8E5BD8A089735AEAAC1477F7F2C9A234
  - Cookie: JSESSIONID=8E5BD8A089735AEAAC1477F7F2C9A234
  - JSP displays
- requested: 8E5BD8A089735AEAAC1477F7F2C9A234
- session id: 8E5BD8A089735AEAAC1477F7F2C9A234
- cookie: JSESSIONID=8E5BD8A089735AEAAC1477F7F2C9A234
- click on logout
  - Cookie: JSESSIONID=8E5BD8A089735AEAAC1477F7F2C9A234
- you are back to do.jsp
  - Cookie: JSESSIONID=8E5BD8A089735AEAAC1477F7F2C9A234
  - forwards to login.jsp
  - Set-Cookie: JSESSIONID=A591F1194A99A1AA6CBDAE7511F0BF57; Path=/cookie-bug

So far so good! Now the second round:

- enter "tomcat" as password and press Login
- this POSTs to j_security_check
  - Cookie: JSESSIONID=A591F1194A99A1AA6CBDAE7511F0BF57
- do.jsp:
  - Cookie: JSESSIONID=A591F1194A99A1AA6CBDAE7511F0BF57
  - displays
- requested: A591F1194A99A1AA6CBDAE7511F0BF57
- session id: A591F1194A99A1AA6CBDAE7511F0BF57
- Cookie: JSESSIONID=8E5BD8A089735AEAAC1477F7F2C9A234 => how is this
possible?

Everything is fine *except* the Cookie value comes from nowhere!

It looks like there is a stale cookie that somehow got reused.

-- 
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 49711] HttpServletRequest#getParts() does not work in a Filter

2011-01-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49711

Christopher Schultz  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #11 from Christopher Schultz  
2011-01-21 13:40:26 EST ---
Fixed (again). Will be in 7.0.7 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: r1061960 - /tomcat/trunk/webapps/docs/config/context.xml

2011-01-21 Thread schultz
Author: schultz
Date: Fri Jan 21 18:38:28 2011
New Revision: 1061960

URL: http://svn.apache.org/viewvc?rev=1061960&view=rev
Log:
Fixed typo.

Modified:
tomcat/trunk/webapps/docs/config/context.xml

Modified: tomcat/trunk/webapps/docs/config/context.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1061960&r1=1061959&r2=1061960&view=diff
==
--- tomcat/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/trunk/webapps/docs/config/context.xml Fri Jan 21 18:38:28 2011
@@ -431,7 +431,7 @@
 or HttpServletRequest.getParameter* is called, even when the
 target servlet isn't marked with the @MultipartConfig annotation
 (See Servlet Specification 3.0, Section 3.2 for details).
-Note that any setting other than true causes Tomcat
+Note that any setting other than false causes Tomcat
 to behave in a way that is not technically spec-compliant.
 The default is false
   



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



svn commit: r1061957 - /tomcat/trunk/java/org/apache/catalina/connector/Request.java

2011-01-21 Thread schultz
Author: schultz
Date: Fri Jan 21 18:36:53 2011
New Revision: 1061957

URL: http://svn.apache.org/viewvc?rev=1061957&view=rev
Log:
Removed debug logging added with r1061929.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Request.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=1061957&r1=1061956&r2=1061957&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Fri Jan 21 
18:36:53 2011
@@ -2612,7 +2612,6 @@ public class Request
 Parameters.DEFAULT_ENCODING)});
 } catch (UnsupportedEncodingException e) {
 // Should not be possible
-e.printStackTrace();
 }
 }
 }



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



svn commit: r1061953 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/connector/ java/org/apache/catalina/core/ test/org/apache/catalina/connector/ test/org/apache/catalina/core/

2011-01-21 Thread schultz
Author: schultz
Date: Fri Jan 21 18:32:39 2011
New Revision: 1061953

URL: http://svn.apache.org/viewvc?rev=1061953&view=rev
Log:
Re-fixed bug #49711: HttpServletRequest#getParts() does not work in a Filter
- Moved allowCasualMultipartParsing setting from  to 


Modified:
tomcat/trunk/java/org/apache/catalina/Context.java
tomcat/trunk/java/org/apache/catalina/connector/Connector.java
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/ajp.xml
tomcat/trunk/webapps/docs/config/context.xml
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/java/org/apache/catalina/Context.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1061953&r1=1061952&r2=1061953&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Context.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Context.java Fri Jan 21 18:32:39 2011
@@ -89,6 +89,26 @@ public interface Context extends Contain
 
 // - Properties
 
+/**
+ * Set to true to allow requests mapped to servlets that
+ * do not explicitly declare @MultipartConfig or have
+ *  specified in web.xml to parse
+ * multipart/form-data requests.
+ *
+ * @param allowCasualMultipartParsing true to allow such
+ *casual parsing, false otherwise.
+ */
+public void setAllowCasualMultipartParsing(boolean 
allowCasualMultipartParsing);
+
+/**
+ * Returns true if requests mapped to servlets without
+ * "multipart config" to parse multipart/form-data requests anyway.
+ *
+ * @return true if requests mapped to servlets without
+ *"multipart config" to parse multipart/form-data requests,
+ *false otherwise.
+ */
+public boolean getAllowCasualMultipartParsing();
 
 /**
  * Return the set of initialized application event listener objects,

Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=1061953&r1=1061952&r2=1061953&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Fri Jan 21 
18:32:39 2011
@@ -247,13 +247,6 @@ public class Connector extends Lifecycle
  protected boolean useBodyEncodingForURI = false;
 
 
-/**
- * Allow multipart/form-data requests to be parsed even when the
- * target servlet doesn't specify @MultipartConfig or have a
- *  element.
- */
-protected boolean allowCasualMultipartParsing = false;
- 
  protected static HashMap replacements =
  new HashMap();
  static {
@@ -775,33 +768,6 @@ public class Connector extends Lifecycle
  }
 
 /**
- * Set to true to allow requests mapped to servlets that
- * do not explicitly declare @MultipartConfig or have
- *  specified in web.xml to parse
- * multipart/form-data requests.
- *
- * @param allowCasualMultipartParsing true to allow such
- *casual parsing, false otherwise.
- */
-public void setAllowCasualMultipartParsing(boolean 
allowCasualMultipartParsing)
-{
-this.allowCasualMultipartParsing = allowCasualMultipartParsing;
-}
-
-/**
- * Returns true if requests mapped to servlets without
- * "multipart config" to parse multipart/form-data requests anyway.
- *
- * @return true if requests mapped to servlets without
- *"multipart config" to parse multipart/form-data requests,
- *false otherwise.
- */
-protected boolean getAllowCasualMultipartParsing()
-{
-return this.allowCasualMultipartParsing;
-}
-
-/**
  * Indicates whether the generation of an X-Powered-By response header for
  * servlet-generated responses is enabled or disabled for this Connector.
  *

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=1061953&r1=1061952&r2=1061953&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Fri Jan 21 
18:32:39 2011
@@ -2547,8 +2547,7 @@ public class Request
 MultipartConfigElement mce = getWra

DO NOT REPLY [Bug 49711] HttpServletRequest#getParts() does not work in a Filter

2011-01-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49711

Christopher Schultz  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #10 from Christopher Schultz  
2011-01-21 13:29:26 EST ---
Patch needs tweaking. Configuration belongs in the Context, not in the
Connector.

-- 
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: Proposal: set default for Connector.allowCasualMultipartParsing to true

2011-01-21 Thread Konstantin Kolinko
2011/1/21 Christopher Schultz :
> What about it's default setting?
>

I would opt for "false"
1) on the same grounds as Mark
2) what will happen with an older application that itself implements
file upload  if this feature were enabled globally?

+e.printStackTrace();
Use log.debug() or whatever, but not the above. No need for i18n.

Best regards,
Konstantin Kolinko

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



DO NOT REPLY [Bug 50631] New: InternalNioInputBuffer should honor maxHttpHeadSize

2011-01-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50631

   Summary: InternalNioInputBuffer should honor maxHttpHeadSize
   Product: Tomcat 6
   Version: 6.0.29
  Platform: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
AssignedTo: dev@tomcat.apache.org
ReportedBy: yueson...@gmail.com


InternalNioInputBuffer automatically expands its buffer while reading in
request line, effectively ignoring the maxHttpHeaderSize setting.

-- 
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: Proposal: set default for Connector.allowCasualMultipartParsing to true

2011-01-21 Thread Christopher Schultz
Konstantin,

On 1/21/2011 12:57 PM, Konstantin Kolinko wrote:
> 2011/1/21 Christopher Schultz :
>> All,
>>
>> I've just committed a fix for
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=49711
>> (HttpServletRequest#getParts() does not work in a Filter) with a new
>> configuration attribute on the  called
>> allowCasualMultipartParsing whose default value is "false". Please see
>> BZ for details.
>>
>> I propose to make the default for this setting "true" unless
>> STRICT_SERVLET_COMPLIANCE is set to TRUE.
>>
>> Any comments?
>
> 
> Why is it on Connector? Won't it be better to have it on Context?

Hmm... I guess I didn't even think about that. I can certainly move it
there, since you're right: it has nothing really to do with the connector.

What about it's default setting?

-chris



signature.asc
Description: OpenPGP digital signature


Re: Privileges in Bugzilla

2011-01-21 Thread Christopher Schultz
Mark,

On 1/21/2011 1:02 PM, Mark Thomas wrote:
> On 21/01/2011 17:53, Christopher Schultz wrote:
>> All,
>>
>> I typically use my home email address instead of my @apache.org for
>> everything, including BZ. I don't currently have rights to do things
>> like assign bugs to myself, etc. Can that be done? Or, should I start
>> using my @apache.org email address to do that sort of thing?
> 
> Bug assignment in Bugzilla is disabled since it stops update messages
> being sent to the dev list when a change is made.

Gotcha. Comments for everything, then :)

-chris



signature.asc
Description: OpenPGP digital signature


Re: Proposal: set default for Connector.allowCasualMultipartParsing to true

2011-01-21 Thread Mark Thomas
On 21/01/2011 17:57, Konstantin Kolinko wrote:
> 2011/1/21 Christopher Schultz :
>> All,
>>
>> I've just committed a fix for
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=49711
>> (HttpServletRequest#getParts() does not work in a Filter) with a new
>> configuration attribute on the  called
>> allowCasualMultipartParsing whose default value is "false". Please see
>> BZ for details.
>>
>> I propose to make the default for this setting "true" unless
>> STRICT_SERVLET_COMPLIANCE is set to TRUE.
>>
>> Any comments?
>>
> 
> Why is it on Connector? Won't it be better to have it on Context?

Per Context seems reasonable to me.

As far as defaults go, I'd rather non-spec compliant features were
disabled by default. That way users have to explicitly enable them and
can't complain about portability when they move their app to a different
container that doesn't have the feature.

Mark

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



svn commit: r1061940 - in /tomcat/trunk/java/org/apache: catalina/ant/AbstractCatalinaTask.java tomcat/util/net/AprEndpoint.java

2011-01-21 Thread schultz
Author: schultz
Date: Fri Jan 21 18:04:38 2011
New Revision: 1061940

URL: http://svn.apache.org/viewvc?rev=1061940&view=rev
Log:
Reverted inadvertently-committed files from r1061929.

Modified:
tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java?rev=1061940&r1=1061939&r2=1061940&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java Fri Jan 
21 18:04:38 2011
@@ -170,7 +170,6 @@ public abstract class AbstractCatalinaTa
 URLConnection conn = null;
 InputStreamReader reader = null;
 try {
-openRedirector();
 
 // Create a connection for this command
 conn = (new URL(url + command)).openConnection();

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1061940&r1=1061939&r2=1061940&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Jan 21 
18:04:38 2011
@@ -242,9 +242,6 @@ public class AprEndpoint extends Abstrac
 public String getSSLCipherSuite() { return SSLCipherSuite; }
 public void setSSLCipherSuite(String SSLCipherSuite) { this.SSLCipherSuite 
= SSLCipherSuite; }
 
-protected boolean SSLFIPSMode = false;
-public boolean getSSLFIPSMode() { return SSLFIPSMode; }
-public void setSSLFIPSMode(boolean SSLFIPSMode) { this.SSLFIPSMode = 
SSLFIPSMode; }
 
 /**
  * SSL certificate file.



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



Re: Privileges in Bugzilla

2011-01-21 Thread Mark Thomas
On 21/01/2011 17:53, Christopher Schultz wrote:
> All,
> 
> I typically use my home email address instead of my @apache.org for
> everything, including BZ. I don't currently have rights to do things
> like assign bugs to myself, etc. Can that be done? Or, should I start
> using my @apache.org email address to do that sort of thing?

Bug assignment in Bugzilla is disabled since it stops update messages
being sent to the dev list when a change is made.

The Bugzilla security model used at the ASF is pretty basic.
Projects that have moved to Jira are read-only for everyone but admins
All users can create, edit, comment on all bugs for open projects
Some users can add product versions, components etc
Admins can do everything

Mark

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



RE: bug in TC6 ContainerBase class?

2011-01-21 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
> Subject: Re: bug in TC6 ContainerBase class?

> Are you saying that effectively most method calls have 
> pre- and post-memory barriers?

Essentially yes - except in the presence of a JIT.  Since a JIT can examine the 
called method and analyze its behavior and consequent side effects, it can 
eliminate or reorder writes or reads in both the caller and callee that the 
original compiler generated.  So as a general rule, it's not safe to depend on 
that behavior in Java.  In the specific case under discussion, the methods 
called by the looping run() method are too complex for any current JIT 
technology to fully analyze.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



Re: Proposal: set default for Connector.allowCasualMultipartParsing to true

2011-01-21 Thread Konstantin Kolinko
2011/1/21 Christopher Schultz :
> All,
>
> I've just committed a fix for
> https://issues.apache.org/bugzilla/show_bug.cgi?id=49711
> (HttpServletRequest#getParts() does not work in a Filter) with a new
> configuration attribute on the  called
> allowCasualMultipartParsing whose default value is "false". Please see
> BZ for details.
>
> I propose to make the default for this setting "true" unless
> STRICT_SERVLET_COMPLIANCE is set to TRUE.
>
> Any comments?
>

Why is it on Connector? Won't it be better to have it on Context?

Best regards,
Konstantin Kolinko

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



Re: svn commit: r1061929 - in /tomcat/trunk: java/org/apache/catalina/ant/ java/org/apache/catalina/connector/ java/org/apache/tomcat/util/net/ test/org/apache/catalina/connector/ webapps/docs/ webapp

2011-01-21 Thread Christopher Schultz
All,

Oops. I over-committed files. Evidently, svn commit doesn't work like
cvs commit.

I'll back-out my changes to:

tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Sorry for the noise.

Thanks,
-chris

On 1/21/2011 12:46 PM, schu...@apache.org wrote:
> Author: schultz
> Date: Fri Jan 21 17:46:03 2011
> New Revision: 1061929
> 
> URL: http://svn.apache.org/viewvc?rev=1061929&view=rev
> Log:
> Fixed bug #49711: HttpServletRequest#getParts() does not work in a Filter
> - Added  attribute allowCasualMultipartParsing (default false)
> - Requests that contain multipart/form-data will be parsed in the absence of 
> @MultipartConfig when the above attribute is set to "true"
> 
> 
> Modified:
> tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java
> tomcat/trunk/java/org/apache/catalina/connector/Connector.java
> tomcat/trunk/java/org/apache/catalina/connector/Request.java
> tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
> tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
> tomcat/trunk/webapps/docs/changelog.xml
> tomcat/trunk/webapps/docs/config/ajp.xml
> tomcat/trunk/webapps/docs/config/http.xml
> 
> Modified: tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java?rev=1061929&r1=1061928&r2=1061929&view=diff
> ==
> --- tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java 
> (original)
> +++ tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java Fri 
> Jan 21 17:46:03 2011
> @@ -170,6 +170,7 @@ public abstract class AbstractCatalinaTa
>  URLConnection conn = null;
>  InputStreamReader reader = null;
>  try {
> +openRedirector();
>  
>  // Create a connection for this command
>  conn = (new URL(url + command)).openConnection();
> 
> Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=1061929&r1=1061928&r2=1061929&view=diff
> ==
> --- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Fri Jan 21 
> 17:46:03 2011
> @@ -246,6 +246,13 @@ public class Connector extends Lifecycle
>*/
>   protected boolean useBodyEncodingForURI = false;
>  
> +
> +/**
> + * Allow multipart/form-data requests to be parsed even when the
> + * target servlet doesn't specify @MultipartConfig or have a
> + *  element.
> + */
> +protected boolean allowCasualMultipartParsing = false;
>   
>   protected static HashMap replacements =
>   new HashMap();
> @@ -767,6 +774,32 @@ public class Connector extends Lifecycle
>  
>   }
>  
> +/**
> + * Set to true to allow requests mapped to servlets that
> + * do not explicitly declare @MultipartConfig or have
> + *  specified in web.xml to parse
> + * multipart/form-data requests.
> + *
> + * @param allowCasualMultipartParsing true to allow such
> + *casual parsing, false otherwise.
> + */
> +public void setAllowCasualMultipartParsing(boolean 
> allowCasualMultipartParsing)
> +{
> +this.allowCasualMultipartParsing = allowCasualMultipartParsing;
> +}
> +
> +/**
> + * Returns true if requests mapped to servlets without
> + * "multipart config" to parse multipart/form-data requests anyway.
> + *
> + * @return true if requests mapped to servlets without
> + *"multipart config" to parse multipart/form-data requests,
> + *false otherwise.
> + */
> +protected boolean getAllowCasualMultipartParsing()
> +{
> +return this.allowCasualMultipartParsing;
> +}
>  
>  /**
>   * Indicates whether the generation of an X-Powered-By response header 
> for
> 
> 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=1061929&r1=1061928&r2=1061929&view=diff
> ==
> --- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Fri Jan 21 
> 17:46:03 2011
> @@ -2537,7 +2537,7 @@ public class Request
>  
>  return parts;
>  }
> -
> +
>  private void parseParts() {
>  
>  // Return immediately if the parts have already been parsed
> @@ -2545,13 +2545,22 @@ public class Request
>   

Re: svn commit: r1061929 - in /tomcat/trunk: java/org/apache/catalina/ant/ java/org/apache/catalina/connector/ java/org/apache/tomcat/util/net/ test/org/apache/catalina/connector/ webapps/docs/ webapp

2011-01-21 Thread Mark Thomas
On 21/01/2011 17:46, schu...@apache.org wrote:
> Author: schultz
> Date: Fri Jan 21 17:46:03 2011
> New Revision: 1061929
> 
> URL: http://svn.apache.org/viewvc?rev=1061929&view=rev
> Log:
> Fixed bug #49711: HttpServletRequest#getParts() does not work in a Filter
> - Added  attribute allowCasualMultipartParsing (default false)
> - Requests that contain multipart/form-data will be parsed in the absence of 
> @MultipartConfig when the above attribute is set to "true"

Looks like a few unintended changes also got committed and need to be
reverted as well as a couple of typos.

> --- tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java 
> (original)
> +++ tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java Fri 
> Jan 21 17:46:03 2011
> @@ -170,6 +170,7 @@ public abstract class AbstractCatalinaTa
>  URLConnection conn = null;
>  InputStreamReader reader = null;
>  try {
> +openRedirector();
>  
>  // Create a connection for this command
>  conn = (new URL(url + command)).openConnection();
> 


> --- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
> +++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Jan 21 
> 17:46:03 2011
> @@ -242,6 +242,9 @@ public class AprEndpoint extends Abstrac
>  public String getSSLCipherSuite() { return SSLCipherSuite; }
>  public void setSSLCipherSuite(String SSLCipherSuite) { 
> this.SSLCipherSuite = SSLCipherSuite; }
>  
> +protected boolean SSLFIPSMode = false;
> +public boolean getSSLFIPSMode() { return SSLFIPSMode; }
> +public void setSSLFIPSMode(boolean SSLFIPSMode) { this.SSLFIPSMode = 
> SSLFIPSMode; }
>  
>  /**
>   * SSL certificate file.
> 

> Modified: tomcat/trunk/webapps/docs/config/ajp.xml
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/ajp.xml?rev=1061929&r1=1061928&r2=1061929&view=diff
> ==
> --- tomcat/trunk/webapps/docs/config/ajp.xml (original)
> +++ tomcat/trunk/webapps/docs/config/ajp.xml Fri Jan 21 17:46:03 2011
> @@ -74,6 +74,17 @@
>  
>
>  
> +
> +  Set to true if Tomcat should automatically parse
> +  multipart/form-data request bodies when HttpServletRequest.getPart*
> +  or HttpServletRequest.getParameter* is called, even when the
> +  target servlet isn't marked with the @MultipartConfig annotation
> +  (See Servlet Specification 3.0, Section 3.2 for details).
> +  Note that any setting other than true causes Tomcat

I think you mean false here.

> --- tomcat/trunk/webapps/docs/config/http.xml (original)
> +++ tomcat/trunk/webapps/docs/config/http.xml Fri Jan 21 17:46:03 2011
> @@ -74,6 +74,17 @@
>  
>
>   
> +
> +  Set to true if Tomcat should automatically parse
> +  multipart/form-data request bodies when HttpServletRequest.getPart*
> +  or HttpServletRequest.getParameter* is called, even when the
> +  target servlet isn't marked with the @MultipartConfig annotation
> +  (See Servlet Specification 3.0, Section 3.2 for details).
> +  Note that any setting other than true causes Tomcat

Ditto.

Mark

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



Privileges in Bugzilla

2011-01-21 Thread Christopher Schultz
All,

I typically use my home email address instead of my @apache.org for
everything, including BZ. I don't currently have rights to do things
like assign bugs to myself, etc. Can that be done? Or, should I start
using my @apache.org email address to do that sort of thing?

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


DO NOT REPLY [Bug 50234] JspC use servlet 3.0 features

2011-01-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50234

--- Comment #2 from Christopher Schultz  
2011-01-21 12:52:24 EST ---
It looks like annotations don't make any sense, here. Brain fart on my part.

On the other hand, it looks like a simple change to a properties file plus a
new build-jspc.xml build script should do the trick.

Working on a patch.

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



Proposal: set default for Connector.allowCasualMultipartParsing to true

2011-01-21 Thread Christopher Schultz
All,

I've just committed a fix for
https://issues.apache.org/bugzilla/show_bug.cgi?id=49711
(HttpServletRequest#getParts() does not work in a Filter) with a new
configuration attribute on the  called
allowCasualMultipartParsing whose default value is "false". Please see
BZ for details.

I propose to make the default for this setting "true" unless
STRICT_SERVLET_COMPLIANCE is set to TRUE.

Any comments?

-chris



signature.asc
Description: OpenPGP digital signature


DO NOT REPLY [Bug 49711] HttpServletRequest#getParts() does not work in a Filter

2011-01-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49711

Christopher Schultz  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #9 from Christopher Schultz  
2011-01-21 12:48:10 EST ---
Fixed. Will be available in 7.0.7 onwards.

See documentation for  for how to enable this.

-- 
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: r1061929 - in /tomcat/trunk: java/org/apache/catalina/ant/ java/org/apache/catalina/connector/ java/org/apache/tomcat/util/net/ test/org/apache/catalina/connector/ webapps/docs/ webapps/do

2011-01-21 Thread schultz
Author: schultz
Date: Fri Jan 21 17:46:03 2011
New Revision: 1061929

URL: http://svn.apache.org/viewvc?rev=1061929&view=rev
Log:
Fixed bug #49711: HttpServletRequest#getParts() does not work in a Filter
- Added  attribute allowCasualMultipartParsing (default false)
- Requests that contain multipart/form-data will be parsed in the absence of 
@MultipartConfig when the above attribute is set to "true"


Modified:
tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java
tomcat/trunk/java/org/apache/catalina/connector/Connector.java
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/ajp.xml
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java?rev=1061929&r1=1061928&r2=1061929&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java Fri Jan 
21 17:46:03 2011
@@ -170,6 +170,7 @@ public abstract class AbstractCatalinaTa
 URLConnection conn = null;
 InputStreamReader reader = null;
 try {
+openRedirector();
 
 // Create a connection for this command
 conn = (new URL(url + command)).openConnection();

Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=1061929&r1=1061928&r2=1061929&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Fri Jan 21 
17:46:03 2011
@@ -246,6 +246,13 @@ public class Connector extends Lifecycle
   */
  protected boolean useBodyEncodingForURI = false;
 
+
+/**
+ * Allow multipart/form-data requests to be parsed even when the
+ * target servlet doesn't specify @MultipartConfig or have a
+ *  element.
+ */
+protected boolean allowCasualMultipartParsing = false;
  
  protected static HashMap replacements =
  new HashMap();
@@ -767,6 +774,32 @@ public class Connector extends Lifecycle
 
  }
 
+/**
+ * Set to true to allow requests mapped to servlets that
+ * do not explicitly declare @MultipartConfig or have
+ *  specified in web.xml to parse
+ * multipart/form-data requests.
+ *
+ * @param allowCasualMultipartParsing true to allow such
+ *casual parsing, false otherwise.
+ */
+public void setAllowCasualMultipartParsing(boolean 
allowCasualMultipartParsing)
+{
+this.allowCasualMultipartParsing = allowCasualMultipartParsing;
+}
+
+/**
+ * Returns true if requests mapped to servlets without
+ * "multipart config" to parse multipart/form-data requests anyway.
+ *
+ * @return true if requests mapped to servlets without
+ *"multipart config" to parse multipart/form-data requests,
+ *false otherwise.
+ */
+protected boolean getAllowCasualMultipartParsing()
+{
+return this.allowCasualMultipartParsing;
+}
 
 /**
  * Indicates whether the generation of an X-Powered-By response header for

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=1061929&r1=1061928&r2=1061929&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Fri Jan 21 
17:46:03 2011
@@ -2537,7 +2537,7 @@ public class Request
 
 return parts;
 }
-
+
 private void parseParts() {
 
 // Return immediately if the parts have already been parsed
@@ -2545,13 +2545,22 @@ public class Request
 return;
 
 MultipartConfigElement mce = getWrapper().getMultipartConfigElement();
+
 if (mce == null) {
-parts = Collections.emptyList();
-return;
+Connector connector = getConnector();
+if(connector.getAllowCasualMultipartParsing()) {
+mce = new MultipartConfigElement(null,
+ connector.getMaxPostSize(),
+ connector.getMaxPostSize(),
+  

Re: bug in TC6 ContainerBase class?

2011-01-21 Thread Christopher Schultz
Chuck,

On 1/21/2011 10:02 AM, Caldarale, Charles R wrote:
>> From: sebb [mailto:seb...@gmail.com] Subject: Re: bug in TC6
>> ContainerBase class?
> 
>> There is no requirement for the compiler to reload variables
>> unless the variable is volatile, or there is a shared lock between
>> threads.
> 
> Correct - with one caveat: if the compiler cannot prove there is no
> synchronization, it must assume that there is.  Also, the method
> calls can have side effects not discernible by the compiler,
> including updating of fields not specified in the argument list.

Are you saying that effectively most method calls have pre- and post-
memory barriers?

-chris



signature.asc
Description: OpenPGP digital signature


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

2011-01-21 Thread markt
Author: markt
Date: Fri Jan 21 16:49:02 2011
New Revision: 1061900

URL: http://svn.apache.org/viewvc?rev=1061900&view=rev
Log:
Fix possible thread exhaustion
With a breakpoint in the servlet handling the timeout event, I was seeing a new 
thread being allocated from the poll every second or so

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1061900&r1=1061899&r2=1061900&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri Jan 21 
16:49:02 2011
@@ -1387,6 +1387,8 @@ public class NioEndpoint extends Abstrac
 long timeout = (ka.getTimeout()==-1)?((long) 
socketProperties.getSoTimeout()):(ka.getTimeout());
 boolean isTimedout = delta > timeout;
 if (isTimedout) {
+// Prevent subsequent timeouts if the timeout 
event takes a while to process
+ka.access(Long.MAX_VALUE);
 processSocket(ka.getChannel(), 
SocketStatus.TIMEOUT, true);
 }
 }//end if

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1061900&r1=1061899&r2=1061900&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jan 21 16:49:02 2011
@@ -90,6 +90,14 @@
   
 
   
+  
+
+  
+Prevent possible thread exhaustion if a Comet timeout event takes a
+while to complete. (markt)
+  
+
+  
   
 
   



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



RE: bug in TC6 ContainerBase class?

2011-01-21 Thread Caldarale, Charles R
> From: sebb [mailto:seb...@gmail.com] 
> Subject: Re: bug in TC6 ContainerBase class?

> Do you mean:
> * the compiler must assume that there is no synch, or
> * the compiler must assume that there is synch.

The latter; in the absence of information to the contrary, the compiler must 
assume the worst case - that synchronization can occur as a side effect of the 
method call.

> > Nope, it's required to be reloaded due to the constraints 
> > mentioned above.

> If any reloading is required, it surely only applies to the 
> current thread.

Correct.  The one under discussion is the one with the "while (!threadDone)" 
loop.

> So as far as I can tell, calling non-synch. methods only affects
> compiler optimisation - it does not affect visibility of changes in
> other threads.

True - but the javac compiler cannot be certain that there's no synchronization 
going on inside the called methods or any nested method calls therein.  A JIT 
could, in theory, have access to that information (and all other side effects), 
and optimize out non-volatile memory references, but the overhead of doing so 
is impractical.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



Re: svn commit: r1061433 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/catalina/ha/session/ java/org/apache/catalina/session/ webapps/docs/

2011-01-21 Thread Konstantin Kolinko
2011/1/20  :
> Author: markt
> Date: Thu Jan 20 18:10:16 2011
> New Revision: 1061433
>
> URL: http://svn.apache.org/viewvc?rev=1061433&view=rev
> Log:
> Add session creation / expiration rate statistics to the session managers
> Adds ~10% to the session creation/destruction process when that is all Tomcat 
> is doing. Should be less overhead with less contention.
>
> Modified:
>    tomcat/tc6.0.x/trunk/STATUS.txt
>    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/DeltaManager.java
>    tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java
>    tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java
>    
> tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml
>    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
>
> Modified: tomcat/tc6.0.x/trunk/STATUS.txt
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1061433&r1=1061432&r2=1061433&view=diff
> ==
> --- tomcat/tc6.0.x/trunk/STATUS.txt (original)
> +++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Jan 20 18:10:16 2011
> @@ -89,16 +89,6 @@ PATCHES PROPOSED TO BACKPORT:
>               We can stall this item until we get some feedback about 7.0.5.
>   -1:
>
> -  rjung: getSessionExpireRate() and getSessionCreateRate() could share a 
> common
> -         implementation (same method body except for the input list). The 
> member
> -          "duration" of SessionTiming does not seem to get used.
> -

> --- 
> tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/DeltaManager.java 
> (original)
> +++ 
> tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/DeltaManager.java 
> Thu Jan 20 18:10:16 2011
> @@ -40,6 +40,7 @@ import org.apache.catalina.core.Standard
>  import org.apache.catalina.ha.CatalinaCluster;
>  import org.apache.catalina.ha.ClusterMessage;
>  import org.apache.catalina.ha.tcp.ReplicationValve;
> +import org.apache.catalina.session.ManagerBase;
>  import org.apache.catalina.tribes.Member;
>  import org.apache.catalina.tribes.io.ReplicationStream;
>  import org.apache.catalina.util.LifecycleSupport;
> @@ -1286,6 +1287,16 @@ public class DeltaManager extends Cluste
>     public synchronized void resetStatistics() {
>         processingTime = 0 ;
>         expiredSessions = 0 ;
> +        sessionCreationTiming.clear();
> +        while (sessionCreationTiming.size() <
> +                ManagerBase.TIMING_STATS_CACHE_SIZE) {
> +            sessionCreationTiming.add(null);
> +        }
> +        sessionExpirationTiming.clear();
> +        while (sessionExpirationTiming.size() <
> +                ManagerBase.TIMING_STATS_CACHE_SIZE) {
> +            sessionExpirationTiming.add(null);
> +        }

This resetStatistics() is a synchronized method, i.e. synchronizes on
this, but in all other places these linked lists use themselves as the
lock:
  synchronized (sessionCreationTiming) {


resetStatistics() is called from JMX only, so it does not concern
normal operation.


Best regards,
Konstantin Kolinko

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



Re: Current TC 7.0.x/trunk fails to build release

2011-01-21 Thread Christopher Schultz
Konstantin,

On 1/21/2011 9:47 AM, Konstantin Kolinko wrote:
> 2011/1/21 Christopher Schultz :
>> $ ant release
> 
> What is your ant version?  1.8.x is needed.

$ ant -version
Apache Ant version 1.8.1 compiled on April 30 2010

> Buildbot runs "ant release" repeatedly, and it succeeds

Hmm. I'll re-check everything.

-chris



signature.asc
Description: OpenPGP digital signature


Re: bug in TC6 ContainerBase class?

2011-01-21 Thread sebb
On 21 January 2011 15:52, Konstantin Kolinko  wrote:
> 2011/1/21 maxxe...@gmail.com :
>> In TC6 catalina core, ContainerBase class defines this field to stop
>> the background processor thread:
>>
>>     private boolean threadDone = false;
>>
>> Shouldn't it be a volatile? Because the background processor refers to
>> a classloader, could it prevent a (weak) classloader from being gc'ed?
>>
>
> Reading Chapter 17 of JLS 3rd edition, that defines the current (aka
> "new") memory model [1],  Ch. 17.9 "Sleep and Yield" explicitly
> mentions that sleep does not have "any synchronization semantics", but
> interrupt() has synchronization semantics per Ch.17.4.4.
>
> I think that using interrupt() is the reason why no issue have been
> observed here and why "volatile" is not necessary. (Though I wouldn't
> object if "volatile" were added to that field.)
>
> [1] http://java.sun.com/docs/books/jls/third_edition/html/memory.html
>

Thanks, very useful.

I suggest either adding volatile or at least adding a comment to say
that interrupt() provides the necessary synch.

>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

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



Re: bug in TC6 ContainerBase class?

2011-01-21 Thread Konstantin Kolinko
2011/1/21 maxxe...@gmail.com :
> In TC6 catalina core, ContainerBase class defines this field to stop
> the background processor thread:
>
>     private boolean threadDone = false;
>
> Shouldn't it be a volatile? Because the background processor refers to
> a classloader, could it prevent a (weak) classloader from being gc'ed?
>

Reading Chapter 17 of JLS 3rd edition, that defines the current (aka
"new") memory model [1],  Ch. 17.9 "Sleep and Yield" explicitly
mentions that sleep does not have "any synchronization semantics", but
interrupt() has synchronization semantics per Ch.17.4.4.

I think that using interrupt() is the reason why no issue have been
observed here and why "volatile" is not necessary. (Though I wouldn't
object if "volatile" were added to that field.)

[1] http://java.sun.com/docs/books/jls/third_edition/html/memory.html



Best regards,
Konstantin Kolinko

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



Re: bug in TC6 ContainerBase class?

2011-01-21 Thread sebb
On 21 January 2011 15:02, Caldarale, Charles R
 wrote:
>> From: sebb [mailto:seb...@gmail.com]
>> Subject: Re: bug in TC6 ContainerBase class?
>
>> There is no requirement for the compiler to reload variables unless
>> the variable is volatile, or there is a shared lock between threads.
>
> Correct - with one caveat: if the compiler cannot prove there is no 
> synchronization, it must assume that there is.

Do you mean:
* the compiler must assume that there is no synch, or
* the compiler must assume that there is synch.

I originally read your statement as the latter, but I think the former
is correct, i.e. the compiler cannot assume there is any synch.

> Also, the method calls can have side effects not discernible by the compiler, 
>including updating of fields not specified in the argument list.

True.

>> In the absence of volatile or sync. on a shared lock there is no
>> guarantee that the updated threadDone variable will *ever* be seen by
>> the background thread.
>
> Nope, it's required to be reloaded due to the constraints mentioned above.

If any reloading is required, it surely only applies to the current thread.

The JMM only guarantees as-if-sequential semantics for each thread
independently,

So as far as I can tell, calling non-synch. methods only affects
compiler optimisation - it does not affect visibility of changes in
other threads.

>> In particular, in this case the compiler may notice that the
>> threadDone variable is loop-invariant, and haul it out of the loop;
>> see for example:
>>
>> http://java.dzone.com/articles/multithreading-and-java-memory
>>
>> In which case, the background thread run loop will never terminate.
>
> Note that in all the cited examples, there are no method calls inside the 
> loop.

Point taken.

>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
>
>
> -
> 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



[Tomcat Wiki] Update of "PoweredBy" by SvenWoltmann

2011-01-21 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 SvenWoltmann.
http://wiki.apache.org/tomcat/PoweredBy?action=diff&rev1=299&rev2=300

--

  {{http://www.alfresco.com/assets/images/header/alfresco-logo.gif}} 
[[http://www.alfresco.org/download.html|Alfresco]] is an open-source enterprise 
content management system.
  
  === AndroidPIT ===
- {{http://www.androidpit.com/style/doorway_logo.png}} 
[[http://www.androidpit.com/|AndroidPIT]] is the largest German Android 
community and one of the largest worldwide with about 1.5 million page views 
per day handled by Tomcat 6.0.
+ {{http://www.androidpit.com/style/doorway_logo.png}} 
[[http://www.androidpit.de/|AndroidPIT.de]] is the largest German-speaking 
Android community and secondary Android App Store and 
[[http://www.androidpit.com/|AndroidPIT.com]] one of the largest worldwide with 
about 1.5 million page views per day handled by Tomcat 6.0.
  
  === Astradyne Systems ===
  {{http://astradyne.co.uk/astradynelogo.png}} 
[[http://www.astradyne.co.uk/|Astradyne Systems]] - A front for a crime family? 
;)

-
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 SvenWoltmann

2011-01-21 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 SvenWoltmann.
The comment on this change is: Added AndroidPIT.
http://wiki.apache.org/tomcat/PoweredBy?action=diff&rev1=298&rev2=299

--

  
  === Alfresco ===
  {{http://www.alfresco.com/assets/images/header/alfresco-logo.gif}} 
[[http://www.alfresco.org/download.html|Alfresco]] is an open-source enterprise 
content management system.
+ 
+ === AndroidPIT ===
+ {{http://www.androidpit.com/style/doorway_logo.png}} 
[[http://www.androidpit.com/|AndroidPIT]] is the largest German Android 
community and one of the largest worldwide with about 1.5 million page views 
per day handled by Tomcat 6.0.
  
  === Astradyne Systems ===
  {{http://astradyne.co.uk/astradynelogo.png}} 
[[http://www.astradyne.co.uk/|Astradyne Systems]] - A front for a crime family? 
;)

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



Re: svn commit: r1061442 - in /tomcat/trunk/java/org/apache/catalina/connector: LocalStrings.properties Request.java

2011-01-21 Thread Konstantin Kolinko
2011/1/21 Mark Thomas :
>> How can endAccess throw an exception ?
>
> I asked myself exactly the same question when I read the bug report. My
> conclusion was:
> - StandardSession - it can't unless there is a bug
> - DeltaSession - it can't unless there is a bug
> - Custom session implementation - who knows
>
> It seemed reasonable to add the protection for the custom case
>

StandardSession  -- can StandardSession#accessCount be null? This
field is declared transient.

ReplicatedSession = StandardSession (does not override the method)

DeltaSession -- DeltaManager#registerSessionAtReplicationValve() call
there is not trivial, though I do not see evident issues there. May be
the following:
in ReplicationValve# registerReplicationSession() has the following code:

if(log.isDebugEnabled())

log.debug(sm.getString("ReplicationValve.crossContext.registerSession",
session.getIdInternal(),
session.getManager().getContainer().getName()));

If debug logging is enabled and session.recycle() was already called,
session.getManager() will return null.


Anyway as
  a) custom components can be involved there
  b) endAccess() is not a trivial method to be used in recycle()
it would be better to safeguard it.


Backporting the fix to 5.5 waits for the third vote.


Best regards,
Konstantin Kolinko

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



RE: bug in TC6 ContainerBase class?

2011-01-21 Thread Caldarale, Charles R
> From: sebb [mailto:seb...@gmail.com] 
> Subject: Re: bug in TC6 ContainerBase class?

> There is no requirement for the compiler to reload variables unless
> the variable is volatile, or there is a shared lock between threads.

Correct - with one caveat: if the compiler cannot prove there is no 
synchronization, it must assume that there is.  Also, the method calls can have 
side effects not discernible by the compiler, including updating of fields not 
specified in the argument list.

> In the absence of volatile or sync. on a shared lock there is no
> guarantee that the updated threadDone variable will *ever* be seen by
> the background thread.

Nope, it's required to be reloaded due to the constraints mentioned above.

> In particular, in this case the compiler may notice that the
> threadDone variable is loop-invariant, and haul it out of the loop;
> see for example:
>
> http://java.dzone.com/articles/multithreading-and-java-memory
>
> In which case, the background thread run loop will never terminate.

Note that in all the cited examples, there are no method calls inside the loop.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



Re: Current TC 7.0.x/trunk fails to build release

2011-01-21 Thread Konstantin Kolinko
2011/1/21 Christopher Schultz :
> $ ant release

What is your ant version?  1.8.x is needed.

Buildbot runs "ant release" repeatedly, and it succeeds

E.g.
http://ci.apache.org/builders/tomcat-trunk/builds/1181
-> "3. compile" -> look at stdio file


Best regards,
Konstantin Kolinko

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



Current TC 7.0.x/trunk fails to build release

2011-01-21 Thread Christopher Schultz
All,

$ svn up
At revision 1061823.

$ ant release

[]

logkit-warning:
 [echo]
 [echo] *** WARNING ***
 [echo] LogKit not found: Cannot Build LogKitLogger
 [echo]

jdk1.4-warning:

avalon-framework-warning:
 [echo]
 [echo] *** WARNING ***
 [echo] Avalon-Framework not found: Cannot Build AvalonLogger
 [echo]

 compile-non-log4j:
 [javac]
/home/cschultz/projects/non-chadis/apache-tomcat-7.0.x/trunk/output/extras/logging/commons-logging-1.1.1-src/build2.xml:359:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds
 [javac] Compiling 11 source files to
/home/cschultz/projects/non-chadis/apache-tomcat-7.0.x/trunk/output/extras/logging/commons-logging-1.1.1-src/target/classes
 [javac]
/home/cschultz/projects/non-chadis/apache-tomcat-7.0.x/trunk/output/extras/logging/commons-logging-1.1.1-src/src/java/org/apache/juli/logging/impl/ServletContextCleaner.java:24:
package javax.servlet does not exist
 [javac] import javax.servlet.ServletContextEvent;
 [javac] ^
 [javac]
/home/cschultz/projects/non-chadis/apache-tomcat-7.0.x/trunk/output/extras/logging/commons-logging-1.1.1-src/src/java/org/apache/juli/logging/impl/ServletContextCleaner.java:25:
package javax.servlet does not exist
 [javac] import javax.servlet.ServletContextListener;
 [javac] ^
 [javac]
/home/cschultz/projects/non-chadis/apache-tomcat-7.0.x/trunk/output/extras/logging/commons-logging-1.1.1-src/src/java/org/apache/juli/logging/impl/ServletContextCleaner.java:52:
cannot find symbol
 [javac] symbol: class ServletContextListener
 [javac] public class ServletContextCleaner implements
ServletContextListener {
 [javac]   ^
 [javac]
/home/cschultz/projects/non-chadis/apache-tomcat-7.0.x/trunk/output/extras/logging/commons-logging-1.1.1-src/src/java/org/apache/juli/logging/impl/ServletContextCleaner.java:61:
cannot find symbol
 [javac] symbol  : class ServletContextEvent
 [javac] location: class
org.apache.juli.logging.impl.ServletContextCleaner
 [javac] public void contextDestroyed(ServletContextEvent sce) {
 [javac]  ^
 [javac]
/home/cschultz/projects/non-chadis/apache-tomcat-7.0.x/trunk/output/extras/logging/commons-logging-1.1.1-src/src/java/org/apache/juli/logging/impl/ServletContextCleaner.java:135:
cannot find symbol
 [javac] symbol  : class ServletContextEvent
 [javac] location: class
org.apache.juli.logging.impl.ServletContextCleaner
 [javac] public void contextInitialized(ServletContextEvent sce) {
 [javac]^
 [javac] 5 errors



Is this an environmental problem I have, or is the build really broken?

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


Re: bug in TC6 ContainerBase class?

2011-01-21 Thread sebb
On 21 January 2011 06:36, Caldarale, Charles R
 wrote:
>> From: sebb [mailto:seb...@gmail.com]
>> Subject: Re: bug in TC6 ContainerBase class?
>
>> What method calls will force a reload? Why must the compiler
>> assume it has changed?
>
> Any other than Thread.sleep().  Again, we are discussing what happens in 
> practice, not in theory.  Since the javac compiler does not, in this case, 
> have knowledge of the internal operations of the called methods, it must 
> pessimistically assume that synchronization may occur and fields have been 
> updated.  (On the other hand, a JIT, with its runtime knowledge, could 
> determine whether or not synchronization happens and optimize out the reload. 
>  But that would require either calls to very simplistic methods or a very 
> deeply probing JIT.)  For methods that javac does have knowledge of (e.g., 
> Thread.sleep(), as defined by 17.9 of the language spec, or non-overridable 
> ones in the class), the compiler does not have to be pessimistic.

I really don't understand that.

The JMM specifically allows for caching of variables in local memory
or registers, and in the absence of synch. is only required to
maintain as-if-sequential semantics for a single thread. There is no
requirement for different threads to even maintain the same ordering,
so long as each thread appears to be be sequential.

There is no requirement for the compiler to reload variables unless
the variable is volatile, or there is a shared lock between threads.

So saying that the compiler must reload the value in the absence of
volatile/synch goes against one of the principles of the JMM, which is
to allow the compiler and JVM freedom to cache and re-order operations
to improve performance.

>> Surely that is what volatile is for?
>
> Volatile insures that ordering is observed in lieu of explicit 
> synchronization.

Yes, it effectively ensures that the value written be one thread will
be seen by another that executes later.

In the absence of volatile or sync. on a shared lock there is no
guarantee that the updated threadDone variable will *ever* be seen by
the background thread.

In particular, in this case the compiler may notice that the
threadDone variable is loop-invariant, and haul it out of the loop;
see for example:

http://java.dzone.com/articles/multithreading-and-java-memory

In which case, the background thread run loop will never terminate.

>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
>
>
> -
> 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



buildbot success in ASF Buildbot on tomcat-trunk

2011-01-21 Thread buildbot
The Buildbot has detected a restored build of tomcat-trunk on ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/1181

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: 
Build Source Stamp: [branch tomcat/trunk] 1061797
Blamelist: markt

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: Need a 6.0.31 release

2011-01-21 Thread Mark Thomas
On 20/01/2011 16:38, jean-frederic clere wrote:
> On 01/20/2011 05:09 PM, Mark Thomas wrote:
>> The memory leak in the Tomcat 7 NIO connector [1] got back-ported to
>> 6.0.x and included in 6.0.30. [2]
>>
>> I have proposed the fix for 6.0.x. Given the severity I think we need to
>> approve the backport and start a 6.0.31 release asap.
> 
> +1

I think all the fixes that need to be in 6.0.31 are there.
Jean-Frederic, are you able to be RM for this?

Mark

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



DO NOT REPLY [Bug 50629] Make the bindThread/unbindThread method protected

2011-01-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50629

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Mark Thomas  2011-01-21 08:17:49 EST ---
Assuming it was StandardContext, this has been fixed in 7.0.x and will be
included in 7.0.7 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: r1061797 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml

2011-01-21 Thread markt
Author: markt
Date: Fri Jan 21 13:17:12 2011
New Revision: 1061797

URL: http://svn.apache.org/viewvc?rev=1061797&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50629
Make StandardContext.bindThread() and StandardContext.unbindThread() protected 
to allow use by sub-classes.

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

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=1061797&r1=1061796&r2=1061797&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Fri Jan 21 
13:17:12 2011
@@ -5547,16 +5547,13 @@ public class StandardContext extends Con
 }
 
 
-//  Private Methods
-
-
 /**
  * Bind current thread, both for CL purposes and for JNDI ENC support
  * during : startup, shutdown and realoading of the context.
  *
  * @return the previous context class loader
  */
-private ClassLoader bindThread() {
+protected ClassLoader bindThread() {
 
 ClassLoader oldContextClassLoader =
 Thread.currentThread().getContextClassLoader();
@@ -5588,7 +5585,7 @@ public class StandardContext extends Con
 /**
  * Unbind thread.
  */
-private void unbindThread(ClassLoader oldContextClassLoader) {
+protected void unbindThread(ClassLoader oldContextClassLoader) {
 
 if (isUseNaming()) {
 ContextBindings.unbindThread(this, this);

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1061797&r1=1061796&r2=1061797&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jan 21 13:17:12 2011
@@ -83,6 +83,11 @@
 Session.endAccess() from preventing the normal completion
 of Request.recycle(). (markt)
   
+  
+50629: Make StandardContext.bindThread() and
+StandardContext.unbindThread() protected to allow use by
+sub-classes. (markt)
+  
 
   
   



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



buildbot failure in ASF Buildbot on tomcat-trunk

2011-01-21 Thread buildbot
The Buildbot has detected a new failure of tomcat-trunk on ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/1180

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: 
Build Source Stamp: [branch tomcat/trunk] 1061787
Blamelist: markt

BUILD FAILED: failed failed slave lost

sincerely,
 -The Buildbot


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



DO NOT REPLY [Bug 50629] Make the bindThread/unbindThread method protected

2011-01-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50629

--- Comment #1 from Konstantin Kolinko  2011-01-21 
07:40:04 EST ---
(In reply to comment #0)
> But the two methods bindThread and unbindThread is marked as private,

Methods of what class? Please, be more specific.

-- 
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: r1061787 - in /tomcat/trunk: java/org/apache/el/Messages.properties java/org/apache/el/parser/AstDotSuffix.java java/org/apache/el/parser/AstIdentifier.java webapps/docs/changelog.xml

2011-01-21 Thread markt
Author: markt
Date: Fri Jan 21 12:39:15 2011
New Revision: 1061787

URL: http://svn.apache.org/viewvc?rev=1061787&view=rev
Log:
Improve error message & use i18n

Modified:
tomcat/trunk/java/org/apache/el/Messages.properties
tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java
tomcat/trunk/java/org/apache/el/parser/AstIdentifier.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/el/Messages.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/Messages.properties?rev=1061787&r1=1061786&r2=1061787&view=diff
==
--- tomcat/trunk/java/org/apache/el/Messages.properties (original)
+++ tomcat/trunk/java/org/apache/el/Messages.properties Fri Jan 21 12:39:15 2011
@@ -48,7 +48,7 @@ error.fnMapper.null=Expression uses func
 error.fnMapper.method=Function ''{0}'' not found
 error.fnMapper.paramcount=Function ''{0}'' specifies {1} params, but {2} were 
declared
 
-# **ExpressionImpl
+# ExpressionImpl
 error.context.null=ELContext was null
 
 # ArrayELResolver
@@ -61,4 +61,7 @@ error.list.outofbounds=Index {0} is out 
 error.property.notfound=Property ''{1}'' not found on type: {0}
 error.property.invocation=Property ''{1}'' threw an exception from type: {0}
 error.property.notreadable=Property ''{1}'' doesn't have a 'get' specified on 
type: {0}
-error.property.notwritable=Property ''{1}'' doesn't have a 'set' specified on 
type: {0}
\ No newline at end of file
+error.property.notwritable=Property ''{1}'' doesn't have a 'set' specified on 
type: {0}
+
+# Parser
+error.identifier.notjava=The identifier [{0}] is not a valid Java identifier 
as required by section 1.19 of the EL specification (Identifier ::= Java 
language identifier). This check can be disabled by setting the system property 
org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true.
\ No newline at end of file

Modified: tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java?rev=1061787&r1=1061786&r2=1061787&view=diff
==
--- tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java Fri Jan 21 
12:39:15 2011
@@ -21,6 +21,7 @@ package org.apache.el.parser;
 import javax.el.ELException;
 
 import org.apache.el.lang.EvaluationContext;
+import org.apache.el.util.MessageFactory;
 import org.apache.el.util.Validation;
 
 
@@ -42,8 +43,8 @@ public final class AstDotSuffix extends 
 @Override
 public void setImage(String image) {
 if (!Validation.isIdentifier(image)) {
-throw new ELException("[" + image +
-"] is not a valid Java identifier");
+throw new 
ELException(MessageFactory.get("error.identifier.notjava",
+image));
 }
 this.image = image;
 }

Modified: tomcat/trunk/java/org/apache/el/parser/AstIdentifier.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstIdentifier.java?rev=1061787&r1=1061786&r2=1061787&view=diff
==
--- tomcat/trunk/java/org/apache/el/parser/AstIdentifier.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/AstIdentifier.java Fri Jan 21 
12:39:15 2011
@@ -129,8 +129,8 @@ public final class AstIdentifier extends
 @Override
 public void setImage(String image) {
 if (!Validation.isIdentifier(image)) {
-throw new ELException("[" + image +
-"] is not a valid Java identifier");
+throw new 
ELException(MessageFactory.get("error.identifier.notjava",
+image));
 }
 this.image = image;
 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1061787&r1=1061786&r2=1061787&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jan 21 12:39:15 2011
@@ -97,6 +97,10 @@
 15688: Use fully-qualified class names in generated jsp 
files
 to avoid naming conflicts with user imports. (markt)
   
+  
+Improve error message when EL identifiers are not valid Java 
identifiers
+and use i18n for the error message. (markt)
+  
 
   
   



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



DO NOT REPLY [Bug 50629] New: Make the bindThread/unbindThread method protected

2011-01-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50629

   Summary: Make the bindThread/unbindThread method protected
   Product: Tomcat 7
   Version: trunk
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: xhh...@gmail.com


In the latest Tomcat codes, I saw that a new thread is created for listener
start, filter start and loadOnStartup. But the two methods bindThread and
unbindThread is marked as private, how about making those methods protected ?
So that other containers could use those two methods for their own
initialization works.
Thanks.

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



PoweredBy reverted to revision 290 on Tomcat Wiki

2011-01-21 Thread Apache Wiki
Dear wiki user,

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

The page PoweredBy has been reverted to revision 290 by KonstantinKolinko.
The comment on this change is: Reverted to r290 to remove spam.
http://wiki.apache.org/tomcat/PoweredBy?action=diff&rev1=297&rev2=298

--

  {{http://www.hubspot.com/Portals/53/images/website_logo.gif}} 
[[http://dev.hubspot.com/|HubSpot]] is an inbound marketing system to help your 
small or medium sized business get found on the Internet by the right prospects 
and convert more of them into leads and customers for maximum marketing ROI.
  
  === IMS Neptune ===
- {{http://www.ims.net/design/ims-logo.gif}} 
[[http://www.profi-fachuebersetzung.de|Vereidigter Dolmetscher]] 
[[http://www.profischnell.com|Übersetzung Deutsch Englisch]]
-  [[http://www.ims.net/|IMS Neptune]] is a powerful Java-based content 
management system built on Tomcat and PostgreSQL.
+ {{http://www.ims.net/design/ims-logo.gif}} [[http://www.ims.net/|IMS 
Neptune]] is a powerful Java-based content management system built on Tomcat 
and PostgreSQL.
  
  === Institute for Tourism and Geographic Information Systems ===
  [[http://www.itgis.com|Institute for Tourism and Geographic Information 
Systems]] - A consulting company; all of our projects are built on Tomcat.

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



Re: svn commit: r1061442 - in /tomcat/trunk/java/org/apache/catalina/connector: LocalStrings.properties Request.java

2011-01-21 Thread Mark Thomas
On 21/01/2011 09:39, Remy Maucherat wrote:
> On Thu, 2011-01-20 at 18:34 +, ma...@apache.org wrote:
>> Author: markt
>> Date: Thu Jan 20 18:34:18 2011
>> New Revision: 1061442
>>
>> URL: http://svn.apache.org/viewvc?rev=1061442&view=rev
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50620
>> Exceptions calling session.endAccess should not prevent recycle() from 
>> completing normally
> 
> How can endAccess throw an exception ?

I asked myself exactly the same question when I read the bug report. My
conclusion was:
- StandardSession - it can't unless there is a bug
- DeltaSession - it can't unless there is a bug
- Custom session implementation - who knows

It seemed reasonable to add the protection for the custom case

Mark

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



Re: svn commit: r1061442 - in /tomcat/trunk/java/org/apache/catalina/connector: LocalStrings.properties Request.java

2011-01-21 Thread Remy Maucherat
On Thu, 2011-01-20 at 18:34 +, ma...@apache.org wrote:
> Author: markt
> Date: Thu Jan 20 18:34:18 2011
> New Revision: 1061442
> 
> URL: http://svn.apache.org/viewvc?rev=1061442&view=rev
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50620
> Exceptions calling session.endAccess should not prevent recycle() from 
> completing normally

How can endAccess throw an exception ?

Rémy



-
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

2011-01-21 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=296&rev2=297

--

  {{http://www.hubspot.com/Portals/53/images/website_logo.gif}} 
[[http://dev.hubspot.com/|HubSpot]] is an inbound marketing system to help your 
small or medium sized business get found on the Internet by the right prospects 
and convert more of them into leads and customers for maximum marketing ROI.
  
  === IMS Neptune ===
+ {{http://www.ims.net/design/ims-logo.gif}} 
[[http://www.profi-fachuebersetzung.de|Vereidigter Dolmetscher]] 
[[http://www.profischnell.com|Übersetzung Deutsch Englisch]]
- {{http://www.ims.net/design/ims-logo.gif}} [[http://www.ims.net/|IMS 
Neptune]] is a powerful Java-based content management system built on Tomcat 
and PostgreSQL.
+  [[http://www.ims.net/|IMS Neptune]] is a powerful Java-based content 
management system built on Tomcat and PostgreSQL.
  
  === Institute for Tourism and Geographic Information Systems ===
  [[http://www.itgis.com|Institute for Tourism and Geographic Information 
Systems]] - A consulting company; all of our projects are built on Tomcat.

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