RE: 3.3: nightly, updating the parser, options

2001-06-22 Thread GOMEZ Henri

I'm working on restoring the nightly buildtest, probably this evening
we'll have them ( I was close last night ).

Few issues, need feedback: 

- I would like to update to the latest jaxp, we are still building with
jaxp1.0 ( it's about the default build, of course you can build/use
whatever you want ). 

+1

- There are few module options that are set for backward
compatibility right now, but it would be very usefull otherwise.

One is the autodeploy ( detect when the .WAR file changes, 
and redeploy
and reload the context - same as if a .class file changes ). 

The other is the vhost-based layout for the webapps dir (
use webapps/virtual.host.com/context, with DEFAULT as keyword for the 
main host ). That would allow easier auto-configuration for 
virtual hosts.
( as you should know, the location of webapp and it's behavior can be
easily controlled in server.xml, it's just a matter of setting the
default).

Fine




cvs commit: jakarta-tomcat KEYS

2001-06-22 Thread hgomez

hgomez  01/06/21 23:50:27

  Modified:.KEYS
  Log:
  Update the KEYS files with my PGP KEY used to sign the
  tomcat 3.3 RPM packages
  
  Revision  ChangesPath
  1.3   +18 -0 jakarta-tomcat/KEYS
  
  Index: KEYS
  ===
  RCS file: /home/cvs/jakarta-tomcat/KEYS,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- KEYS  2001/06/22 05:07:56 1.2
  +++ KEYS  2001/06/22 06:50:26 1.3
  @@ -57,3 +57,21 @@
   KZxX8kdYyu+d7ySJ
   =4qPO
   -END PGP PUBLIC KEY BLOCK-
  +
  +
  +Type Bits/KeyIDDate   User ID
  +pub  1024/697ECEDD 2000/04/06 Henri Gomez [EMAIL PROTECTED]
  +  *** RPM SIGNING KEY ***
  +-BEGIN PGP PUBLIC KEY BLOCK-
  +Version: 2.6.3i
  +
  +mQCNAzjsydwAAAEEAMpwFU/ci3/wR3ryCGp9Exr+Rx/hTQ7hWAJcVw8ejlBXlT4T
  +yITlRUs0HGfRWxME2J55PuXXsIEPZzjfozNtvOyq8WlLlJ7iaiyWxVRoPJ25sSEj
  +C9etm6wjj4E66ZgzuElZkm1m69uEsCHPPNuz1oQ/g1O+SmIVxIYirlxpfs7dAAUR
  +tBxIZW5yaSBHb21leiA8aGdvbWV6QHNsaWIuZnI+iQCVAwUQOOzJ3IYirlxpfs7d
  +AQFQyQQAj0D9G0hEL7SQGaSCkkoXwvamQw42N8+tNm+jfWHWdE4HAiVlhJmI2GyD
  +sdcXVAcR8R7ILIRB5AY7a3bF+qMk0r+vO6oR878RKKn9AvtaAIOnrh6tr0tiPwf5
  +XDUMySxIWJEF3SmJAy9Lq3bAl5GMzZCFHiS0NW2gtWgmr/u1RuM=
  +=6l+I
  +-END PGP PUBLIC KEY BLOCK-
  +
  
  
  



cvs commit: jakarta-tomcat KEYS

2001-06-22 Thread hgomez

hgomez  01/06/22 01:05:55

  Modified:.Tag: tomcat_32 KEYS
  Log:
  Updated KEYS with my KEY.
  Used to sign RPMS
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.2   +17 -0 jakarta-tomcat/KEYS
  
  Index: KEYS
  ===
  RCS file: /home/cvs/jakarta-tomcat/KEYS,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- KEYS  2001/05/25 21:41:37 1.1.2.1
  +++ KEYS  2001/06/22 08:05:54 1.1.2.2
  @@ -35,3 +35,20 @@
   =3OGr
   -END PGP PUBLIC KEY BLOCK-
   
  +
  +Type Bits/KeyIDDate   User ID
  +pub  1024/697ECEDD 2000/04/06 Henri Gomez [EMAIL PROTECTED]
  +  *** RPM SIGNING KEY ***
  +-BEGIN PGP PUBLIC KEY BLOCK-
  +Version: 2.6.3i
  +
  +mQCNAzjsydwAAAEEAMpwFU/ci3/wR3ryCGp9Exr+Rx/hTQ7hWAJcVw8ejlBXlT4T
  +yITlRUs0HGfRWxME2J55PuXXsIEPZzjfozNtvOyq8WlLlJ7iaiyWxVRoPJ25sSEj
  +C9etm6wjj4E66ZgzuElZkm1m69uEsCHPPNuz1oQ/g1O+SmIVxIYirlxpfs7dAAUR
  +tBxIZW5yaSBHb21leiA8aGdvbWV6QHNsaWIuZnI+iQCVAwUQOOzJ3IYirlxpfs7d
  +AQFQyQQAj0D9G0hEL7SQGaSCkkoXwvamQw42N8+tNm+jfWHWdE4HAiVlhJmI2GyD
  +sdcXVAcR8R7ILIRB5AY7a3bF+qMk0r+vO6oR878RKKn9AvtaAIOnrh6tr0tiPwf5
  +XDUMySxIWJEF3SmJAy9Lq3bAl5GMzZCFHiS0NW2gtWgmr/u1RuM=
  +=6l+I
  +-END PGP PUBLIC KEY BLOCK-
  +
  
  
  



RE: Any reason why...

2001-06-22 Thread GOMEZ Henri

...these two lines at around 1110 in jk_ajp_common.c

  int port = jk_get_worker_port(props, p-name, port);
  char *host = jk_get_worker_host(props, p-name, host);

use unitialised values for port and host. Anyone mind if I change them
to

  int port = jk_get_worker_port(props, p-name, -1);
  char *host = jk_get_worker_host(props, p-name, NULL);


The value are initialised some lines before depending AJP13/AJP14 :)



Re: Any reason why...

2001-06-22 Thread Andy Armstrong

GOMEZ Henri wrote:
 
 ...these two lines at around 1110 in jk_ajp_common.c
 
   int port = jk_get_worker_port(props, p-name, port);
   char *host = jk_get_worker_host(props, p-name, host);
 
 use unitialised values for port and host. Anyone mind if I change them
 to
 
   int port = jk_get_worker_port(props, p-name, -1);
   char *host = jk_get_worker_host(props, p-name, NULL);
 
 
 The value are initialised some lines before depending AJP13/AJP14 :)

They can't be initialised before -- they're actually declared in the
fragment I quote -- they don't exist before here.

-- 
Andy Armstrong, Tagish



Re: Any reason why...

2001-06-22 Thread Andy Armstrong

Andy Armstrong wrote:
 
 GOMEZ Henri wrote:
 
  ...these two lines at around 1110 in jk_ajp_common.c
  
int port = jk_get_worker_port(props, p-name, port);
char *host = jk_get_worker_host(props, p-name, host);
  
  use unitialised values for port and host. Anyone mind if I change them
  to
  
int port = jk_get_worker_port(props, p-name, -1);
char *host = jk_get_worker_host(props, p-name, NULL);
  
 
  The value are initialised some lines before depending AJP13/AJP14 :)
 
 They can't be initialised before -- they're actually declared in the
 fragment I quote -- they don't exist before here.

Ah. I see the real problem -- they're declared at the start of the
function and again here. Unfortunately the values that are in scope when
jk_get_worker_port() and jk_get_worker_host() are called are the new,
uninitialised variables rather than the ones declared at the top of the
function.

Those two lines should change to

port = jk_get_worker_port(props, p-name, port);
host = jk_get_worker_host(props, p-name, host);


-- 
Andy Armstrong, Tagish



RE: Any reason why...

2001-06-22 Thread GOMEZ Henri

+1, I'll correct now.

I'll have a huge commit to send today, 
AJP14 login feature is quasi finished :)


-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: Andy Armstrong [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 10:25 AM
To: [EMAIL PROTECTED]
Subject: Re: Any reason why...


Andy Armstrong wrote:
 
 GOMEZ Henri wrote:
 
  ...these two lines at around 1110 in jk_ajp_common.c
  
int port = jk_get_worker_port(props, p-name, port);
char *host = jk_get_worker_host(props, p-name, host);
  
  use unitialised values for port and host. Anyone mind if 
I change them
  to
  
int port = jk_get_worker_port(props, p-name, -1);
char *host = jk_get_worker_host(props, p-name, NULL);
  
 
  The value are initialised some lines before depending 
AJP13/AJP14 :)
 
 They can't be initialised before -- they're actually declared in the
 fragment I quote -- they don't exist before here.

Ah. I see the real problem -- they're declared at the start of the
function and again here. Unfortunately the values that are in 
scope when
jk_get_worker_port() and jk_get_worker_host() are called are the new,
uninitialised variables rather than the ones declared at the top of the
function.

Those two lines should change to

port = jk_get_worker_port(props, p-name, port);
host = jk_get_worker_host(props, p-name, host);


-- 
Andy Armstrong, Tagish




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp14.c jk_ajp14_worker.c jk_ajp_common.c jk_worker.c

2001-06-22 Thread hgomez

hgomez  01/06/22 01:33:57

  Modified:jk/native/common jk_ajp14.c jk_ajp14_worker.c
jk_ajp_common.c jk_worker.c
  Log:
  This bunch of code fixes the AJP14 login problem.
  Rigth now ajp14 advanced login features works with
  the experimental ajp14 I'll commit later today
  
  Revision  ChangesPath
  1.9   +19 -20jakarta-tomcat-connectors/jk/native/common/jk_ajp14.c
  
  Index: jk_ajp14.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp14.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jk_ajp14.c2001/06/18 14:15:23 1.8
  +++ jk_ajp14.c2001/06/22 08:33:56 1.9
  @@ -58,7 +58,7 @@
   /***
* Description: Next generation bi-directional protocol handler.   *
* Author:  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.8 $   *
  + * Version: $Revision: 1.9 $   *
***/
   
   
  @@ -73,11 +73,12 @@
* Compute the MD5 with ENTROPY / SECRET KEY
*/
   
  -void ajp14_compute_md5(jk_login_service_t *s, jk_logger_t *l)
  +void ajp14_compute_md5(jk_login_service_t *s, 
  +   jk_logger_t*l)
   {
jk_md5((const unsigned char *)s-entropy, (const unsigned char 
*)s-secret_key, s-computed_key);
   
  - jk_log(l, JK_LOG_DEBUG, Into ajp14_compute_md5 (%s)\n, s-computed_key);
  + jk_log(l, JK_LOG_DEBUG, Into ajp14_compute_md5 (%s/%s) - (%s)\n, 
s-entropy, s-secret_key, s-computed_key);
   }
   
   
  @@ -132,9 +133,9 @@
*
*/
   
  -int ajp14_unmarshal_login_seed(jk_msg_buf_t *msg,
  +int ajp14_unmarshal_login_seed(jk_msg_buf_t   *msg,
  jk_login_service_t *s,
  -   jk_logger_t *l)
  +   jk_logger_t*l)
   {
   if (jk_b_get_bytes(msg, (unsigned char *)s-entropy, AJP14_ENTROPY_SEED_LEN)  
0) {
   jk_log(l, JK_LOG_ERROR, Error ajp14_unmarshal_login_seed - can't get 
seed\n);
  @@ -169,8 +170,6 @@
   if (jk_b_append_byte(msg, AJP14_LOGCOMP_CMD)) 
   return JK_FALSE;
   
  - ajp14_compute_md5(s, l);
  -
/*
 * COMPUTED-SEED
 */
  @@ -192,9 +191,9 @@
*
*/
   
  -int ajp14_unmarshal_log_ok(jk_msg_buf_t *msg,
  +int ajp14_unmarshal_log_ok(jk_msg_buf_t   *msg,
  jk_login_service_t *s,
  -   jk_logger_t *l)
  +   jk_logger_t*l)
   {
unsigned long   nego;
char *  sname;
  @@ -237,7 +236,7 @@
*/
   
   int ajp14_unmarshal_log_nok(jk_msg_buf_t *msg,
  -jk_logger_t *l)
  +jk_logger_t  *l)
   {
unsigned long   status;
   
  @@ -299,7 +298,7 @@
*
*/
   int ajp14_unmarshal_shutdown_nok(jk_msg_buf_t *msg,
  - jk_logger_t *l)
  + jk_logger_t  *l)
   {
   unsigned long   status;
   
  @@ -367,9 +366,9 @@
*
*/
   
  -int ajp14_marshal_context_query_into_msgb(jk_msg_buf_t *msg,
  -   char 
*virtual,
  -   
jk_logger_t  *l)
  +int ajp14_marshal_context_query_into_msgb(jk_msg_buf_t *msg,
  +   char 
*virtual,
  +   
jk_logger_t  *l)
   {
jk_log(l, JK_LOG_DEBUG, Into ajp14_marshal_context_query_into_msgb\n);
   
  @@ -408,7 +407,7 @@
   
   int ajp14_unmarshal_context_info(jk_msg_buf_t *msg,
 jk_context_t *context,
  - jk_logger_t *l)
  + jk_logger_t  *l)
   {
   char *sname;
/* char *old; unused */
  @@ -479,9 +478,9 @@
*
*/
   
  -int ajp14_marshal_context_state_into_msgb(jk_msg_buf_t   *msg,
  -  jk_context_t   *context,
  -  jk_logger_t*l)
  +int ajp14_marshal_context_state_into_msgb(jk_msg_buf_t *msg,
  +  jk_context_t *context,
  +  jk_logger_t  *l)
   {
   jk_log(l, JK_LOG_DEBUG, Into ajp14_marshal_context_state_into_msgb\n);
   
  @@ -525,7 +524,7 @@
   
   int ajp14_unmarshal_context_state_reply(jk_msg_buf_t *msg,
 

Re: Any reason why...

2001-06-22 Thread Andy Armstrong

GOMEZ Henri wrote:
 
 +1, I'll correct now.
 
 I'll have a huge commit to send today,
 AJP14 login feature is quasi finished :)

Quasi? :-)

-- 
Andy Armstrong, Tagish



cvs commit: jakarta-tomcat-connectors/webapp/lib Makefile.in

2001-06-22 Thread jfclere

jfclere 01/06/22 02:45:59

  Modified:webapp   Makefile.in
   webapp/apache-1.3 Makefile.in
   webapp/lib Makefile.in
  Log:
  Add make install (via apxs -i). Change the make -C to (cd ; make).
  
  Revision  ChangesPath
  1.5   +14 -3 jakarta-tomcat-connectors/webapp/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/Makefile.in,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.in   2001/05/10 06:05:41 1.4
  +++ Makefile.in   2001/06/22 09:45:56 1.5
  @@ -56,7 +56,7 @@
   # = #
   
   # @author  Pier Fumagalli mailto:[EMAIL PROTECTED]
  -# @version $Id: Makefile.in,v 1.4 2001/05/10 06:05:41 pier Exp $
  +# @version $Id: Makefile.in,v 1.5 2001/06/22 09:45:56 jfclere Exp $
   
   include Makedefs
   
  @@ -73,7 +73,7 @@
   all:
@for DIR in $(DIRS) ; do \
echo Compiling sources in $$DIR... ; \
  - $(MAKE) -C $$DIR all ; \
  + (cd $$DIR; $(MAKE) all) ; \
RET=$$? ; \
if ( test $$RET != 0 ) ; then \
exit $$RET ; \
  @@ -83,12 +83,23 @@
   clean:
@for DIR in $(DIRS) ; do \
echo Cleaning up $$DIR... ; \
  - $(MAKE) -C $$DIR clean ; \
  + (cd $$DIR; $(MAKE) clean) ; \
RET=$$? ; \
if ( test $$RET != 0 ) ; then \
exit $$RET ; \
fi ; \
done
  +
  +install:
  + @for DIR in $(DIRS) ; do \
  + echo Installing $$DIR... ; \
  + (cd $$DIR; $(MAKE) install) ; \
  + RET=$$? ; \
  + if ( test $$RET != 0 ) ; then \
  + exit $$RET ; \
  + fi ; \
  + done
  +
   
   apidocs: include/*.h
@echo Generating API documentation...
  
  
  
  1.2   +4 -1  jakarta-tomcat-connectors/webapp/apache-1.3/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/apache-1.3/Makefile.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.in   2001/05/10 06:13:29 1.1
  +++ Makefile.in   2001/06/22 09:45:57 1.2
  @@ -56,7 +56,7 @@
   # = #
   
   # @author  Pier Fumagalli mailto:[EMAIL PROTECTED]
  -# @version $Id: Makefile.in,v 1.1 2001/05/10 06:13:29 pier Exp $
  +# @version $Id: Makefile.in,v 1.2 2001/06/22 09:45:57 jfclere Exp $
   
   include ../Makedefs
   
  @@ -69,6 +69,9 @@
   mod_webapp.so:
@echo Linking Apache 1.3.x module
@$(APXS) -c $(APXSFLAGS) mod_webapp.c
  +install: mod_webapp.so
  + @echo Installing Apache 1.3.x module
  + @$(APXS) -i mod_webapp.so
   
   clean:
@echo Removing object files $(OBJS) $(MODULE)
  
  
  
  1.9   +4 -1  jakarta-tomcat-connectors/webapp/lib/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/lib/Makefile.in,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Makefile.in   2001/05/10 21:12:31 1.8
  +++ Makefile.in   2001/06/22 09:45:58 1.9
  @@ -56,7 +56,7 @@
   # = #
   
   # @author  Pier Fumagalli mailto:[EMAIL PROTECTED]
  -# @version $Id: Makefile.in,v 1.8 2001/05/10 21:12:31 pier Exp $
  +# @version $Id: Makefile.in,v 1.9 2001/06/22 09:45:58 jfclere Exp $
   
   include ../Makedefs
   
  @@ -75,3 +75,6 @@
   clean:
@echo Removing object files $(OBJS) $(PROVS) $(LIB)
@rm -f $(OBJS) $(PROVS) $(LIB)
  +
  +install:
  +
  
  
  



cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33 PoolTcpConnector.java

2001-06-22 Thread hgomez

hgomez  01/06/22 03:13:55

  Modified:jk/java/org/apache/ajp/tomcat33 PoolTcpConnector.java
  Log:
  moved isSameAddress to PoolTcpConnector so
  Ajp12/Ajp13/Ajp14 could have it
  
  Revision  ChangesPath
  1.2   +32 -0 
jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/PoolTcpConnector.java
  
  Index: PoolTcpConnector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/PoolTcpConnector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PoolTcpConnector.java 2001/06/09 02:56:22 1.1
  +++ PoolTcpConnector.java 2001/06/22 10:13:52 1.2
  @@ -263,4 +263,36 @@
   //   return classN;
   // }
   
  +/**
  + * Return codetrue/code if the specified client and server addresses
  + * are the same.  This method works around a bug in the IBM 1.1.8 JVM on
  + * Linux, where the address bytes are returned reversed in some
  + * circumstances.
  + *
  + * @param server The server's InetAddress
  + * @param client The client's InetAddress
  + */
  +public static boolean isSameAddress(InetAddress server, InetAddress client) {
  +// Compare the byte array versions of the two addresses
  +byte serverAddr[] = server.getAddress();
  +byte clientAddr[] = client.getAddress();
  +if (serverAddr.length != clientAddr.length)
  +return (false);
  +boolean match = true;
  +for (int i = 0; i  serverAddr.length; i++) {
  +if (serverAddr[i] != clientAddr[i]) {
  +match = false;
  +break;
  +}
  +}
  +if (match)
  +return (true);
  +
  +// Compare the reversed form of the two addresses
  +for (int i = 0; i  serverAddr.length; i++) {
  +if (serverAddr[i] != clientAddr[(serverAddr.length-1)-i])
  +return (false);
  +}
  +return (true);
  +}
   }
  
  
  



RE: Any reason why...

2001-06-22 Thread GOMEZ Henri

 +1, I'll correct now.
 
 I'll have a huge commit to send today,
 AJP14 login feature is quasi finished :)

Quasi? :-)

Quasi (oups french word).

native and java parts of AJP14 login are working now.
We need now to add some stuff to set the secret word
and also grab some entropy.

I'll commit my AJP13/AJP14 today in TC33 sub dir of
J-T-C...





Re: Any reason why...

2001-06-22 Thread Andy Armstrong

GOMEZ Henri wrote:
 
  +1, I'll correct now.
 
  I'll have a huge commit to send today,
  AJP14 login feature is quasi finished :)
 
 Quasi? :-)
 
 Quasi (oups french word).

C'est la meme en Anglais.

 native and java parts of AJP14 login are working now.
 We need now to add some stuff to set the secret word
 and also grab some entropy.
 
 I'll commit my AJP13/AJP14 today in TC33 sub dir of
 J-T-C...

-- 
Andy Armstrong, Tagish



cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33 Ajp13.java Ajp13Interceptor.java

2001-06-22 Thread hgomez

hgomez  01/06/22 03:32:25

  Modified:jk/java/org/apache/ajp/tomcat33 Ajp13.java
Ajp13Interceptor.java
  Log:
  Updated Ajp13 stuff after refactory
  
  Revision  ChangesPath
  1.2   +27 -334   
jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/Ajp13.java
  
  Index: Ajp13.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/Ajp13.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Ajp13.java2001/06/09 02:56:22 1.1
  +++ Ajp13.java2001/06/22 10:32:21 1.2
  @@ -183,11 +183,11 @@
   
   // Buffer used of output body and headers
   OutputBuffer headersWriter=new OutputBuffer(MAX_PACKET_SIZE);
  -Ajp13Packet outBuf = new Ajp13Packet( headersWriter );
  +AjpPacket outBuf;
   // Buffer used for input body
  -Ajp13Packet inBuf  = new Ajp13Packet( MAX_PACKET_SIZE );
  +AjpPacket inBuf;
   // Boffer used for request head ( and headers )
  -Ajp13Packet hBuf=new Ajp13Packet( MAX_PACKET_SIZE );
  +AjpPacket hBuf;
   
   // Holds incoming reads of request body data (*not* header data)
   byte []bodyBuff = new byte[MAX_READ_SIZE];
  @@ -198,8 +198,16 @@
   public Ajp13() 
   {
   super();
  + initBuf();
   }
   
  +public void initBuf()
  +{   
  +outBuf = new Ajp13Packet( headersWriter );
  +inBuf  = new Ajp13Packet( MAX_PACKET_SIZE );
  +hBuf   = new Ajp13Packet( MAX_PACKET_SIZE );
  +}
  +
   public void recycle() 
   {
 // This is a touch cargo-cultish, but I think wise.
  @@ -250,6 +258,15 @@
return 200; // XXX This is actually an error condition 
   }
   
  + /**
  +  * Try to decode Headers - AJP13 will do nothing but descendant will
  +  * override this method to handle new headers (ie SSL_KEY_SIZE in AJP14)
  +  */
  + int decodeMoreHeaders(Request req, byte attribute, AjpPacket msg)
  + {
  + return 500;
  + }
  +
   /**
* Parse a FORWARD_REQUEST packet from the web server and store its
* properties in the passed-in request object.
  @@ -261,7 +278,7 @@
*
* @return 200 in case of a successful decoduing, 500 in case of error.  
*/
  -private int decodeRequest( Request req, Ajp13Packet msg ) throws IOException
  +protected int decodeRequest( Request req, AjpPacket msg ) throws IOException
   {
// XXX Awful return values
   
  @@ -361,7 +378,10 @@
   break;
   
default:
  - return 500; // Error
  + if (decodeMoreHeaders(req, attributeCode, msg) != 500)
  + break;
  +
  + return 500;
   }
   }
   
  @@ -629,7 +649,7 @@
* @return The number of bytes read on a successful read or -1 if there 
* was an error.
**/
  -private int receive(Ajp13Packet msg) throws IOException {
  +protected int receive(AjpPacket msg) throws IOException {
// XXX If the length in the packet header doesn't agree with the
// actual number of bytes read, it should probably return an error
// value.  Also, callers of this method never use the length
  @@ -665,7 +685,7 @@
* @param msg A packet with accumulated data to send to the server --
* this method will write out the length in the header.  
*/
  -private void send( Ajp13Packet msg ) throws IOException {
  +protected void send( AjpPacket msg ) throws IOException {
msg.end(); // Write the packet header
byte b[] = msg.getBuff();
int len  = msg.getLen();
  @@ -685,333 +705,6 @@
}
if(null !=in) {
in.close();
  - }
  -}
  -
  -/**
  - * A single packet for communication between the web server and the
  - * container.  Designed to be reused many times with no creation of
  - * garbage.  Understands the format of data types for these packets.
  - * Can be used (somewhat confusingly) for both incoming and outgoing
  - * packets.  
  - */
  -public static class Ajp13Packet {
  - byte buff[]; // Holds the bytes of the packet
  - int pos; // The current read or write position in the buffer
  - OutputBuffer ob;
  -
  - int len; 
  - // This actually means different things depending on whether the
  - // packet is read or write.  For read, it's the length of the
  - // payload (excluding the header).  For write, it's the length of
  - // the packet as a whole (counting the header).  Oh, well.
  -
  - /**
  -  * Create a new packet with an internal buffer of given size.
  -  */
  - public Ajp13Packet( int size ) {
  - buff = new byte[size];
  - }
  -
  - public Ajp13Packet( byte 

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33 AjpPacket.java Ajp13Packet.java

2001-06-22 Thread hgomez

hgomez  01/06/22 03:34:10

  Added:   jk/java/org/apache/ajp/tomcat33 AjpPacket.java
Ajp13Packet.java
  Log:
  Refactory of Ajp packet handling.
  Extract Packet stuff from Ajp13
  We'll be able to merge with Kevin pretty soon :)
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/AjpPacket.java
  
  Index: AjpPacket.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  
  package org.apache.ajp.tomcat33;
  
  import java.io.IOException;
  import java.io.UnsupportedEncodingException;
  import java.io.InputStream;
  import java.io.OutputStream;
  import java.net.Socket;
  import java.util.Enumeration;
  
  import org.apache.tomcat.core.*;
  import org.apache.tomcat.util.*;
  import org.apache.tomcat.util.http.MimeHeaders;
  import org.apache.tomcat.util.buf.MessageBytes;
  import org.apache.tomcat.util.http.HttpMessages;
  
  /**
   * A single packet for communication between the web server and the
   * container.  Designed to be reused many times with no creation of
   * garbage.  Understands the format of data types for these packets.
   * Can be used (somewhat confusingly) for both incoming and outgoing
   * packets.  
   *
   * @author Dan Milstein [[EMAIL PROTECTED]]
   * @author Keith Wannamaker [[EMAIL PROTECTED]]
   */
  public interface AjpPacket {

public byte[] getBuff();
  
public int getLen();

public int getByteOff();
  
public void setByteOff(int c);
  
/** 
 * Parse the packet header for a packet sent from the web server to
 * the container.  Set the read position to immediately after
 * the header.
 *
 * @return The length of the packet payload, as encoded in the
 * header, or -1 if the packet doesn't have a valid header.  
 */
public int checkIn();

/**
 * Prepare this packet for accumulating a message from the container to
 * the web server.  Set the write position to just after the header
 * (but leave the length unwritten, because it is as yet 

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33 Ajp14.java Ajp14Interceptor.java Ajp14Packet.java

2001-06-22 Thread hgomez

hgomez  01/06/22 03:35:46

  Added:   jk/java/org/apache/ajp/tomcat33 Ajp14.java
Ajp14Interceptor.java Ajp14Packet.java
  Log:
  The long awaited initial Ajp14 support.
  Interceptor, Packet, Protocol (advanced login and SSL_KEY_SIZE)
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/Ajp14.java
  
  Index: Ajp14.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  
  package org.apache.ajp.tomcat33;
  
  import java.io.IOException;
  import java.io.UnsupportedEncodingException;
  import java.io.InputStream;
  import java.io.OutputStream;
  import java.net.Socket;
  import java.util.Enumeration;
  import java.security.*;
  
  import org.apache.tomcat.core.*;
  import org.apache.tomcat.util.*;
  import org.apache.tomcat.util.http.MimeHeaders;
  import org.apache.tomcat.util.buf.MessageBytes;
  import org.apache.tomcat.util.http.HttpMessages;
  import org.apache.tomcat.util.buf.HexUtils;
  
  
  /**
   * Represents a single, persistent connection between the web server and
   * the servlet container.  Uses the Apache JServ Protocol version 1.3 for
   * communication.  Because this protocal does not multiplex requests, this
   * connection can only be associated with a single request-handling cycle
   * at a time.P
   *
   * This class contains knowledge about how an individual packet is laid out
   * (via the internal CODEAjp14Packet/CODE class), and also about the
   * stages of communicaton between the server and the servlet container.  It
   * translates from Tomcat's internal servlet support methods
   * (e.g. doWrite) to the correct packets to send to the web server.
   *
   * @see Ajp14Interceptor 
   *
   * @author Henri Gomez [[EMAIL PROTECTED]]
   * @author Dan Milstein [[EMAIL PROTECTED]]
   * @author Keith Wannamaker [[EMAIL PROTECTED]]
   */
  public class Ajp14 extends Ajp13
  {
// AJP14 commands
  
// Initial Login Phase (web server - servlet engine)
public static final byte JK_AJP14_LOGINIT_CMD   = 0x10;
   
// Second Login Phase (servlet engine - web server), 

[J-T-C] Initial Ajp14 Java uploaded

2001-06-22 Thread GOMEZ Henri

Hi, 

I just upload the initial Ajp14 java side to cvs.

It's present under tomcat33 branch of jtc since I
used TC33 to test it.

To take a look at Ajp14 login features, define the new
ajp14 worker  :


workers.tomcat_home=/var/tomcat
workers.java_home=/opt/IBMJava2-13
ps=/
worker.list=ajp12, ajp13, ajp14

worker.ajp12.port=8007
worker.ajp12.host=localhost
#worker.ajp12.type=ajp12
#worker.ajp12.lbfactor=1

worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
#worker.ajp13.lbfactor=1
#worker.ajp13.cachesize=8

worker.ajp14.port=8011
worker.ajp14.host=localhost
worker.ajp14.type=ajp14
worker.ajp14.secretkey=myverysecretkey
#worker.ajp14.lbfactor=1
#worker.ajp14.cachesize=8

And replace the URL handled by AJP12/AJP13 by
AJP14 

:)

It works on Apache 1.3, Apache 2.0 will be tested soon,
I'd like to have report on IIS/DOMINO/NETSCAPE.

Regards

DONT FORGET TO UPDATE worker.list :)

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



cvs commit: jakarta-tomcat/src/doc mod_jk-howto.html

2001-06-22 Thread hgomez

hgomez  01/06/22 07:45:55

  Modified:src/doc  mod_jk-howto.html
  Log:
  Updated mod_jk documentation. Add in FAQ the explanation
  about EAPI/STD, garbled and might crash !
  
  Revision  ChangesPath
  1.9   +24 -2 jakarta-tomcat/src/doc/mod_jk-howto.html
  
  Index: mod_jk-howto.html
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/doc/mod_jk-howto.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mod_jk-howto.html 2001/05/18 16:32:40 1.8
  +++ mod_jk-howto.html 2001/06/22 14:45:53 1.9
  @@ -794,6 +794,8 @@
   Tomcat 3.3. The Binary Distributions of mod_jk are available at the same
   location as the Binary Distribution of Tomcat.nbsp; The mod_jk binaries are
   located in subdirectories by platform.
  +But in May 2001, the jakarta-tomcat-connectors was started and you'll find here
  +up to date featured mod_jk (ie: new protocols AJP14/WARP) 
   
   h3Q. Which protocol should I use? Ajp12 or Ajp13?/h3
   A. Ajp13 is a newer protocol, it's faster, and it works better with SSL. You almost
  @@ -801,8 +803,28 @@
   a href=Tomcat-Workers-HowTo.htmlworkers.properties howto/a document.
   
   h3Q. Whenever I restart Tomcat, Apache locks up!/h3
  -A. The Ajp13 protocol keeps an open socket between Tomcat and Apache. When you 
restart
  -Tomcat, you need to restart Apache as well.
  +A. The Ajp13 protocol keeps an open socket between Tomcat and Apache. The latest
  +release of mod_jk (the one found since Tomcat 3.3-m2 and J-T-C) handle the network 
failure.
  +But with previous release of mod_jk, you may have to restart Apache as well.
  +
  +h3Q. Why did exist two files mod_jk.so (-eapi ad -noeapi) in download dir for 
Linux ?/h3
  +A. Many versions of Apache use of modified API, known at Extended API. For example,
  +Apache using mod_ssl or Apache present in certains recent Linux distributions.
  +So if you got such 'Extended Apache', you need to use mod_jk.so-eapi, or use
  +mod_jk.so-noeapi for standard Apache. It's wise to avoid using EAPI modules on STD 
API Apache or to use standard
  +API modules on EAPI Apache. Allways be sure to have the mod_jk.so for your version 
of Apache  
  +
  +
  +h3Q. What's that message about 'garbled DSO ?'/h3
  +A. It's related to Apache EAPI, the message 'mod_jk.so is garbled - perhaps this is 
not an Apache module DSO ?'
  +just told you are trying to install a mod_jk.so DSO module that was compiled on an 
Apache using EAPI, 
  +like apache-mod_ssl or apache from Redhat distro 6.2/7.0 but your system use the 
standard apache 
  +with normal API.
  +
  +h3Q. And the message about 'module might crash under EAPI! '/h3
  +A. Also related to EAPI, the message '[warn] Loaded DSO /usr/lib/apache/mod_jk.so 
uses plain Apache 1.3 API, 
  +this module might crash under EAPI! (please recompile it with -DEAPI)', the 
mod_jk.so was compiled under normal 
  +Apache with standard API and you try to install the module on an Apache using EAPI. 
   
   h3Q. Where can I get more information?/h3
   A. The a href=Tomcat-Workers-HowTo.htmlworkers.properties howto/a document has
  
  
  



cvs commit: jakarta-tomcat/src/doc mod_jk-howto.html

2001-06-22 Thread hgomez

hgomez  01/06/22 07:49:49

  Modified:src/doc  Tag: tomcat_32 mod_jk-howto.html
  Log:
  Updated mod_jk documentation. Add in FAQ the explanation
  about EAPI/STD, garbled and might crash !
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.4   +532 -155  jakarta-tomcat/src/doc/mod_jk-howto.html
  
  Index: mod_jk-howto.html
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/doc/mod_jk-howto.html,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- mod_jk-howto.html 2001/06/05 14:38:23 1.1.2.3
  +++ mod_jk-howto.html 2001/06/22 14:49:47 1.1.2.4
  @@ -1,10 +1,10 @@
   html
   head
   !-- $Id  $ --
  -!-- Copyright 1999, Apache Software Foundation --
  +!-- Copyright 2001, Apache Software Foundation --
   
   meta http-equiv=Content-Type content=text/html
  -link rel=stylesheet href=uguide/style.css
  +link rel=stylesheet href=style.css
   style type=text/css
   .inlinetd {
   background-color: #E0E0E0;
  @@ -40,11 +40,11 @@
 tr
   td width=50% align=left
   a href=http://jakarta.apache.org/index.html;
  -  img src=uguide/images/banner.gif width=350 height=100 alt=The 
Jakarta Project border=0
  +  img src=images/banner.gif width=350 height=100 alt=The Jakarta 
Project border=0
   /a
   /td
   td width=50% align=right
  -  img border=0 src=uguide/images/tomcat.gif width=100 height=71 
alt=The mighty Tomcat - Meow!
  +  img border=0 src=images/tomcat.gif width=100 height=71 alt=The 
mighty Tomcat - Meow!
   /td
 /tr
   /table
  @@ -58,24 +58,36 @@
   lia href=#s3Why mod_jk?/a/li
   lia href=#s4What does it mean to me?/a/li
   lia href=#s5Definitions and Terminology/a/li
  -lia href=#s6Configuring Apache to use mod_jk/a
  +lia href=#s6Obtaining mod_jk/a
  +  ul
  +lia href=#s61mod_jk Binaries/a/li
  +lia href=#s62Building mod_jk/a/li
  +lia href=#s63Building mod_jk for NT/a/li
  +lia href=#s64Building mod_jk for Unix/a/li
  +  /ul
  +/li
  +lia href=#s7Configuring Apache/a
   ul
  -lia href=#s61Removing the mod_jserv directives/a/li
  -lia href=#s62Obtaining mod_jk/a/li
  -lia href=#s63Configuring Tomcat to use the Ajpv13 protocol/a/li
  -lia href=#s64Defining workers for mod_jk/a/li
  -lia href=#s65Configuring Apache to use mod_jk/a/li
  -lia href=#s66Assigning URLs to be redirected to Tomcat/a/li
  +lia href=#s71Removing mod_jserv directives/a/li
  +lia href=#s72Configuring Apache to use mod_jk/a/li
  +lia href=#s73Assigning URLs to be redirected to Tomcat/a/li
   /ul/li
  -lia href=#s7An example configuration/a/li
  -lia href=#s8Troubleshooting and F.A.Q's/a/li
  -lia href=#s9Credits/a/li
  +lia href=#s8Configuring Tomcat/a
  +  ul
  +lia href=#s81Enabling Tomcat's Apache Auto-Config/a/li
  +lia href=#s82Configuring Tomcat to use the AJPv13 Protocol/a/li
  +lia href=#s83Defining Workers/a/li
  +  /ul
  +/li
  +lia href=#s9Example Configuration/a/li
  +lia href=#s10Troubleshooting and F.A.Q's/a/li
  +lia href=#s11Credits/a/li
   /ul
   hr
   h2a name=s2What is mod_jk?/a/h2
   
   pmod_jk is a replacement to the elderly mod_jserv. It is a completely new
  -Tomcat-Apache plugin that handles the communication between Tomcat and Apache/p
  +Tomcat-Apache plug-in that handles the communication between Tomcat and Apache./p
   hr
   h2a name=s3Why mod_jk?/a/h2
   
  @@ -99,13 +111,13 @@
   
   pYou will need to get to know a new simplified configuration mechanism. The
   advantage is that learning this mechanism will give you a head start if you
  -want to deploy Tomcat on other web servers such as IIS and Netscape (oops,
  -iPlanet)./p
  +want to deploy Tomcat on Apache and other web servers, such as Microsoft's
  +Internet Information Server (IIS) and the iPlanet Enterprise Web Server./p
   
   hr
  -h2a name=s5Definitions and terminology/a/h2
  +h2a name=s5Definitions and Terminology/a/h2
   
  -pDuring this document I am going to use a few terms, so lets define them:/p
  +pIn this document I am going to use a few terms, so let's define them:/p
   
   table class=inlinetable
tr
  @@ -118,7 +130,7 @@
/tr
tr
 td class=inlinetd
  -  pWorker process/p
  +  pWorker Process/p
 /td
 td class=inlinetd
 pA worker is a tomcat instance that is running to serve
  @@ -131,7 +143,7 @@
/tr
tr
 td class=inlinetd
  -  pIn process worker/p
  +  pIn-Process Worker/p
 /td
 td class=inlinetd
 pThis is a special worker. Instead of working with a Tomcat
  @@ -142,78 +154,98 @@
/tr
tr
 td class=inlinetd
  -  pWeb server plugin/tomcat redirector/p
  +  pWeb Server Plug-in/Tomcat Redirector/p
 /td
 td class=inlinetd
 pFor Tomcat to cooperate with any web server it needs an
 quot;agentquot; to reside in the web server and send him servlet 

Re: [J-T-C] Initial Ajp14 Java uploaded

2001-06-22 Thread jean-frederic clere

GOMEZ Henri wrote:
 
 Hi,
 
 I just upload the initial Ajp14 java side to cvs.
 
 It's present under tomcat33 branch of jtc since I
 used TC33 to test it.
 
 To take a look at Ajp14 login features, define the new
 ajp14 worker  :
 
 workers.tomcat_home=/var/tomcat
 workers.java_home=/opt/IBMJava2-13
 ps=/
 worker.list=ajp12, ajp13, ajp14
 
 worker.ajp12.port=8007
 worker.ajp12.host=localhost
 #worker.ajp12.type=ajp12
 #worker.ajp12.lbfactor=1
 
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 #worker.ajp13.lbfactor=1
 #worker.ajp13.cachesize=8
 
 worker.ajp14.port=8011
 worker.ajp14.host=localhost
 worker.ajp14.type=ajp14
 worker.ajp14.secretkey=myverysecretkey
 #worker.ajp14.lbfactor=1
 #worker.ajp14.cachesize=8
 
 And replace the URL handled by AJP12/AJP13 by
 AJP14
 
 :)
 
 It works on Apache 1.3, Apache 2.0 will be tested soon,

It does not work because #include apu_compat.h is missing in mod_jk.c. Should
I commit the change?.

 I'd like to have report on IIS/DOMINO/NETSCAPE.
 
 Regards
 
 DONT FORGET TO UPDATE worker.list :)
 
 -
 Henri Gomez ___[_]
 EMAIL : [EMAIL PROTECTED](. .)
 PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
 PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6



RE: [J-T-C] Initial Ajp14 Java uploaded

2001-06-22 Thread GOMEZ Henri

It does not work because #include apu_compat.h is missing in 
mod_jk.c. Should
I commit the change?.

Strange, I didn't have problem to build it in Apache 2.0.18.
But feel free to add in apache-2.0/mod_jk.c :)

 
 I'd like to have report on IIS/DOMINO/NETSCAPE.
 
 Regards
 
 DONT FORGET TO UPDATE worker.list :)




cvs commit: jakarta-tomcat/src/doc mod_jk-howto.html

2001-06-22 Thread hgomez

hgomez  01/06/22 07:59:50

  Modified:src/doc  Tag: tomcat_32 mod_jk-howto.html
  Log:
  corrected uguide link
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.5   +3 -3  jakarta-tomcat/src/doc/mod_jk-howto.html
  
  Index: mod_jk-howto.html
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/doc/mod_jk-howto.html,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- mod_jk-howto.html 2001/06/22 14:49:47 1.1.2.4
  +++ mod_jk-howto.html 2001/06/22 14:59:48 1.1.2.5
  @@ -4,7 +4,7 @@
   !-- Copyright 2001, Apache Software Foundation --
   
   meta http-equiv=Content-Type content=text/html
  -link rel=stylesheet href=style.css
  +link rel=stylesheet href=uguide/style.css
   style type=text/css
   .inlinetd {
   background-color: #E0E0E0;
  @@ -40,11 +40,11 @@
 tr
   td width=50% align=left
   a href=http://jakarta.apache.org/index.html;
  -  img src=images/banner.gif width=350 height=100 alt=The Jakarta 
Project border=0
  +  img src=uguide/images/banner.gif width=350 height=100 alt=The 
Jakarta Project border=0
   /a
   /td
   td width=50% align=right
  -  img border=0 src=images/tomcat.gif width=100 height=71 alt=The 
mighty Tomcat - Meow!
  +  img border=0 src=uguide/images/tomcat.gif width=100 height=71 
alt=The mighty Tomcat - Meow!
   /td
 /tr
   /table
  
  
  



cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c

2001-06-22 Thread jfclere

jfclere 01/06/22 08:19:15

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  add apu_compat.h for ap_parseHTTPdate (moved httpd-2.0/.../util_date.[ch]).
  
  Revision  ChangesPath
  1.9   +2 -1  jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mod_jk.c  2001/06/18 14:37:24 1.8
  +++ mod_jk.c  2001/06/22 15:19:13 1.9
  @@ -59,13 +59,14 @@
* Description: Apache 2 plugin for Jakarta/Tomcat *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
*   Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.8 $   *
  + * Version: $Revision: 1.9 $   *
***/
   
   /*
* mod_jk: keeps all servlet/jakarta related ramblings together.
*/
   
  +#include apu_compat.h
   #include ap_config.h
   #include httpd.h
   #include http_config.h
  
  
  



Re: [J-T-C] Initial Ajp14 Java uploaded

2001-06-22 Thread jean-frederic clere

GOMEZ Henri wrote:
 
 It does not work because #include apu_compat.h is missing in
 mod_jk.c. Should
 I commit the change?.
 
 Strange, I didn't have problem to build it in Apache 2.0.18.
 But feel free to add in apache-2.0/mod_jk.c :)

Ok, I have used a more recent Apache-2.0. apu_compat.h contains lot of #define
titi toto and ap_parseHTTPdate is one of these.
I have committed the needed changes.

 
 
  I'd like to have report on IIS/DOMINO/NETSCAPE.
 
  Regards
 
  DONT FORGET TO UPDATE worker.list :)



RE: [J-T-C] Initial Ajp14 Java uploaded

2001-06-22 Thread GOMEZ Henri

 Strange, I didn't have problem to build it in Apache 2.0.18.
 But feel free to add in apache-2.0/mod_jk.c :)

Ok, I have used a more recent Apache-2.0. apu_compat.h 
contains lot of #define
titi toto and ap_parseHTTPdate is one of these.
I have committed the needed changes.

I've used the latest alpha18 but not the up to date CVS



Re: #define JK_VERSION in j-t-c (doesn't exist)

2001-06-22 Thread Andy Armstrong

One small point comes to light now you've released this: version.h is
quite a common thing to have on your include path; certainly under MS
operating systems there tends to be a version.h already on the include
path which may cause confusion. Any reason not to call it jk_version.h?

jean-frederic clere wrote:
 
 Andy Armstrong wrote:
 
  jean-frederic clere wrote:
  
   Hi,
  
   I have prepared a patch for configure.in to generate JK_EXPOSED_VERSION and
   JK_VERSION.
   The result is a file named common/version.h:
   +++
   #define JK_EXPOSED_VERSION mod_jk/1.2.0-dev
   #define JK_VERSION (((1)  16) + ((2)  8) +
   (0))
   +++
   Any comments? - Otherwise I will commit it tomorrow -

-- 
Andy Armstrong, Tagish



[J-T-C/TC3.3] Update

2001-06-22 Thread GOMEZ Henri

What about moving isSameAdress to another package ?

org.apache.tomcat.util.net ?

And put there some usefull classes ?

in J-T-C I moved it in PoolTCPConnector to make it
available at both Ajp13Interceptor and Ajp14Interceptor,
but under TC 3.3, Ajp12 need it directly.

So we need to have it on a common place for both 
JTC/UTIL, JTC/JK/TC33 and JTC/JK/TC4

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



RE: #define JK_VERSION in j-t-c (doesn't exist)

2001-06-22 Thread GOMEZ Henri

One small point comes to light now you've released this: version.h is
quite a common thing to have on your include path; certainly under MS
operating systems there tends to be a version.h already on the include
path which may cause confusion. Any reason not to call it jk_version.h?

+1 for jk_version.h

Sure it will take less than 30ms to JF :)



Re: Problem with apache response codes

2001-06-22 Thread Andrew Baptist

 I switched an application I was working on from JServ to Jakarta and realized 
 there is a change in the way the response codes for the server are being set. 
 Apache no longer recieves the response code the servlet sets and therefore 
 can not do further processing. For context, I am using apache 1.3.12 with 
 mod_jserv from the 3.2.2 tomcat release.

After converting to mod_jk and finding that it didn't fix the problem, I 
reverted back to mod_jserv and have made a patch to the tomcat code for the 
ajp12 adapter. This will send the response back the same way that JServ used 
to and allow apache to handle the response nativly

The change is in Ajp12ConnectionHandler.java I simply added this method in the 
inner class AJP12ResponseAdapter:


public void endHeaders() throws IOException {
if (status = 400) {
sout.write(Status: .getBytes());
sout.write(String.valueOf(status).getBytes());
sout.write( .getBytes());
sout.write(ResponseImpl.getMessage( status ).getBytes());
sout.write(\r\nServlet-Error: .getBytes());
sout.write(ResponseImpl.getMessage( status ).getBytes());
sout.write(\r\n\r\n.getBytes());
sout.flush();
} else {
super.endHeaders();
}
}


I realize this is not the most efficient way of doing it but I think it should 
be safe since there typically is not any action associated with responses 
over 400. If this is the case I would greatly appreciate if someone could fold 
this into the main code base.

Andrew




Re: [J-T-C/TC3.3] Update

2001-06-22 Thread kevin seguin

 
 What about moving isSameAdress to another package ?
 
 org.apache.tomcat.util.net ?
 

+1

 And put there some usefull classes ?
 
 in J-T-C I moved it in PoolTCPConnector to make it
 available at both Ajp13Interceptor and Ajp14Interceptor,
 but under TC 3.3, Ajp12 need it directly.
 
 So we need to have it on a common place for both
 JTC/UTIL, JTC/JK/TC33 and JTC/JK/TC4
 
 -
 Henri Gomez ___[_]
 EMAIL : [EMAIL PROTECTED](. .)
 PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
 PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6



RE: [J-T-C/TC3.3] Update

2001-06-22 Thread GOMEZ Henri

Hi Kevin,

Did you take a look at my AjpXX stuff in TC 3.3 subdir.
Could you see how hard it will be to merge with yours ?

I think the only stuff which must stay under org.apache.ajp.tomcat33
must be interceptor. May be something which could became.

org.apache.ajp.interceptor 

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: kevin seguin [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 6:06 PM
To: [EMAIL PROTECTED]
Subject: Re: [J-T-C/TC3.3] Update


 
 What about moving isSameAdress to another package ?
 
 org.apache.tomcat.util.net ?
 

+1

 And put there some usefull classes ?
 
 in J-T-C I moved it in PoolTCPConnector to make it
 available at both Ajp13Interceptor and Ajp14Interceptor,
 but under TC 3.3, Ajp12 need it directly.
 
 So we need to have it on a common place for both
 JTC/UTIL, JTC/JK/TC33 and JTC/JK/TC4
 
 -
 Henri Gomez ___[_]
 EMAIL : [EMAIL PROTECTED](. .)
 PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
 PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6




Tomcat 3.2.2

2001-06-22 Thread Rick Rupp
Title: Tomcat 3.2.2





We just upgraded to 3.2.2 and have come across the problem with escaped character in the URL. Are there plans to fix this soon or has that already been done? Thanks.

From the release notes:


6.10 Resource Paths Can't Contain URL Escapes


The path passed to javax.servlet.Context.getResource() and
javax.servlet.Context.getResrouceAsStream() cannot contain URL escapes of
the form %HH. Paths containing any URL escapes will return null.





cvs commit: jakarta-tomcat-connectors/jk/native/common jk_global.h version.h.in

2001-06-22 Thread jfclere

jfclere 01/06/22 09:22:03

  Modified:jk/native/common jk_global.h
  Removed: jk/native/common version.h.in
  Log:
  Changed version.h to jk_version.h
  
  Revision  ChangesPath
  1.5   +2 -2  jakarta-tomcat-connectors/jk/native/common/jk_global.h
  
  Index: jk_global.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_global.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_global.h   2001/06/21 14:48:05 1.4
  +++ jk_global.h   2001/06/22 16:22:01 1.5
  @@ -59,13 +59,13 @@
* Description: Global definitions and include files that should exist *
*  anywhere   *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.4 $   *
  + * Version: $Revision: 1.5 $   *
***/
   
   #ifndef JK_GLOBAL_H
   #define JK_GLOBAL_H
   
  -#include version.h
  +#include jk_version.h
   
   #include stdio.h
   #include stdlib.h
  
  
  



cvs commit: jakarta-tomcat-connectors/jk/native/common jk_version.h.in

2001-06-22 Thread jfclere

jfclere 01/06/22 09:23:02

  Added:   jk/native/common jk_version.h.in
  Log:
  Add the jk_version.h!
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/jk/native/common/jk_version.h.in
  
  Index: jk_version.h.in
  ===
  #undef JK_EXPOSED_VERSION
  #undef JK_VERSION
  
  
  



cvs commit: jakarta-tomcat-connectors/jk/native configure.in

2001-06-22 Thread jfclere

jfclere 01/06/22 09:25:12

  Modified:jk/native configure.in
  Log:
  Add jk_version.h (Damned 3 commits for that, I am bad!).
  
  Revision  ChangesPath
  1.7   +2 -2  jakarta-tomcat-connectors/jk/native/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/configure.in,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- configure.in  2001/06/21 14:47:59 1.6
  +++ configure.in  2001/06/22 16:25:11 1.7
  @@ -1,12 +1,12 @@
   dnl
   dnl Process this file with autoconf to produce a configure script
   dnl
  -AC_REVISION($Id: configure.in,v 1.6 2001/06/21 14:47:59 jfclere Exp $)dnl
  +AC_REVISION($Id: configure.in,v 1.7 2001/06/22 16:25:11 jfclere Exp $)dnl
   
   AC_PREREQ(2.13)
   AC_INIT(common/jk_ajp13.h)
   AC_CONFIG_AUX_DIR(scripts/build/unix)
  -AM_CONFIG_HEADER(common/version.h)
  +AM_CONFIG_HEADER(common/jk_version.h)
   
   dnl package and version.
   PACKAGE=mod_jk
  
  
  



Re: #define JK_VERSION in j-t-c (doesn't exist)

2001-06-22 Thread jean-frederic clere

GOMEZ Henri wrote:
 
 One small point comes to light now you've released this: version.h is
 quite a common thing to have on your include path; certainly under MS
 operating systems there tends to be a version.h already on the include
 path which may cause confusion. Any reason not to call it jk_version.h?
 
 +1 for jk_version.h
 
 Sure it will take less than 30ms to JF :)

Done, it was more 3 mn and 3 commits...



Re: [J-T-C/TC3.3] Update

2001-06-22 Thread kevin seguin

i took a quit look, and it doesn't look like merging what's in
o.a.a.tomcat33 with what's in o.a.a should be too difficult.  hopefully,
soon i'll have some time to help out on this :)

GOMEZ Henri wrote:
 
 Hi Kevin,
 
 Did you take a look at my AjpXX stuff in TC 3.3 subdir.
 Could you see how hard it will be to merge with yours ?
 
 I think the only stuff which must stay under org.apache.ajp.tomcat33
 must be interceptor. May be something which could became.
 
 org.apache.ajp.interceptor
 
 -
 Henri Gomez ___[_]
 EMAIL : [EMAIL PROTECTED](. .)
 PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
 PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6
 
 -Original Message-
 From: kevin seguin [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 22, 2001 6:06 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [J-T-C/TC3.3] Update
 
 
 
  What about moving isSameAdress to another package ?
 
  org.apache.tomcat.util.net ?
 
 
 +1
 
  And put there some usefull classes ?
 
  in J-T-C I moved it in PoolTCPConnector to make it
  available at both Ajp13Interceptor and Ajp14Interceptor,
  but under TC 3.3, Ajp12 need it directly.
 
  So we need to have it on a common place for both
  JTC/UTIL, JTC/JK/TC33 and JTC/JK/TC4
 
  -
  Henri Gomez ___[_]
  EMAIL : [EMAIL PROTECTED](. .)
  PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
  PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6
 



cvs commit: jakarta-tomcat-connectors/jk/native/domino config.h jk_dsapi_plugin.c

2001-06-22 Thread andya

andya   01/06/22 09:59:59

  Modified:jk/native/domino config.h jk_dsapi_plugin.c
  Log:
  Updated to take advantage of JK_VERSION. The same source now builds for TC 3.2 and 
the latest development code.
  
  Revision  ChangesPath
  1.5   +3 -6  jakarta-tomcat-connectors/jk/native/domino/config.h
  
  Index: config.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/domino/config.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- config.h  2001/06/18 14:41:17 1.4
  +++ config.h  2001/06/22 16:59:57 1.5
  @@ -58,17 +58,14 @@
   /***
* Description: DSAPI plugin for Lotus Domino  *
* Author:  Andy Armstrong [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.4 $   *
  + * Version: $Revision: 1.5 $   *
***/
   
   #ifndef __config_h
   #define __config_h
   
  -#define TOMCAT320320
  -#define TOMCAT330330
  -#define TOMCAT400400
  -
  -#define FOR_TOMCAT TOMCAT400
  +#define MAKEVERSION(a, b, c, d) \
  + (((a)  24) + ((b)  16) + ((c)  8) + (d))
   
   /* the _memicmp() function is available */
   #if defined(WIN32)
  
  
  
  1.8   +5 -5  jakarta-tomcat-connectors/jk/native/domino/jk_dsapi_plugin.c
  
  Index: jk_dsapi_plugin.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/domino/jk_dsapi_plugin.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_dsapi_plugin.c 2001/06/18 14:41:22 1.7
  +++ jk_dsapi_plugin.c 2001/06/22 16:59:58 1.8
  @@ -58,7 +58,7 @@
   /***
* Description: DSAPI plugin for Lotus Domino  *
* Author:  Andy Armstrong [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.7 $   *
  + * Version: $Revision: 1.8 $   *
***/
   
   /* Based on the IIS redirector by Gal Shachor [EMAIL PROTECTED] */
  @@ -128,7 +128,7 @@
   static const char *tomcatStart;
   static const char *tomcatStop;
   
  -#if FOR_TOMCAT = TOMCAT400
  +#if defined(JK_VERSION)  JK_VERSION = MAKEVERSION(1, 2, 0, 1)
   static jk_worker_env_t   worker_env;
   #endif
   
  @@ -857,7 +857,7 @@
s-ssl_cipher   = NULL; /* required by Servlet 2.3 Api */
s-ssl_session  = NULL;
   
  -#if FOR_TOMCAT = TOMCAT400
  +#if defined(JK_VERSION)  JK_VERSION = MAKEVERSION(1, 2, 0, 1)
s-ssl_key_size = -1;   /* required by Servlet 2.3 Api, added in jtc */
   #endif
   
  @@ -883,7 +883,7 @@
   
DEBUG((SSL request\n));
   
  -#if FOR_TOMCAT = TOMCAT400
  +#if defined(JK_VERSION)  JK_VERSION = MAKEVERSION(1, 2, 0, 1)
/* Read the variable into a dummy variable: we do this for the side 
effect of
 * reading it into workBuf.
 */
  @@ -995,7 +995,7 @@
DEBUG((About to read %s\n, workerFile));
if (map_read_properties(map, workerFile))
{
  -#if FOR_TOMCAT = TOMCAT400
  +#if defined(JK_VERSION)  JK_VERSION = MAKEVERSION(1, 2, 0, 1)
char server[256];
   
worker_env.uri_to_worker = uw_map;
  
  
  



Re: [J-T-C/TC3.3] Update

2001-06-22 Thread Costin Manolache

Hi Kevin, Henri,

I will spend some time on the connector and can help a bit with 
that too. 

Merging should be reasonably easy, but I would like to keep a backup,
i.e. do the merge in a new file. 

Kevin - what about doing the merge as part of Ajp14 ? It should be able

to handle ajp13 requests as well, and it will have a lot of nice
features, including the important web-app autoconf. I think it would be
a much better way to spend the time - and if we work togheter we can
finish ajp14 much sooner ( than if we would work on both 13 and 14 ).

Costin

--- kevin seguin [EMAIL PROTECTED] wrote:
 i took a quit look, and it doesn't look like merging what's in
 o.a.a.tomcat33 with what's in o.a.a should be too difficult. 
 hopefully,
 soon i'll have some time to help out on this :)
 
 GOMEZ Henri wrote:
  
  Hi Kevin,
  
  Did you take a look at my AjpXX stuff in TC 3.3 subdir.
  Could you see how hard it will be to merge with yours ?
  
  I think the only stuff which must stay under
 org.apache.ajp.tomcat33
  must be interceptor. May be something which could became.
  
  org.apache.ajp.interceptor
  
  -
  Henri Gomez ___[_]
  EMAIL : [EMAIL PROTECTED](. .)
  PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
  PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6
  
  -Original Message-
  From: kevin seguin [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 22, 2001 6:06 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [J-T-C/TC3.3] Update
  
  
  
   What about moving isSameAdress to another package ?
  
   org.apache.tomcat.util.net ?
  
  
  +1
  
   And put there some usefull classes ?
  
   in J-T-C I moved it in PoolTCPConnector to make it
   available at both Ajp13Interceptor and Ajp14Interceptor,
   but under TC 3.3, Ajp12 need it directly.
  
   So we need to have it on a common place for both
   JTC/UTIL, JTC/JK/TC33 and JTC/JK/TC4
  
   -
   Henri Gomez ___[_]
   EMAIL : [EMAIL PROTECTED](. .)
   PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
   PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6
  


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2001-06-22 Thread remm

remm01/06/22 10:29:22

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Forgot to rename StandardClassLoader - WebappClassLoader.
  
  Revision  ChangesPath
  1.3   +12 -12
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WebappClassLoader.java2001/06/19 17:37:23 1.2
  +++ WebappClassLoader.java2001/06/22 17:29:22 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.2 2001/06/19 17:37:23 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/06/19 17:37:23 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.3 2001/06/22 17:29:22 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/06/22 17:29:22 $
*
* 
*
  @@ -117,7 +117,7 @@
*
* @author Remy Maucherat
* @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/06/19 17:37:23 $
  + * @version $Revision: 1.3 $ $Date: 2001/06/22 17:29:22 $
*/
   public class WebappClassLoader
   extends URLClassLoader
  @@ -576,10 +576,10 @@
loader = loader.getParent();
if (loader == null)
break;
  - if (!(loader instanceof StandardClassLoader))
  + if (!(loader instanceof WebappClassLoader))
continue;
   Extension extensions[] =
  -((StandardClassLoader) loader).findAvailable();
  +((WebappClassLoader) loader).findAvailable();
   for (int i = 0; i  extensions.length; i++)
   results.add(extensions[i]);
   }
  @@ -623,10 +623,10 @@
loader = loader.getParent();
   if (loader == null)
   break;
  -if (!(loader instanceof StandardClassLoader))
  +if (!(loader instanceof WebappClassLoader))
   continue;
   Extension extensions[] =
  -((StandardClassLoader) loader).findRequired();
  +((WebappClassLoader) loader).findRequired();
   for (int i = 0; i  extensions.length; i++)
   results.add(extensions[i]);
   }
  @@ -717,7 +717,7 @@
*/
   public String toString() {
   
  -StringBuffer sb = new StringBuffer(StandardClassLoader\r\n);
  +StringBuffer sb = new StringBuffer(WebappClassLoader\r\n);
   sb.append(  available:\r\n);
   Iterator available = this.available.iterator();
   while (available.hasNext()) {
  @@ -1187,7 +1187,7 @@
   
   /**
* Get the Permissions for a CodeSource.  If this instance
  - * of StandardClassLoader is for a web application context,
  + * of WebappClassLoader is for a web application context,
* add read FilePermissions for the base directory (if unpacked),
* the context URL, and jar file resources.
*
  @@ -1556,7 +1556,7 @@
*/
   private void log(String message) {
   
  - System.out.println(StandardClassLoader:  + message);
  + System.out.println(WebappClassLoader:  + message);
   
   }
   
  @@ -1569,7 +1569,7 @@
*/
   private void log(String message, Throwable throwable) {
   
  - System.out.println(StandardClassLoader:  + message);
  + System.out.println(WebappClassLoader:  + message);
throwable.printStackTrace(System.out);
   
   }
  
  
  



Re: [J-T-C/TC3.3] Update

2001-06-22 Thread kevin seguin

Costin Manolache wrote:
 
 Hi Kevin, Henri,
 
 I will spend some time on the connector and can help a bit with
 that too.
 
 Merging should be reasonably easy, but I would like to keep a backup,
 i.e. do the merge in a new file.
 
 Kevin - what about doing the merge as part of Ajp14 ? It should be able
 
 to handle ajp13 requests as well, and it will have a lot of nice
 features, including the important web-app autoconf. I think it would be
 a much better way to spend the time - and if we work togheter we can
 finish ajp14 much sooner ( than if we would work on both 13 and 14 ).
 

that all sounds reasonable.  i will try to get some stuff done this
weekend.

 Costin
 
 --- kevin seguin [EMAIL PROTECTED] wrote:
  i took a quit look, and it doesn't look like merging what's in
  o.a.a.tomcat33 with what's in o.a.a should be too difficult.
  hopefully,
  soon i'll have some time to help out on this :)
 
  GOMEZ Henri wrote:
  
   Hi Kevin,
  
   Did you take a look at my AjpXX stuff in TC 3.3 subdir.
   Could you see how hard it will be to merge with yours ?
  
   I think the only stuff which must stay under
  org.apache.ajp.tomcat33
   must be interceptor. May be something which could became.
  
   org.apache.ajp.interceptor
  
   -
   Henri Gomez ___[_]
   EMAIL : [EMAIL PROTECTED](. .)
   PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
   PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6
  
   -Original Message-
   From: kevin seguin [mailto:[EMAIL PROTECTED]]
   Sent: Friday, June 22, 2001 6:06 PM
   To: [EMAIL PROTECTED]
   Subject: Re: [J-T-C/TC3.3] Update
   
   
   
What about moving isSameAdress to another package ?
   
org.apache.tomcat.util.net ?
   
   
   +1
   
And put there some usefull classes ?
   
in J-T-C I moved it in PoolTCPConnector to make it
available at both Ajp13Interceptor and Ajp14Interceptor,
but under TC 3.3, Ajp12 need it directly.
   
So we need to have it on a common place for both
JTC/UTIL, JTC/JK/TC33 and JTC/JK/TC4
   
-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .)
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6
   
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/



Not getting emails from tomcat-user

2001-06-22 Thread Jacob Thomas

I apologize for butting in on the tomcat-dev list. I am not receiving any
emails from tomcat-user for the last three days. ezmlm indicates that I have
been added to the list but no emails have followed. Any suggestions?
--
Thanks
Jacob

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 8:49 AM
To: [EMAIL PROTECTED]
Subject: Tomcat with multiple JVMs


Hello all!

We configure the Tomcat 3.2.1 (mod_jserv) to run multiples JVMs on a one
Web Server Apache, but when i make the request to the second JVM the tomcat
response with the last JVM that i started (set as default in
tomcat-apache.conf the last JVMS).  and ignore the other.  How can i
configure my tomcat for run OK with multiples JVMs

regards!




[t4] again...classloader stuff...

2001-06-22 Thread Jon Stevens

on 6/21/01 7:13 PM, Remy Maucherat [EMAIL PROTECTED] wrote:

 If you're paranoid, you can do as I did and delete StandardLoader from your
 tree.
 
 Remy

Or I can check out your recent fixes...

  - Forgot to rename StandardClassLoader - WebappClassLoader.

:-)

Ok...with the latest CVS update, now the .jar files are being copied over
and basic classreloading is working. Thank you for fixing things.

But when I log into Turbine and then try to cause a classreloader to reload,
I'm still getting this crash below and it causes the SESSION.ser file to be
left in the work directory which ends up screwing things up if I
quit/restart tomcat because it tries to read that file on startup and it is
invalid or corrupt or noclassdeffound...

I have started to trace the problem down and the weird thing is what is
happening is this:

In initializeBeanProp (see the stack trace below), there is a
Class.forName() call...it is getting the Class for various objects that are
passed into it. I put a System.out.println before the Class.forName() to see
what is happening...when things are working fine (ie: before a classloader
reload), it ends like this:

Everything is fine...

...
className: 'org.tigris.scarab.om.AttributeOption' propName: 'AttributeId'
className: 'org.tigris.scarab.om.AttributeOption' propName: 'AttributeId'
className: 'org.tigris.scarab.om.Attribute' propName: 'Deleted'
className: 'org.tigris.scarab.om.Attribute' propName: 'Deleted'
className: 'org.tigris.scarab.om.Attribute' propName: 'Description'
className: 'org.tigris.scarab.om.Attribute' propName: 'Description'
className: 'org.tigris.scarab.om.Attribute' propName: 'Name'
className: 'org.tigris.scarab.om.Attribute' propName: 'Name'
className: 'org.tigris.scarab.om.Attribute' propName: 'TypeId'
className: 'org.tigris.scarab.om.Attribute' propName: 'TypeId'
className: 'org.tigris.scarab.om.Attribute' propName: 'PrimaryKey'
className: 'org.tigris.scarab.om.Attribute' propName: 'PrimaryKey'

---

When I force a classloader reload...this gets output on the next request...

...
className: 'org.tigris.scarab.om.AttributeOption' propName: 'AttributeId'
className: 'org.tigris.scarab.om.AttributeOption' propName: 'AttributeId'
className: 'org.tigris.scarab.om.Attribute' propName: 'Deleted'
className: 'org.tigris.scarab.om.Attribute' propName: 'Deleted'

For some reason, it seems to stop at the 'Description' propName and throws
the exception shown below...

Note: I'm not sure it makes any difference, but the Scarab classes are
stored in WEB-INF/classes and the Turbine classes are in WEB-INF/lib.

Again, everything works fine as long as the classloader hasn't reloaded...

-jon



Horrible Exception: java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at 
org.apache.turbine.services.intake.TurbineIntakeService.initializeBeanProp(T
urbineIntakeService.java:224)
at 
org.apache.turbine.services.intake.TurbineIntakeService.getFieldGetter(Turbi
neIntakeService.java:581)
at 
org.apache.turbine.services.intake.TurbineIntake.getFieldGetter(TurbineIntak
e.java:235)
at org.apache.turbine.services.intake.model.Field.init(Field.java:180)
at 
org.apache.turbine.services.intake.model.BooleanField.init(BooleanField.ja
va:73)
at 
org.apache.turbine.services.intake.model.FieldFactory$2.getInstance(FieldFac
tory.java:90)
at 
org.apache.turbine.services.intake.model.FieldFactory.getInstance(FieldFacto
ry.java:154)
at org.apache.turbine.services.intake.model.Group.init(Group.java:154)
at 
org.apache.turbine.services.intake.TurbineIntakeService.getGroup(TurbineInta
keService.java:363)
at 
org.apache.turbine.services.intake.TurbineIntake.getGroup(TurbineIntake.java
:85)
at 
org.apache.turbine.services.intake.IntakeTool.init(IntakeTool.java:131)
at 
org.apache.turbine.services.pull.TurbinePullService.populateWithRequestTools
(TurbinePullService.java:463)
at 
org.apache.turbine.services.pull.TurbinePullService.populateContext(TurbineP
ullService.java:391)
at 
org.apache.turbine.services.pull.TurbinePull.populateContext(TurbinePull.jav
a:145)
at 
org.apache.turbine.services.velocity.TurbineVelocityService.getContext(Turbi
neVelocityService.java:221)
at 
org.apache.turbine.services.velocity.TurbineVelocity.getContext(TurbineVeloc
ity.java:140)
at 
org.apache.turbine.modules.pages.VelocityPage.doBuildBeforeAction(VelocityPa
ge.java:84)
at 
org.tigris.scarab.pages.ScarabPage.doBuildBeforeAction(ScarabPage.java:74)
at 
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:137)
at org.apache.turbine.modules.Page.build(Page.java:90)
at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
at org.apache.turbine.Turbine.doGet(Turbine.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at 

Re: [t4] again...classloader stuff...

2001-06-22 Thread Remy Maucherat

Quoting Jon Stevens [EMAIL PROTECTED]:

 on 6/21/01 7:13 PM, Remy Maucherat [EMAIL PROTECTED] wrote:
 
  If you're paranoid, you can do as I did and delete StandardLoader from
 your
  tree.
  
  Remy
 
 Or I can check out your recent fixes...
 
   - Forgot to rename StandardClassLoader - WebappClassLoader.
 
 :-)

The env is set up by the Standard[Webapp]Loader, so the problem was there.
The fix above should fix problems with the extensions feature.

 Ok...with the latest CVS update, now the .jar files are being copied
 over
 and basic classreloading is working. Thank you for fixing things.

Cool.

 But when I log into Turbine and then try to cause a classreloader to
 reload,
 I'm still getting this crash below and it causes the SESSION.ser file to
 be
 left in the work directory which ends up screwing things up if I
 quit/restart tomcat because it tries to read that file on startup and it
 is
 invalid or corrupt or noclassdeffound...

Ok, I'll make sure I find an explanation. If I remember well, you had problems 
in the manager, right ?
These should be gone.

Is it with the default config of Turbine with some example app ?

Remy



[t4 patch] delete the damn file. :-)

2001-06-22 Thread Jon Stevens

Untested...

If there is an exception thrown during the processing, the file won't get
deleted because it isn't in a try/finally statement...

-jon

cvs diff StandardManager.java
Index: StandardManager.java
===
RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/se
ssion/StandardManager.java,v
retrieving revision 1.10
diff -r1.10 StandardManager.java
353a354,355
 try {

445,447c447,451
 // Delete the persistent storage file
 file.delete();

---
 } finally {
 // Delete the persistent storage file
 if (file != null  file.exists() )
 file.delete();
 }




Re: [t4] again...classloader stuff...

2001-06-22 Thread Jon Stevens

on 6/22/01 11:48 AM, Remy Maucherat [EMAIL PROTECTED] wrote:

 Ok, I'll make sure I find an explanation. If I remember well, you had problems
 in the manager, right ?
 These should be gone.

Yes...this problem is a whole new problem and seems to exist in both the
StandardClassLoader and the WebappClassLoader...

 Is it with the default config of Turbine with some example app ?

I'm using Scarab...if you already have MySQL installed somewhere, it is
pretty easy to get things up and running...I can give you a cookbook for
setting up Scarab for testing if you want...

-jon




Re: [t4 patch] delete the damn file. :-)

2001-06-22 Thread Remy Maucherat

Quoting Jon Stevens [EMAIL PROTECTED]:

 Untested...
 
 If there is an exception thrown during the processing, the file won't
 get
 deleted because it isn't in a try/finally statement...

That looks like a good idea (more robust).

I would add the finally block to the second try (the one in the sync(sessions) 
block) (apparently, if the first one is failing, it's only because no file 
exists).

Remy

 cvs diff StandardManager.java
 Index: StandardManager.java
 ===
 RCS file: 
 /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/se
 ssion/StandardManager.java,v
 retrieving revision 1.10
 diff -r1.10 StandardManager.java
 353a354,355
  try {
 
 445,447c447,451
  // Delete the persistent storage file
  file.delete();
 
 ---
  } finally {
  // Delete the persistent storage file
  if (file != null  file.exists() )
  file.delete();
  }
 



cvs commit: jakarta-tomcat-4.0 .cvsignore

2001-06-22 Thread glenn

glenn   01/06/22 12:52:12

  Modified:..cvsignore
  Log:
  ignore build.properties instead of build.properties.sample
  
  Revision  ChangesPath
  1.3   +1 -1  jakarta-tomcat-4.0/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/.cvsignore,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- .cvsignore2001/05/21 21:47:11 1.2
  +++ .cvsignore2001/06/22 19:52:11 1.3
  @@ -1,3 +1,3 @@
   build
  -build.properties.sample
  +build.properties
   dist
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming JndiPermission.java

2001-06-22 Thread glenn

glenn   01/06/22 13:06:01

  Added:   catalina/src/share/org/apache/naming JndiPermission.java
  Log:
  New JndiPermission for file based JNDI resources
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/JndiPermission.java
  
  Index: JndiPermission.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/JndiPermission.java,v
 1.1 2001/06/22 20:06:00 glenn Exp $
   * $Revision: 1.1 $
   * $Date: 2001/06/22 20:06:00 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:  
   *   This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  
  
  package org.apache.naming;
  
  import java.security.BasicPermission;
  
  /**
   * Java SecurityManager Permission class for JNDI name based file resources
   * p
   * The JndiPermission extends the BasicPermission.
   * The permission name is a full or partial jndi resource name.
   * An * can be used at the end of the name to match all named
   * resources that start with name.  There are no actions./p
   * p
   * Example that grants permission to read all JNDI file based resources:
   * li permission org.apache.naming.JndiPermission *;/li
   * /p
   *
   * @author Glenn Nielsen
   * @version $Revision: 1.1 $ $Date: 2001/06/22 20:06:00 $
   */
  
  public final class JndiPermission extends BasicPermission {
  
  // --- Constructors
  
  /**
   * Creates a new JndiPermission with no actions
   *
   * @param String - JNDI resource path name
   */
  public JndiPermission(String name) {
  super(name);
  }
  
  /**
   * Creates a new JndiPermission with no actions
   *
   * @param String - JNDI resource path name
   */
  public JndiPermission(String name, String actions) {
  super(name,actions);
  }
  
  //  Permission Class abstract public method implementations
  
  public boolean equals(Object obj) {
  if( !(obj instanceof JndiPermission) )
  return false;
  
  JndiPermission p = (JndiPermission)obj;
  if( !p.getName().equals(this.getName()) )
   

cvs commit: jakarta-tomcat-4.0/catalina build.xml

2001-06-22 Thread glenn

glenn   01/06/22 13:08:40

  Modified:catalina build.xml
  Log:
  Adjust build for JndiPermission
  
  Revision  ChangesPath
  1.46  +3 -2  jakarta-tomcat-4.0/catalina/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/build.xml,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- build.xml 2001/06/19 01:06:21 1.45
  +++ build.xml 2001/06/22 20:08:40 1.46
  @@ -164,11 +164,12 @@
   !-- Construct bootstrap JAR file --
   jar   jarfile=${catalina.build}/bin/bootstrap.jar
  basedir=${catalina.build}/classes
  -   
includes=org/apache/catalina/startup/Bootstrap.class,org/apache/catalina/loader/StandardClassLoader*.class,org/apache/catalina/loader/Extension.class,org/apache/catalina/loader/Reloader.class
 
  +   
includes=org/apache/catalina/startup/Bootstrap.class,org/apache/catalina/loader/StandardClassLoader*.class,org/apache/catalina/loader/Extension.class,org/apache/catalina/loader/Reloader.class,org/apache/catalina/startup/SecurityManagerDebug.class,org/apache/naming/JndiPermission.class
 
  /
   jar   jarfile=${catalina.build}/common/lib/naming.jar
  basedir=${catalina.build}/classes
  
includes=**/org/apache/naming/*,**/org/apache/naming/factory/Constants.class,**/org/apache/naming/java/*
  +   excludes=**/org/apache/naming/JndiPermission.class
  /
   jar   jarfile=${catalina.build}/common/lib/resources.jar
  basedir=${catalina.build}/classes
  @@ -337,7 +338,7 @@
 target name=deploy-main depends=deploy-static
   jar  jarfile=${catalina.deploy}/server/lib/catalina.jar
 basedir=${catalina.build}/classes 
  -  
excludes=**/org/apache/naming/**,**/connector/warp/**,org/apache/catalina/startup/Bootstrap.class,org/apache/catalina/loader/StandardClassLoader*.class,org/apache/catalina/loader/Extension.class,org/apache/catalina/loader/Reloader.class
 /
  +  
excludes=**/org/apache/naming/**,**/connector/warp/**,org/apache/catalina/startup/Bootstrap.class,org/apache/catalina/loader/StandardClassLoader*.class,org/apache/catalina/loader/Extension.class,org/apache/catalina/loader/Reloader.class,org/apache/catalina/startup/SecurityManagerDebug.class
 /
   jar  jarfile=${catalina.deploy}/server/lib/warp.jar
 basedir=${catalina.build}/classes 
 includes=**/connector/warp/** /
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector HttpRequestBase.java

2001-06-22 Thread glenn

glenn   01/06/22 13:09:25

  Modified:catalina/src/share/org/apache/catalina/connector
HttpRequestBase.java
  Log:
  Add a doPrivileged for getSession()
  
  Revision  ChangesPath
  1.26  +28 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java
  
  Index: HttpRequestBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- HttpRequestBase.java  2001/05/16 17:55:21 1.25
  +++ HttpRequestBase.java  2001/06/22 20:09:24 1.26
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
 1.25 2001/05/16 17:55:21 remm Exp $
  - * $Revision: 1.25 $
  - * $Date: 2001/05/16 17:55:21 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
 1.26 2001/06/22 20:09:24 glenn Exp $
  + * $Revision: 1.26 $
  + * $Date: 2001/06/22 20:09:24 $
*
* 
*
  @@ -101,7 +101,7 @@
* be implemented.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.25 $ $Date: 2001/05/16 17:55:21 $
  + * @version $Revision: 1.26 $ $Date: 2001/06/22 20:09:24 $
*/
   
   public class HttpRequestBase
  @@ -109,6 +109,22 @@
   implements HttpRequest, HttpServletRequest {
   
   
  +protected class PrivilegedGetSession
  +implements PrivilegedAction {   
  +
  +private boolean create;  
  +   
  +PrivilegedGetSession(boolean create) {
  +this.create = create;  
  +}  
  + 
  +public Object run() {
  +return doGetSession(create);
  +}
  +
  +}
  + 
  +
   // - Instance Variables
   
   
  @@ -1038,6 +1054,14 @@
* @param create Create a new session if one does not exist
*/
   public HttpSession getSession(boolean create) {
  +if( System.getSecurityManager() != null ) {
  +PrivilegedGetSession dp = new PrivilegedGetSession(create);
  +return (HttpSession)AccessController.doPrivileged(dp);
  +}
  +return doGetSession(create);
  +}
  +
  +private HttpSession doGetSession(boolean create) {
   // There cannot be a session if no context has been assigned yet
   if (context == null)
   return (null);
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java

2001-06-22 Thread glenn

glenn   01/06/22 13:10:49

  Modified:catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java
  Log:
  Add support for JndiPermission
  
  Revision  ChangesPath
  1.21  +18 -12
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- StandardClassLoader.java  2001/06/22 02:04:11 1.20
  +++ StandardClassLoader.java  2001/06/22 20:10:49 1.21
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.20 2001/06/22 02:04:11 remm Exp $
  - * $Revision: 1.20 $
  - * $Date: 2001/06/22 02:04:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.21 2001/06/22 20:10:49 glenn Exp $
  + * $Revision: 1.21 $
  + * $Date: 2001/06/22 20:10:49 $
*
* 
*
  @@ -77,6 +77,7 @@
   import java.net.URLStreamHandler;
   import java.security.AccessControlException;
   import java.security.CodeSource;
  +import java.security.Permission;
   import java.security.PermissionCollection;
   import java.security.Policy;
   import java.util.ArrayList;
  @@ -87,6 +88,7 @@
   import java.util.jar.JarEntry;
   import java.util.jar.JarInputStream;
   import java.util.jar.Manifest;
  +import org.apache.naming.JndiPermission;
   
   
   /**
  @@ -110,7 +112,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.20 $ $Date: 2001/06/22 02:04:11 $
  + * @version $Revision: 1.21 $ $Date: 2001/06/22 20:10:49 $
*/
   
   public class StandardClassLoader
  @@ -296,10 +298,10 @@
   
   
   /**
  - * A list of read FilePermission's required if this loader
  + * A list of read File and Jndi Permission's required if this loader
* is for a web application context.
*/
  -private ArrayList filePermissionList = new ArrayList();
  +private ArrayList permissionList = new ArrayList();
   
   
   /**
  @@ -387,20 +389,24 @@
   
   /**
* If there is a Java SecurityManager create a read FilePermission
  - * for the file directory path.
  + * or JndiPermission for the file directory path.
*
* @param path file directory path
*/
   public void setPermissions(String path) {
if( securityManager != null ) {
  -filePermissionList.add(new FilePermission(path + -,read));
  +if( path.startsWith(jndi:) || path.startsWith(jar:jndi:) ) {
  +permissionList.add(new JndiPermission(path + *));
  +} else {
  +permissionList.add(new FilePermission(path + -,read));
  +}
}
   }
   
   
   /**
* If there is a Java SecurityManager add a read FilePermission
  - * for URL.
  + * or JndiPermission for URL.
*
* @param url URL for a file or directory on local system
*/
  @@ -1139,10 +1145,10 @@
   if ((pc = (PermissionCollection)loaderPC.get(codeUrl)) == null) {
   pc = super.getPermissions(codeSource);
   if (pc != null) {
  -Iterator perms = filePermissionList.iterator();
  +Iterator perms = permissionList.iterator();
   while (perms.hasNext()) {
  -FilePermission fp = (FilePermission)perms.next();
  -pc.add(fp);
  +Permission p = (Permission)perms.next();
  +pc.add(p);
   }
loaderPC.put(codeUrl,pc);
   }
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2001-06-22 Thread glenn

glenn   01/06/22 13:11:02

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Add support for JndiPermission
  
  Revision  ChangesPath
  1.4   +21 -14
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WebappClassLoader.java2001/06/22 17:29:22 1.3
  +++ WebappClassLoader.java2001/06/22 20:11:01 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.3 2001/06/22 17:29:22 remm Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/06/22 17:29:22 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.4 2001/06/22 20:11:01 glenn Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/06/22 20:11:01 $
*
* 
*
  @@ -81,6 +81,7 @@
   import java.security.AccessController;
   import java.security.AccessControlContext;
   import java.security.CodeSource;
  +import java.security.Permission;
   import java.security.PermissionCollection;
   import java.security.Policy;
   import java.security.cert.Certificate;
  @@ -100,6 +101,7 @@
   import javax.naming.NamingEnumeration;
   import javax.naming.NameClassPair;
   
  +import org.apache.naming.JndiPermission;
   import org.apache.naming.resources.ResourceAttributes;
   import org.apache.naming.resources.Resource;
   
  @@ -117,7 +119,7 @@
*
* @author Remy Maucherat
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/06/22 17:29:22 $
  + * @version $Revision: 1.4 $ $Date: 2001/06/22 20:11:01 $
*/
   public class WebappClassLoader
   extends URLClassLoader
  @@ -274,10 +276,10 @@
   
   
   /**
  - * A list of read FilePermission's required if this loader
  + * A list of read File and Jndi Permission's required if this loader
* is for a web application context.
*/
  -private ArrayList filePermissionList = new ArrayList();
  +private ArrayList permissionList = new ArrayList();
   
   
   /**
  @@ -366,20 +368,24 @@
   
   /**
* If there is a Java SecurityManager create a read FilePermission
  - * for the file directory path.
  + * or JndiPermission for the file directory path.
*
* @param path file directory path
*/
   public void setPermissions(String path) {
if( securityManager != null ) {
  -filePermissionList.add(new FilePermission(path + -,read));
  +if( path.startsWith(jndi:) || path.startsWith(jar:jndi:) ) {
  +permissionList.add(new JndiPermission(path + *));
  +} else {
  +permissionList.add(new FilePermission(path + -,read));
  +}
}
   }
   
   
   /**
  - * If there is a Java SecurityManager add a read FilePermission
  - * for URL.
  + * If there is a Java SecurityManager create a read FilePermission
  + * or JndiPermission for URL.
*
* @param url URL for a file or directory on local system
*/
  @@ -1188,7 +1194,8 @@
   /**
* Get the Permissions for a CodeSource.  If this instance
* of WebappClassLoader is for a web application context,
  - * add read FilePermissions for the base directory (if unpacked),
  + * add read FilePermission or JndiPermissions for the base
  + * directory (if unpacked),
* the context URL, and jar file resources.
*
* @param CodeSource where the code was loaded from
  @@ -1207,10 +1214,10 @@
   if ((pc = (PermissionCollection)loaderPC.get(codeUrl)) == null) {
   pc = super.getPermissions(codeSource);
   if (pc != null) {
  -Iterator perms = filePermissionList.iterator();
  +Iterator perms = permissionList.iterator();
   while (perms.hasNext()) {
  -FilePermission fp = (FilePermission)perms.next();
  -pc.add(fp);
  +Permission p = (Permission)perms.next();
  +pc.add(p);
   }
   loaderPC.put(codeUrl,pc);
   }
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet JasperLoader.java

2001-06-22 Thread glenn

glenn   01/06/22 13:13:19

  Modified:jasper/src/share/org/apache/jasper/servlet JasperLoader.java
  Log:
  Wrap getContextClassLoader with a doPrivileged
  
  Revision  ChangesPath
  1.5   +23 -2 
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JasperLoader.java
  
  Index: JasperLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JasperLoader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JasperLoader.java 2001/06/02 20:22:19 1.4
  +++ JasperLoader.java 2001/06/22 20:13:19 1.5
  @@ -62,8 +62,10 @@
   import java.io.IOException;
   import java.net.URL;
   import java.net.URLClassLoader;
  +import java.security.AccessController;
   import java.security.CodeSource;
   import java.security.PermissionCollection;
  +import java.security.PrivilegedAction;
   import java.security.ProtectionDomain;
   
   import org.apache.jasper.JasperException;
  @@ -85,11 +87,24 @@
*/
   public class JasperLoader extends URLClassLoader {
   
  +protected class PrivilegedLoadClass
  +implements PrivilegedAction {
  +
  +PrivilegedLoadClass() {
  +}
  + 
  +public Object run() {
  +return Thread.currentThread().getContextClassLoader();
  +}
  +
  +}
  +
   private PermissionCollection permissionCollection = null;
   private CodeSource codeSource = null;
   private String className = null;
   private ClassLoader parent = null;
   private SecurityManager securityManager = null;
  +private PrivilegedLoadClass privLoadClass = null;
   
   JasperLoader(URL [] urls, String className, ClassLoader parent,
 PermissionCollection permissionCollection,
  @@ -99,6 +114,7 @@
this.codeSource = codeSource;
this.className = className;
this.parent = parent;
  +this.privLoadClass = new PrivilegedLoadClass();
this.securityManager = System.getSecurityManager();
   }
   
  @@ -173,8 +189,13 @@
   
// Class is in a package, delegate to thread context class loader
if( !name.startsWith(Constants.JSP_PACKAGE_NAME) ) {
  - clazz = Thread.currentThread().getContextClassLoader()
  -.loadClass(name);
  +ClassLoader classLoader = null;
  + if (System.getSecurityManager() != null) {
  + classLoader = 
(ClassLoader)AccessController.doPrivileged(privLoadClass);
  +} else {
  + classLoader = Thread.currentThread().getContextClassLoader();
  +}
  +clazz = classLoader.loadClass(name);
if( resolve )
resolveClass(clazz);
return clazz;
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources DirContextURLConnection.java

2001-06-22 Thread glenn

glenn   01/06/22 13:18:24

  Modified:catalina/src/share/org/apache/naming/resources
DirContextURLConnection.java
  Log:
  Add support for JndiPermission
  
  Revision  ChangesPath
  1.12  +8 -7  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java
  
  Index: DirContextURLConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DirContextURLConnection.java  2001/06/03 19:52:00 1.11
  +++ DirContextURLConnection.java  2001/06/22 20:18:24 1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.11 2001/06/03 19:52:00 remm Exp $
  - * $Revision: 1.11 $
  - * $Date: 2001/06/03 19:52:00 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.12 2001/06/22 20:18:24 glenn Exp $
  + * $Revision: 1.12 $
  + * $Date: 2001/06/22 20:18:24 $
*
* 
*
  @@ -68,7 +68,6 @@
   import java.io.IOException;
   import java.io.InputStream;
   import java.io.FileNotFoundException;
  -import java.io.FilePermission;
   import java.security.Permission;
   import java.util.Date;
   import java.util.Enumeration;
  @@ -79,6 +78,7 @@
   import javax.naming.directory.DirContext;
   import javax.naming.directory.Attribute;
   import javax.naming.directory.Attributes;
  +import org.apache.naming.JndiPermission;
   import org.apache.naming.resources.Resource;
   import org.apache.naming.resources.ResourceAttributes;
   
  @@ -91,7 +91,7 @@
* content is directly returned.
* 
* @author a href=mailto:[EMAIL PROTECTED];Remy Maucherat/a
  - * @version $Revision: 1.11 $
  + * @version $Revision: 1.12 $
*/
   public class DirContextURLConnection 
   extends URLConnection {
  @@ -105,8 +105,9 @@
   if (context == null)
   throw new IllegalArgumentException
   (Directory context can't be null);
  -if (System.getSecurityManager() != null)
  -this.permission = new FilePermission(url.toString(), read);
  +if (System.getSecurityManager() != null) {
  +this.permission = new JndiPermission(url.toString());
  + }
   this.context = context;
   }
   
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources FileDirContext.java

2001-06-22 Thread glenn

glenn   01/06/22 13:20:54

  Modified:catalina/src/share/org/apache/naming/resources
FileDirContext.java
  Log:
  Fix path for windows file separator
  
  Revision  ChangesPath
  1.4   +6 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/FileDirContext.java
  
  Index: FileDirContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/FileDirContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileDirContext.java   2001/03/31 03:00:41 1.3
  +++ FileDirContext.java   2001/06/22 20:20:54 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/FileDirContext.java,v
 1.3 2001/03/31 03:00:41 remm Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/03/31 03:00:41 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/FileDirContext.java,v
 1.4 2001/06/22 20:20:54 glenn Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/06/22 20:20:54 $
*
* 
*
  @@ -98,7 +98,7 @@
* Filesystem Directory Context implementation helper class.
*
* @author Remy Maucherat
  - * @version $Revision: 1.3 $ $Date: 2001/03/31 03:00:41 $
  + * @version $Revision: 1.4 $ $Date: 2001/06/22 20:20:54 $
*/
   
   public class FileDirContext extends BaseDirContext {
  @@ -218,7 +218,6 @@
*/
   public Object lookup(String name)
   throws NamingException {
  -
   Object result = null;
   File file = file(name);
   
  @@ -843,6 +842,8 @@
* @param name Normalized context-relative path (with leading '/')
*/
   protected File file(String name) {
  + if( File.separatorChar == '\\' )
  +name = name.replace('/',File.separatorChar);
   
   File file = new File(base, name);
   if (file.exists()  file.canRead()) {
  
  
  



cvs commit: jakarta-tomcat-4.0 RELEASE-NOTES-4.0-B6.txt

2001-06-22 Thread glenn

glenn   01/06/22 13:31:26

  Modified:.RELEASE-NOTES-4.0-B6.txt
  Log:
  Add note about new JndiPermission
  
  Revision  ChangesPath
  1.2   +3 -1  jakarta-tomcat-4.0/RELEASE-NOTES-4.0-B6.txt
  
  Index: RELEASE-NOTES-4.0-B6.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-NOTES-4.0-B6.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RELEASE-NOTES-4.0-B6.txt  2001/05/15 03:25:46 1.1
  +++ RELEASE-NOTES-4.0-B6.txt  2001/06/22 20:31:25 1.2
  @@ -3,7 +3,7 @@
   Release Notes
   =
   
  -$Id: RELEASE-NOTES-4.0-B6.txt,v 1.1 2001/05/15 03:25:46 craigmcc Exp $
  +$Id: RELEASE-NOTES-4.0-B6.txt,v 1.2 2001/06/22 20:31:25 glenn Exp $
   
   
   
  @@ -44,6 +44,8 @@
   Catalina New Features:
   -
   
  +Created a new Java SecurityManager permission called JndiPermission
  +for use in setting security policy for file based JNDI named resources.
   
   ---
   Jasper New Features:
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/conf catalina.policy

2001-06-22 Thread glenn

glenn   01/06/22 13:36:30

  Modified:catalina/src/conf catalina.policy
  Log:
  Update for new JndiPermission
  
  Revision  ChangesPath
  1.12  +2 -2  jakarta-tomcat-4.0/catalina/src/conf/catalina.policy
  
  Index: catalina.policy
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/catalina.policy,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- catalina.policy   2001/04/25 17:02:10 1.11
  +++ catalina.policy   2001/06/22 20:36:29 1.12
  @@ -8,7 +8,7 @@
   //
   // * Read access to the document root directory
   //
  -// $Id: catalina.policy,v 1.11 2001/04/25 17:02:10 glenn Exp $
  +// $Id: catalina.policy,v 1.12 2001/06/22 20:36:29 glenn Exp $
   // 
   
   
  @@ -81,7 +81,7 @@
   
   // These permissions are granted by default to all web applications
   // In addition, a web application will be given a read FilePermission
  -// for all files and directories in its document root.
  +// and JndiPermission for all files and directories in its document root.
   grant { 
   // Required for JNDI lookup of named JDBC DataSource's and
   // javamail named MimePart DataSource used to send mail
  
  
  



cvs commit: jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/unshared - New directory

2001-06-22 Thread craigmcc

craigmcc01/06/22 13:42:03

  jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/unshared - New directory



Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources FileDirContext.java

2001-06-22 Thread Remy Maucherat

Quoting [EMAIL PROTECTED]:

 glenn   01/06/22 13:20:54
 
   Modified:catalina/src/share/org/apache/naming/resources
 FileDirContext.java
   Log:
   Fix path for windows file separator
   @@ -843,6 +842,8 @@
 * @param name Normalized context-relative path (with leading
 '/')
 */
protected File file(String name) {
   +   if( File.separatorChar == '\\' )
   +name = name.replace('/',File.separatorChar);

File file = new File(base, name);
if (file.exists()  file.canRead()) {

Is this really needed ?
I think this should be abstracted by the new File call.

Remy



RE: Problem with apache response codes

2001-06-22 Thread GOMEZ Henri

If it's allowed by servlet spec, we'll modify it in mod_jk,
the current Tomcat connector to web servers.


I switched an application I was working on from JServ to 
Jakarta and realized 
there is a change in the way the response codes for the server 
are being set. 
Apache no longer recieves the response code the servlet sets 
and therefore 
can not do further processing. For context, I am using apache 
1.3.12 with 
mod_jserv from the 3.2.2 tomcat release.

Here is the relevant code from the sample servlet

public void doGet(HttpServletRequest req, HttpServletResponse res) {
res.sendError(503, blah);
}

In my httpd.conf file I have the following line

ErrorDocument 503 /foo.html

When running against JServ I get the foo.html file served up 
and the following 
line in my access.log file:

GET /servlet/test HTTP/1.1 503 10189 -

If 
When running against Tomcat I get a standard tomcat error 
message (which is 
not what I want) and the following line in the log

GET /servlet/test HTTP/1.1 200 129 -

My guess is that tomcat is not setting some code in the 
communication between 
them however I am not familiar enough with the code to track it down.

Any help (or a tomcat patch) would be appreciated

Andrew




cvs commit: jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/unshared UnsharedSessionBean.java

2001-06-22 Thread craigmcc

craigmcc01/06/22 14:57:08

  Modified:tester   build.xml
   tester/src/tester/org/apache/tester Session01.java
Session03.java SessionBean.java
  Added:   tester/src/tester/org/apache/tester/shared
SharedSessionBean.java
   tester/src/tester/org/apache/tester/unshared
UnsharedSessionBean.java
  Log:
  Add some unit tests for bean references from a servlet (Session01 or
  Session03) to beans in the following locations:
  * SessionBean is in the same /WEB-INF/lib/tester.jar JAR file as the
servlet classes are
  * UnsharedSessionBean is unpacked under /WEB-INF/classes in the
tester web app, but should be loaded by the same webapp class loader
that loads the servlet.
  * SharedSessionBean is in a JAR file under $CATALINA_HOME/lib, so it
should be loaded by the parent classloader
  
  There definitely appears to be a problem with class loading, and trying
  this stuff fails under either WebappClassLoader and StandardClassLoader.
  Right now, I've commented things in the build.xml file out so that all the
  classes get built into tester.jar, and running the HttpSession target
  all succeeds.
  
  If you uncomment the following sets of lines in build.xml, though:
  * 75-76 to copy UnsharedSessionBean to /WEB-INF/classes
  * 95-96 to exclude SharedSessionBean and UnsharedSessionBean
from tester.jar
  * 151-156 to create and deploy SharedSessionBean into the
$CATALINA_HOME/lib directory
  
  then you will get NoClassDefFound exceptions when trying to execute either
  Session01 or Session03.
  
  Conclusion:  class loading fails when a class within a JAR file under
  /WEB-INF/lib references a class in /WEB-INF/classes, or in a shared JAR
  file in the parent class loader.
  
  Notes:
  - Fails identically under WebappClassLoader and StandardClassLoader
  - WebappClassLoader copies the JAR files under /WEB-INF/lib to the
work directory (why?), but it does NOT copy the /WEB-INF/classes
directory (even though the log messages say that it does).
  
  Now for the fun part -- figuring out WHY this is happening :-(.
  
  Revision  ChangesPath
  1.10  +22 -2 jakarta-tomcat-4.0/tester/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/build.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- build.xml 2001/05/21 21:47:22 1.9
  +++ build.xml 2001/06/22 21:57:07 1.10
  @@ -71,6 +71,10 @@
   include name=**/*.txt/
 /fileset
   /copy
  +!--
  +copy 
file=${tester.build}/classes/org/apache/tester/unshared/UnsharedSessionBean.class
  +
tofile=${tester.build}/web/WEB-INF/classes/org/apache/tester/unshared/UnsharedSessionBean.class/
  +--
   copy file=src/tester/org/apache/tester/Resources01.txt
   
tofile=${tester.build}/web/WEB-INF/classes/org/apache/tester/Unpacked01.txt/
   copy file=src/tester/org/apache/tester/Resources03.txt
  @@ -85,8 +89,14 @@
   
   !-- Create and install tester library --
   mkdir   dir=${tester.build}/web/WEB-INF/lib/
  -jar jarfile=${tester.build}/web/WEB-INF/lib/tester.jar
  - basedir=${tester.build}/classes/
  +jar jarfile=${tester.build}/web/WEB-INF/lib/tester.jar
  +  fileset dir=${tester.build}/classes
  +!--
  +exclude name=**/shared/*/
  +exclude name=**/unshared/*/
  +--
  +  /fileset
  +/jar
   
 /target
   
  @@ -135,6 +145,16 @@
   fixcrlf srcdir=${tester.deploy}/bin includes=*.sh cr=remove/
   fixcrlf srcdir=${tester.deploy}/bin includes=*.bat cr=add/
   chmod perm=+x file=${tester.deploy}/bin/tester.sh/
  +
  +!-- Shared Library --
  +!--
  +mkdir   dir=${tester.deploy}/lib/
  +jar jarfile=${tester.deploy}/lib/tester-shared.jar
  +  fileset dir=${tester.build}/classes
  +include name=**/shared/*/
  +  /fileset
  +/jar
  +--
   
   !-- Web Application --
   mkdir  dir=${tester.deploy}/webapps/tester/
  
  
  
  1.3   +14 -1 
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Session01.java
  
  Index: Session01.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Session01.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Session01.java2001/04/26 18:30:17 1.2
  +++ Session01.java2001/06/22 21:57:08 1.3
  @@ -61,14 +61,17 @@
   import java.io.*;
   import javax.servlet.*;
   import javax.servlet.http.*;
  +import org.apache.tester.shared.SharedSessionBean;
  +import org.apache.tester.unshared.UnsharedSessionBean;
   
  +
   /**
* Part 1 of Session Tests.  Ensures that there is no current session, then
* creates a new session and sets a session attribute.  Also, ensure that
* 

Re: cvs commit:jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/unsharedUnsharedSessionBean.java

2001-06-22 Thread Jon Stevens

on 6/22/01 2:57 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 There definitely appears to be a problem with class loading

I have been saying that for a while now...I'm glad to hear it acknowledged
finally. :-)

-jon

-- 
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
http://jakarta.apache.org/velocity/ymtd/ymtd.html




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session StandardManager.java

2001-06-22 Thread jon

jon 01/06/22 15:03:36

  Modified:catalina/src/share/org/apache/catalina/session
StandardManager.java
  Log:
  please check this patch!
  
  #1. make sure the file is deleted if there is an error.
  #2. move the ois.close() into the finally block to also ensure it is
  closed on error.
  #3. improve the logging messages
  
  Revision  ChangesPath
  1.11  +18 -17
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java
  
  Index: StandardManager.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- StandardManager.java  2001/05/03 20:45:03 1.10
  +++ StandardManager.java  2001/06/22 22:03:35 1.11
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
 1.10 2001/05/03 20:45:03 bip Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/05/03 20:45:03 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
 1.11 2001/06/22 22:03:35 jon Exp $
  + * $Revision: 1.11 $
  + * $Date: 2001/06/22 22:03:35 $
*
* 
*
  @@ -106,7 +106,7 @@
* codestop()/code methods of this class at the correct times.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.10 $ $Date: 2001/05/03 20:45:03 $
  + * @version $Revision: 1.11 $ $Date: 2001/06/22 22:03:35 $
*/
   
   public class StandardManager
  @@ -349,7 +349,7 @@
   public void load() throws ClassNotFoundException, IOException {
   
   if (debug = 1)
  -log(Loading persisted sessions);
  +log(Start: Loading persisted sessions);
   
   // Initialize our internal data structures
   recycled.clear();
  @@ -432,22 +432,23 @@
   ois = null;
   }
   throw e;
  -}
  -}
  +} finally {
  +// Close the input stream
  +try {
  +if (ois != null)
  +ois.close();
  +} catch (IOException f) {
  +// ignored
  +}
   
  -// Close the input stream
  -try {
  -ois.close();
  -} catch (IOException f) {
  -;
  +// Delete the persistent storage file
  +if (file != null  file.exists() )
  +file.delete();
  +}
   }
   
  -// Delete the persistent storage file
  -file.delete();
  -
   if (debug = 1)
  -log(Loading complete);
  -
  +log(Finish: Loading persisted sessions);
   }
   
   
  
  
  



A couple of questions, please!

2001-06-22 Thread Jacob Thomas

Sorry for intruding on the dev list, but I am having no luck getting emails
from the user list. I greatly appreciate it if someone could answer these
two questions:

a) Can Tomcat do a forward to an anchor in a JSP page, such as:

RequestDispatcher rd =
getServletContext().getRequestDispatcher(/page.jsp#anchorName);
rd.forward(request, response);

b) I am finding that my Tomcat does not load classes from WEB-INF/classess
directory. %JAVA_HOME%/jre/lib/ext directory has no jars. What else could I
check?
--
Thanks
Jacob



Re: cvs commit: jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/unsharedUnsharedSessionBean.java

2001-06-22 Thread Craig R. McClanahan



On Fri, 22 Jun 2001, Jon Stevens wrote:

 on 6/22/01 2:57 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  There definitely appears to be a problem with class loading
 
 I have been saying that for a while now...I'm glad to hear it acknowledged
 finally. :-)
 

And once the problem *is* solved, we'll now have unit tests to catch any
regressions, so we don't have to run Scarab all the time :-).

By the way, my testing was done *without* the changes that Glenn just made
for JndiPermission.  I'm downloading those as I type.

 -jon
 

Craig




cvs commit: jakarta-tomcat-connectors/jk/native/domino Makefile

2001-06-22 Thread andya

andya   01/06/22 16:18:44

  Modified:jk/native/domino Makefile
  Log:
  Fixed Makefile to look for common headers in ../common
  
  Revision  ChangesPath
  1.5   +2 -3  jakarta-tomcat-connectors/jk/native/domino/Makefile
  
  Index: Makefile
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/domino/Makefile,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile  2001/06/14 14:58:27 1.4
  +++ Makefile  2001/06/22 23:18:41 1.5
  @@ -41,12 +41,11 @@
   ##
   #
   
  -JKINC=../jk
  +JK=../common
   LIBS=-lc -ldl -lnotes -L$(NOTESHOME)
   
  -INC=-I$(NOTESINC) -I$(JAVAINC) -I$(JKINC)
  +INC=-I$(NOTESINC) -I$(JAVAINC) -I$(JK)
   DEFS=-DLINUX -DUNIX
  -JK=../common
   
   JKOBJ = $(JK)/jk_ajp12_worker.o $(JK)/jk_ajp13.o $(JK)/jk_ajp13_worker.o \
$(JK)/jk_connect.o $(JK)/jk_jni_worker.o $(JK)/jk_lb_worker.o \
  
  
  



Re: cvs commit: jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/unshared UnsharedSessionBean.java

2001-06-22 Thread Remy Maucherat

 craigmcc01/06/22 14:57:08

   Log:
   Add some unit tests for bean references from a servlet (Session01 or
   Session03) to beans in the following locations:
   * SessionBean is in the same /WEB-INF/lib/tester.jar JAR file as the
 servlet classes are
   * UnsharedSessionBean is unpacked under /WEB-INF/classes in the
 tester web app, but should be loaded by the same webapp class loader
 that loads the servlet.
   * SharedSessionBean is in a JAR file under $CATALINA_HOME/lib, so it
 should be loaded by the parent classloader

   There definitely appears to be a problem with class loading, and trying
   this stuff fails under either WebappClassLoader and StandardClassLoader.
   Right now, I've commented things in the build.xml file out so that all
the
   classes get built into tester.jar, and running the HttpSession target
   all succeeds.

   If you uncomment the following sets of lines in build.xml, though:
   * 75-76 to copy UnsharedSessionBean to /WEB-INF/classes
   * 95-96 to exclude SharedSessionBean and UnsharedSessionBean
 from tester.jar
   * 151-156 to create and deploy SharedSessionBean into the
 $CATALINA_HOME/lib directory

   then you will get NoClassDefFound exceptions when trying to execute
either
   Session01 or Session03.

   Conclusion:  class loading fails when a class within a JAR file under
   /WEB-INF/lib references a class in /WEB-INF/classes, or in a shared JAR
   file in the parent class loader.

I don't think that test case is valid.

Both of the following explanations are theories. I could be wrong. Comments
by CL gurus are welcome.

Case A (Craig's test) :

Basically, what happens here is :
- The Webapp CL which manages the tester webapp loads Session01
- It then notices it needs to be linked with other classes (SessionBean,
SSB, and USB)
- It loads USB, no problem
- It asks the parent CL to load SSB, because it can't find it
- Parent loads SSB, checks linking
- It notices it needs to load SB
- It can't find SB (since it's in his child CL repository)

I don't see how we can have that work. It's a case where classes from the
shared loader depend on classes from the webapp loader.

Case B (Jon's reloading) :

- Class A which depends on class B (which is also loaded by CL 1 -
everything would be ok if it was loaded by the parent CL) gets loaded
(perhaps along with class B) by CL 1
- Touch class A
- Reload
- CL 1 gets destroyed, and CL 2 is created, and contains the same
repositories as CL 1
- all the classes loaded by CL 1 are still there
- Later, reload new class A
- New class A needs class B, which CL 2 doesn't know
- CL 2 loads another class B
- The other objects instance of the old class B are unaffected, which leads
to an error at some point

To solve this, I would try doing a ctx.stop + ctx.start (instead of
ctx.reload) whenever class reloading is needed. I think the current
reloading will only be able to reload reliably things like the HelloWorld
servlet (ie, classes which are fully independent from other classes from the
webapp).

Remy




Re: cvs commit: jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/unsharedUnsharedSessionBean.java

2001-06-22 Thread Craig R. McClanahan



On Fri, 22 Jun 2001, Remy Maucherat wrote:

 
 I don't think that test case is valid.
 
 Both of the following explanations are theories. I could be wrong. Comments
 by CL gurus are welcome.
 
 Case A (Craig's test) :
 
 Basically, what happens here is :
 - The Webapp CL which manages the tester webapp loads Session01
 - It then notices it needs to be linked with other classes (SessionBean,
 SSB, and USB)
 - It loads USB, no problem
 - It asks the parent CL to load SSB, because it can't find it
 - Parent loads SSB, checks linking
 - It notices it needs to load SB
 - It can't find SB (since it's in his child CL repository)
 
 I don't see how we can have that work. It's a case where classes from the
 shared loader depend on classes from the webapp loader.
 

Yep, you are right on SSB.  I'll change it to not be a subclass.

However, that doesn't explain why it fails on USB -- that's loaded by the
same classloader as Session01, so it should still work.  The only
difference is that USB is in /WEB-INF/classes instead of
/WEB-INF/lib/tester.jar like SessionBean is.  You can uncomment just the
parts of build.xml that do UnsharedSessionBean, and it will still fail.

NOTE:  Even though the log file says it was copying the classes
repository, only the JAR files were copied.  Is it supposed to copy
/WEB-INF/classes/* as well?  If so, that's probably why the error is
occurring.

 Case B (Jon's reloading) :
 
 - Class A which depends on class B (which is also loaded by CL 1 -
 everything would be ok if it was loaded by the parent CL) gets loaded
 (perhaps along with class B) by CL 1
 - Touch class A
 - Reload
 - CL 1 gets destroyed, and CL 2 is created, and contains the same
 repositories as CL 1
 - all the classes loaded by CL 1 are still there
 - Later, reload new class A
 - New class A needs class B, which CL 2 doesn't know
 - CL 2 loads another class B
 - The other objects instance of the old class B are unaffected, which leads
 to an error at some point
 

What other old instances of class B are still around at that
point?  Reloading should have made them all go away.

 To solve this, I would try doing a ctx.stop + ctx.start (instead of
 ctx.reload) whenever class reloading is needed. I think the current
 reloading will only be able to reload reliably things like the HelloWorld
 servlet (ie, classes which are fully independent from other classes from the
 webapp).
 
 Remy
 
 

Craig





Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources FileDirContext.java

2001-06-22 Thread Glenn Nielsen

Remy Maucherat wrote:
 
 Quoting [EMAIL PROTECTED]:
 
  glenn   01/06/22 13:20:54
 
Modified:catalina/src/share/org/apache/naming/resources
  FileDirContext.java
Log:
Fix path for windows file separator
@@ -843,6 +842,8 @@
  * @param name Normalized context-relative path (with leading
  '/')
  */
 protected File file(String name) {
+   if( File.separatorChar == '\\' )
+name = name.replace('/',File.separatorChar);
 
 File file = new File(base, name);
 if (file.exists()  file.canRead()) {
 
 Is this really needed ?
 I think this should be abstracted by the new File call.
 

Yes, it was needed.  There were a few cases under windows when the
file separator was incorrect, causing FileDirContext to fail.  
As long as we make sure the file separator is correct, you can 
abstract it out any way you think works best.

Regards,

Glenn

--
Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder|
MOREnet System Programming   |  * if iz ina coment.  |
Missouri Research and Education Network  |  */   |
--



cvs commit: jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/shared SharedSessionBean.java

2001-06-22 Thread craigmcc

craigmcc01/06/22 17:14:48

  Modified:tester/src/tester/org/apache/tester/shared
SharedSessionBean.java
  Log:
  Make SharedSessionBean independent of SessionBean.  It used to be a
  subclass, but that could never work because SessionBean was only loaded
  from a child classloader.
  
  Submitted by: Remy Maucherat [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.2   +93 -7 
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/shared/SharedSessionBean.java
  
  Index: SharedSessionBean.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/shared/SharedSessionBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SharedSessionBean.java2001/06/22 21:57:08 1.1
  +++ SharedSessionBean.java2001/06/23 00:14:44 1.2
  @@ -63,26 +63,58 @@
   import javax.servlet.http.HttpSessionBindingEvent;
   import javax.servlet.http.HttpSessionBindingListener;
   import javax.servlet.http.HttpSessionEvent;
  -import org.apache.tester.SessionBean;
   
   
   /**
* Simple JavaBean to use for session attribute tests.  It is Serializable
* so that instances can be saved and restored across server restarts.
* p
  - * This bean is functionally equivalent to
  - * codeorg.apache.tester.SessionBean/code, but will be deployed inside
  - * code$CATALINA_HOME/lib/tester-shared.jar/code instead of inside
  - * code/WEB-INF/lib/tester.jar/code.
  + * This is functionally equivalent to codeSessionBean/code, but stored
  + * in a different package so that it gets deployed into a JAR file under
  + * code$CATALINA_HOME/lib/code.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/06/22 21:57:08 $
  + * @version $Revision: 1.2 $ $Date: 2001/06/23 00:14:44 $
*/
   
  -public class SharedSessionBean extends SessionBean implements
  +public class SharedSessionBean implements
   HttpSessionActivationListener, HttpSessionBindingListener, Serializable {
   
   
  +// - Properties
  +
  +
  +/**
  + * The lifecycle events that have happened on this bean instance.
  + */
  +protected String lifecycle = ;
  +
  +public String getLifecycle() {
  +return (this.lifecycle);
  +}
  +
  +public void setLifecycle(String lifecycle) {
  +this.lifecycle = lifecycle;
  +}
  +
  +
  +/**
  + * A string property.
  + */
  +protected String stringProperty = Default String Property Value;
  +
  +public String getStringProperty() {
  +return (this.stringProperty);
  +}
  +
  +public void setStringProperty(String stringProperty) {
  +this.stringProperty = stringProperty;
  +}
  +
  +
  +// - Public Methods
  +
  +
   /**
* Return a string representation of this bean.
*/
  @@ -94,6 +126,60 @@
   sb.append(this.stringProperty);
   sb.append(]);
   return (sb.toString());
  +
  +}
  +
  +
  +// -- HttpSessionActivationListener Methods
  +
  +
  +/**
  + * Receive notification that this session was activated.
  + *
  + * @param event The session event that has occurred
  + */
  +public void sessionDidActivate(HttpSessionEvent event) {
  +
  +lifecycle += /sda;
  +
  +}
  +
  +
  +/**
  + * Receive notification that this session will be passivated.
  + *
  + * @param event The session event that has occurred
  + */
  +public void sessionWillPassivate(HttpSessionEvent event) {
  +
  +lifecycle += /swp;
  +
  +}
  +
  +
  +// - HttpSessionBindingListener Methods
  +
  +
  +/**
  + * Receive notification that this attribute has been bound.
  + *
  + * @param event The session event that has occurred
  + */
  +public void valueBound(HttpSessionBindingEvent event) {
  +
  +lifecycle += /vb;
  +
  +}
  +
  +
  +/**
  + * Receive notification that this attribute has been unbound.
  + *
  + * @param event The session event that has occurred
  + */
  +public void valueUnbound(HttpSessionBindingEvent event) {
  +
  +lifecycle += /vu;
   
   }
   
  
  
  



[jtc] tabs policy??

2001-06-22 Thread kevin seguin

so, is there a tabs policy in jakarta?  like the number of spaces per
tab (4 vs. 8), of no tabs in source code?  i ask because i just got the
latest jtc source, and when i open up some of the files in emacs (in
which i have tab width set to 8 spaces), some lines are indented 4
spaces, and some 8.  what it looks like is someone used an editor with
tabs configured to be 4 spaces, but insert tab characters rather than
spaces.  anyway, it's quite unreadable, so that why i ask ;)  (i hope
this doesn't start a war ;-))



Re: cvs commit:jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/unsharedUnsharedSessionBean.java

2001-06-22 Thread Jon Stevens

on 6/22/01 5:09 PM, Remy Maucherat [EMAIL PROTECTED] wrote:

 I'm not too sure about that yet ...
 Jon's case is quite complex, and is definitely not the same thing as your
 test case.
 
 Remy

I don't think that my case is that out of the ordinary though.

Essentially, classes in a .jar file are attempting to instantiate classes in
the WEB-INF/classes directory using Class.forName(). It works fine in normal
usage, it just doesn't work when the classloader reloads things.

I'm curious how other people are able to use Catalina with these bugs in it.
Anyone?

-jon




cvs commit: jakarta-tomcat-4.0/tester build.xml

2001-06-22 Thread craigmcc

craigmcc01/06/22 17:22:13

  Modified:tester   build.xml
  Log:
  With the fix to SharedSessionBean, the test now works when SSB is deployed
  in $CATALINA_HOME/lib/tester-shared.jar.
  
  Revision  ChangesPath
  1.11  +1 -3  jakarta-tomcat-4.0/tester/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/build.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- build.xml 2001/06/22 21:57:07 1.10
  +++ build.xml 2001/06/23 00:22:08 1.11
  @@ -91,8 +91,8 @@
   mkdir   dir=${tester.build}/web/WEB-INF/lib/
   jar jarfile=${tester.build}/web/WEB-INF/lib/tester.jar
 fileset dir=${tester.build}/classes
  -!--
   exclude name=**/shared/*/
  +!--
   exclude name=**/unshared/*/
   --
 /fileset
  @@ -147,14 +147,12 @@
   chmod perm=+x file=${tester.deploy}/bin/tester.sh/
   
   !-- Shared Library --
  -!--
   mkdir   dir=${tester.deploy}/lib/
   jar jarfile=${tester.deploy}/lib/tester-shared.jar
 fileset dir=${tester.build}/classes
   include name=**/shared/*/
 /fileset
   /jar
  ---
   
   !-- Web Application --
   mkdir  dir=${tester.deploy}/webapps/tester/
  
  
  



Re: cvs commit:jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/unsharedUnsharedSessionBean.java

2001-06-22 Thread Remy Maucherat

 on 6/22/01 5:09 PM, Remy Maucherat [EMAIL PROTECTED] wrote:

  I'm not too sure about that yet ...
  Jon's case is quite complex, and is definitely not the same thing as
your
  test case.
 
  Remy

 I don't think that my case is that out of the ordinary though.

 Essentially, classes in a .jar file are attempting to instantiate classes
in
 the WEB-INF/classes directory using Class.forName(). It works fine in
normal
 usage, it just doesn't work when the classloader reloads things.

 I'm curious how other people are able to use Catalina with these bugs in
it.
 Anyone?

Well, if I remember well, reloading was broken. So ...

Remy




Re: [jtc] tabs policy??

2001-06-22 Thread Andy Armstrong

Here we go... ;-)

I like tabs set to four spaces, tabs in source rather than spaces and
opening braces on a new line. How evil does that make me?

Actually I was just wondering the other day how easy it would be to do
smart de-tabbing on source -- i.e. how easily can you infer the original
tab size given some arbitrary source file. Of course it's easy enough
for a human, but how much syntax awareness would you need to do it
automagically?

kevin seguin wrote:
 
 so, is there a tabs policy in jakarta?  like the number of spaces per
 tab (4 vs. 8), of no tabs in source code?  i ask because i just got the
 latest jtc source, and when i open up some of the files in emacs (in
 which i have tab width set to 8 spaces), some lines are indented 4
 spaces, and some 8.  what it looks like is someone used an editor with
 tabs configured to be 4 spaces, but insert tab characters rather than
 spaces.  anyway, it's quite unreadable, so that why i ask ;)  (i hope
 this doesn't start a war ;-))

-- 
Andy Armstrong, Tagish



Re: [jtc] tabs policy??

2001-06-22 Thread Justin Erenkrantz

On Fri, Jun 22, 2001 at 07:17:37PM -0500, kevin seguin wrote:
 so, is there a tabs policy in jakarta?  like the number of spaces per
 tab (4 vs. 8), of no tabs in source code?  i ask because i just got the
 latest jtc source, and when i open up some of the files in emacs (in
 which i have tab width set to 8 spaces), some lines are indented 4
 spaces, and some 8.  what it looks like is someone used an editor with
 tabs configured to be 4 spaces, but insert tab characters rather than
 spaces.  anyway, it's quite unreadable, so that why i ask ;)  (i hope
 this doesn't start a war ;-))

According to the Jakarta site, I believe the Java code goes under:

http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

Spaces vs. tabs aren't specified, but it says indention of 8.

I'd imagine that the j-t-c code (non-Java code) uses the traditional
Apache style:

http://dev.apache.org/styleguide.html

But, that isn't specified anywhere.

I wish that the Java code used the Apache style.  I find indention of 
8 with hard tabs to be downright awful.  Some of us don't use GUI 
editors.  =)  -- justin




cvs commit: jakarta-tomcat-4.0/tester build.xml

2001-06-22 Thread craigmcc

craigmcc01/06/22 17:28:36

  Modified:tester   build.xml
  Log:
  OK, the problem with SharedSessionBean was creating a false negative on my
  tests with UnsharedSessionBean.  To recap, the following things now work
  using WebappClassLoader:
  - Session class Session01 can reference beans loaded from
/WEB-INF/classes, /WEB-INF/lib/tester.jar (i.e. the same JAR file),
and from a JAR file in the parent class loader.
  - Session attributes of all three bean classes survive a
restart of the web application.
  
  Revision  ChangesPath
  1.12  +0 -4  jakarta-tomcat-4.0/tester/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/build.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- build.xml 2001/06/23 00:22:08 1.11
  +++ build.xml 2001/06/23 00:28:33 1.12
  @@ -71,10 +71,8 @@
   include name=**/*.txt/
 /fileset
   /copy
  -!--
   copy 
file=${tester.build}/classes/org/apache/tester/unshared/UnsharedSessionBean.class
   
tofile=${tester.build}/web/WEB-INF/classes/org/apache/tester/unshared/UnsharedSessionBean.class/
  ---
   copy file=src/tester/org/apache/tester/Resources01.txt
   
tofile=${tester.build}/web/WEB-INF/classes/org/apache/tester/Unpacked01.txt/
   copy file=src/tester/org/apache/tester/Resources03.txt
  @@ -92,9 +90,7 @@
   jar jarfile=${tester.build}/web/WEB-INF/lib/tester.jar
 fileset dir=${tester.build}/classes
   exclude name=**/shared/*/
  -!--
   exclude name=**/unshared/*/
  ---
 /fileset
   /jar
   
  
  
  



Re: cvs commit: jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/unsharedUnsharedSessionBean.java

2001-06-22 Thread Craig R. McClanahan



On Fri, 22 Jun 2001, Jon Stevens wrote:

 on 6/22/01 5:09 PM, Remy Maucherat [EMAIL PROTECTED] wrote:
 
  I'm not too sure about that yet ...
  Jon's case is quite complex, and is definitely not the same thing as your
  test case.
  
  Remy
 
 I don't think that my case is that out of the ordinary though.
 
 Essentially, classes in a .jar file are attempting to instantiate classes in
 the WEB-INF/classes directory using Class.forName(). It works fine in normal
 usage, it just doesn't work when the classloader reloads things.
 
 I'm curious how other people are able to use Catalina with these bugs in it.
 Anyone?
 
 -jon
 
 

Jon,

Following up on Remy's theory of what might be going on with your case, is
the following scenario possible with Scarab?

- Class A is loaded from the shared class loader (because it's
  from a JAR file in $CATALINA_HOME/lib).

- Class B is loaded from Scarab's class loader (it shouldn't matter
  whether it's from /WEB-INF/classes or /WEB-INF/lib.

- A reference to an instance of class B is passed to class A and stored
  (perhaps in a static collection or something).

- The webapp is reloaded (either because of a modified class or a
  command via the Manager webapp).

If this scenario is possible, you'd get a ClassCastException or something
like that when trying to reference the instance of class B after the
reload.  However, if everything is loaded from /WEB-INF/classes or
/WEB-INF/lib, then something else is going on.

Craig





Re: [jtc] tabs policy??

2001-06-22 Thread kevin seguin

well, i prefer 8-space tabs, tabs in source code iif everybody uses the
same number of spaces per tab.  and, that'll never happen.

for the most part, i don't much care, so long as everybody is
consistent.  and, that'll likely never happen either :)

Andy Armstrong wrote:
 
 Here we go... ;-)
 
 I like tabs set to four spaces, tabs in source rather than spaces and
 opening braces on a new line. How evil does that make me?
 
 Actually I was just wondering the other day how easy it would be to do
 smart de-tabbing on source -- i.e. how easily can you infer the original
 tab size given some arbitrary source file. Of course it's easy enough
 for a human, but how much syntax awareness would you need to do it
 automagically?
 
 kevin seguin wrote:
 
  so, is there a tabs policy in jakarta?  like the number of spaces per
  tab (4 vs. 8), of no tabs in source code?  i ask because i just got the
  latest jtc source, and when i open up some of the files in emacs (in
  which i have tab width set to 8 spaces), some lines are indented 4
  spaces, and some 8.  what it looks like is someone used an editor with
  tabs configured to be 4 spaces, but insert tab characters rather than
  spaces.  anyway, it's quite unreadable, so that why i ask ;)  (i hope
  this doesn't start a war ;-))
 
 --
 Andy Armstrong, Tagish



RE: [jtc] tabs policy??

2001-06-22 Thread Tomas Rokicki

No, it says indentation of 4, and it also says that tabs are
equivalent to 8 spaces.  This is precise and sufficient and
will work with any virtually any editor [assuming people know
how to use their editor].  Hint:  if your editor displays
a single hard-tab (^I in the file) as four spaces
(the indentation), you probably have your editor misconfigured.

-Original Message-
From: Justin Erenkrantz [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 5:25 PM
To: [EMAIL PROTECTED]
Subject: Re: [jtc] tabs policy??


On Fri, Jun 22, 2001 at 07:17:37PM -0500, kevin seguin wrote:
 so, is there a tabs policy in jakarta?  like the number of spaces per
 tab (4 vs. 8), of no tabs in source code?  i ask because i just got the
 latest jtc source, and when i open up some of the files in emacs (in
 which i have tab width set to 8 spaces), some lines are indented 4
 spaces, and some 8.  what it looks like is someone used an editor with
 tabs configured to be 4 spaces, but insert tab characters rather than
 spaces.  anyway, it's quite unreadable, so that why i ask ;)  (i hope
 this doesn't start a war ;-))

According to the Jakarta site, I believe the Java code goes under:

http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

Spaces vs. tabs aren't specified, but it says indention of 8.

I'd imagine that the j-t-c code (non-Java code) uses the traditional
Apache style:

http://dev.apache.org/styleguide.html

But, that isn't specified anywhere.

I wish that the Java code used the Apache style.  I find indention of 
8 with hard tabs to be downright awful.  Some of us don't use GUI 
editors.  =)  -- justin





Re: [jtc] tabs policy??

2001-06-22 Thread kevin seguin

 
 No, it says indentation of 4, and it also says that tabs are
 equivalent to 8 spaces.  This is precise and sufficient and
 will work with any virtually any editor [assuming people know
 how to use their editor].  Hint:  if your editor displays
 a single hard-tab (^I in the file) as four spaces
 (the indentation), you probably have your editor misconfigured.
 

+1 billion ;-)



Re: [jtc] tabs policy??

2001-06-22 Thread Craig R. McClanahan



On Sat, 23 Jun 2001, Andy Armstrong wrote:

 Here we go... ;-)
 
 I like tabs set to four spaces, tabs in source rather than spaces and
 opening braces on a new line. How evil does that make me?
 

The conventions we follow are documented on the Jakarta web site:

  http://jakarta.apache.org/site/source.html

which points at Code Conventions for the Java Programming Language:

  http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

There, you will find that the standard tab interval is 8 spaces.  The use
of spaces versus actual tab characters is not mandated absolutely in the
document -- but usage shows that tabs make CVS commit messages MUCH harder
to read, so spaces should be preferred.

That being said, there are the usual caveats:

* There's lots of old code that does not conform to these
  conventions, or the other suggested conventions for
  things like bracket locations and spacing.  Politeness
  and historical convention say you should maintain the style
  of the surrounding code when you're doing a patch, but follow
  the standards on new code.

* There are existing Tomcat committers who adamantly swear
  by using tab characters (who will speak up if they feel
  like it :-) despite the community's repeatedly expressed
  convention for spaces.

So, to answer your questions, tabs set at four spaces and tabs in the
source violates two of the common conventions.

Craig




Re: [jtc] tabs policy??

2001-06-22 Thread cmanolache

On Sat, 23 Jun 2001, Andy Armstrong wrote:

 Here we go... ;-)
 
 I like tabs set to four spaces, tabs in source rather than spaces and
 opening braces on a new line. How evil does that make me?

Not necesarily evil, I also like the week with 3 days ( 1 for work, 2 for
weekend ), tabs in source, lines below 80 chars, and consistent
indentation.

The only problem is that all the code in jakarta-tomcat repository is
using the old eight space tab, with 4 space indentation.

( xml projects seem to prefer a 2 space indentation )

 Actually I was just wondering the other day how easy it would be to do
 smart de-tabbing on source -- i.e. how easily can you infer the original
 tab size given some arbitrary source file. Of course it's easy enough
 for a human, but how much syntax awareness would you need to do it
 automagically?

It's much easier to set the tab consistenly. The 8 has been used in
typewriters and most computers ( until recent editors decided it'll be fun
to allow you to configure that, and also what character coresponds to the
0x41 byte ).

Costin 




Re: [jtc] tabs policy??

2001-06-22 Thread cmanolache

On Fri, 22 Jun 2001, Craig R. McClanahan wrote:

 * There are existing Tomcat committers who adamantly swear
   by using tab characters (who will speak up if they feel
   like it :-) despite the community's repeatedly expressed
   convention for spaces.

I'm one :-)

I'm not sure about community's expressed convention for spaces - if you
look at the sources you'll notice most files are using tabs in source, so
at least a part of the community who is writing code seem to use
tabs. 

It's the part where code speaks :-)

Besides that - I don't remember any vote on this issue, so please don't
confuse personal opinions with community.

Costin





Apache2.0 build on linux

2001-06-22 Thread cmanolache

Ok, after a lot of gdb-ing and strugling with the ./configure and apr 
I got apache2 working. 

To save other's some time: 
If you see SIGSEGV just after you start ( you can use 
httpd -D ONE_PROCESS, that replaces the old -X and env ), one place to
look is srclib/apr/shmem/unix/mm.

There is a nice test program, you can run it ( on my system it crashes
with all setting except MMFILE ). The trick is to build  configure mm
with the good option _before_ compiling apr and httpd.

( if you run a recent linux probably the default will work, I'm still
using Redhat 6.2 with libc.2.1.91 )

Costin




Re: [jtc] tabs policy??

2001-06-22 Thread Pier P. Fumagalli

Craig R. McClanahan at [EMAIL PROTECTED] wrote:
 
 So, to answer your questions, tabs set at four spaces and tabs in the
 source violates two of the common conventions.

For whoever wants it, I have a lil' C script that checks that, and does the
trick (since my MacOS/X editor is kinda f***ed up..)

Pier




[jtc - coyote] couple questions about the Request object

2001-06-22 Thread kevin seguin

1) why is Request final?  i was planning on extending it in
org.apache.ajp.AjpRequest, but can't do so since it's final.  it's no
big deal, i can create org.apache.ajp.AjpRequestAdapter instead, just
kind of curious.

2) any reason why there is no way to set/get attributes on Request?

as mentioned, the reason i ask is i was planning on taking advantage of
Request in org.apache.ajp so that a bunch of work wasn't duplicated.

-kevin.



Re: cvs commit:jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/unsharedUnsharedSessionBean.java

2001-06-22 Thread Jon Stevens

on 6/22/01 5:36 PM, Craig R. McClanahan [EMAIL PROTECTED] wrote:

 Jon,
 
 Following up on Remy's theory of what might be going on with your case, is
 the following scenario possible with Scarab?
 
 - Class A is loaded from the shared class loader (because it's
 from a JAR file in $CATALINA_HOME/lib).
 
 - Class B is loaded from Scarab's class loader (it shouldn't matter
 whether it's from /WEB-INF/classes or /WEB-INF/lib.
 
 - A reference to an instance of class B is passed to class A and stored
 (perhaps in a static collection or something).
 
 - The webapp is reloaded (either because of a modified class or a
 command via the Manager webapp).
 
 If this scenario is possible, you'd get a ClassCastException or something
 like that when trying to reference the instance of class B after the
 reload.  However, if everything is loaded from /WEB-INF/classes or
 /WEB-INF/lib, then something else is going on.
 
 Craig

Nothing is in $CATALINA_HOME/lib except Catalina classes.

Everything related to Scarab is in WEB-INF/classes or WEB-INF/lib

#1. cvs co scarab
#2. cd scarab/build
#3. ./build.sh
#4. cd ../target

In the target directory is the copy of Catalina with Scarab installed into
the webapps directory.

-jon

-- 
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
http://jakarta.apache.org/velocity/ymtd/ymtd.html




cvs commit: jakarta-tomcat-connectors/jk/native buildconf.sh

2001-06-22 Thread costin

costin  01/06/22 22:52:12

  Modified:jk   build.xml
   jk/native buildconf.sh
  Log:
  Added a new target to build ajp14 for tomcat33.
  
  Added few more defaults for properties ( based on the current dir layout,
  assuming the same dir is used to check out the repositories ). The
  properties file can override that, but it's good to have defaults.
  
  Added a small mkdir in the config script, cvs update -dP will remove
  the build/unix dir.
  
  Also made optimize and debug settable properties, consistent with
  jakarta-tomcat and other projects.
  
  Congrats for the ./configure scripts, it's amazing. Tommorow I'll play a bit
  with ajp14, so far it compiles without problems.
  
  Revision  ChangesPath
  1.10  +54 -2 jakarta-tomcat-connectors/jk/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/build.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- build.xml 2001/06/09 02:56:22 1.9
  +++ build.xml 2001/06/23 05:52:11 1.10
  @@ -13,6 +13,17 @@
   property name=test.runner value=junit.textui.TestRunner/
   property name=test.entry value=org.apache.ajp.test.TestAll/
   
  +property name=optimize value=off /
  +property name=debug value=on /
  +
  +!-- default locations --
  +property name=tomcat-util.jar 
  +   location=../util/build/lib/tomcat-util.jar /
  +property name=tomcat33.src 
  +   location=../../jakarta-tomcat /
  +property name=tomcat33.home 
  +   location=${tomcat33.src}/build/tomcat /
  +
   path id=test.classpath
   pathelement location=${jk.build}/classes/
pathelement location=${tomcat-util.jar}/
  @@ -26,6 +37,15 @@
pathelement location=${junit.jar}/
   /path
   
  +path id=build-tomcat33.classpath
  + pathelement location=${tomcat-util.jar}/
  +pathelement location=${tomcat33.home}/lib/common/servlet.jar/
  +pathelement location=${tomcat33.home}/lib/common/tomcat_core.jar/
  +pathelement location=${tomcat33.home}/lib/common/core_util.jar/
  +pathelement 
  +   location=${tomcat33.home}/lib/container/tomcat_util.jar/
  +/path
  +
   target name=build-prepare
   mkdir dir=${jk.build}/
mkdir dir=${jk.build}/classes/
  @@ -37,8 +57,8 @@
   javac srcdir=java
   destdir=${jk.build}/classes
   deprecation=on
  -debug=on
  -optimize=off
  +debug=${debug}
  +optimize=${optimize}
   verbose=off
   excludes=**/CVS/**
exclude name=org/apache/ajp/tomcat4/** if=tomcat4.skip/
  @@ -89,4 +109,36 @@
   target name=clean
   delete dir=${jk.build}/
   /target
  +
  +  !--  Experimental tomcat33 build = --
  +
  +  target name=build-tomcat depends=build-prepare 
  +ant dir=../util antfile=../util/build.xml/
  +javac srcdir=java
  +destdir=${jk.build}/classes
  +deprecation=on
  +debug=${debug}
  +optimize=${optimize}
  +verbose=off
  +excludes=**/CVS/**
  +  exclude name=org/apache/ajp/tomcat4/** /
  +  exclude name=org/apache/ajp/test/** /
  +  classpath refid=build-tomcat33.classpath/
  +/javac
  +!-- Copy static resource files --
  +copy todir=${jk.build}/classes
  +  fileset dir=java
  + include name=**/*.properties/
  +  /fileset
  +/copy
  +
  +jar jarfile=${jk.build}/lib/tc33_ajp.jar
  +  basedir=${jk.build}/classes
  +  excludes=org/apache/ajp/test /
  +
  +copy todir=${tomcat33.home}/lib/container 
  +   file=build/lib/tc33_ajp.jar /
  +  /target
  +
  +
   /project
  
  
  
  1.2   +3 -0  jakarta-tomcat-connectors/jk/native/buildconf.sh
  
  Index: buildconf.sh
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/buildconf.sh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- buildconf.sh  2001/06/11 11:07:46 1.1
  +++ buildconf.sh  2001/06/23 05:52:12 1.2
  @@ -1,4 +1,7 @@
   #!/bin/sh
  +
  +# if cvs -dP the dir will not exist. Alternative: create a dummy file in it
  +mkdir script/tool/unix
   echo libtoolize --force --automake
   libtoolize --force --automake
   echo automake -a --foreign -i