svn commit: r563087 - in /tomcat/connectors/trunk/jk/native: STATUS.txt common/portable.h.sample configure.in

2007-08-06 Thread rjung
Author: rjung
Date: Mon Aug  6 03:07:40 2007
New Revision: 563087

URL: http://svn.apache.org/viewvc?view=rev&rev=563087
Log:
Update version number.

Modified:
tomcat/connectors/trunk/jk/native/STATUS.txt
tomcat/connectors/trunk/jk/native/common/portable.h.sample
tomcat/connectors/trunk/jk/native/configure.in

Modified: tomcat/connectors/trunk/jk/native/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/STATUS.txt?view=diff&rev=563087&r1=563086&r2=563087
==
--- tomcat/connectors/trunk/jk/native/STATUS.txt (original)
+++ tomcat/connectors/trunk/jk/native/STATUS.txt Mon Aug  6 03:07:40 2007
@@ -3,7 +3,8 @@
 
 Release:
 
-1.2.24  : released July 27, 2007
+1.2.25  : in development
+1.2.24  : released July 27, 2007, withdrawn August 2, 2007
 1.2.23  : released May 18, 2007
 1.2.22  : released April 17, 2007
 1.2.21  : released March 1, 2007

Modified: tomcat/connectors/trunk/jk/native/common/portable.h.sample
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/portable.h.sample?view=diff&rev=563087&r1=563086&r2=563087
==
--- tomcat/connectors/trunk/jk/native/common/portable.h.sample (original)
+++ tomcat/connectors/trunk/jk/native/common/portable.h.sample Mon Aug  6 
03:07:40 2007
@@ -1,6 +1,6 @@
-/* On most platform this file is overwritten when doing configure */
-/* common/portable.h.  Generated by configure.  */
-/* common/portable.h.in.  Generated from configure.in by autoheader.  */
+/* Sample file for common/portable.h. */
+/* On most platforms the file common/portable.h is generated */
+/* by configure from common/portable.h.in. */
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_DLFCN_H 1
@@ -96,4 +96,4 @@
 #define USE_SO_SNDTIMEO 1
 
 /* Version number of package */
-#define VERSION "1.2.24"
+#define VERSION "1.2.25"

Modified: tomcat/connectors/trunk/jk/native/configure.in
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/configure.in?view=diff&rev=563087&r1=563086&r2=563087
==
--- tomcat/connectors/trunk/jk/native/configure.in (original)
+++ tomcat/connectors/trunk/jk/native/configure.in Mon Aug  6 03:07:40 2007
@@ -11,7 +11,7 @@
 
 dnl package and version. (synchronization with common/jk_version.h ?)
 PACKAGE=mod_jk
-VERSION=1.2.24
+VERSION=1.2.25
 
 AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r563085 - /tomcat/connectors/trunk/jk/native/netscape/README

2007-08-06 Thread rjung
Author: rjung
Date: Mon Aug  6 03:06:13 2007
New Revision: 563085

URL: http://svn.apache.org/viewvc?view=rev&rev=563085
Log:
Fix netscape build readme.

Modified:
tomcat/connectors/trunk/jk/native/netscape/README

Modified: tomcat/connectors/trunk/jk/native/netscape/README
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/netscape/README?view=diff&rev=563085&r1=563084&r2=563085
==
--- tomcat/connectors/trunk/jk/native/netscape/README (original)
+++ tomcat/connectors/trunk/jk/native/netscape/README Mon Aug  6 03:06:13 2007
@@ -5,9 +5,9 @@
 so having this environment is a prerequisite if you want to perform 
 a custom build on Windows systems
 
-On Unix system, a Makefile.solaris is provided and should be 
-adapted to tailor to your own configuration. Be sure to read
-the BUILDING file, one directory up.
+On Unix system, a Makefile.solaris and Makefile.linux are provided
+and should be adapted to tailor to your own configuration.
+Be sure to read the BUILDING file, one directory up.
 
 
 REQUIREMENT for Windows build



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cannot find method addEnvironment with this signature

2007-08-06 Thread Santosh [ಸಂತೋಷ ]
Hi All,

 I have integrated "storeconfig" and "cluster" modules of
tomcat 5.5to tomcat
6.0 to make admin webapp works with tomcat 6.0. Also i added storeconfig
listener in server.xml. Out of three categories in admin (server, Resources,
users), server is working in fine. Changes done in server category is
updating the server.xml. Others i.e. Resources and User Definition are not
working.

If i try to add environment variable, its throwing error "
javax.management.ReflectionException: Cannot find method addEnvironment with
this signature". This method is present in NamingResourcesMBean.java. I also
added addEnvironment(String, String, String) in NamingResource.java then it
started giving error "java.lang.NullPointerException: name cannot be null".

   I think there is some problem with NamingContextListeners or some
configuration error. Can someone help me on this.

Regards,
Santosh


DO NOT REPLY [Bug 36155] - tomcat chooses wrong host if using mod_jk

2007-08-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36155





--- Additional Comments From [EMAIL PROTECTED]  2007-08-06 07:17 ---
So William has made a start. His patch works, and could be ported to the other 2
connectors.

But i think he's waiting for some reaction by Remy and Mladen.
(see comment #22)

Let's get this done, so this can be marked fixed.


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Quality check mod_jk 1.2.25-dev

2007-08-06 Thread Jim Jagielski

So far, so good.

+1

On Aug 3, 2007, at 2:40 AM, Rainer Jung wrote:


Hi all,

unfortunately we had to withdraw mod_jk 1.2.24. It had a serious  
regression bug. To ensure the quality of the new 1.2.25 we invite  
you to actively participate in testing.


A code snapshot (revision 562250) is available at:

http://people.apache.org/~rjung/mod_jk-dev/

It is in the same format as a release download, so easy to build.
Under the same URL you can find the updated documentation.

It would be really nice, if we could get some testing feedback from  
the

community. Feel free to post any observations.

Depending on your feedback we plan to tag the release next week.

The most important changes after 1.2.24 are:

- fix flushing regression bug
- fix behaviour of fail_on_status
- additional soft error mode for fail_on_status
- bug fixes for nsapi plugin (see changelog)

The full change log is available under:

http://people.apache.org/~rjung/mod_jk-dev/docs/miscellaneous/ 
changelog.html


Thanks for your valuable time!

Regards,

Rainer



-
To start a new topic, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TC6 source file licensing - last few files

2007-08-06 Thread Paul McMahan

On Aug 5, 2007, at 12:25 AM, Mark Thomas wrote:


Finally, if anyone knows of / spots any other TC6 files that appear to
have license issues, now would be a good time to speak up.


Shouldn't these changes also be merged to tomcat/trunk ?

Best wishes,
Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 42269] - Content-Length header is removed on HEAD requests

2007-08-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42269


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-08-06 08:13 ---
Seems to be working in the dev snapshot of 1.2.25.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41563] - Processing result of mod_jk for Apache2.0.x is unexpected, differs from the one for Apache1.3.x.

2007-08-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41563


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-08-06 08:21 ---
Seems to work for 1.2.25-dev.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 42579] - JNDIRealm fails to parse absolute names

2007-08-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42579


[EMAIL PROTECTED] changed:

   What|Removed |Added

 OS/Version|other   |Windows XP
Version|5.5.9   |5.5.23




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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Add detach method to JNI SSLSocket

2007-08-06 Thread Rupert Daniel

Hi,

I have been re-using the tomcat native APR library in some of my own  
projects and I have come up against a problem with the SSLSocket  
workings.


My current project is a high performance LDAP injector/simulator and  
I need to be able to support TLS on the sockets.  The SSL component  
works fine, but the LDAP protocol allows for the client connection to  
go "secure" for the login/bind request and then once that is  
successful, the connection can then go "unsecured".  With the current  
implementation I cannot seem to find away to end the SSL/TLS session  
without disconnecting the socket.


I have looked through the JNI code and I created the following  
function in the file sslnetwork.c:


TCN_IMPLEMENT_CALL(jint, SSLSocket, detach)(TCN_STDARGS, jlong sock)
{
tcn_socket_t *s = J2P(sock, tcn_socket_t *);

TCN_ASSERT(sock != 0);

s->net = &apr_socket_layer;
s->opaque = s ->socket;

return APR_SUCCESS;
}

Then I added the following method to the class SSLSocket

public static int detach(long sock) throws Exception;

These new functions/methods now allow me to revert a socket, that was  
using TLS, back to the original apr_socket_layer definition without  
having to disconnect the socket.  So in my application to go from a  
secured socket to unsecured one I just have to do.


Socket.shutdown(socket, 0);  //End the TLS session
SSLSocket.detach(socket);  //Revert the socket back to normal
SSLContext.free(sslContext);  //Free the context

I know that this is not tomcat related, but I find the JNI APR lib  
really useful when I need to create high performance Java code.
Is there any possibility of including a fix along these lines or, if  
there is a better way (I am not a C expert), into the main release of  
the JNI connector?


Cheers

Rupert




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r563193 - /tomcat/sandbox/bayeux/build/build.xml

2007-08-06 Thread fhanik
Author: fhanik
Date: Mon Aug  6 10:04:41 2007
New Revision: 563193

URL: http://svn.apache.org/viewvc?view=rev&rev=563193
Log:
new version of json

Modified:
tomcat/sandbox/bayeux/build/build.xml

Modified: tomcat/sandbox/bayeux/build/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/bayeux/build/build.xml?view=diff&rev=563193&r1=563192&r2=563193
==
--- tomcat/sandbox/bayeux/build/build.xml (original)
+++ tomcat/sandbox/bayeux/build/build.xml Mon Aug  6 10:04:41 2007
@@ -66,8 +66,8 @@
   
 
 
-  http://superb-east.dl.sourceforge.net/sourceforge/stringtree/stringtree-json-2.0.7.jar"/>
-  
+  http://superb-east.dl.sourceforge.net/sourceforge/stringtree/stringtree-json-2.0.9.jar"/>
+  
   
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 43019] - valid absolute request uris + mod_jk 1.2.23 return 400 Invalid URI

2007-08-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43019





--- Additional Comments From [EMAIL PROTECTED]  2007-08-06 12:01 ---
mod_jk 1.2.25 has fixed this issue when the default forwarding option is used

When the forwarding option is +ForwardURICompatUnparsed, however, the issue 
remains.



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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38897] - Invalid TLDs receive cryptic error

2007-08-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38897





--- Additional Comments From [EMAIL PROTECTED]  2007-08-06 15:14 ---
I had a very similar problem in Tomcat 6.0.13 that was caused by a missing tld 
file in my deployment. The stacktrace was the same as in the first comment and 
did not indicate which tag library caused the problem. I used the following 
patch to track down the problem and log the cause of the exception:

Index: java/org/apache/jasper/compiler/JspDocumentParser.java
===
--- java/org/apache/jasper/compiler/JspDocumentParser.java  (revision 
563257)
+++ java/org/apache/jasper/compiler/JspDocumentParser.java  (working copy)
@@ -214,7 +214,8 @@
 jspDocParser.err.jspError
 (new Mark(jspDocParser.ctxt, path, e.getLineNumber(),
   e.getColumnNumber()),
- e.getMessage());
+ e.getMessage(),
+ e);
 } catch (Exception e) {
 jspDocParser.err.jspError(e);
 }
Index: java/org/apache/jasper/compiler/ErrorDispatcher.java
===
--- java/org/apache/jasper/compiler/ErrorDispatcher.java(revision 
563257)
+++ java/org/apache/jasper/compiler/ErrorDispatcher.java(working copy)
@@ -225,6 +225,22 @@
  * resource bundle for localized error messages, it is used as the error
  * message.
  *
+ * @param where Error location
+ * @param errCode Error code
+ * @param exception Exception
+ */
+
+public void jspError(Mark where, String errCode, Exception exception)
+throws JasperException {
+dispatch(where, errCode, null, exception);
+}
+/*
+ * Dispatches the given JSP parse error to the configured error handler.
+ *
+ * The given error code is localized. If it is not found in the
+ * resource bundle for localized error messages, it is used as the error
+ * message.
+ *
  * @param n Node that caused the error
  * @param errCode Error code
  * @param arg1 First argument for parametric replacement

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r563330 - in /tomcat/trunk/java/org/apache: coyote/http11/Http11NioProtocol.java tomcat/util/net/NioEndpoint.java tomcat/util/net/SocketProperties.java

2007-08-06 Thread fhanik
Author: fhanik
Date: Mon Aug  6 16:19:17 2007
New Revision: 563330

URL: http://svn.apache.org/viewvc?view=rev&rev=563330
Log:
Improve upon poller timeout handling, to not waste cycles running the timeout 
setting too often
same fix as 6.0.x

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?view=diff&rev=563330&r1=563329&r2=563330
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Mon Aug  
6 16:19:17 2007
@@ -710,7 +710,7 @@
 // Associate the connection with the processor. The next 
request 
 // processed by this thread will use either a new or a 
recycled
 // processor.
-if (log.isDebugEnabled()) log.debug("Not recycling 
["+processor+"] 
Comet="+((NioEndpoint.KeyAttachment)socket.getAttachment(false)).getComet());
+//if (log.isDebugEnabled()) log.debug("Not recycling 
["+processor+"] 
Comet="+((NioEndpoint.KeyAttachment)socket.getAttachment(false)).getComet());
 connections.put(socket, processor);
 if (processor.comet) {
 NioEndpoint.KeyAttachment att = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=563330&r1=563329&r2=563330
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Mon Aug  6 
16:19:17 2007
@@ -1574,8 +1574,11 @@
 long now = System.currentTimeMillis();
 //don't process timeouts too frequently, but if the selector 
simply timed out
 //then we can check timeouts to avoid gaps
-if ( (now < nextExpiration) && (keyCount>0 || hasEvents) && 
(!close) ) return;
-nextExpiration = now + (long)socketProperties.getSoTimeout();
+if ( ((keyCount>0 || hasEvents) ||(now < nextExpiration)) && 
(!close) ) {
+return;
+}
+long prevExp = nextExpiration; //for logging purposes only
+nextExpiration = now + socketProperties.getTimeoutInterval();
 //timeout
 Set keys = selector.keys();
 int keycount = 0;
@@ -1613,7 +1616,9 @@
 cancelledKey(key, SocketStatus.ERROR,false);
 }
 }//for
-if ( log.isDebugEnabled() ) log.debug("Poller processed 
"+keycount+" keys through timeout");
+if ( log.isDebugEnabled() ) log.debug("timeout completed: keys 
processed="+keycount+"; now="+now+"; nextExpiration="+prevExp+"; "+
+  "keyCount="+keyCount+"; 
hasEvents="+hasEvents +"; eval="+( (now < prevExp) && (keyCount>0 || hasEvents) 
&& (!close) ));
+
 }
 }
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java?view=diff&rev=563330&r1=563329&r2=563330
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java Mon Aug  
6 16:19:17 2007
@@ -156,6 +156,13 @@
  * Default value is 1
  */
 protected int performanceBandwidth = 1;
+
+/**
+ * Minimum time to pass by before another socket expiration run performs
+ * This avoids unncessary loops over all sockets when the poller is busy
+ */
+protected long timeoutInterval = 1000;
+
 private Socket properties;
 
 public void setProperties(Socket socket) throws SocketException{
@@ -349,6 +356,14 @@
 
 public void setDirectBufferPool(int directBufferPool) {
 this.bufferPool = directBufferPool;
+}
+
+public void setTimeoutInterval(long toi){
+this.timeoutInterval = toi;
+}
+
+public long getTimeoutInterval(){
+return timeoutInterval;
 }
 
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r563331 - in /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net: NioEndpoint.java SocketProperties.java

2007-08-06 Thread fhanik
Author: fhanik
Date: Mon Aug  6 16:19:37 2007
New Revision: 563331

URL: http://svn.apache.org/viewvc?view=rev&rev=563331
Log:
Improve poller timeout handling to not waste cycles

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SocketProperties.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=563331&r1=563330&r2=563331
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Mon 
Aug  6 16:19:37 2007
@@ -1582,8 +1582,11 @@
 long now = System.currentTimeMillis();
 //don't process timeouts too frequently, but if the selector 
simply timed out
 //then we can check timeouts to avoid gaps
-if ( (now < nextExpiration) && (keyCount>0 || hasEvents) && 
(!close) ) return;
-nextExpiration = now + (long)socketProperties.getSoTimeout();
+if ( ((keyCount>0 || hasEvents) ||(now < nextExpiration)) && 
(!close) ) {
+return;
+}
+long prevExp = nextExpiration;
+nextExpiration = now + socketProperties.getTimeoutInterval();
 //timeout
 Set keys = selector.keys();
 int keycount = 0;
@@ -1618,7 +1621,9 @@
 cancelledKey(key, SocketStatus.ERROR,false);
 }
 }//for
-if ( log.isDebugEnabled() ) log.debug("Poller processed 
"+keycount+" keys through timeout");
+   if ( log.isDebugEnabled() ) log.debug("timeout completed: 
keycount="+keycount+"; now="+now+"; nextExpiration="+prevExp+"; "+
+  "keyCount="+keyCount+"; 
hasEvents="+hasEvents +"; eval="+( (now < prevExp) && (keyCount>0 || hasEvents) 
&& (!close) ));
+
 }
 }
 

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SocketProperties.java?view=diff&rev=563331&r1=563330&r2=563331
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
Mon Aug  6 16:19:37 2007
@@ -1,354 +1,370 @@
-/*
- * 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.tomcat.util.net;
-
-import java.net.Socket;
-import java.net.SocketException;
-/**
- * Properties that can be set in the  element
- * in server.xml. All properties are prefixed with "socket."
- * and are currently only working for the Nio connector
- *
- * @author Filip Hanik
- */
-public class SocketProperties {
-/**
- * Enable/disable key cache, this bounded cache stores
- * KeyAttachment objects to reduce GC
- * Default is 500
- * -1 is unlimited
- * 0 is disabled
- */
-protected int keyCache = 500;
-
-/**
- * Enable/disable socket processor cache, this bounded cache stores
- * SocketProcessor objects to reduce GC
- * Default is 500
- * -1 is unlimited
- * 0 is disabled
- */
-protected int processorCache = 500;
-
-
-
-/**
- * Enable/disable poller event cache, this bounded cache stores
- * PollerEvent objects to reduce GC for the poller
- * Default is 500 
- * -1 is unlimited
- * 0 is disabled
- * >0 the max number of objects to keep in cache.
- */
-protected int eventCache = 500;
-
-
-/**
- * Enable/disable direct buffers for the network buffers
- * Default value is enabled
- */
-protected boolean directBuffer = false;
-/**
- * Socket receive buffer size in bytes (SO_RCVBUF)
- * Default value is 25188
- */
-protected int rxBufSize = 25188;
-/**
- * Socket send buffer size in bytes (SO_SNDBUF)
- * Def

svn commit: r563344 - in /tomcat/trunk/java/org/apache: catalina/util/RequestUtil.java jasper/servlet/JspServlet.java jasper/servlet/JspServletWrapper.java

2007-08-06 Thread fhanik
Author: fhanik
Date: Mon Aug  6 16:49:46 2007
New Revision: 563344

URL: http://svn.apache.org/viewvc?view=rev&rev=563344
Log:
forward port from markt bug fixes in 6.0.x branch


Modified:
tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java
tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java
tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java

Modified: tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java?view=diff&rev=563344&r1=563343&r2=563344
==
--- tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java Mon Aug  6 
16:49:46 2007
@@ -187,7 +187,7 @@
  * Decode and return the specified URL-encoded String.
  * When the byte array is converted to a string, the system default
  * character encoding is used...  This may be different than some other
- * servers.
+ * servers. It is assumed the string is not a query string.
  *
  * @param str The url-encoded string
  *
@@ -195,14 +195,13 @@
  * by a valid 2-digit hexadecimal number
  */
 public static String URLDecode(String str) {
-
 return URLDecode(str, null);
-
 }
-
-
+
+
 /**
- * Decode and return the specified URL-encoded String.
+ * Decode and return the specified URL-encoded String. It is assumed the
+ * string is not a query string.
  *
  * @param str The url-encoded string
  * @param enc The encoding to use; if null, the default encoding is used
@@ -210,7 +209,19 @@
  * by a valid 2-digit hexadecimal number
  */
 public static String URLDecode(String str, String enc) {
-
+return URLDecode(str, enc, false);
+}
+
+/**
+ * Decode and return the specified URL-encoded String.
+ *
+ * @param str The url-encoded string
+ * @param enc The encoding to use; if null, the default encoding is used
+ * @param isQuery Is this a query string being processed
+ * @exception IllegalArgumentException if a '%' character is not followed
+ * by a valid 2-digit hexadecimal number
+ */
+public static String URLDecode(String str, String enc, boolean isQuery) {
 if (str == null)
 return (null);
 
@@ -226,13 +237,14 @@
 }
 } catch (UnsupportedEncodingException uee) {}
 
-return URLDecode(bytes, enc);
+return URLDecode(bytes, enc, isQuery);
 
 }
 
 
 /**
- * Decode and return the specified URL-encoded byte array.
+ * Decode and return the specified URL-encoded byte array. It is assumed
+ * the string is not a query string.
  *
  * @param bytes The url-encoded byte array
  * @exception IllegalArgumentException if a '%' character is not followed
@@ -244,7 +256,8 @@
 
 
 /**
- * Decode and return the specified URL-encoded byte array.
+ * Decode and return the specified URL-encoded byte array. It is assumed
+ * the string is not a query string.
  *
  * @param bytes The url-encoded byte array
  * @param enc The encoding to use; if null, the default encoding is used
@@ -252,7 +265,20 @@
  * by a valid 2-digit hexadecimal number
  */
 public static String URLDecode(byte[] bytes, String enc) {
+return URLDecode(bytes, null, false);
+}
 
+/**
+ * Decode and return the specified URL-encoded byte array.
+ *
+ * @param bytes The url-encoded byte array
+ * @param enc The encoding to use; if null, the default encoding is used
+ * @param isQuery Is this a query string being processed
+ * @exception IllegalArgumentException if a '%' character is not followed
+ * by a valid 2-digit hexadecimal number
+ */
+public static String URLDecode(byte[] bytes, String enc, boolean isQuery) {
+
 if (bytes == null)
 return (null);
 
@@ -261,7 +287,7 @@
 int ox = 0;
 while (ix < len) {
 byte b = bytes[ix++]; // Get byte to test
-if (b == '+') {
+if (b == '+' && isQuery) {
 b = (byte)' ';
 } else if (b == '%') {
 b = (byte) ((convertHexDigit(bytes[ix++]) << 4)

Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java?view=diff&rev=563344&r1=563343&r2=563344
==
--- tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java (original)
+++ tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java Mon Aug  6 
16:49:46 2007
@@ -305,8 +305,25 @@
 // Check if the requested JSP page exists, to avoid
 // creating unnecessary directories and files.

Re: [VOTE] Release build 6.0.14

2007-08-06 Thread Filip Hanik - Dev Lists

Remy Maucherat wrote:

Remy Maucherat wrote:

The candidates binaries are available here:
http://people.apache.org/~remm/tomcat-6/v6.0.14/

According to the release process, the 6.0.14 tag is:
[ ] Broken
[ ] Alpha
[ ] Beta
[ ] Stable


Ok, so far this build seems stable. Any other votes ?

I believe we are good

Filip


Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 43002] - NIO connector performance issue in 6.0.13

2007-08-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43002


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||WORKSFORME




--- Additional Comments From [EMAIL PROTECTED]  2007-08-06 16:56 ---
I'm unable to reproduce the problem, and have to jump to the conclusion that the
problem lies within Windows 2000 and JDK 1.6

Please reopen if you are able to reproduce it on another platform/jdk combo

Filip

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r563367 - /tomcat/tc6.0.x/trunk/NOTICE

2007-08-06 Thread markt
Author: markt
Date: Mon Aug  6 18:34:05 2007
New Revision: 563367

URL: http://svn.apache.org/viewvc?view=rev&rev=563367
Log:
Line endings

Modified:
tomcat/tc6.0.x/trunk/NOTICE   (props changed)

Propchange: tomcat/tc6.0.x/trunk/NOTICE
--
svn:eol-style = native



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 42943] - jsp:text gets confused with other *:text elements in a JSP tag file

2007-08-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42943





--- Additional Comments From [EMAIL PROTECTED]  2007-08-06 20:02 ---
Out of interest, what do you find if you move the 'dul' namespace declaration up
to the ? Any change?

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



6.x feature wishlist

2007-08-06 Thread Filip Hanik - Dev Lists
I wanted to start a wish list of what we can move forward with, here is 
a short list of items that I had in mind as a starter


1. Session replication - stateless backup location
  Store the backup location of a session as part of the sessionId, 
similar to the jvmRoute but opposite.
  This way, you can scale a cluster horizontally, since the location of 
the backup node doesn't have to be known until you fail over.


2. Add a block/no-block parameter to InputFilter.doRead and 
OutputFilter.doWrite
   InputFilter -> public int doRead(ByteChunk chunk, Request unused, 
boolean block) throws IOException;
   OutputFilter -> public int doWrite(ByteChunk chunk, Response unused, 
boolean block) throws IOException;
   Servlet 3.0 will most likely expose non blocking read/write through 
the servlet API, this will get us there ahead of time
   Haven't thought of how we expose this API yet though, but more will 
follow


3. Consolidate connector code
  Currently we have 
Http11Processor/Http11NioProcessor/Http11AprProcessor doing almost the 
same thing, there is much that

  can be consolidated to make the code more maintainable
  Essentially, you create a Endpoint base line interface.
  At the same time we could consolidate the Internal(In/Out)put buffers 
as they are copies too.
  We have some fairly tuned endpoints now, it would also be nice to 
make these protocol agnostic.


4. Startup -> server.xml warnings
  If one enters an invalid element or attribute that is simply ignored 
today, at least output an info or warn message letting the

  admin know if its misconfiguration.

5. Finish bayeux -> I started this in sandbox, took me a while to 
understand the protocol, and its not as cool as I thought it would be

  but I still feel its important for it to be part of Tomcat

6. Auto context logging
  Automatically create loggers for each context, so that one doesn't 
have to specify one per context in logging.properties
  Of course, you can turn on/off the auto context logger through 
logging.properties


7. File cache - use MappedByteBuffers for the file cache, that way the 
send file operation can benefit even more
  when you have two direct buffers, and you also avoid reading the disk 
each time for a file

  ideas on this came from Jeanfrancois Arcand.
  
(http://fisheye5.cenqua.com/browse/glassfish/appserv-http-engine/src/java/com/sun/enterprise/web/connector/grizzly/FileCache.java?r=1.21)


8. Add getName()/setName() to the WebappClassLoader, name of the web app 
classloader will correspond to the one of the Context container
  Applications like Terracotta or AOP apps can much easier plug in and 
be able to share data when they know what loader the class came from


9. Add the configuration option to start the connectors after all apps 
are deployed
  If some applications are taking long to startup, load balancers are 
already trying to send requests to the Tomcat instance, which is just 
bound to a port, but not yet taking requests


10.Turn our embedded thread pools into Tomcat Executor thread pools, 
same performance but pluggable. Instead of having them hidden in the end 
point code


11.Timestamps & System.currentTimeMillis
  System.currentTimeMillis is invoked everywhere during the chain of 
events for a HTTP requests, even though most dates only need precision 
down to the second.
  I've received feedback that this could be improved by keeping a time 
service, that updates a timestamp every second, and therefor reduces the 
number of system calls
  I think we would need to prove the theory before committing to the 
implementation, but that should be pretty easy


12.Comet sample webapp
  While most folks want to start with Comet, it is a strange question, 
tons of users on the user list just are having a hard time getting kick 
started


I was thinking we can keep this list on Wiki or in a text file in SVN,
http://wiki.apache.org/tomcat/6xFeatures


thoughts
Filip





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 6.x feature wishlist

2007-08-06 Thread Remy Maucherat

Filip Hanik - Dev Lists wrote:
I wanted to start a wish list of what we can move forward with, here is 
a short list of items that I had in mind as a starter


Here's my opinion on these. I think most of them are not a good idea, 
actually.



1. Session replication - stateless backup location
  Store the backup location of a session as part of the sessionId, 
similar to the jvmRoute but opposite.
  This way, you can scale a cluster horizontally, since the location of 
the backup node doesn't have to be known until you fail over.


No idea about that.

2. Add a block/no-block parameter to InputFilter.doRead and 
OutputFilter.doWrite
   InputFilter -> public int doRead(ByteChunk chunk, Request unused, 
boolean block) throws IOException;
   OutputFilter -> public int doWrite(ByteChunk chunk, Response unused, 
boolean block) throws IOException;
   Servlet 3.0 will most likely expose non blocking read/write through 
the servlet API, this will get us there ahead of time
   Haven't thought of how we expose this API yet though, but more will 
follow


I think it's too early to speculate on what the Servlet API may add, and 
I don't see any benefit this would bring at this point. I am managing to 
implement non blocking functionality without major problems without 
these additional calls. I also think your API proposal for Comet in 
trunk is inappropriate, and I will come back with my original proposal, 
which I like more and more. So -1 for this one.



3. Consolidate connector code
  Currently we have 
Http11Processor/Http11NioProcessor/Http11AprProcessor doing almost the 
same thing, there is much that

  can be consolidated to make the code more maintainable
  Essentially, you create a Endpoint base line interface.
  At the same time we could consolidate the Internal(In/Out)put buffers 
as they are copies too.
  We have some fairly tuned endpoints now, it would also be nice to make 
these protocol agnostic.


This has been tried before (I was supporting it), but the endpoints (and 
connectors) have a fairly different processing logic. The result was 
actually more complex than the original version, so I removed it. -1 too.



4. Startup -> server.xml warnings
  If one enters an invalid element or attribute that is simply ignored 
today, at least output an info or warn message letting the

  admin know if its misconfiguration.


That's going to be hard to do in a consistent way.

5. Finish bayeux -> I started this in sandbox, took me a while to 
understand the protocol, and its not as cool as I thought it would be

  but I still feel its important for it to be part of Tomcat


Ok. You could try to come up with something better if you think it's not 
good enough.



6. Auto context logging
  Automatically create loggers for each context, so that one doesn't 
have to specify one per context in logging.properties
  Of course, you can turn on/off the auto context logger through 
logging.properties


I don't like that:
- very little logging occurs through the context logger (or maybe it's a 
default for the whole webapp like if you added a file handler in 
logging.properties ?)
- JULI already provides a separate logging environment for the webapp 
(because it uses a separate classloader), and webapps interested in that 
can easily configure it using a logging.properties
- JULI specific (if this is actually done, I would like to remove log4j 
support)
- and most importantly, would automagically be creating zillions of 
small logfiles, so I like the idea of people configuring it in better 
than configuring it out


7. File cache - use MappedByteBuffers for the file cache, that way the 
send file operation can benefit even more
  when you have two direct buffers, and you also avoid reading the disk 
each time for a file

  ideas on this came from Jeanfrancois Arcand.
  
(http://fisheye5.cenqua.com/browse/glassfish/appserv-http-engine/src/java/com/sun/enterprise/web/connector/grizzly/FileCache.java?r=1.21) 


I dislike gimmick cache functionality inside the connector (worst 
Grizzly idea ever ...), where actually the overhead of the default 
servlet is very slim. In the real world people could instead:
- write a caching valve using sendfile which would fit their needs 
better and which will have a couple more % of overhead

- use a separate webserver for static resources if they have so many of them
- would have a lodbalancer/proxy nullifying the benefit

8. Add getName()/setName() to the WebappClassLoader, name of the web app 
classloader will correspond to the one of the Context container
  Applications like Terracotta or AOP apps can much easier plug in and 
be able to share data when they know what loader the class came from


Really ? How would they know that this corresponds to something 
meaningful ? It's possible to determine the webapp name in a similar 
proprietary way without this, but making the change seems harmless.


9. Add the configuration option to start the connectors after all apps 
are deployed
  I