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

2010-01-13 Thread kkolinko
Author: kkolinko
Date: Wed Jan 13 08:48:12 2010
New Revision: 898682

URL: http://svn.apache.org/viewvc?rev=898682&view=rev
Log:
votes

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=898682&r1=898681&r2=898682&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 08:48:12 2010
@@ -71,7 +71,7 @@
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47774
   Ensure web application class loader is used when calling session listeners
   http://svn.apache.org/viewvc?rev=898555&view=rev
-  +1: markt
+  +1: markt, kkolinko
   -1: 
 
 * Fix second part of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=47413#c8
@@ -154,8 +154,10 @@
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48470
   Ensure shutdown does not lock up when Tomcat is shut down under load
   https://issues.apache.org/bugzilla/attachment.cgi?id=24827
-  +1: markt, jim
+  +1: markt, jim, kkolinko
   -1: 
+   kkolinko: I have several comments in BZ 48470#c6, but those can be
+   proposed separately
 
 * Fix various EL issues (with test cases) including BZ47413#c8 & BZ48112
   The actual fixes
@@ -193,12 +195,12 @@
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48004
   Allow applications to set the Server header
   http://svn.apache.org/viewvc?rev=898527&view=rev
-  +1: markt
+  +1: markt, kkolinko
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48516
   Prevent possible NPE in JNDIRealm when user does not exist
   Patch provided by Kevin Conaway
   http://svn.apache.org/viewvc?rev=898558&view=rev
-  +1: markt
+  +1: markt, kkolinko
   -1: 



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



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

2010-01-13 Thread Konstantin Kolinko
2010/1/12  :
> Author: markt
> Date: Tue Jan 12 20:30:46 2010
> New Revision: 898496
>
> URL: http://svn.apache.org/viewvc?rev=898496&view=rev
> Log:
> Add note
>
> Modified:
>    tomcat/tc6.0.x/trunk/STATUS.txt
>

>  * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48421
>   Prevent file descriptor leak. Allow a web application's logs to be deleted
>   once the application has been stopped.
> +  I haven't figured out why, but this also prevents buffered log messages 
> being
> +  lost on stop when running as a service.
>   http://svn.apache.org/viewvc?rev=898468&view=rev
>   +1: markt
>   -1:

Some quick thoughts:

1. Stopping from a sh/bat file is performed by a listener, that
received shutdown command on a port. And the listener runs in the same
thread that started the server.

Stopping from Windows service/ Unix jsvc is performed by calling
stop() method using direct access to JVM. Maybe it is a separate
thread, or somehow otherwise the environment is different.


2. I have not followed the code in detail, but some tricks from other
places (maybe not necessary here):
a) setting a TCCL after creating the Cleaner thread, as done in 6u(14
and later) implementation of java logging. (I think won't be needed
here. Just mentioning it).
b) maybe
Runtime.getRuntime().removeShutdownHook(shutdownHook);
(like Catalina#stop() does)
I do not know, whether it would be needed here.


Best regards,
Konstantin Kolinko

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



tagging 6.0.23

2010-01-13 Thread jean-frederic clere
Hi,

I plan to tag 6.0.23 tomorrow lunch time (~13h00 my time).

Please complain if that is not ok.

Cheers

Jean-Frederic

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



Re: modify the source code to measure the time of processing a request

2010-01-13 Thread Pid

On 13/01/2010 06:37, Bao wrote:

Hi,
   Our company is using the apache tomcat 6.0.20 as our server.
And now I plan to measure the time of every requet processed in the server 
without the help of any benchmark tool.
   I plan to modify the code to add a time stamp in a request when it comes 
into the server and add another time stamp when it go out of server. So with a 
simple subtraction I can get the time I need.
   However,I am not familiar with the archive of the source code.So anyone 
could give me some suggestion of doing this?Like where should I modify in the 
source code.
   Thanks!


Look at the code for the AccessLogValve.  The SVN repository is listed 
on tomcat.apache.org.



p


   ___
   好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/

-
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: modify the source code to measure the time of processing a request

2010-01-13 Thread Bao
Thanks!
could you tell me under the what content?

--- 10年1月13日,周三, Pid  写道:

> 发件人: Pid 
> 主题: Re: modify the source code to measure the time of processing a request
> 收件人: dev@tomcat.apache.org
> 日期: 2010年1月13日,周三,下午5:14
> On 13/01/2010 06:37, Bao wrote:
> > Hi,
> >    Our company is using the apache tomcat
> 6.0.20 as our server.
> > And now I plan to measure the time of every requet
> processed in the server without the help of any benchmark
> tool.
> >    I plan to modify the code to add a time
> stamp in a request when it comes into the server and add
> another time stamp when it go out of server. So with a
> simple subtraction I can get the time I need.
> >    However,I am not familiar with the
> archive of the source code.So anyone could give me some
> suggestion of doing this?Like where should I modify in the
> source code.
> >    Thanks!
> 
> Look at the code for the AccessLogValve.  The SVN
> repository is listed 
> on tomcat.apache.org.
> 
> 
> p
> 
> >       
> ___
> >   
> 好玩贺卡等你发,邮箱贺卡全新上线!
> > http://card.mail.cn.yahoo.com/
> >
> >
> -
> > 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
> 
> 


  ___ 
  好玩贺卡等你发,邮箱贺卡全新上线! 
http://card.mail.cn.yahoo.com/

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



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

2010-01-13 Thread rjung
Author: rjung
Date: Wed Jan 13 10:16:21 2010
New Revision: 898697

URL: http://svn.apache.org/viewvc?rev=898697&view=rev
Log:
Vote.

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

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=898697&r1=898696&r2=898697&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 10:16:21 2010
@@ -148,7 +148,7 @@
   which failed to implement this fix properly.
   http://svn.apache.org/viewvc?rev=897380&view=rev  (fix)
   http://svn.apache.org/viewvc?rev=897381&view=rev  (Documentation)
-  +1: kkolinko, markt
+  +1: kkolinko, markt, rjung
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48470
@@ -195,12 +195,12 @@
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48004
   Allow applications to set the Server header
   http://svn.apache.org/viewvc?rev=898527&view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko, rjung
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48516
   Prevent possible NPE in JNDIRealm when user does not exist
   Patch provided by Kevin Conaway
   http://svn.apache.org/viewvc?rev=898558&view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko, rjung
   -1: 



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



Re: With a view to 6.0.23

2010-01-13 Thread Rainer Jung

On 12.01.2010 19:35, Mark Thomas wrote:

On 12/01/2010 18:24, Konstantin Kolinko wrote:

2010/1/12 Mark Thomas:
Thank you for vote. I would very like to see the JULI FileHandler
buffering patch in 6.0.23.
A third vote is required.


Done.


I think we need to get 6.0.23 out asap. It has been too long since the
last 6.0.x release and there are many, many bug fixes. Once 6.0.23 is
out, there is nothing stopping us doing 6.0.24 a few weeks later if we
think it is justified.


+1

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



Re: tagging 6.0.23

2010-01-13 Thread Rainer Jung

On 13.01.2010 10:09, jean-frederic clere wrote:

Hi,

I plan to tag 6.0.23 tomorrow lunch time (~13h00 my time).


+1

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



svn commit: r898703 - /tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 10:26:58 2010
New Revision: 898703

URL: http://svn.apache.org/viewvc?rev=898703&view=rev
Log:
Add TODO

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

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=898703&r1=898702&r2=898703&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Wed Jan 
13 10:26:58 2010
@@ -406,6 +406,7 @@
 }
 s = new java.net.Socket();
 s.setSoTimeout(getSocketProperties().getSoTimeout());
+// TODO Consider hard-coding to s.setSoLinger(true,0)
 
s.setSoLinger(getSocketProperties().getSoLingerOn(),getSocketProperties().getSoLingerTime());
 if (log.isDebugEnabled()) {
 log.debug("About to unlock socket for:"+saddr);



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



DO NOT REPLY [Bug 48470] Tomcat hangs while stoppping

2010-01-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48470

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #7 from Mark Thomas  2010-01-13 02:30:43 GMT ---
The fix has been applied to 6.0.x and will be included in 6.0.23 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: r898705 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ webapps/docs/

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 10:30:50 2010
New Revision: 898705

URL: http://svn.apache.org/viewvc?rev=898705&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48470
Ensure Tomcat does not lock up if shut down under load.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
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=898705&r1=898704&r2=898705&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 10:30:50 2010
@@ -151,14 +151,6 @@
   +1: kkolinko, markt, rjung
   -1:
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48470
-  Ensure shutdown does not lock up when Tomcat is shut down under load
-  https://issues.apache.org/bugzilla/attachment.cgi?id=24827
-  +1: markt, jim, kkolinko
-  -1: 
-   kkolinko: I have several comments in BZ 48470#c6, but those can be
-   proposed separately
-
 * Fix various EL issues (with test cases) including BZ47413#c8 & BZ48112
   The actual fixes
 svn copy 
https://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=898705&r1=898704&r2=898705&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 
Wed Jan 13 10:30:50 2010
@@ -226,6 +226,11 @@
 public int getSoTimeout() { return endpoint.getSoTimeout(); }
 public void setSoTimeout(int soTimeout) { 
endpoint.setSoTimeout(soTimeout); }
 
+public int getUnlockTimeout() { return endpoint.getUnlockTimeout(); }
+public void setUnlockTimeout(int unlockTimeout) {
+endpoint.setUnlockTimeout(unlockTimeout);
+}
+
 /**
  * The number of seconds Tomcat will wait for a subsequent request
  * before closing the connection.

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java?rev=898705&r1=898704&r2=898705&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java Wed 
Jan 13 10:30:50 2010
@@ -426,6 +426,11 @@
 public int getSoTimeout() { return endpoint.getSoTimeout(); }
 public void setSoTimeout(int soTimeout) { 
endpoint.setSoTimeout(soTimeout); }
 
+public int getUnlockTimeout() { return endpoint.getUnlockTimeout(); }
+public void setUnlockTimeout(int unlockTimeout) {
+endpoint.setUnlockTimeout(unlockTimeout);
+}
+
 // HTTP
 /**
  * Return the Keep-Alive policy for the connection.

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=898705&r1=898704&r2=898705&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed 
Jan 13 10:30:50 2010
@@ -18,6 +18,7 @@
 package org.apache.tomcat.util.net;
 
 import java.net.InetAddress;
+import java.net.InetSocketAddress;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.concurrent.Executor;
@@ -399,6 +400,16 @@
 
 
 /**
+ * Unlock timeout.
+ */
+protected int unlockTimeout = 250;
+public int getUnlockTimeout() { return unlockTimeout; }
+public void setUnlockTimeout(int unlockTimeout) {
+this.unlockTimeout = unlockTimeout;
+}
+
+
+/**
  * SSL engine.
  */
 protected boolean SSLEnabled = false;
@@ -880,16 +891,21 @@
  */
 protected void unlockAccept() {
 java.net.Socket s = null;
+InetSocketAddress saddr = null;
 try {
 // Need to create a connection to unlock the accept();
 if (address == null) {
-s = new 
java.net.Socket(InetAddress.getByName("localhost")

svn commit: r898707 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/realm/JNDIRealm.java webapps/docs/changelog.xml

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 10:37:53 2010
New Revision: 898707

URL: http://svn.apache.org/viewvc?rev=898707&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48516
Prevent possible NPE in JNDIRealm when user does not exist
Patch provided by Kevin Conaway

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java
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=898707&r1=898706&r2=898707&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 10:37:53 2010
@@ -189,10 +189,3 @@
   http://svn.apache.org/viewvc?rev=898527&view=rev
   +1: markt, kkolinko, rjung
   -1: 
-
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48516
-  Prevent possible NPE in JNDIRealm when user does not exist
-  Patch provided by Kevin Conaway
-  http://svn.apache.org/viewvc?rev=898558&view=rev
-  +1: markt, kkolinko, rjung
-  -1: 

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java?rev=898707&r1=898706&r2=898707&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java Wed Jan 
13 10:37:53 2010
@@ -1924,8 +1924,12 @@
 
 User user = getUser(context, username);
 
-return new GenericPrincipal(this, user.username, user.password ,
-getRoles(context, user));
+if (user != null) {
+return new GenericPrincipal(this, user.username, user.password,
+getRoles(context, user));
+}
+
+return null;
 }
 
 /**

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=898707&r1=898706&r2=898707&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Jan 13 10:37:53 2010
@@ -42,8 +42,8 @@
 specification. (markt)
   
   
-48345: Sessions timed out too early when using 
PersistentManager.
-Patch provided by Keiichi Fujino. (markt)
+48345: Sessions timed out too early when using
+PersistentManager. Patch provided by Keiichi Fujino. (markt)
   
   
 48398: Make objects used as locks final to ensure correct
@@ -57,6 +57,10 @@
 48454: Ensure stderr is completely read before terminating
 the CGI process. Patch provided by Markus Grieder. (markt)
   
+  
+48516: Prevent NPE in JNDIRealm if requested user does not
+exist. Patch provided by Kevin Conaway. (markt)
+  
 
   
   



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



DO NOT REPLY [Bug 48516] NullPointerException in JNDIRealm

2010-01-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48516

Mark Thomas  changed:

   What|Removed |Added

  Component|Catalina|Catalina
Version|6.0.20  |5.5.28
Product|Tomcat 6|Tomcat 5
   Target Milestone|default |---

--- Comment #3 from Mark Thomas  2010-01-13 02:38:20 GMT ---
Thanks again for the patch. It has been applied to 6.0.x and will be included
in 6.0.23 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



Re: tagging 6.0.23

2010-01-13 Thread Mladen Turk

On 01/13/2010 10:09 AM, jean-frederic clere wrote:

Hi,

I plan to tag 6.0.23 tomorrow lunch time (~13h00 my time).



Third luck ;)


Please complain if that is not ok.



+1


Cheers
--
^TM

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



svn commit: r898709 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/coyote/http11/ webapps/docs/ webapps/docs/config/

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 10:42:08 2010
New Revision: 898709

URL: http://svn.apache.org/viewvc?rev=898709&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48004
Allow applications to set the Server header

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=898709&r1=898708&r2=898709&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 10:42:08 2010
@@ -183,9 +183,3 @@
   http://svn.apache.org/viewvc?rev=898468&view=rev
   +1: markt
   -1: 
-  
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48004
-  Allow applications to set the Server header
-  http://svn.apache.org/viewvc?rev=898527&view=rev
-  +1: markt, kkolinko, rjung
-  -1: 

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=898709&r1=898708&r2=898709&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 
Wed Jan 13 10:42:08 2010
@@ -1696,8 +1696,10 @@
 
 // Add server header
 if (server != null) {
+// Always overrides anything the app might set
 headers.setValue("Server").setString(server);
-} else {
+} else if (headers.getValue("Server") == null) {
+// If app didn't set the header, use the default
 outputBuffer.write(Constants.SERVER_BYTES);
 }
 

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=898709&r1=898708&r2=898709&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
Wed Jan 13 10:42:08 2010
@@ -1723,8 +1723,10 @@
 
 // Add server header
 if (server != null) {
+// Always overrides anything the app might set
 headers.setValue("Server").setString(server);
-} else {
+} else if (headers.getValue("Server") == null) {
+// If app didn't set the header, use the default
 outputBuffer.write(Constants.SERVER_BYTES);
 }
 

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=898709&r1=898708&r2=898709&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java Wed 
Jan 13 10:42:08 2010
@@ -1602,8 +1602,10 @@
 
 // Add server header
 if (server != null) {
+// Always overrides anything the app might set
 headers.setValue("Server").setString(server);
-} else {
+} else if (headers.getValue("Server") == null) {
+// If app didn't set the header, use the default
 outputBuffer.write(Constants.SERVER_BYTES);
 }
 

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=898709&r1=898708&r2=898709&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Jan 13 10:42:08 2010
@@ -72,6 +72,10 @@
 Update recommended version for native to 1.1.19. (rjung)
   
   
+48004: All web applications to set the http
+Server header. (markt)
+  
+  
 48470: Ensure Tomcat does not lock up if shut down under
 load. (markt)
   

Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml?rev=898709&r1=898708&r2=898709&view=diff
==
--- tomcat/t

DO NOT REPLY [Bug 48004] setHeader() does not replace the previous value for a "Server"

2010-01-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48004

--- Comment #3 from Mark Thomas  2010-01-13 02:42:12 GMT ---
The patch has been applied to 6.0.x and will be included in 6.0.23 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 48464] Feature request: startup.bat: -title option needed

2010-01-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48464

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #11 from Mark Thomas  2010-01-13 02:43:42 GMT ---
The patch has been applied to 6.0.x and will be included in 6.0.23 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: r898718 - /tomcat/trunk/webapps/docs/config/http.xml

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 11:18:10 2010
New Revision: 898718

URL: http://svn.apache.org/viewvc?rev=898718&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48532
Better documentation of the SSL connector defaults

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

Modified: tomcat/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/http.xml?rev=898718&r1=898717&r2=898718&view=diff
==
--- tomcat/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/trunk/webapps/docs/config/http.xml Wed Jan 13 11:18:10 2010
@@ -764,22 +764,34 @@
 
 
 
-  The TrustStore file to use to validate client certificates.
+  The trust store file to use to validate client certificates. The
+  default is the value of the javax.net.ssl.trustStore system
+  property. If neither this attribute nor the default system property is
+  set, no trust store will be configured.
 
 
 
-  The password to access the TrustStore. This defaults to the value
-  of keystorePass.
+  The password to access the trust store. The default is the value of 
the
+  javax.net.ssl.trustStorePassword system property. If that
+  property is null, the value of keystorePass is used as the
+  default. If neither this attribute, the default system property nor
+  keystorePassis set, no trust store will be configured.
 
 
 
-  Add this element if your are using a different format for the
-  TrustStore then you are using for the KeyStore.
+  The type of key store used for the trust store. The default is the
+  value of the javax.net.ssl.trustStoreType system property. 
If
+  that property is null, the value of keystoreType is used as
+  the default.
  
 
 
   The name of the truststore provider to be used for the server
-  certificate. If not specified, the list of registered providers is
+  certificate. The default is the value of the
+  javax.net.ssl.trustStoreProvider system property. If
+  that property is null, the value of keystoreProvider is used
+  as the default. If neither this attribute, the default system property 
nor
+  keystoreProvideris set, the list of registered providers is
   traversed in preference order and the first provider that supports the
   truststoreType is used.
   



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



svn commit: r898719 - in /tomcat/tc6.0.x/trunk: ./ webapps/docs/changelog.xml webapps/docs/config/http.xml

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 11:22:47 2010
New Revision: 898719

URL: http://svn.apache.org/viewvc?rev=898719&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48532
Better documentation of the SSL connector defaults

Modified:
tomcat/tc6.0.x/trunk/   (props changed)
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml

Propchange: tomcat/tc6.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 13 11:22:47 2010
@@ -1,2 +1,2 @@
 /tomcat:883362
-/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,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,770809,77
 
0876,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,890139,8902
 
65,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,895703,896370,896384,897776
+/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,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,770809,77
 
0876,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,890139,8902
 
65,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,895703,896370,896384,897380-

svn commit: r898722 - in /tomcat/tc5.5.x/trunk/container/webapps/docs: changelog.xml config/http.xml

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 11:26:39 2010
New Revision: 898722

URL: http://svn.apache.org/viewvc?rev=898722&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48532
Better documentation of the SSL connector defaults

Modified:
tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
tomcat/tc5.5.x/trunk/container/webapps/docs/config/http.xml

Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml?rev=898722&r1=898721&r2=898722&view=diff
==
--- tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml (original)
+++ tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Wed Jan 13 
11:26:39 2010
@@ -177,6 +177,11 @@
 the Manager How-To in the documentation webapp. Based on a patch by
 Arnaud Espy. (markt)
   
+  
+48532: Add information to the BIO/NIO SSL configuration page
+in the documentation web application to specify how the defaults for 
the
+various trust store attributes are determined. (markt)
+  
 
   
 

Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/config/http.xml?rev=898722&r1=898721&r2=898722&view=diff
==
--- tomcat/tc5.5.x/trunk/container/webapps/docs/config/http.xml (original)
+++ tomcat/tc5.5.x/trunk/container/webapps/docs/config/http.xml Wed Jan 13 
11:26:39 2010
@@ -480,18 +480,26 @@
 
 
 
-  The TrustStore file to use to validate client certificates.
+  The trust store file to use to validate client certificates. The
+  default is the value of the javax.net.ssl.trustStore system
+  property. If neither this attribute nor the default system property is
+  set, no trust store will be configured.
 
 
 
-  The password to access the TrustStore. This defaults to the value
-  of keystorePass.
+  The password to access the trust store. The default is the value of 
the
+  javax.net.ssl.trustStorePassword system property. If that
+  property is null, the value of keystorePass is used as the
+  default. If neither this attribute, the default system property nor
+  keystorePassis set, no trust store will be configured.
 
 
 
-  Add this element if your are using a different format for the
-  TrustStore then you are using for the KeyStore.
-
+  The type of key store used for the trust store. The default is the
+  value of the javax.net.ssl.trustStoreType system property. 
If
+  that property is null, the value of keystoreType is used as
+  the default.
+ 
 
 
   Is unsafe legacy TLS renegotiation allowed which is likely to expose



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



DO NOT REPLY [Bug 48532] try to read truststore even when clientauth is false

2010-01-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48532

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Component|Connectors  |Webapps:Documentation
Version|unspecified |5.5.28
 Resolution||FIXED
Product|Tomcat 6|Tomcat 5
   Target Milestone|default |---

--- Comment #1 from Mark Thomas  2010-01-13 03:29:14 GMT ---
Changing version since the stack trace is from Tomcat 5.

I suspect you were caught out by the undocumented feature whereby Tomcat uses a
number of system properties to determine defaults for the trust store. I have
updated the SSL config docs to make this clearer.

-- 
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: r898742 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-01-13 Thread jim
Author: jim
Date: Wed Jan 13 13:27:33 2010
New Revision: 898742

URL: http://svn.apache.org/viewvc?rev=898742&view=rev
Log:
tested and ok

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=898742&r1=898741&r2=898742&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 13:27:33 2010
@@ -148,7 +148,7 @@
   which failed to implement this fix properly.
   http://svn.apache.org/viewvc?rev=897380&view=rev  (fix)
   http://svn.apache.org/viewvc?rev=897381&view=rev  (Documentation)
-  +1: kkolinko, markt, rjung
+  +1: kkolinko, markt, rjung, jim
   -1:
 
 * Fix various EL issues (with test cases) including BZ47413#c8 & BZ48112



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



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

2010-01-13 Thread jim
Author: jim
Date: Wed Jan 13 13:27:58 2010
New Revision: 898743

URL: http://svn.apache.org/viewvc?rev=898743&view=rev
Log:
promote

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=898743&r1=898742&r2=898743&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 13:27:58 2010
@@ -28,6 +28,14 @@
 PATCHES ACCEPTED TO BACKPORT:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
+* Allow to disable buffering in JULI FileHandler
+  It is followup to r891328,
+  which failed to implement this fix properly.
+  http://svn.apache.org/viewvc?rev=897380&view=rev  (fix)
+  http://svn.apache.org/viewvc?rev=897381&view=rev  (Documentation)
+  +1: kkolinko, markt, rjung, jim
+  -1:
+
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]
 
@@ -143,14 +151,6 @@
  +1 for all the other changes
)
 
-* Allow to disable buffering in JULI FileHandler
-  It is followup to r891328,
-  which failed to implement this fix properly.
-  http://svn.apache.org/viewvc?rev=897380&view=rev  (fix)
-  http://svn.apache.org/viewvc?rev=897381&view=rev  (Documentation)
-  +1: kkolinko, markt, rjung, jim
-  -1:
-
 * Fix various EL issues (with test cases) including BZ47413#c8 & BZ48112
   The actual fixes
 svn copy 
https://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/jasper/compiler/AttributeParser.java



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



svn commit: r898745 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/juli/FileHandler.java webapps/docs/logging.xml

2010-01-13 Thread jim
Author: jim
Date: Wed Jan 13 13:28:54 2010
New Revision: 898745

URL: http://svn.apache.org/viewvc?rev=898745&view=rev
Log:
Merge r897380, r897381 from trunk:

Followup for r816252/r891328
Allow to disable buffering in JULI FileHandler
The previous implementation did not work as expected because of buffering 
performed by OutputStreamWriter

Update documentation
Submitted by: kkolinko
Reviewed/backported by: jim

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/juli/FileHandler.java
tomcat/tc6.0.x/trunk/webapps/docs/logging.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=898745&r1=898744&r2=898745&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 13:28:54 2010
@@ -28,13 +28,6 @@
 PATCHES ACCEPTED TO BACKPORT:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-* Allow to disable buffering in JULI FileHandler
-  It is followup to r891328,
-  which failed to implement this fix properly.
-  http://svn.apache.org/viewvc?rev=897380&view=rev  (fix)
-  http://svn.apache.org/viewvc?rev=897381&view=rev  (Documentation)
-  +1: kkolinko, markt, rjung, jim
-  -1:
 
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]

Modified: tomcat/tc6.0.x/trunk/java/org/apache/juli/FileHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/juli/FileHandler.java?rev=898745&r1=898744&r2=898745&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/juli/FileHandler.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/juli/FileHandler.java Wed Jan 13 
13:28:54 2010
@@ -144,7 +144,16 @@
 try {
 PrintWriter writer = this.writer;
 if (writer!=null) {
-writer.write(result);
+if (bufferSize > 0) {
+writer.write(result);
+} else {
+synchronized (this) {
+// OutputStreamWriter performs buffering inside its 
StreamEncoder,
+// and so to run without a buffer we have to flush 
explicitly
+writer.write(result);
+writer.flush();
+}
+}
 } else {
 reportError("FileHandler is closed or not yet initialized, 
unable to log ["+result+"]", null, ErrorManager.WRITE_FAILURE);
 }

Modified: tomcat/tc6.0.x/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/logging.xml?rev=898745&r1=898744&r2=898745&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/logging.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/logging.xml Wed Jan 13 13:28:54 2010
@@ -129,9 +129,10 @@
   The root logger can define its set of handlers using a
   .handlers property.
   Logging is buffered using a default buffer size of 8192 bytes.
-  To change buffersize, use the bufferSize property.
-  System property replacement for property values which start with
-  ${systemPropertyName}.
+  To change buffersize, use the bufferSize property of a 
handler.
+  The value of 0 disables buffering.
+  System property replacement is performed for property values which
+  contain ${systemPropertyName}.
 
   
   



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



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

2010-01-13 Thread yoavs
Author: yoavs
Date: Wed Jan 13 14:45:18 2010
New Revision: 898779

URL: http://svn.apache.org/viewvc?rev=898779&view=rev
Log:
Add my votes pre 6.0.23 release.

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=898779&r1=898778&r2=898779&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 14:45:18 2010
@@ -72,7 +72,7 @@
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47774
   Ensure web application class loader is used when calling session listeners
   http://svn.apache.org/viewvc?rev=898555&view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko, yoavs
   -1: 
 
 * Fix second part of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=47413#c8
@@ -127,7 +127,7 @@
   http://svn.apache.org/viewvc?rev=712053&view=rev
   Complete patch applicable to TC6:
   http://people.apache.org/~rjung/patches/tc6-version_filter.patch
-  +1: rjung
+  +1: rjung, yoavs
   -1: 
kkolinko: (
  -0 for changes of the *.txt files:
@@ -158,14 +158,14 @@
  
https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/test/org/apache/el/TestELEvaluation.java
 svn copy 
https://svn.apache.org/repos/asf/tomcat/trunk/test/org/apache/el/TesterFunctions.java
  
https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/test/org/apache/el/TesterFunctions.java
-  +1: markt, jim
+  +1: markt, jim, yoavs
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47977
   Using a body with a tag that has an empty body should cause an error
   http://svn.apache.org/viewvc?rev=898126&view=rev
   http://svn.apache.org/viewvc?rev=898256&view=rev (case insensitivity)
-  +1: markt, jim
+  +1: markt, jim, yoavs
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48421
@@ -174,5 +174,5 @@
   I haven't figured out why, but this also prevents buffered log messages being
   lost on stop when running as a service. 
   http://svn.apache.org/viewvc?rev=898468&view=rev
-  +1: markt
+  +1: markt, yoavs
   -1: 



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



Re: svn commit: r897380 - /tomcat/trunk/java/org/apache/juli/FileHandler.java

2010-01-13 Thread Filip Hanik - Dev Lists

On 01/08/2010 09:00 PM, kkoli...@apache.org wrote:

Author: kkolinko
Date: Sat Jan  9 03:59:59 2010
New Revision: 897380

URL: http://svn.apache.org/viewvc?rev=897380&view=rev
Log:
Followup for r816252/r891328
Allow to disable buffering in JULI FileHandler
The previous implementation did not work as expected because of buffering 
performed by OutputStreamWriter

Modified:
 tomcat/trunk/java/org/apache/juli/FileHandler.java

Modified: tomcat/trunk/java/org/apache/juli/FileHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/FileHandler.java?rev=897380&r1=897379&r2=897380&view=diff
==
--- tomcat/trunk/java/org/apache/juli/FileHandler.java (original)
+++ tomcat/trunk/java/org/apache/juli/FileHandler.java Sat Jan  9 03:59:59 2010
@@ -145,7 +145,16 @@
  try {
  PrintWriter writer = this.writer;
  if (writer!=null) {
-writer.write(result);
+if (bufferSize>  0) {
+writer.write(result);
+} else {
+synchronized (this) {
+// OutputStreamWriter performs buffering inside its 
StreamEncoder,
+// and so to run without a buffer we have to flush 
explicitly
+writer.write(result);
+writer.flush();
+}
+}
  } else {
  reportError("FileHandler is closed or not yet initialized, unable to log 
["+result+"]", null, ErrorManager.WRITE_FAILURE);
  }
   


can you explain this to me?

we already have
OutputStream os = bufferSize>0?new BufferedOutputStream(fos,bufferSize):fos;

And what you're doing here is forcing a possibly disk flush and yet 
another synchronization


you could limit the sync block too

+writer.write(result);
+if (bufferSize<= 0) {
+synchronized (this) {
+// OutputStreamWriter performs buffering inside its 
StreamEncoder,
+// and so to run without a buffer we have to flush 
explicitly
+writer.flush();
+}
+}

but why synchronized(this) ? output streams are already synchronized. 
This just doesn't seem right


Filip





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


   



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



Re: svn commit: r898745 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/juli/FileHandler.java webapps/docs/logging.xml

2010-01-13 Thread Filip Hanik - Dev Lists

-1, I would propose this one to be

writer.write(result);
if (bufferSize < 0)
flush();


Here is why

1. No synchronized(this) - not sure why we think its needed
2. It allows a setting of bufferSize==0 -> use system default
3. bufferSize<0 do a flush of the writer

best
Filip


On 01/13/2010 06:28 AM, j...@apache.org wrote:

Author: jim
Date: Wed Jan 13 13:28:54 2010
New Revision: 898745

URL: http://svn.apache.org/viewvc?rev=898745&view=rev
Log:
Merge r897380, r897381 from trunk:

Followup for r816252/r891328
Allow to disable buffering in JULI FileHandler
The previous implementation did not work as expected because of buffering 
performed by OutputStreamWriter

Update documentation
Submitted by: kkolinko
Reviewed/backported by: jim

Modified:
 tomcat/tc6.0.x/trunk/STATUS.txt
 tomcat/tc6.0.x/trunk/java/org/apache/juli/FileHandler.java
 tomcat/tc6.0.x/trunk/webapps/docs/logging.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=898745&r1=898744&r2=898745&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 13:28:54 2010
@@ -28,13 +28,6 @@
  PATCHES ACCEPTED TO BACKPORT:
[ start all new proposals below, under PATCHES PROPOSED. ]

-* Allow to disable buffering in JULI FileHandler
-  It is followup to r891328,
-  which failed to implement this fix properly.
-  http://svn.apache.org/viewvc?rev=897380&view=rev  (fix)
-  http://svn.apache.org/viewvc?rev=897381&view=rev  (Documentation)
-  +1: kkolinko, markt, rjung, jim
-  -1:

  PATCHES PROPOSED TO BACKPORT:
[ New proposals should be added at the end of the list ]

Modified: tomcat/tc6.0.x/trunk/java/org/apache/juli/FileHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/juli/FileHandler.java?rev=898745&r1=898744&r2=898745&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/juli/FileHandler.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/juli/FileHandler.java Wed Jan 13 
13:28:54 2010
@@ -144,7 +144,16 @@
  try {
  PrintWriter writer = this.writer;
  if (writer!=null) {
-writer.write(result);
+if (bufferSize>  0) {
+writer.write(result);
+} else {
+synchronized (this) {
+// OutputStreamWriter performs buffering inside its 
StreamEncoder,
+// and so to run without a buffer we have to flush 
explicitly
+writer.write(result);
+writer.flush();
+}
+}
  } else {
  reportError("FileHandler is closed or not yet initialized, unable to log 
["+result+"]", null, ErrorManager.WRITE_FAILURE);
  }

Modified: tomcat/tc6.0.x/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/logging.xml?rev=898745&r1=898744&r2=898745&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/logging.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/logging.xml Wed Jan 13 13:28:54 2010
@@ -129,9 +129,10 @@
The root logger can define its set of handlers using a
.handlers  property.
Logging is buffered using a default buffer size of 8192 bytes.
-  To change buffersize, use thebufferSize  property.
-System property replacement for property values which start with
-  ${systemPropertyName}.
+  To change buffersize, use thebufferSize  property of a 
handler.
+  The value of0  disables buffering.
+System property replacement is performed for property values which
+  contain ${systemPropertyName}.
  





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


   



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



Re: svn commit: r898745 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/juli/FileHandler.java webapps/docs/logging.xml

2010-01-13 Thread Konstantin Kolinko
2010/1/13 Filip Hanik - Dev Lists :
> -1, I would propose this one to be
>
> writer.write(result);
> if (bufferSize < 0)
>    flush();
>
>
> Here is why
>
> 1. No synchronized(this) - not sure why we think its needed

Re: synchronized(this)

-writer.write(result);
+if (bufferSize > 0) {
+writer.write(result);
+} else {
+synchronized (this) {
+// OutputStreamWriter performs buffering
inside its StreamEncoder,
+// and so to run without a buffer we have to
flush explicitly
+writer.write(result);
+writer.flush();
+}
+}

synchronized (this) {} was added so that writer.write() was
immediately followed by writer.flush().

Both of them are internally synchronized(lock).

Omitting synchronized (this) will result in
writer.write()
writer.write()
writer.flush()
writer.flush()

I do not see much harm from that, so I'd agree to remove synchronized(this).


> 2. It allows a setting of bufferSize==0 -> use system default
> 3. bufferSize<0 do a flush of the writer

I doubt, that such feature is needed, though I'll be OK if anyone proposes it.
Should we use system default (internal buffer of OutputStreamWriter's Encoder),
or our default?

If you want, you can propose a patch that implements this feature and
updates /docs/logging.xml accordingly.


By the way:
with logs buffering enabled by default, as it is now, last log entries
are lost when Tomcat is stopped when Tomcat is run as a service (on
Windows, but I suppose jsvc on Unix has the same effect).

There is Mark's patch for that (r898468), but I have doubts
regarding Runtime.getRuntime().addShutdownHook(new Cleaner());
used there.

We could disable log buffering in 6.0.23, to be it the same as in
6.0.20 (were logs were not buffered):
a) by setting bufferSize=0 or -1 explicitly in the default
logging.properties file
b) by changing the default value in o.a.juli.FileHandler to disable buffering.

I am ok with any of a) and b).  Any thoughts?


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: r898745 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/juli/FileHandler.java webapps/docs/logging.xml

2010-01-13 Thread Mark Thomas
On 13/01/2010 16:24, Konstantin Kolinko wrote:
> There is Mark's patch for that (r898468), but I have doubts
> regarding Runtime.getRuntime().addShutdownHook(new Cleaner());
> used there.

Why? It is pretty much identical to the code in the standard LogManager.

> We could disable log buffering in 6.0.23, to be it the same as in
> 6.0.20 (were logs were not buffered):
> a) by setting bufferSize=0 or -1 explicitly in the default
> logging.properties file
> b) by changing the default value in o.a.juli.FileHandler to disable buffering.
> 
> I am ok with any of a) and b).  Any thoughts?

Buffered logs are useful. Lets just fix not flushing the buffers on shut
down.

Mark



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



Re: svn commit: r898745 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/juli/FileHandler.java webapps/docs/logging.xml

2010-01-13 Thread Filip Hanik - Dev Lists

On 01/13/2010 09:24 AM, Konstantin Kolinko wrote:

2010/1/13 Filip Hanik - Dev Lists:
   

-1, I would propose this one to be

writer.write(result);
if (bufferSize<  0)
flush();


Here is why

1. No synchronized(this) - not sure why we think its needed
 

Re: synchronized(this)

-writer.write(result);
+if (bufferSize>  0) {
+writer.write(result);
+} else {
+synchronized (this) {
+// OutputStreamWriter performs buffering
inside its StreamEncoder,
+// and so to run without a buffer we have to
flush explicitly
+writer.write(result);
+writer.flush();
+}
+}

synchronized (this) {} was added so that writer.write() was
immediately followed by writer.flush().

Both of them are internally synchronized(lock).

Omitting synchronized (this) will result in
writer.write()
writer.write()
writer.flush()
writer.flush()

I do not see much harm from that, so I'd agree to remove synchronized(this).


   

2. It allows a setting of bufferSize==0 ->  use system default
3. bufferSize<0 do a flush of the writer
 

I doubt, that such feature is needed, though I'll be OK if anyone proposes it.
   
ok, forcing a flush, could have the impact of a forced disk write, that 
is really bad. Let the disk do its own caching, and decide when to flush 
it out.

Should we use system default (internal buffer of OutputStreamWriter's Encoder),
or our default?
   

system default

If you want, you can propose a patch that implements this feature and
updates /docs/logging.xml accordingly.
   

will do



By the way:
with logs buffering enabled by default, as it is now, last log entries
are lost when Tomcat is stopped when Tomcat is run as a service (on
Windows, but I suppose jsvc on Unix has the same effect).
   

got it


There is Mark's patch for that (r898468), but I have doubts
regarding Runtime.getRuntime().addShutdownHook(new Cleaner());
used there.

We could disable log buffering in 6.0.23, to be it the same as in
6.0.20 (were logs were not buffered):
a) by setting bufferSize=0 or -1 explicitly in the default
logging.properties file
b) by changing the default value in o.a.juli.FileHandler to disable buffering.

I am ok with any of a) and b).  Any thoughts?
   

I would propose
a)
b) default value in FileHandler be 0 (system default behavior)

Filip


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



svn commit: r898836 - in /tomcat/trunk: java/org/apache/juli/FileHandler.java webapps/docs/logging.xml

2010-01-13 Thread fhanik
Author: fhanik
Date: Wed Jan 13 17:00:26 2010
New Revision: 898836

URL: http://svn.apache.org/viewvc?rev=898836&view=rev
Log:
Following changes
1. Default bufferSize is 0 - rely on system behavior
2. bufferSize of <0 will automatically flush the writer on each write
3. autoFlush for printWriter is false, otherwise we are duplicating the effort
4. date is a volatile variable so that a write to the variable gets propagated 
properly


Modified:
tomcat/trunk/java/org/apache/juli/FileHandler.java
tomcat/trunk/webapps/docs/logging.xml

Modified: tomcat/trunk/java/org/apache/juli/FileHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/FileHandler.java?rev=898836&r1=898835&r2=898836&view=diff
==
--- tomcat/trunk/java/org/apache/juli/FileHandler.java (original)
+++ tomcat/trunk/java/org/apache/juli/FileHandler.java Wed Jan 13 17:00:26 2010
@@ -71,7 +71,7 @@
  * The as-of date for the currently open log file, or a zero-length
  * string if there is no open log file.
  */
-private String date = "";
+private volatile String date = "";
 
 
 /**
@@ -100,7 +100,7 @@
 /**
  * Log buffer size
  */
-private int bufferSize = 8192;
+private int bufferSize = 0;
 
 
 // - Public Methods
@@ -145,15 +145,9 @@
 try {
 PrintWriter writer = this.writer;
 if (writer!=null) {
-if (bufferSize > 0) {
-writer.write(result);
-} else {
-synchronized (this) {
-// OutputStreamWriter performs buffering inside its 
StreamEncoder,
-// and so to run without a buffer we have to flush 
explicitly
-writer.write(result);
-writer.flush();
-}
+writer.write(result);
+if (bufferSize < 0) {
+writer.flush();
 }
 } else {
 reportError("FileHandler is closed or not yet initialized, 
unable to log ["+result+"]", null, ErrorManager.WRITE_FAILURE);
@@ -314,7 +308,7 @@
 OutputStream os = bufferSize>0?new 
BufferedOutputStream(fos,bufferSize):fos;
 writer = new PrintWriter(
 (encoding != null) ? new OutputStreamWriter(os, encoding)
-   : new OutputStreamWriter(os), true);
+   : new OutputStreamWriter(os), false);
 writer.write(getFormatter().getHead(this));
 } catch (Exception e) {
 reportError(null, e, ErrorManager.OPEN_FAILURE);

Modified: tomcat/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/logging.xml?rev=898836&r1=898835&r2=898836&view=diff
==
--- tomcat/trunk/webapps/docs/logging.xml (original)
+++ tomcat/trunk/webapps/docs/logging.xml Wed Jan 13 17:00:26 2010
@@ -128,9 +128,11 @@
   boolean value.
   The root logger can define its set of handlers using a
   .handlers property.
-  Logging is buffered using a default buffer size of 8192 bytes.
-  To change buffersize, use the bufferSize property of a 
handler.
-  The value of 0 disables buffering.
+  Logging is buffered using a default buffer size of 0 bytes.
+  To change bufferSize, use the bufferSize property of a 
handler.
+  The value of 0 uses system default buffering.
+  The value of <0 forces a writer flush upon each log 
write.
+  A value >0 uses a BufferedOutputStream with the defined 
value.
   System property replacement is performed for property values which
   contain ${systemPropertyName}.
 



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



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

2010-01-13 Thread fhanik
Author: fhanik
Date: Wed Jan 13 17:01:52 2010
New Revision: 898838

URL: http://svn.apache.org/viewvc?rev=898838&view=rev
Log:
well defined buffering behavior and sensible default

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=898838&r1=898837&r2=898838&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 17:01:52 2010
@@ -176,3 +176,8 @@
   http://svn.apache.org/viewvc?rev=898468&view=rev
   +1: markt, yoavs
   -1: 
+  
+* Cleanup and well define log buffering behavior
+  http://svn.apache.org/viewvc?rev=898836&view=rev
+  +1: fhanik
+  -1: 



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



svn commit: r898860 - /tomcat/trunk/java/javax/el/BeanELResolver.java

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 17:53:36 2010
New Revision: 898860

URL: http://svn.apache.org/viewvc?rev=898860&view=rev
Log:
If the method is found, mark the property as resolved

Modified:
tomcat/trunk/java/javax/el/BeanELResolver.java

Modified: tomcat/trunk/java/javax/el/BeanELResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanELResolver.java?rev=898860&r1=898859&r2=898860&view=diff
==
--- tomcat/trunk/java/javax/el/BeanELResolver.java (original)
+++ tomcat/trunk/java/javax/el/BeanELResolver.java Wed Jan 13 17:53:36 2010
@@ -429,8 +429,9 @@
}
}
}
+   Object result = null;
try {
-return matchingMethod.invoke(base, parameters);
+   result = matchingMethod.invoke(base, parameters);
 } catch (IllegalArgumentException e) {
 throw new ELException(e);
 } catch (IllegalAccessException e) {
@@ -439,6 +440,8 @@
 throw new ELException(e.getCause());
 }

+context.setPropertyResolved(true);
+return result;
 }
 
 }



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



svn commit: r898862 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 18:00:24 2010
New Revision: 898862

URL: http://svn.apache.org/viewvc?rev=898862&view=rev
Log:
Up the timeout. 100s isn't always long enough when stepping through why a 
failing test.

Modified:
tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=898862&r1=898861&r2=898862&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Wed Jan 
13 18:00:24 2010
@@ -118,7 +118,7 @@
 URL url = new URL(path);
 HttpURLConnection connection = 
 (HttpURLConnection) url.openConnection();
-connection.setReadTimeout(10);
+connection.setReadTimeout(100);
 connection.connect();
 int rc = connection.getResponseCode();
 if (resHead != null) {



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



svn commit: r898863 - in /tomcat/trunk/test: org/apache/el/TestELInJsp.java org/apache/el/TesterBeanA.java org/apache/el/TesterBeanB.java webapp/el-method.jsp

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 18:01:26 2010
New Revision: 898863

URL: http://svn.apache.org/viewvc?rev=898863&view=rev
Log:
Add a test for method invocation with parameters

Added:
tomcat/trunk/test/org/apache/el/TesterBeanA.java   (with props)
tomcat/trunk/test/org/apache/el/TesterBeanB.java   (with props)
tomcat/trunk/test/webapp/el-method.jsp   (with props)
Modified:
tomcat/trunk/test/org/apache/el/TestELInJsp.java

Modified: tomcat/trunk/test/org/apache/el/TestELInJsp.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TestELInJsp.java?rev=898863&r1=898862&r2=898863&view=diff
==
--- tomcat/trunk/test/org/apache/el/TestELInJsp.java (original)
+++ tomcat/trunk/test/org/apache/el/TestELInJsp.java Wed Jan 13 18:01:26 2010
@@ -312,7 +312,6 @@
 ByteChunk res = getUrl("http://localhost:"; + getPort() +
 "/test/script-expr.jsp");
 String result = res.toString();
-System.out.println(result);
 assertTrue(result.indexOf("00-hello world") > 0);
 assertTrue(result.indexOf("01-hello \"world") > 0);
 assertTrue(result.indexOf("02-hello \\\"world") > 0);
@@ -327,4 +326,21 @@
 assertTrue(result.indexOf("11-hello %> world") > 0);
 }
 
+public void testELMethod() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir = 
+new File("test/webapp");
+// app dir is relative to server home
+tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
+
+tomcat.start();
+
+ByteChunk res = getUrl("http://localhost:"; + getPort() +
+"/test/el-method.jsp");
+String result = res.toString();
+assertTrue(result.indexOf("00-Hello JUnit from Tomcat") > 0);
+assertTrue(result.indexOf("01-Hello JUnit from Tomcat") > 0);
+assertTrue(result.indexOf("02-Hello JUnit from Tomcat") > 0);
+}
 }

Added: tomcat/trunk/test/org/apache/el/TesterBeanA.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TesterBeanA.java?rev=898863&view=auto
==
--- tomcat/trunk/test/org/apache/el/TesterBeanA.java (added)
+++ tomcat/trunk/test/org/apache/el/TesterBeanA.java Wed Jan 13 18:01:26 2010
@@ -0,0 +1,30 @@
+/*
+ * 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.el;
+
+public class TesterBeanA {
+private TesterBeanB bean;
+
+public TesterBeanB getBean() {
+return bean;
+}
+
+public void setBean(TesterBeanB bean) {
+this.bean = bean;
+}
+}

Propchange: tomcat/trunk/test/org/apache/el/TesterBeanA.java
--
svn:eol-style = native

Propchange: tomcat/trunk/test/org/apache/el/TesterBeanA.java
--
svn:keywords = Date Author Id Revision

Added: tomcat/trunk/test/org/apache/el/TesterBeanB.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TesterBeanB.java?rev=898863&view=auto
==
--- tomcat/trunk/test/org/apache/el/TesterBeanB.java (added)
+++ tomcat/trunk/test/org/apache/el/TesterBeanB.java Wed Jan 13 18:01:26 2010
@@ -0,0 +1,34 @@
+/*
+ * 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
+ *

svn commit: r898864 - in /tomcat/trunk/java/org/apache/el/parser: AstBracketSuffix.java AstDotSuffix.java AstValue.java ELParser.jjt Suffix.java

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 18:02:36 2010
New Revision: 898864

URL: http://svn.apache.org/viewvc?rev=898864&view=rev
Log:
Implement method invocation with parameters

Added:
tomcat/trunk/java/org/apache/el/parser/Suffix.java   (with props)
Modified:
tomcat/trunk/java/org/apache/el/parser/AstBracketSuffix.java
tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java
tomcat/trunk/java/org/apache/el/parser/AstValue.java
tomcat/trunk/java/org/apache/el/parser/ELParser.jjt

Modified: tomcat/trunk/java/org/apache/el/parser/AstBracketSuffix.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstBracketSuffix.java?rev=898864&r1=898863&r2=898864&view=diff
==
--- tomcat/trunk/java/org/apache/el/parser/AstBracketSuffix.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/AstBracketSuffix.java Wed Jan 13 
18:02:36 2010
@@ -27,7 +27,7 @@
  * @author Jacob Hookom [ja...@hookom.net]
  * @version $Change: 181177 $$Date$$Author$
  */
-public final class AstBracketSuffix extends SimpleNode {
+public final class AstBracketSuffix extends SimpleNode implements Suffix {
 public AstBracketSuffix(int id) {
 super(id);
 }

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=898864&r1=898863&r2=898864&view=diff
==
--- tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/AstDotSuffix.java Wed Jan 13 
18:02:36 2010
@@ -27,7 +27,7 @@
  * @author Jacob Hookom [ja...@hookom.net]
  * @version $Change: 181177 $$Date$$Author$
  */
-public final class AstDotSuffix extends SimpleNode {
+public final class AstDotSuffix extends SimpleNode implements Suffix {
 public AstDotSuffix(int id) {
 super(id);
 }

Modified: tomcat/trunk/java/org/apache/el/parser/AstValue.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstValue.java?rev=898864&r1=898863&r2=898864&view=diff
==
--- tomcat/trunk/java/org/apache/el/parser/AstValue.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/AstValue.java Wed Jan 13 18:02:36 
2010
@@ -20,6 +20,7 @@
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.util.ArrayList;
 
 import javax.el.ELException;
 import javax.el.ELResolver;
@@ -109,17 +110,34 @@
 Object base = this.children[0].getValue(ctx);
 int propCount = this.jjtGetNumChildren();
 int i = 1;
-Object property = null;
+Object suffix = null;
 ELResolver resolver = ctx.getELResolver();
 while (base != null && i < propCount) {
-property = this.children[i].getValue(ctx);
-if (property == null) {
-return null;
+suffix = this.children[i].getValue(ctx);
+if (i + 1 < propCount && !(this.children[i+1] instanceof Suffix)) {
+// Looking for a method
+ArrayList params = new ArrayList();
+ArrayList> paramTypes = new ArrayList>();
+while (i + 1 < propCount &&
+!(this.children[i+1] instanceof Suffix)) {
+params.add(this.children[i+1].getValue(ctx));
+paramTypes.add(this.children[i+1].getType(ctx));
+i++;
+}
+base = resolver.invoke(ctx, base, suffix,
+paramTypes.toArray(new Class[paramTypes.size()]),
+params.toArray(new Object[params.size()]));
+i++;
 } else {
-ctx.setPropertyResolved(false);
-base = resolver.getValue(ctx, base, property);
+// Looking for a property
+if (suffix == null) {
+return null;
+} else {
+ctx.setPropertyResolved(false);
+base = resolver.getValue(ctx, base, suffix);
+}
+i++;
 }
-i++;
 }
 return base;
 }

Modified: tomcat/trunk/java/org/apache/el/parser/ELParser.jjt
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/ELParser.jjt?rev=898864&r1=898863&r2=898864&view=diff
==
--- tomcat/trunk/java/org/apache/el/parser/ELParser.jjt (original)
+++ tomcat/trunk/java/org/apache/el/parser/ELParser.jjt Wed Jan 13 18:02:36 2010
@@ -227,7 +227,7 @@
  */
 void ValueSuffix() : {}
 {
-DotSuffix() | BracketSuffix()
+( DotSuffix() | BracketSuffix() ) ( MethodParameters())?
 }
 
 /*
@@ -249,6 +249,14 @@
 }
 
 /*
+ * MethodParam

svn commit: r898865 - /tomcat/trunk/java/org/apache/el/parser/ELParser.java

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 18:05:59 2010
New Revision: 898865

URL: http://svn.apache.org/viewvc?rev=898865&view=rev
Log:
Updated autogenerated code after r898864

Modified:
tomcat/trunk/java/org/apache/el/parser/ELParser.java

Modified: tomcat/trunk/java/org/apache/el/parser/ELParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/ELParser.java?rev=898865&r1=898864&r2=898865&view=diff
==
--- tomcat/trunk/java/org/apache/el/parser/ELParser.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/ELParser.java Wed Jan 13 18:05:59 
2010
@@ -1039,6 +1039,14 @@
   jj_consume_token(-1);
   throw new ParseException();
 }
+switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+case LPAREN:
+  MethodParameters();
+  break;
+default:
+  jj_la1[27] = jj_gen;
+  ;
+}
   }
 
 /*
@@ -1098,6 +1106,46 @@
   }
 
 /*
+ * MethodParameters
+ */
+  final public void MethodParameters() throws ParseException {
+jj_consume_token(LPAREN);
+switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+case INTEGER_LITERAL:
+case FLOATING_POINT_LITERAL:
+case STRING_LITERAL:
+case TRUE:
+case FALSE:
+case NULL:
+case LPAREN:
+case NOT0:
+case NOT1:
+case EMPTY:
+case MINUS:
+case IDENTIFIER:
+  Expression();
+  label_10:
+  while (true) {
+switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+case COMMA:
+  ;
+  break;
+default:
+  jj_la1[28] = jj_gen;
+  break label_10;
+}
+jj_consume_token(COMMA);
+Expression();
+  }
+  break;
+default:
+  jj_la1[29] = jj_gen;
+  ;
+}
+jj_consume_token(RPAREN);
+  }
+
+/*
  * NonLiteral
  * For Grouped Operations, Identifiers, and Functions
  */
@@ -1109,7 +1157,7 @@
   jj_consume_token(RPAREN);
   break;
 default:
-  jj_la1[27] = jj_gen;
+  jj_la1[30] = jj_gen;
   if (jj_2_2(2147483647)) {
 Function();
   } else {
@@ -1118,7 +1166,7 @@
   Identifier();
   break;
 default:
-  jj_la1[28] = jj_gen;
+  jj_la1[31] = jj_gen;
   jj_consume_token(-1);
   throw new ParseException();
 }
@@ -1186,22 +1234,22 @@
   case MINUS:
   case IDENTIFIER:
 Expression();
-label_10:
+label_11:
 while (true) {
   switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
   case COMMA:
 ;
 break;
   default:
-jj_la1[29] = jj_gen;
-break label_10;
+jj_la1[32] = jj_gen;
+break label_11;
   }
   jj_consume_token(COMMA);
   Expression();
 }
 break;
   default:
-jj_la1[30] = jj_gen;
+jj_la1[33] = jj_gen;
 ;
   }
   jj_consume_token(RPAREN);
@@ -1249,7 +1297,7 @@
   Null();
   break;
 default:
-  jj_la1[31] = jj_gen;
+  jj_la1[34] = jj_gen;
   jj_consume_token(-1);
   throw new ParseException();
 }
@@ -1286,7 +1334,7 @@
   }
   break;
 default:
-  jj_la1[32] = jj_gen;
+  jj_la1[35] = jj_gen;
   jj_consume_token(-1);
   throw new ParseException();
 }
@@ -1394,17 +1442,7 @@
 finally { jj_save(2, xla); }
   }
 
-  private boolean jj_3R_24() {
-if (jj_3R_30()) return true;
-Token xsp;
-while (true) {
-  xsp = jj_scanpos;
-  if (jj_3R_31()) { jj_scanpos = xsp; break; }
-}
-return false;
-  }
-
-  private boolean jj_3R_12() {
+  private boolean jj_3R_13() {
 if (jj_scan_token(IDENTIFIER)) return true;
 if (jj_scan_token(COLON)) return true;
 return false;
@@ -1413,34 +1451,34 @@
   private boolean jj_3_2() {
 Token xsp;
 xsp = jj_scanpos;
-if (jj_3R_12()) jj_scanpos = xsp;
+if (jj_3R_13()) jj_scanpos = xsp;
 if (jj_scan_token(IDENTIFIER)) return true;
 if (jj_scan_token(LPAREN)) return true;
 return false;
   }
 
-  private boolean jj_3R_33() {
-if (jj_scan_token(MINUS)) return true;
-return false;
-  }
-
-  private boolean jj_3R_68() {
+  private boolean jj_3R_69() {
 if (jj_scan_token(IDENTIFIER)) return true;
 return false;
   }
 
   private boolean jj_3R_25() {
+if (jj_3R_31()) return true;
 Token xsp;
-xsp = jj_scanpos;
-if (jj_3R_32()) {
-jj_scanpos = xsp;
-if (jj_3R_33()) return true;
+while (true) {
+  xsp = jj_scanpos;
+  if (jj_3R_32()) { jj_scanpos = xsp; break; }
 }
 return false;
   }
 
-  private boolean jj_3R_32() {
-if (jj_scan_token(PLUS)) return true;
+  private boolean jj_3R_59() {
+if (jj_3R_69()) return true;
+return false;
+  }
+
+  private boolean jj_3R_34() {
+if (jj_scan_token(MINUS)) return true;
 return false;
   }
 
@@ -1449,41 +1487,56 @@
 return false;
   }
 
-  private boolean jj_3R_20() {
-if (jj_3R_24()) ret

svn commit: r898889 - in /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool: DataSourceFactory.java DataSourceProxy.java PoolConfiguration.java PoolProperties.java jmx/ConnectionPool.jav

2010-01-13 Thread fhanik
Author: fhanik
Date: Wed Jan 13 19:08:09 2010
New Revision: 898889

URL: http://svn.apache.org/viewvc?rev=898889&view=rev
Log:
Remove a dependency on Java 6 that accidentally got introduced

Modified:

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java?rev=898889&r1=89&r2=898889&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java
 Wed Jan 13 19:08:09 2010
@@ -464,10 +464,10 @@
 public static DataSource createDataSource(Properties properties,Context 
context) throws Exception {
 PoolConfiguration poolProperties = 
DataSourceFactory.parsePoolProperties(properties);
 if (poolProperties.getDataSourceJNDI()!=null && 
poolProperties.getDataSource()==null) {
-javax.sql.CommonDataSource jndiDS = null;
+Object jndiDS = null;
 try {
 if (context!=null) {
-jndiDS = 
(javax.sql.CommonDataSource)context.lookup(poolProperties.getDataSourceJNDI());
+jndiDS = 
context.lookup(poolProperties.getDataSourceJNDI());
 } else {
 log.warn("dataSourceJNDI property is configued, but local 
JNDI context is null.");
 }
@@ -477,7 +477,7 @@
 if (jndiDS==null) {
 try {
 context = (Context) (new InitialContext());
-jndiDS = 
(javax.sql.CommonDataSource)context.lookup(poolProperties.getDataSourceJNDI());
+jndiDS = 
context.lookup(poolProperties.getDataSourceJNDI());
 } catch (NamingException e) {
 log.warn("The name 
\""+poolProperties.getDataSourceJNDI()+"\" can not be found in the 
InitialContext.");
 }

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=898889&r1=89&r2=898889&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
 Wed Jan 13 19:08:09 2010
@@ -23,7 +23,6 @@
 import java.util.Properties;
 import java.util.concurrent.Future;
 
-import javax.sql.CommonDataSource;
 import javax.sql.XAConnection;
 
 import org.apache.juli.logging.Log;
@@ -1015,14 +1014,14 @@
 /** 
  * {...@inheritdoc}
  */
-public void setDataSource(javax.sql.CommonDataSource ds) {
+public void setDataSource(Object ds) {
 getPoolProperties().setDataSource(ds);
 }
 
 /** 
  * {...@inheritdoc}
  */
-public CommonDataSource getDataSource() {
+public Object getDataSource() {
 return getPoolProperties().getDataSource();
 }
 

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java?rev=898889&r1=89&r2=898889&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
 Wed Jan 13 19:08:09 2010
@@ -18,8 +18,6 @@
 
 import java.util.Properties;
 
-import javax.sql.CommonDataSource;
-
 import org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorDefinition;
 
 /**
@@ -730,14 +728,14 @@
  * will be invoked.  
  * @param ds the {...@link javax.sql.DataSource} to be used for creating 
connections to be pooled.
  */
-public void setDataSource(CommonDataSource ds);
+public void setDataSource(Object ds);
 
 /**
  * Returns a datasource, if one exists that is being used to create 
connections.
  * This method will return null if the pool is using a {...@link 
java.sql.Driver}
  * @return the {...@link javax.sql.DataSource} to be used for creatin

svn commit: r898897 - /tomcat/trunk/java/javax/el/

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 19:18:08 2010
New Revision: 898897

URL: http://svn.apache.org/viewvc?rev=898897&view=rev
Log:
Tab police, fix Eclipse warnings, add @since Javadoc

Modified:
tomcat/trunk/java/javax/el/BeanELResolver.java
tomcat/trunk/java/javax/el/CompositeELResolver.java
tomcat/trunk/java/javax/el/ELContextEvent.java
tomcat/trunk/java/javax/el/ELException.java
tomcat/trunk/java/javax/el/ELResolver.java
tomcat/trunk/java/javax/el/Expression.java
tomcat/trunk/java/javax/el/MethodNotFoundException.java
tomcat/trunk/java/javax/el/PropertyNotFoundException.java
tomcat/trunk/java/javax/el/PropertyNotWritableException.java

Modified: tomcat/trunk/java/javax/el/BeanELResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanELResolver.java?rev=898897&r1=898896&r2=898897&view=diff
==
--- tomcat/trunk/java/javax/el/BeanELResolver.java (original)
+++ tomcat/trunk/java/javax/el/BeanELResolver.java Wed Jan 13 19:18:08 2010
@@ -35,174 +35,174 @@
 
 public class BeanELResolver extends ELResolver {
 
-   private final boolean readOnly;
+private final boolean readOnly;
 
-   private final ConcurrentCache cache =
-   new ConcurrentCache(1000);
+private final ConcurrentCache cache =
+new ConcurrentCache(1000);
 
-   public BeanELResolver() {
-   this.readOnly = false;
-   }
+public BeanELResolver() {
+this.readOnly = false;
+}
 
-   public BeanELResolver(boolean readOnly) {
-   this.readOnly = readOnly;
-   }
+public BeanELResolver(boolean readOnly) {
+this.readOnly = readOnly;
+}
 
-   @Override
+@Override
 public Object getValue(ELContext context, Object base, Object property)
-   throws NullPointerException, PropertyNotFoundException, 
ELException {
-   if (context == null) {
-   throw new NullPointerException();
-   }
-   if (base == null || property == null) {
-   return null;
-   }
-
-   context.setPropertyResolved(true);
-   Method m = this.property(context, base, property).read(context);
-   try {
-   return m.invoke(base, (Object[]) null);
-   } catch (IllegalAccessException e) {
-   throw new ELException(e);
-   } catch (InvocationTargetException e) {
-   throw new ELException(message(context, 
"propertyReadError",
-   new Object[] { 
base.getClass().getName(),
-   property.toString() }), 
e.getCause());
-   } catch (Exception e) {
-   throw new ELException(e);
-   }
-   }
+throws NullPointerException, PropertyNotFoundException, 
ELException {
+if (context == null) {
+throw new NullPointerException();
+}
+if (base == null || property == null) {
+return null;
+}
 
-   @Override
+context.setPropertyResolved(true);
+Method m = this.property(context, base, property).read(context);
+try {
+return m.invoke(base, (Object[]) null);
+} catch (IllegalAccessException e) {
+throw new ELException(e);
+} catch (InvocationTargetException e) {
+throw new ELException(message(context, "propertyReadError",
+new Object[] { base.getClass().getName(),
+property.toString() }), e.getCause());
+} catch (Exception e) {
+throw new ELException(e);
+}
+}
+
+@Override
 public Class getType(ELContext context, Object base, Object property)
-   throws NullPointerException, PropertyNotFoundException, 
ELException {
-   if (context == null) {
-   throw new NullPointerException();
-   }
-   if (base == null || property == null) {
-   return null;
-   }
-
-   context.setPropertyResolved(true);
-   return this.property(context, base, property).getPropertyType();
-   }
+throws NullPointerException, PropertyNotFoundException, 
ELException {
+if (context == null) {
+throw new NullPointerException();
+}
+if (base == null || property == null) {
+return null;
+}
 
-   @Override
+context.setPropertyResolved(true);
+return this.property(context, base, property).getPropertyType();
+}
+
+@Override
 public void setValue(ELContext context, Object base, Object property,
-   Object value) throws NullPointerException,
-   PropertyNotFoundExceptio

svn commit: r898900 - /tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 19:19:25 2010
New Revision: 898900

URL: http://svn.apache.org/viewvc?rev=898900&view=rev
Log:
Jasper Parser change so methods with parameters aren't mistaken for functions

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java?rev=898900&r1=898899&r2=898900&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java Wed Jan 13 
19:19:25 2010
@@ -30,7 +30,8 @@
 
 public class ELParser {
 
-private Token curToken; // current token
+private Token curToken;  // current token
+private Token prevToken; // previous token
 
 private ELNode.Nodes expr;
 
@@ -119,27 +120,28 @@
  * arguments
  */
 private boolean parseFunction() {
-if (!(curToken instanceof Id) || isELReserved(curToken.toString())) {
+if (!(curToken instanceof Id) || isELReserved(curToken.toString()) ||
+prevToken instanceof Char && prevToken.toChar() == '.') {
 return false;
 }
 String s1 = null; // Function prefix
 String s2 = curToken.toString(); // Function name
 int mark = getIndex();
 if (hasNext()) {
-Token t = nextToken();
-if (t.toChar() == ':') {
+curToken = nextToken();
+if (curToken.toChar() == ':') {
 if (hasNext()) {
 Token t2 = nextToken();
 if (t2 instanceof Id) {
 s1 = s2;
 s2 = t2.toString();
 if (hasNext()) {
-t = nextToken();
+curToken = nextToken();
 }
 }
 }
 }
-if (t.toChar() == '(') {
+if (curToken.toChar() == '(') {
 ELexpr.add(new ELNode.Function(s1, s2));
 return true;
 }
@@ -224,6 +226,7 @@
  * @return The next token in the EL expression buffer.
  */
 private Token nextToken() {
+prevToken = curToken;
 skipSpaces();
 if (hasNextChar()) {
 char ch = nextChar();



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



svn commit: r898902 - in /tomcat/trunk/java/javax/el: MethodExpression.java ValueExpression.java ValueReference.java

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 19:20:42 2010
New Revision: 898902

URL: http://svn.apache.org/viewvc?rev=898902&view=rev
Log:
Implement remainder of EL 2.2. API changes

Added:
tomcat/trunk/java/javax/el/ValueReference.java   (with props)
Modified:
tomcat/trunk/java/javax/el/MethodExpression.java
tomcat/trunk/java/javax/el/ValueExpression.java

Modified: tomcat/trunk/java/javax/el/MethodExpression.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/MethodExpression.java?rev=898902&r1=898901&r2=898902&view=diff
==
--- tomcat/trunk/java/javax/el/MethodExpression.java (original)
+++ tomcat/trunk/java/javax/el/MethodExpression.java Wed Jan 13 19:20:42 2010
@@ -22,7 +22,17 @@
  */
 public abstract class MethodExpression extends Expression {
 
+private static final long serialVersionUID = 8163925562047324656L;
+
 public abstract MethodInfo getMethodInfo(ELContext context) throws 
NullPointerException, PropertyNotFoundException, MethodNotFoundException, 
ELException;
 
 public abstract Object invoke(ELContext context, Object[] params) throws 
NullPointerException, PropertyNotFoundException, MethodNotFoundException, 
ELException;
+
+/**
+ * @since EL 2.2
+ */
+public boolean isParametersProvided() {
+// Expected to be over-ridden by implementation
+return false;
+}
 }

Modified: tomcat/trunk/java/javax/el/ValueExpression.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ValueExpression.java?rev=898902&r1=898901&r2=898902&view=diff
==
--- tomcat/trunk/java/javax/el/ValueExpression.java (original)
+++ tomcat/trunk/java/javax/el/ValueExpression.java Wed Jan 13 19:20:42 2010
@@ -22,6 +22,8 @@
  */
 public abstract class ValueExpression extends Expression {
 
+private static final long serialVersionUID = 8577809572381654673L;
+
 public abstract Class getExpectedType();
 
 public abstract Class getType(ELContext context) throws 
NullPointerException, PropertyNotFoundException, ELException;
@@ -32,4 +34,11 @@
 
 public abstract Object getValue(ELContext context) throws 
NullPointerException, PropertyNotFoundException, ELException;
 
+/**
+ * @since EL 2.2
+ */
+public ValueReference getValueReference(@SuppressWarnings("unused") 
ELContext context) {
+ // Expected to be over-ridden by implementation
+return null;
+}
 }

Added: tomcat/trunk/java/javax/el/ValueReference.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ValueReference.java?rev=898902&view=auto
==
--- tomcat/trunk/java/javax/el/ValueReference.java (added)
+++ tomcat/trunk/java/javax/el/ValueReference.java Wed Jan 13 19:20:42 2010
@@ -0,0 +1,44 @@
+/*
+ * 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 javax.el;
+
+import java.io.Serializable;
+
+/**
+ * @since EL 2.2
+ */
+public class ValueReference implements Serializable {
+
+private static final long serialVersionUID = 1L;
+
+private Object base;
+private Object property;
+
+public ValueReference(Object base, Object property) {
+this.base = base;
+this.property = property;
+}
+
+public Object getBase() {
+return base;
+}
+
+public Object getProperty() {
+return property;
+}
+}

Propchange: tomcat/trunk/java/javax/el/ValueReference.java
--
svn:eol-style = native

Propchange: tomcat/trunk/java/javax/el/ValueReference.java
--
svn:keywords = Date Author Id Revision



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



svn commit: r898906 - /tomcat/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java

2010-01-13 Thread fhanik
Author: fhanik
Date: Wed Jan 13 19:23:53 2010
New Revision: 898906

URL: http://svn.apache.org/viewvc?rev=898906&view=rev
Log:
Force a unconditional disconnect when an error happens, like dropped 
connections to a firewall

Modified:

tomcat/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java?rev=898906&r1=898905&r2=898906&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java
 Wed Jan 13 19:23:53 2010
@@ -76,7 +76,12 @@
  */
 public void sendMessage(ChannelMessage message, Member[] destination) 
throws ChannelException {
 MultiPointSender sender = getTransport();
-sender.sendMessage(destination,message);
+try {
+sender.sendMessage(destination,message);
+}catch (ChannelException x) {
+sender.disconnect();
+throw x;
+}
 }
 
 



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



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

2010-01-13 Thread fhanik
Author: fhanik
Date: Wed Jan 13 19:26:16 2010
New Revision: 898909

URL: http://svn.apache.org/viewvc?rev=898909&view=rev
Log:
backport of connectivity fix

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=898909&r1=898908&r2=898909&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 19:26:16 2010
@@ -181,3 +181,9 @@
   http://svn.apache.org/viewvc?rev=898836&view=rev
   +1: fhanik
   -1: 
+
+* Force disconnect upon transmission failure
+  http://svn.apache.org/viewvc?rev=898906&view=rev
+  +1: fhanik
+  -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



svn commit: r898912 - /tomcat/trunk/modules/jdbc-pool/build.properties.default

2010-01-13 Thread fhanik
Author: fhanik
Date: Wed Jan 13 19:32:51 2010
New Revision: 898912

URL: http://svn.apache.org/viewvc?rev=898912&view=rev
Log:
Up the version num

Modified:
tomcat/trunk/modules/jdbc-pool/build.properties.default

Modified: tomcat/trunk/modules/jdbc-pool/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/build.properties.default?rev=898912&r1=898911&r2=898912&view=diff
==
--- tomcat/trunk/modules/jdbc-pool/build.properties.default (original)
+++ tomcat/trunk/modules/jdbc-pool/build.properties.default Wed Jan 13 19:32:51 
2010
@@ -28,7 +28,7 @@
 version.major=1
 version.minor=0
 version.build=8
-version.patch=3
+version.patch=4
 version.suffix=
 
 # - Default Base Path for Dependent Packages -



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



svn commit: r898913 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java

2010-01-13 Thread fhanik
Author: fhanik
Date: Wed Jan 13 19:34:31 2010
New Revision: 898913

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

Modified:

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java?rev=898913&r1=898912&r2=898913&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java
 Wed Jan 13 19:34:31 2010
@@ -738,7 +738,7 @@
 public Object getDataSource();
 
 /**
- * Configure the connection pool to use a DataSource according to 
{...@link PoolConfiguration#setDataSource(CommonDataSource)}
+ * Configure the connection pool to use a DataSource according to 
{...@link PoolConfiguration#setDataSource(Object)}
  * But instead of injecting the object, specify the JNDI location.
  * After a successful JNDI look, the {...@link 
PoolConfiguration#getDataSource()} will not return null. 
  * @param jndiDS -the JNDI string @TODO specify the rules here.
@@ -747,7 +747,7 @@
 
 /**
  * Returns the JNDI string configured for data source usage.
- * @return
+ * @return the JNDI string or null if not set
  */
 public String getDataSourceJNDI();
 



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



svn commit: r898915 - /tomcat/tags/JDBC_POOL_1_0_8_4/

2010-01-13 Thread fhanik
Author: fhanik
Date: Wed Jan 13 19:36:05 2010
New Revision: 898915

URL: http://svn.apache.org/viewvc?rev=898915&view=rev
Log:
Tag current state

Added:
tomcat/tags/JDBC_POOL_1_0_8_4/   (props changed)
  - copied from r898914, tomcat/trunk/modules/jdbc-pool/

Propchange: tomcat/tags/JDBC_POOL_1_0_8_4/
--
--- svn:ignore (added)
+++ svn:ignore Wed Jan 13 19:36:05 2010
@@ -0,0 +1,3 @@
+build.properties
+includes
+output

Propchange: tomcat/tags/JDBC_POOL_1_0_8_4/
--
svn:mergeinfo = /tomcat/tc6.0.x/trunk/modules/jdbc-pool:742915



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



[Tomcat Wiki] Update of "HowTo" by ChristopherSchultz

2010-01-13 Thread Apache Wiki
Dear Wiki user,

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

The "HowTo" page has been changed by ChristopherSchultz.
The comment on this change is: Fixed spelling of "priviledges". Added reference 
to jsvc to the section on running without root..
http://wiki.apache.org/tomcat/HowTo?action=diff&rev1=82&rev2=83

--

  
  Corrections and comments are most welcome!
  
- == How to run Tomcat without root priviledges? ==
+ == How to run Tomcat without root privileges? ==
+ 
+ The best way is to use jsvc, available as part of the 
[[http://commons.apache.org/daemon/jsvc.html|commons-daemon]] project.
+ 
+ 
+ 
- Is there a way to allow normal user(non-root) to start/stop the tomcat 
server. Tried assigning permision, did not work. Read thru some articles, 
stated that only root has permission to port below 1025.
+ Is there a way to allow normal user(non-root) to start/stop the tomcat 
server. Tried assigning permission, did not work. Read thru some articles, 
stated that only root has permission to port below 1025.
  How can i allow a non-root user to do so ? thks in adv. :)
  
  - malathi ranjit singh

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



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

2010-01-13 Thread kkolinko
Author: kkolinko
Date: Wed Jan 13 21:23:03 2010
New Revision: 898945

URL: http://svn.apache.org/viewvc?rev=898945&view=rev
Log:
vote

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

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=898945&r1=898944&r2=898945&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 21:23:03 2010
@@ -179,7 +179,7 @@
   
 * Cleanup and well define log buffering behavior
   http://svn.apache.org/viewvc?rev=898836&view=rev
-  +1: fhanik
+  +1: fhanik, kkolinko
   -1: 
 
 * Force disconnect upon transmission failure



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



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

2010-01-13 Thread Konstantin Kolinko
2010/1/13  :
> Author: fhanik
> Date: Wed Jan 13 19:26:16 2010
> New Revision: 898909
>
> URL: http://svn.apache.org/viewvc?rev=898909&view=rev
> Log:
> backport of connectivity fix
>
> Modified:
>    tomcat/tc6.0.x/trunk/STATUS.txt
>

> +
> +* Force disconnect upon transmission failure
> +  http://svn.apache.org/viewvc?rev=898906&view=rev
> +  +1: fhanik
> +  -1:
> +

Just wondering:

1. If any destination fails, you will disconnect the whole sender?
2. Shouldn't disconnect() call be surrounded by try{}catch ?

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: r898909 - /tomcat/tc6.0.x/trunk/STATUS.txt

2010-01-13 Thread Filip Hanik - Dev Lists

On 01/13/2010 02:40 PM, Konstantin Kolinko wrote:

2010/1/13:
   

Author: fhanik
Date: Wed Jan 13 19:26:16 2010
New Revision: 898909

URL: http://svn.apache.org/viewvc?rev=898909&view=rev
Log:
backport of connectivity fix

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

 
   

+
+* Force disconnect upon transmission failure
+  http://svn.apache.org/viewvc?rev=898906&view=rev
+  +1: fhanik
+  -1:
+
 

Just wondering:

1. If any destination fails, you will disconnect the whole sender?
   
yes, I was pondering only disconnecting the faulty members, but decided 
against it.

since its an error condition, better clean everything up.

2. Shouldn't disconnect() call be surrounded by try{}catch ?
   
nope, it doesn't throw any exceptions. It itself does a try/catch around 
the actual closure


thanks for the feedback
Filip

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



svn commit: r898967 - /tomcat/trunk/test/org/apache/el/TestValueExpressionImpl.java

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 22:08:54 2010
New Revision: 898967

URL: http://svn.apache.org/viewvc?rev=898967&view=rev
Log:
Add a test case for the new ValueExpression.getValueReference() method.

Added:
tomcat/trunk/test/org/apache/el/TestValueExpressionImpl.java   (with props)

Added: tomcat/trunk/test/org/apache/el/TestValueExpressionImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/TestValueExpressionImpl.java?rev=898967&view=auto
==
--- tomcat/trunk/test/org/apache/el/TestValueExpressionImpl.java (added)
+++ tomcat/trunk/test/org/apache/el/TestValueExpressionImpl.java Wed Jan 13 
22:08:54 2010
@@ -0,0 +1,55 @@
+/*
+ * 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.el;
+
+import javax.el.ELContext;
+import javax.el.ExpressionFactory;
+import javax.el.ValueExpression;
+import javax.el.ValueReference;
+
+import org.apache.jasper.el.ELContextImpl;
+
+import junit.framework.TestCase;
+
+public class TestValueExpressionImpl extends TestCase {
+
+public void testGetValueReference() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+ELContext context = new ELContextImpl();
+
+TesterBeanB beanB = new TesterBeanB();
+beanB.setName("Tomcat");
+ValueExpression var = factory.createValueExpression(beanB, 
TesterBeanB.class);
+context.getVariableMapper().setVariable("beanB", var);
+
+ValueExpression ve =
+factory.createValueExpression(context, "${beanB.name}", 
String.class); 
+
+// First check the basics work
+String result = (String) ve.getValue(context);
+assertEquals("Tomcat", result);
+
+// Now check the value reference
+ValueReference vr = ve.getValueReference(context);
+assertNotNull(vr);
+
+assertEquals(beanB, vr.getBase());
+assertEquals("name", vr.getProperty());
+}
+
+}

Propchange: tomcat/trunk/test/org/apache/el/TestValueExpressionImpl.java
--
svn:eol-style = native

Propchange: tomcat/trunk/test/org/apache/el/TestValueExpressionImpl.java
--
svn:keywords = Date Author Id Revision



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



svn commit: r898969 - in /tomcat/trunk/java/org/apache/el: MethodExpressionImpl.java ValueExpressionImpl.java parser/AstValue.java parser/Node.java parser/SimpleNode.java

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 22:10:49 2010
New Revision: 898969

URL: http://svn.apache.org/viewvc?rev=898969&view=rev
Log:
Implement the new ValueExpression.getValueReference() method.
Add some plumbing for MethodExpression.isParametersProvided()
Add some more generics where we can without breaking the code generation

Modified:
tomcat/trunk/java/org/apache/el/MethodExpressionImpl.java
tomcat/trunk/java/org/apache/el/ValueExpressionImpl.java
tomcat/trunk/java/org/apache/el/parser/AstValue.java
tomcat/trunk/java/org/apache/el/parser/Node.java
tomcat/trunk/java/org/apache/el/parser/SimpleNode.java

Modified: tomcat/trunk/java/org/apache/el/MethodExpressionImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/MethodExpressionImpl.java?rev=898969&r1=898968&r2=898969&view=diff
==
--- tomcat/trunk/java/org/apache/el/MethodExpressionImpl.java (original)
+++ tomcat/trunk/java/org/apache/el/MethodExpressionImpl.java Wed Jan 13 
22:10:49 2010
@@ -317,4 +317,13 @@
 public boolean isLiteralText() {
 return false;
 }
+
+/**
+ * @since EL 2.2
+ */
+@Override
+public boolean isParametersProvided() {
+return this.getNode().isParametersProvided();
+}
+
 }

Modified: tomcat/trunk/java/org/apache/el/ValueExpressionImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/ValueExpressionImpl.java?rev=898969&r1=898968&r2=898969&view=diff
==
--- tomcat/trunk/java/org/apache/el/ValueExpressionImpl.java (original)
+++ tomcat/trunk/java/org/apache/el/ValueExpressionImpl.java Wed Jan 13 
22:10:49 2010
@@ -31,6 +31,7 @@
 import javax.el.PropertyNotFoundException;
 import javax.el.PropertyNotWritableException;
 import javax.el.ValueExpression;
+import javax.el.ValueReference;
 import javax.el.VariableMapper;
 
 import org.apache.el.lang.ELSupport;
@@ -103,7 +104,7 @@
 private transient Node node;
 
 public ValueExpressionImpl() {
-
+super();
 }
 
 /**
@@ -270,4 +271,15 @@
 public String toString() {
 return "ValueExpression["+this.expr+"]";
 }
+
+/**
+ * @since EL 2.2
+ */
+@Override
+public ValueReference getValueReference(ELContext context) {
+EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
+this.varMapper);
+return this.getNode().getValueReference(ctx);
+}
+
 }

Modified: tomcat/trunk/java/org/apache/el/parser/AstValue.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstValue.java?rev=898969&r1=898968&r2=898969&view=diff
==
--- tomcat/trunk/java/org/apache/el/parser/AstValue.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/AstValue.java Wed Jan 13 22:10:49 
2010
@@ -26,6 +26,7 @@
 import javax.el.ELResolver;
 import javax.el.MethodInfo;
 import javax.el.PropertyNotFoundException;
+import javax.el.ValueReference;
 
 import org.apache.el.lang.ELSupport;
 import org.apache.el.lang.EvaluationContext;
@@ -207,4 +208,20 @@
 }
 return result;
 }
+
+/**
+ * @since EL 2.2
+ */
+@Override
+public ValueReference getValueReference(EvaluationContext ctx) {
+// Check this is a reference to a base and a property
+if (this.children.length > 2 && this.jjtGetChild(2) instanceof Suffix) 
{
+// This is a method call
+return null;
+}
+Target t = getTarget(ctx);
+return new ValueReference(t.base, this.jjtGetChild(1).getValue(ctx));
+}
+
+
 }

Modified: tomcat/trunk/java/org/apache/el/parser/Node.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/Node.java?rev=898969&r1=898968&r2=898969&view=diff
==
--- tomcat/trunk/java/org/apache/el/parser/Node.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/Node.java Wed Jan 13 22:10:49 2010
@@ -21,6 +21,7 @@
 
 import javax.el.ELException;
 import javax.el.MethodInfo;
+import javax.el.ValueReference;
 
 import org.apache.el.lang.EvaluationContext;
 
@@ -31,7 +32,7 @@
 
 /**
  * @author Jacob Hookom [ja...@hookom.net]
- * @version $Change: 181177 $$Date$$Author$
+ * $Id$
  */
 public interface Node {
 
@@ -63,9 +64,21 @@
   
   public Object getValue(EvaluationContext ctx) throws ELException;
   public void setValue(EvaluationContext ctx, Object value) throws ELException;
-  public Class getType(EvaluationContext ctx) throws ELException;
+  public Class getType(EvaluationContext ctx) throws ELException;
   public boolean isReadOnly(EvaluationContext ctx) throws ELException;
   public void accept(NodeVisitor visitor) throws Exception;
-  public MethodInfo getMethodInfo(EvaluationContext ctx, Cl

svn commit: r898975 - in /tomcat/site/trunk: docs/download-native.html docs/resources.html docs/stylesheets/tomcat.css xdocs/resources.xml

2010-01-13 Thread markt
Author: markt
Date: Wed Jan 13 22:26:59 2010
New Revision: 898975

URL: http://svn.apache.org/viewvc?rev=898975&view=rev
Log:
Add new Tomcat book
Update generated content

Modified:
tomcat/site/trunk/docs/download-native.html
tomcat/site/trunk/docs/resources.html
tomcat/site/trunk/docs/stylesheets/tomcat.css
tomcat/site/trunk/xdocs/resources.xml

Modified: tomcat/site/trunk/docs/download-native.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-native.html?rev=898975&r1=898974&r2=898975&view=diff
==
--- tomcat/site/trunk/docs/download-native.html (original)
+++ tomcat/site/trunk/docs/download-native.html Wed Jan 13 22:26:59 2010
@@ -273,35 +273,35 @@
 
   
 
-  
-Native 1.1.18 Source Release tar.gz
+  
+Native 1.1.19 Source Release tar.gz
(e.g. Unix, Linux, Mac OS)
 
   
 
-[http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.18/source/tomcat-native-1.1.18-src.tar.gz.asc";>PGP]
+[http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.19/source/tomcat-native-1.1.19-src.tar.gz.asc";>PGP]
   
 
   
 
-[http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.18/source/tomcat-native-1.1.18-src.tar.gz.md5";>MD5]
+[http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.19/source/tomcat-native-1.1.19-src.tar.gz.md5";>MD5]
   
 
 
 
 
-  
-Native 1.1.18 Source Release zip
+  
+Native 1.1.19 Source Release zip
(e.g. Windows)
 
   
 
-[http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.18/source/tomcat-native-1.1.18-win32-src.zip.asc";>PGP]
+[http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.19/source/tomcat-native-1.1.19-win32-src.zip.asc";>PGP]
   
 
   
 
-[http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.18/source/tomcat-native-1.1.18-win32-src.zip.md5";>MD5]
+[http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.19/source/tomcat-native-1.1.19-win32-src.zip.md5";>MD5]
   
 
 
@@ -311,7 +311,7 @@
 
 You can find binaries release too
 You may download them from
-  HERE
+  HERE
 
 
   
@@ -350,19 +350,19 @@
 
 
 % pgpk -a KEYS
-% pgpv tomcat-native-1.1.18-src.tar.gz.asc
+% pgpv tomcat-native-1.1.19-src.tar.gz.asc
 
 or
 
 
 % pgp -ka KEYS
-% pgp tomcat-native-1.1.18-src.tar.gz.asc
+% pgp tomcat-native-1.1.19-src.tar.gz.asc
 
 or
 
 
 % gpg --import KEYS
-% gpg --verify tomcat-native-1.1.18-src.tar.gz.asc
+% gpg --verify tomcat-native-1.1.19-src.tar.gz.asc
 
 
 

Modified: tomcat/site/trunk/docs/resources.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/resources.html?rev=898975&r1=898974&r2=898975&view=diff
==
--- tomcat/site/trunk/docs/resources.html (original)
+++ tomcat/site/trunk/docs/resources.html Wed Jan 13 22:26:59 2010
@@ -306,6 +306,12 @@
   
 
   
+http://www.amazon.com/Tomcat-Developers-Guide-Damodar-Chetty/dp/1847197280/ref=sr_1_1?ie=UTF8&s=books&qid=1261141977&sr=8-1";>Tomcat
 6 Developer's Guide
+, by Damodar Chetty
+  Packt Publishing (12/2009)
+
+
+  
 http://www.brainysoftware.com/";>How Tomcat Works
 , by Budi Kurniawan
   ? (09/2003)

Modified: tomcat/site/trunk/docs/stylesheets/tomcat.css
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/stylesheets/tomcat.css?rev=898975&r1=898974&r2=898975&view=diff
==
--- tomcat/site/trunk/docs/stylesheets/tomcat.css (original)
+++ tomcat/site/trunk/docs/stylesheets/tomcat.css Wed Jan 13 22:26:59 2010
@@ -1,5 +1,5 @@
 /*
-* Copyright 2002-2006 The Apache Software Foundation
+* Copyright 2002-2010 The Apache Software Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.

Modified: tomcat/site/trunk/xdocs/resources.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/resources.xml?rev=898975&r1=898974&r2=898975&view=diff
==
--- tomcat/site/trunk/xdocs/resources.xml (original)
+++ tomcat/site/trunk/xdocs/resources.xml Wed Jan 13 22:26:59 2010
@@ -73,6 +73,10 @@
 
   
 
+  http://www.amazon.com/Tomcat-Developers-Guide-Damodar-Chetty/dp/1847197280/ref=sr

DO NOT REPLY [Bug 48498] 6.0.22RC: ArrayIndexOutOfBoundsException from Jasper when compilation error inside a CDATA block

2010-01-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48498

--- Comment #2 from Konstantin Kolinko  2010-01-13 
17:00:40 UTC ---
Reproducible in 6.0.20.
So, it is not a regression in the current 6.0.x.


If anyone encounters this, one way to find where it failed is to search in the
/work directory for a *.java file that does not have *.class file of the same
name. That matches to a jsp or tag file that failed to compile.

-- 
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: r898745 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/juli/FileHandler.java webapps/docs/logging.xml

2010-01-13 Thread Konstantin Kolinko
2010/1/13 Mark Thomas :
> On 13/01/2010 16:24, Konstantin Kolinko wrote:
>> There is Mark's patch for that (r898468), but I have doubts
>> regarding Runtime.getRuntime().addShutdownHook(new Cleaner());
>> used there.
>
> Why? It is pretty much identical to the code in the standard LogManager.
>

One thing is that all shutdown hooks start at the same time and run in
parallel, with no precedence relative each other.

It might help to know, what exactly you are observing. (Maybe file a BZ issue?)

One test, using Windows XP, JRE 6u16:

1. catalina.bat run
2. Press Ctrl+C in the console.

Current trunk and current tc6.0.x:  terminates immediately.  No
"shutting down" log messages neither on the screen, nor in logs. Thus
messages are lost, and the patch does not fix it. There is some delay,
so I think the shutdown process is actually being performed.

Setting
1catalina.org.apache.juli.FileHandler.bufferSize=-1
in logging.properties does not fix it either.

Current tc5.5.x (though don't remember when I compiled it): Shows a
lot of "shutting down" log messages.

With 6.0.20 I see log messages in the console and in catalina.2010-01-14.log:

14.01.2010 4:38:30 org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
14.01.2010 4:38:31 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
14.01.2010 4:38:32 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080


I thought that I'll also see some occurrences of
reportError("FileHandler is closed or not yet initialized
messages from o.a.juli.FileHandler#publish(),
(I remember seeing them several times last month when Ctrl+C'ing a
console on WinXP)
but I have not observed them now, so that is not confirmed.


> * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48421
>   Prevent file descriptor leak. Allow a web application's logs to be deleted
>   once the application has been stopped.
>(...)
>  http://svn.apache.org/viewvc?rev=898468&view=rev

How this (web application's logs) part of the issue is fixed?
Is it that thanks to the change to LogFactory.java? Or
ClassLoaderLogManager.java change is also needed?



>> We could disable log buffering in 6.0.23, to be it the same as in
>> 6.0.20 (were logs were not buffered):
>> a) by setting bufferSize=0 or -1 explicitly in the default
>> logging.properties file
>> b) by changing the default value in o.a.juli.FileHandler to disable 
>> buffering.
>>
>> I am ok with any of a) and b).  Any thoughts?
>
> Buffered logs are useful. Lets just fix not flushing the buffers on shut
> down.
>
> Mark
>

Best regards,
Konstantin Kolinko

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