cvs commit: jakarta-tomcat-connectors/jni/native/src sslinfo.c

2005-07-08 Thread mturk
mturk   2005/07/08 00:19:10

  Modified:jni/java/org/apache/tomcat/jni SSL.java
   jni/native/include ssl_private.h
   jni/native/src sslinfo.c
  Log:
  Add SSL_INFO_CLIENT_CERT_CHAIN param getter.
  Right now the majority of info's are returned in PEM format,
  meaning with :
  ---BEGIN XXX 
  
  ---END XXX ---
  We have to see how to return the actual data in byte array if desired.
  
  Revision  ChangesPath
  1.21  +5 -2  
jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSL.java
  
  Index: SSL.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSL.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- SSL.java  17 Jun 2005 09:41:30 -  1.20
  +++ SSL.java  8 Jul 2005 07:19:10 -   1.21
  @@ -203,7 +203,10 @@
   public static final int SSL_INFO_SERVER_A_SIG  = 0x0205;
   public static final int SSL_INFO_SERVER_A_KEY  = 0x0206;
   public static final int SSL_INFO_SERVER_CERT   = 0x0207;
  -
  +/* Return client certificate chain.
  + * Add certificate chain number to that flag (0 ... verify depth)
  + */
  +public static final int SSL_INFO_CLIENT_CERT_CHAIN = 0x0400;
   /* Return OpenSSL version number */
   public static native int version();
   
  
  
  
  1.33  +2 -1  
jakarta-tomcat-connectors/jni/native/include/ssl_private.h
  
  Index: ssl_private.h
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jni/native/include/ssl_private.h,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- ssl_private.h 7 Jul 2005 08:10:08 -   1.32
  +++ ssl_private.h 8 Jul 2005 07:19:10 -   1.33
  @@ -188,6 +188,7 @@
   #define SSL_INFO_SERVER_A_SIG   (0x0205)
   #define SSL_INFO_SERVER_A_KEY   (0x0206)
   #define SSL_INFO_SERVER_CERT(0x0207)
  +#define SSL_INFO_CLIENT_CERT_CHAIN  (0x0400)
   
   #define SSL_VERIFY_ERROR_IS_OPTIONAL(errnum) \
  ((errnum == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT) \
  
  
  
  1.5   +15 -2 jakarta-tomcat-connectors/jni/native/src/sslinfo.c
  
  Index: sslinfo.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/sslinfo.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- sslinfo.c 17 Jun 2005 09:41:30 -  1.4
  +++ sslinfo.c 8 Jul 2005 07:19:10 -   1.5
  @@ -105,7 +105,7 @@
   n = BIO_pending(bio);
   result = malloc(n+1);
   n = BIO_read(bio, result, n);
  -result[n] = '\n';
  +result[n] = '\0';
   BIO_free(bio);
   return result;
   }
  @@ -399,6 +399,19 @@
   }
   rv = APR_SUCCESS;
   }
  +else if (what  SSL_INFO_CLIENT_CERT_CHAIN) {
  +X509 *xs;
  +char *result;
  +STACK_OF(X509) *sk =  SSL_get_peer_cert_chain(s-ssl);
  +int n = what  0x0F;
  +if (n  sk_X509_num(sk)) {
  +xs = sk_X509_value(sk, n);
  +if ((result = get_cert_PEM(xs))) {
  +value = tcn_new_string(e, result);
  +free(result);
  +}
  +}
  +}
   if (rv != APR_SUCCESS)
   tcn_ThrowAPRException(e, rv);
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jni/native/src sslinfo.c

2005-07-08 Thread mturk
mturk   2005/07/08 00:49:56

  Modified:jni/native/src sslinfo.c
  Log:
  Add param infos in ASN1 format for server and client certificates.
  
  Revision  ChangesPath
  1.6   +78 -8 jakarta-tomcat-connectors/jni/native/src/sslinfo.c
  
  Index: sslinfo.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/sslinfo.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- sslinfo.c 8 Jul 2005 07:19:10 -   1.5
  +++ sslinfo.c 8 Jul 2005 07:49:56 -   1.6
  @@ -95,21 +95,40 @@
   
   static char *get_cert_PEM(X509 *xs)
   {
  -char *result;
  +char *result = NULL;
   BIO *bio;
  -int n;
   
   if ((bio = BIO_new(BIO_s_mem())) == NULL)
   return NULL;
  -PEM_write_bio_X509(bio, xs);
  -n = BIO_pending(bio);
  -result = malloc(n+1);
  -n = BIO_read(bio, result, n);
  -result[n] = '\0';
  +if (PEM_write_bio_X509(bio, xs)) {
  +int n = BIO_pending(bio);
  +result = malloc(n+1);
  +n = BIO_read(bio, result, n);
  +result[n] = '\0';
  +}
  +BIO_free(bio);
  +return result;
  +}
  +
  +static unsigned char *get_cert_ASN1(X509 *xs, int *len)
  +{
  +char *result = NULL;
  +BIO *bio;
  +
  +*len = 0;
  +if ((bio = BIO_new(BIO_s_mem())) == NULL)
  +return NULL;
  +if (i2d_X509_bio(bio, xs)) {
  +int n = BIO_pending(bio);
  +result = malloc(n);
  +n = BIO_read(bio, result, n);
  +*len = n;
  +}
   BIO_free(bio);
   return result;
   }
   
  +
   static char *get_cert_serial(X509 *xs)
   {
   char *result;
  @@ -186,6 +205,7 @@
   {
   tcn_ssl_conn_t *s = J2P(sock, tcn_ssl_conn_t *);
   jbyteArray array = NULL;
  +apr_status_t rv = APR_SUCCESS;
   
   UNREFERENCED(o);
   TCN_ASSERT(sock != 0);
  @@ -204,6 +224,56 @@
   tcn_ThrowAPRException(e, APR_EINVAL);
   break;
   }
  +if (what  SSL_INFO_CLIENT_MASK) {
  +X509 *xs;
  +unsigned char *result;
  +int len;
  +if ((xs = SSL_get_peer_certificate(s-ssl)) != NULL) {
  +switch (what) {
  +case SSL_INFO_CLIENT_CERT:
  +if ((result = get_cert_ASN1(xs, len))) {
  +array = tcn_new_arrayb(e, result, len);
  +free(result);
  +}
  +break;
  +}
  +X509_free(xs);
  +}
  +rv = APR_SUCCESS;
  +}
  +else if (what  SSL_INFO_SERVER_MASK) {
  +X509 *xs;
  +unsigned char *result;
  +int len;
  +if ((xs = SSL_get_certificate(s-ssl)) != NULL) {
  +switch (what) {
  +case SSL_INFO_SERVER_CERT:
  +if ((result = get_cert_ASN1(xs, len))) {
  +array = tcn_new_arrayb(e, result, len);
  +free(result);
  +}
  +break;
  +}
  +/* XXX: No need to call the X509_free(xs); */
  +}
  +rv = APR_SUCCESS;
  +}
  +else if (what  SSL_INFO_CLIENT_CERT_CHAIN) {
  +X509 *xs;
  +unsigned char *result;
  +STACK_OF(X509) *sk =  SSL_get_peer_cert_chain(s-ssl);
  +int len, n = what  0x0F;
  +if (n  sk_X509_num(sk)) {
  +xs = sk_X509_value(sk, n);
  +if ((result = get_cert_ASN1(xs, len))) {
  +array = tcn_new_arrayb(e, result, len);
  +free(result);
  +}
  +}
  +rv = APR_SUCCESS;
  +}
  +if (rv != APR_SUCCESS)
  +tcn_ThrowAPRException(e, rv);
   
   return array;
   }
  
  
  

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



Re: cvs commit: jakarta-tomcat-connectors/jni/native/src sslinfo.c

2005-07-08 Thread works
Please send all future mails at [EMAIL PROTECTED]



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



Re: Tomcat Session Replication Portlets

2005-07-08 Thread Remy Maucherat

Eric Dalquist wrote:
I am prepared to do the work for this task but would like to get some 
feed back from the tomcat developer community on recommendations and in 
what way the work could be done to ensure its eventual inclusion in the 
tomcat codebase.


We're not going to need much help here, as I assume that there will be 
at least two persons interested in fixing this eventually. Probably 
registering sessions for checking in access or endAccess would be a 
decent solution.


Rémy

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



Re: Re: Tomcat Session Replication Portlets

2005-07-08 Thread batkinson
I will be on holidays from July 6th to 8th. For any urgent matter, please 
contact Ms. Alonso at [EMAIL PROTECTED]

Estaré de vacaciones del 6 al 8 de Julio. Para cualquier asunto urgente, por 
favor, contacten a Marito Alonso al e-mail: [EMAIL PROTECTED]


Gracias



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



Re: Re: Re: Tomcat Session Replication Portlets

2005-07-08 Thread batkinson
I will be on holidays from July 6th to 8th. For any urgent matter, please 
contact Ms. Alonso at [EMAIL PROTECTED]

Estaré de vacaciones del 6 al 8 de Julio. Para cualquier asunto urgente, por 
favor, contacten a Marito Alonso al e-mail: [EMAIL PROTECTED]


Gracias



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



Re: Re: Re: Re: Tomcat Session Replication Portlets

2005-07-08 Thread batkinson
I will be on holidays from July 6th to 8th. For any urgent matter, please 
contact Ms. Alonso at [EMAIL PROTECTED]

Estaré de vacaciones del 6 al 8 de Julio. Para cualquier asunto urgente, por 
favor, contacten a Marito Alonso al e-mail: [EMAIL PROTECTED]


Gracias



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



Re: Re: Re: Re: Re: Tomcat Session Replication Portlets

2005-07-08 Thread batkinson
I will be on holidays from July 6th to 8th. For any urgent matter, please 
contact Ms. Alonso at [EMAIL PROTECTED]

Estaré de vacaciones del 6 al 8 de Julio. Para cualquier asunto urgente, por 
favor, contacten a Marito Alonso al e-mail: [EMAIL PROTECTED]


Gracias



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



Re: Re: Re: Re: Re: Re: Tomcat Session Replication Portlets

2005-07-08 Thread batkinson
I will be on holidays from July 6th to 8th. For any urgent matter, please 
contact Ms. Alonso at [EMAIL PROTECTED]

Estaré de vacaciones del 6 al 8 de Julio. Para cualquier asunto urgente, por 
favor, contacten a Marito Alonso al e-mail: [EMAIL PROTECTED]


Gracias



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



Re: Re: Re: Re: Re: Re: Re: Tomcat Session Replication Portlets

2005-07-08 Thread batkinson
I will be on holidays from July 6th to 8th. For any urgent matter, please 
contact Ms. Alonso at [EMAIL PROTECTED]

Estaré de vacaciones del 6 al 8 de Julio. Para cualquier asunto urgente, por 
favor, contacten a Marito Alonso al e-mail: [EMAIL PROTECTED]


Gracias



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



Re: Re: Re: Re: Re: Re: Re: Re: Tomcat Session Replication Portlets

2005-07-08 Thread batkinson
I will be on holidays from July 6th to 8th. For any urgent matter, please 
contact Ms. Alonso at [EMAIL PROTECTED]

Estaré de vacaciones del 6 al 8 de Julio. Para cualquier asunto urgente, por 
favor, contacten a Marito Alonso al e-mail: [EMAIL PROTECTED]


Gracias



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



Re: Re: Re: Re: Re: Re: Re: Re: Re: Tomcat Session Replication Portlets

2005-07-08 Thread batkinson
I will be on holidays from July 6th to 8th. For any urgent matter, please 
contact Ms. Alonso at [EMAIL PROTECTED]

Estaré de vacaciones del 6 al 8 de Julio. Para cualquier asunto urgente, por 
favor, contacten a Marito Alonso al e-mail: [EMAIL PROTECTED]


Gracias



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



Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Tomcat Session Replication Portlets

2005-07-08 Thread batkinson
I will be on holidays from July 6th to 8th. For any urgent matter, please 
contact Ms. Alonso at [EMAIL PROTECTED]

Estaré de vacaciones del 6 al 8 de Julio. Para cualquier asunto urgente, por 
favor, contacten a Marito Alonso al e-mail: [EMAIL PROTECTED]


Gracias



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



Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Tomcat Session Replication Portlets

2005-07-08 Thread batkinson
I will be on holidays from July 6th to 8th. For any urgent matter, please 
contact Ms. Alonso at [EMAIL PROTECTED]

Estaré de vacaciones del 6 al 8 de Julio. Para cualquier asunto urgente, por 
favor, contacten a Marito Alonso al e-mail: [EMAIL PROTECTED]


Gracias



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



Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Tomcat Session Replication Portlets

2005-07-08 Thread batkinson
I will be on holidays from July 6th to 8th. For any urgent matter, please 
contact Ms. Alonso at [EMAIL PROTECTED]

Estaré de vacaciones del 6 al 8 de Julio. Para cualquier asunto urgente, por 
favor, contacten a Marito Alonso al e-mail: [EMAIL PROTECTED]


Gracias



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



DO NOT REPLY [Bug 14994] - https coyote connector leaving sockets in CLOSE_WAIT

2005-07-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=14994.
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=14994





--- Additional Comments From [EMAIL PROTECTED]  2005-07-08 14:53 ---
I am not facing this problem on tomcat 5.5.9 :) may be it is resolved now.


(In reply to comment #6)
 Here's a real easy test case.
 
 1. Configure an https service.
 
 2.
 import java.io.*;
 import java.text.*;
 import java.util.*;
 import javax.servlet.http.*;
 
 public class test extends HttpServlet
 {
 public void doGet(HttpServletRequest request, HttpServletResponse 
 response)
 throws IOException
 {
 PrintWriter out = null;
 try
 {
 response.setContentType(text/plain);
 response.setDateHeader(Expires, 0);
 response.setHeader(Pragma, no-cache);
 out = response.getWriter();
 out.println(Hello There);
 for (int i = 0 ; i  2000 ; i ++)
 out.println(Math.random());
 }
 catch (Exception e)
 {
 e.printStackTrace();
 }
 }
 }
 
 Fire it up.
 
 3. Start IE or Mozilla and aim it at page.
 4. Hold F5 button down for 10 seconds.
 5. netstat -anp
 tcp1  0 63.127.110.16:443   63.127.110.14:4499  
 CLOSE_WAIT 
 10860/java  
 tcp1  0 63.127.110.16:443   63.127.110.14:4498  
 CLOSE_WAIT 
 10860/java  
 tcp1  0 63.127.110.16:443   63.127.110.14:4497  
 CLOSE_WAIT 
 etc. etc.
 
 Dead and stays that way for at least three hours (as long as I could leave 
 it).

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



cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net AprEndpoint.java

2005-07-08 Thread remm
remm2005/07/08 08:43:23

  Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java
  Log:
  - Add extra value.
  
  Revision  ChangesPath
  1.62  +2 -0  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java
  
  Index: AprEndpoint.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- AprEndpoint.java  8 Jul 2005 14:19:04 -   1.61
  +++ AprEndpoint.java  8 Jul 2005 15:43:23 -   1.62
  @@ -543,6 +543,8 @@
   value = SSL.SSL_PROTOCOL_SSLV3;
   } else if (TLSv1.equalsIgnoreCase(SSLProtocol)) {
   value = SSL.SSL_PROTOCOL_TLSV1;
  +} else if (SSLv2+SSLv3.equalsIgnoreCase(SSLProtocol)) {
  +value = SSL.SSL_PROTOCOL_SSLV2 | SSL.SSL_PROTOCOL_SSLV3;
   }
   // Create SSL Context
   sslContext = SSLContext.make(rootPool, value, 
SSL.SSL_MODE_SERVER);
  
  
  

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



DO NOT REPLY [Bug 32063] - Installing as service: Unable to insert values for JvmMx and JvmMs in registry

2005-07-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=32063.
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=32063


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2005-07-08 18:12 ---
The options being set in service.bat do not work.  

This is the option as set in service.bat as distributed in Tomcat 5.0.28:

%EXECUTABLE% //US//%SERVICE_NAME% ++JvmOptions
-Djava.io.tmpdir=%CATALINA_BASE%\temp --JvmMs 128 --JvmMx 256

That will not set those options in the registry.  

You can, however, get the values to be set in the registry by expressing the
options in hex:

%EXECUTABLE% //US//%SERVICE_NAME% ++JvmOptions
-Djava.io.tmpdir=%CATALINA_BASE%\temp --JvmMs 0x80 --JvmMx 0x100

Either the default values in service.bat should be changed, or the code should
be changed to support the decimal input as provided by the current service.bat 
file.

Hope this helps.

-- 
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 7360] - res-sharing-scope not supported

2005-07-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=7360.
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=7360


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2005-07-08 19:06 ---
res-sharing-scope is supported and the default value is shareable. See
o.a.c.deploy.ContextResource for confirmation.

I haven't actually done it, but writing an object factory that uses does seem
possible from a quick look at o.a.naming.factory.ResourceFactory and
o.a.naming.ResourceRef
If you need help doing this, then please use the tomcat-user mailing list.

As to Tomcat behaviour, the spec states that res-sharing-scope indicates if
resources *can* be shared, not that they *must* be shared. Therefore the
factories supplied with Tomcat are spec compilant if they choose to ignore this
flag and always issue non-shared resources. Of course, doing the opposite and
always issuing shared resources would be a spec violation.

-- 
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 34870] - Problems with jakarta-tomcat-connectors-1.2.12-src/jk/native/configure and HP-UX 11.0

2005-07-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34870.
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=34870





--- Additional Comments From [EMAIL PROTECTED]  2005-07-08 19:45 ---
In my experience HP-UX /bin/sh and /bin/ksh treats using unset environment
variables as an script error/abort. i.e. If VARX is not set, using ${VARX}
causes a shell script ending error.  Some OSes follow this error scheme, some do
not (treat it as an error).

To get around that shell error, you can use the Bourne Shell ':-' notation
within variable references: ${VARX:-foo} means Substitute with the value of
VARX. If VARX is not set, use the value following the dash (in this case 'foo')
instead. If you leave the value off ${VARX:-}, it means If VARX is not set,
use the value following the dash (in this case nothing) instead. It's an easy
way to get around unset variable shell error. This type of notation should be
supported in all Bourne shell derivatives (it works on HP-UX, Solaris, AIX and
Linux 'cause I use it all the time).

So, while this may work under Linux/bash and cause a script error/abort under 
HP-UX:

if [ ${a}x = x ]; then echo a is not set; else echo a is set; fi

This produces the desired result without error in both:

if [ ${a:-}x = x ]; then echo a is not set; else echo a is set; fi

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



getting AbstractMethodError when attempting to implement JavaCompiler interface

2005-07-08 Thread James Puthukattukaran
I have defined my own class (IJC) that implements the JavaCompiler
interface and am using it with Websphere 5.0.
The IJC class is used instead of the default Java compiler when the JSP
engines loads it (defined jspCompilerPlugin in the ibm-ext.xml file).
 
When it attempts to load the class, it fails giving the following stack
trace.
 
[7/8/05 15:49:07:469 EDT] 5d1faf8f WebGroup  E SRVE0026E: [Servlet
Error]-[incert/addins/tomcat/IJC.setVerbose]: 
ava.lang.AbstractMethodError: incert/addins/tomcat/IJC.setVerbose
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:301)^M
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:129)^M
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet.loadJSP(JspServlet.jav
a:926)^M
at
com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.load
IfNecessary(JspServlet.java:285)^M
.
.
.
 
(only posted the relevant part of the stack trace). Where is setVerbose
defined? I can't seem to find it in the javadoc pages for JavaCompiler.
 
thanks,
James


cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java DataSender.java LocalStrings.properties PooledSocketSender.java ReplicationListener.java ReplicationTransmitter.java SendMessageData.java SimpleTcpCluster.java SocketReplicationListener.java SocketReplicationThread.java TcpReplicationThread.java mbeans-descriptors.xml

2005-07-08 Thread pero
pero2005/07/08 13:51:48

  Modified:modules/cluster/src/share/org/apache/catalina/cluster/io
ListenCallback.java SocketObjectReader.java
   modules/cluster/src/share/org/apache/catalina/cluster/tcp
ClusterReceiverBase.java DataSender.java
LocalStrings.properties PooledSocketSender.java
ReplicationListener.java
ReplicationTransmitter.java SendMessageData.java
SimpleTcpCluster.java
SocketReplicationListener.java
SocketReplicationThread.java
TcpReplicationThread.java mbeans-descriptors.xml
  Log:
  send ack before message is handled
  default is now that no wait ack is default.
  
  Revision  ChangesPath
  1.4   +11 -4 
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/ListenCallback.java
  
  Index: ListenCallback.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/ListenCallback.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ListenCallback.java   26 Jun 2005 21:21:49 -  1.3
  +++ ListenCallback.java   8 Jul 2005 20:50:30 -   1.4
  @@ -26,8 +26,6 @@
* @author Peter Rossbach
* @version $Revision$, $Date$
*/
  -
  -
   public interface ListenCallback
   {
   /**
  @@ -35,6 +33,15 @@
* been received from one of the cluster nodes.
* @param data - the message bytes received from the cluster/replication 
system
*/
  -   // public void messageDataReceived(byte[] data);
public void messageDataReceived(ClusterData data);
  + 
  +/** receiver must be send ack
  +  */
  + public boolean isSendAck() ;
  + 
  + /** send ack
  +  *
  +  */
  + public void sendAck() throws java.io.IOException ;
  +
   }
  \ No newline at end of file
  
  
  
  1.4   +3 -1  
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/SocketObjectReader.java
  
  Index: SocketObjectReader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/SocketObjectReader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SocketObjectReader.java   26 Jun 2005 21:21:49 -  1.3
  +++ SocketObjectReader.java   8 Jul 2005 20:50:30 -   1.4
  @@ -74,6 +74,8 @@
   int pkgCnt = 0;
   while ( pkgExists ) {
   ClusterData cdata = buffer.extractPackage(true);
  +if(callback.isSendAck())
  +callback.sendAck() ;
   callback.messageDataReceived(cdata);
   pkgCnt++;
   pkgExists = buffer.doesPackageExist();
  
  
  
  1.9   +9 -1  
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java
  
  Index: ClusterReceiverBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ClusterReceiverBase.java  1 Jul 2005 18:35:54 -   1.8
  +++ ClusterReceiverBase.java  8 Jul 2005 20:50:30 -   1.9
  @@ -505,4 +505,12 @@
   }
   }
   }
  +
  +/* (non-Javadoc)
  + * @see org.apache.catalina.cluster.io.ListenCallback#sendAck()
  + */
  +public void sendAck() throws IOException {
  +// do nothing
  +}
  +
   }
  
  
  
  1.14  +36 -3 
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java
  
  Index: DataSender.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DataSender.java   26 Jun 2005 21:21:50 -  1.13
  +++ DataSender.java   8 Jul 2005 20:50:30 -   1.14
  @@ -120,6 +120,11 @@
   protected long dataResendCounter = 0;
   
   /**
  + * number of data failure sends 
  + */
  +protected long dataFailureCounter = 0;
  +
  +/**
* doProcessingStats
*/
   protected boolean doProcessingStats = false;
  @@ -182,7 +187,7 @@
   /**
* wait for receiver Ack
*/
  -private boolean waitForAck = true;
  +private boolean waitForAck = false;
   
   /**
* number of socket close
  @@ -199,6 +204,12 @@
*/
   private 

cvs commit: jakarta-tomcat-catalina/webapps/docs cluster-howto.xml

2005-07-08 Thread pero
pero2005/07/08 13:52:50

  Modified:webapps/docs cluster-howto.xml
  Log:
  document new resend flag
  small other changes
  
  Revision  ChangesPath
  1.11  +43 -18jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml
  
  Index: cluster-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- cluster-howto.xml 1 Jul 2005 18:35:03 -   1.10
  +++ cluster-howto.xml 8 Jul 2005 20:52:50 -   1.11
  @@ -342,8 +342,7 @@
  resourceName=UserDatabase /gt;
   lt;Host  name=localhost
   appBase=webappsgt;
  - lt;Cluster 
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
  -defaultMode=true /gt;
  + lt;Cluster 
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster/gt;
   lt;/Hostgt;
   lt;/Enginegt;
   lt;/Servicegt;
  @@ -353,7 +352,8 @@
   The default mode configuration setup a emfastasyncmode/em cluster 
configuration with following
   parameters:
   ul
  -liOpen Membership receiver at em228.0.0.4/em and send to multicast 
udp port em8012/em./li
  +liOpen Membership receiver at em228.0.0.4/em and send to multicast 
udp port em8012/em/li
  +liSend membership every 1 sec and drop member after 30sec./li
   liOpen message receiver at default ip interface at first free port 
between em8015/em and em8019/em./li
   liReceiver message with emSocketReplicationListener/em /li
   liConfigure a emReplicationTransmitter/em with 
emfastasyncmode/em sender mode./li
  @@ -372,8 +372,7 @@
   lt;Cluster 
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 service.mcastBindAddress=127.0.0.1 
   receiver.tcpListenPort=9070 
  - receiver.tcpListenMaxPort=9075 
  -   defaultMode=true /gt;
  + receiver.tcpListenMaxPort=9075 /gt;
   /source
   br/   
   bWARNING/b: When you add you sub elements, there overwrite the defaults 
complete.
  @@ -383,8 +382,7 @@
   lt;Cluster 
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 service.mcastBindAddress=127.0.0.1 
   receiver.tcpListenPort=9070 
  - receiver.tcpListenMaxPort=9075 
  -   defaultMode=true gt;
  + receiver.tcpListenMaxPort=9075 gt;
  lt;ClusterListener  
className=org.apache.catalina.cluster.session.ClusterSessionListener /gt;
  lt;ClusterListener  
className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener 
/gt;
  lt;Valve
className=org.apache.catalina.cluster.tcp.ReplicationValve
  @@ -423,8 +421,7 @@
   jvmRoute=node1gt;
   lt;Realm
className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase /gt;
  -lt;Cluster  
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
  -defaultMode=true /gt;
  +lt;Cluster  
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster/gt;
   lt;Host  name=localhost
   appBase=webapps/gt;
   lt;/Enginegt;
  @@ -474,7 +471,7 @@
  manager.expireSessionsOnShutdown=false
  manager.notifyListenersOnReplication=false
   manager.notifySessionListenersOnReplication=false
  -   manager.sendAllSessions=false
  +manager.sendAllSessions=false
   manager.sendAllSessionsSize=500
   manager.sendAllSessionsWaitTime=20gt;
 lt;Membership 
  @@ -483,8 +480,8 @@
  mcastBindAddress=127.0.0.1 
mcastClusterDomain=d10 
 mcastPort=45564
  - mcastFrequency=500
  -  mcastDropTime=3000/gt;
  + mcastFrequency=1000
  +  mcastDropTime=3/gt;
 lt;Receiver 
  
className=org.apache.catalina.cluster.tcp.ReplicationListener
   tcpListenAddress=auto
  @@ -566,7 +563,7 @@
 tr
   tdwaitForAck/td
   tdWait for ack after data send/td
  -tdcodetrue/code/td
  +tdcodefalse/code/td
 /tr
   
 tr
  @@ -583,7 +580,7 @@
   /table
   /p
   p
  -Example to get statistic information and transfer is compressedbr/
  +Example to get statistic information, wait for ack at every message send and 
transfer at compressed modebr/
   source
   lt;Sender
 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorQueryTask.java JMXAccessorTask.java

2005-07-08 Thread pero
pero2005/07/08 13:54:40

  Modified:catalina/src/share/org/apache/catalina/ant/jmx
JMXAccessorQueryTask.java JMXAccessorTask.java
  Log:
  more support for MXBean data
  better property binding support
  
  Revision  ChangesPath
  1.3   +54 -60
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java
  
  Index: JMXAccessorQueryTask.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JMXAccessorQueryTask.java 30 Jun 2005 13:01:27 -  1.2
  +++ JMXAccessorQueryTask.java 8 Jul 2005 20:54:40 -   1.3
  @@ -135,31 +135,29 @@
   String resultproperty = getResultproperty();
   try {
   names = jmxServerConnection.queryNames(new ObjectName(qry), 
null);
  -if (resultproperty != null)
  -getProject().setNewProperty(resultproperty + .length,
  -Integer.toString(names.size()));
  +if (resultproperty != null) {
  +setProperty(resultproperty + 
.Length,Integer.toString(names.size()));
  +}
   } catch (Exception e) {
   if (isEcho())
   handleErrorOutput(e.getMessage());
   return Can't query mbeans  + qry;
   }
   
  -Iterator it = names.iterator();
  -int oindex = 0;
  -String pname = null;
  -while (it.hasNext()) {
  -ObjectName oname = (ObjectName) it.next();
  -pname = resultproperty + . + Integer.toString(oindex) + .;
  -oindex++;
  -if (isEcho())
  -handleOutput(pname + name= + oname.toString());
  -if (resultproperty != null) {
  -getProject().setNewProperty(pname + name,
  -oname.toString());
  -}
  -if (isAttributebinding()) {
  -bindAttributes(jmxServerConnection, resultproperty, pname, 
oname);
  -}
  +if (resultproperty != null) {
  +Iterator it = names.iterator();
  +int oindex = 0;
  +String pname = null;
  +while (it.hasNext()) {
  +ObjectName oname = (ObjectName) it.next();
  +pname = resultproperty + . + Integer.toString(oindex) + 
.;
  +oindex++;
  +setProperty(pname + Name, oname.toString());
  +if (isAttributebinding()) {
  +bindAttributes(jmxServerConnection, resultproperty, 
pname, oname);
  +
  +}
  +}
   }
   return isError;
   }
  @@ -171,50 +169,46 @@
* @param oname
*/
   protected void bindAttributes(MBeanServerConnection jmxServerConnection, 
String resultproperty, String pname, ObjectName oname) {
  -try {
  -MBeanInfo minfo = jmxServerConnection.getMBeanInfo(oname);
  -String code = minfo.getClassName();
  -if (org.apache.commons.modeler.BaseModelMBean
  -.equals(code)) {
  -code = (String) jmxServerConnection.getAttribute(oname,
  -modelerType);
  -}
  -MBeanAttributeInfo attrs[] = minfo.getAttributes();
  -Object value = null;
  -
  -for (int i = 0; i  attrs.length; i++) {
  -if (!attrs[i].isReadable())
  -continue;
  -String attName = attrs[i].getName();
  -if (attName.indexOf(=) = 0
  -|| attName.indexOf(:) = 0
  -|| attName.indexOf( ) = 0) {
  -continue;
  +if (jmxServerConnection != null   resultproperty != null 
  + pname != null  oname != null ) {
  +try {
  +MBeanInfo minfo = jmxServerConnection.getMBeanInfo(oname);
  +String code = minfo.getClassName();
  +if 
(org.apache.commons.modeler.BaseModelMBean.equals(code)) {
  +code = (String) jmxServerConnection.getAttribute(oname,
  +modelerType);
   }
  +MBeanAttributeInfo attrs[] = minfo.getAttributes();
  +Object value = null;
   
  -try {
  -value = jmxServerConnection.getAttribute(oname,
  -attName);
  -} catch (Throwable t) {
  -if (isEcho())
  -handleErrorOutput(Error getting attribute 
  -+ oname +   + pname + attName +  
  -+ t.toString());

DO NOT REPLY [Bug 35666] New: - NT service will not start if the installation path contains unicode path name

2005-07-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=35666.
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=35666

   Summary: NT service will not start if the installation path
contains unicode path name
   Product: Tomcat 4
   Version: 4.1.27
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Keywords: RFC
  Severity: critical
  Priority: P1
 Component: Connector:Webapp
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


NT service will not start if the installation path contains unicode path name

Steps 1:
Download JDK 1.4.1_02 and install it.
Step 2:
Set JAVA_HOME=[MY JDK PATH]
Step 3:
Install jakarta-tomcat-4.1.27.exe 
Install path chosen : C:\Program Files\ƒT[ƒrƒX\Tomcat4
(suppose this path contains some Japanese characters)
Select NT Service option
Step 4:
Installation completed but Tomcat service won't start
Step 5:
Try to start the service manually by clicking on Start from the properties of 
the service.
Step 6:
View the logs file from the window viewers.log and see and error 
message Could not create a FileOutputStream for System.out redirect.

-- 
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: Tomcat Session Replication Portlets

2005-07-08 Thread Eric Dalquist

Rémy,
   We are hoping to get this work done in short order for a client. 
What class are the access / endAccess methods in?


Thank you,
-Eric Dalquist

Remy Maucherat wrote:


Eric Dalquist wrote:

I am prepared to do the work for this task but would like to get some 
feed back from the tomcat developer community on recommendations and 
in what way the work could be done to ensure its eventual inclusion 
in the tomcat codebase.



We're not going to need much help here, as I assume that there will be 
at least two persons interested in fixing this eventually. Probably 
registering sessions for checking in access or endAccess would be a 
decent solution.


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 34526] - Truncated content in decompressed requests from mod_deflate

2005-07-08 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=34526.
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=34526


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |




--- Additional Comments From [EMAIL PROTECTED]  2005-07-09 06:08 ---
The client sends correct Content-Length equal to the compressed request size,
that's what it's supposed to be per HTTP 1.1, and I don't see where the client
has a problem here. Apache correctly reads the request, and mod_deflate
correctly decompresses it, only the servlet receives truncated content. Where
does the servlet spec imply that behaviour? The original Content-Length header
value cannot be trusted after passing through HTTP Server, specifically because
filters like mod_deflate may render it invalid.

Setting Content-Length to -1 might work as a workaround, but my point was that
it should also work with a correct positive Content-Length.

If I don't use mod_deflate's decompression and decompress with a servlet filter
instead, the servlet gets complete content, while the Content-Length header of
course remains with the original value, which is functionality-wise, but I would
much rather use mod_deflate's decompression for scalability and load
distribution reasons, and mod_deflate is likely faster than GZIPInputStream.

I initially thought it might be a mod_deflate's problem, but an HTTP Server
person (André Malo) said he is certain it should be fixed in mod_jk. I suppose
he implied that instead of trusting Content-Length, there is another more
reliable way to determine end of request stream from Apache. Please refer to the
HTTP Server bug linked in the original description.

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