Re: DNS name changes to Machine name with Tomcat 4.1.27 - Reason?

2003-10-16 Thread sabiq
I had the same problem using J2EE 1.4 Beta 2 (Tomcat 5). But i blamed it on my 
ISP (they use a router, which apparently does the replacement of HTTP 
headers). Was i right?
I wonder why the URLs like this work: it has to be the case that the browsers 
ignore the domain part of the URL once TCP/IP connection is established. 
Because the URL i was seeing in the HTTP header was MACHINE.isp.etc.com, which 
couldn't even be pinged from outside. So, TCP/IP headers take precedence over 
HTTP headers. Am i right?

Thanks,
Reshat.

Quoting Sridhar R [EMAIL PROTECTED]:

 Hi there,
 We are facing a problem of Tomcat changing the DNS name (xyz.abc.com) to the
 internal machine name (machine1.Company.com:port). This peculiar behaviour
 happens only when we do not give index.jsp at the end of the URL. (i.e.)
 https://xyz.abc.com/context/ - This gets changed to
 https://machine1.company.com:port/context/index.jsp. But if we give
 https://xyz.abc.com/context/index.jsp, the referer name remains the same.
  
 Our environment is Tomcat 4.1.27 with AJP13 connector to iPlanet web server
 over SSL. We found that (from the debug files generated on AJP13 connector)
 the host (and referer) name changes once the authentication is complete.
 Since the domain name changes to the machine name, one more authentication
 popup window comes up. Although, it changes the URL with the machine instead
 of domain, the application works without any issue. But we do not want the
 user to see the machine name with the port in a site with SSL instead of
 given domain name.
  
 Earlier we had an environment with Tomcat 3.2.4 with AJP13 connector to
 IPlanet. It was working fine in that environment. When we changed it to
 Tomcat 4.1.27, we encountered this peculiar issue. We are not sure, if this
 has some thing to do with Tomcat configuration. We are doubtful, if Tomcat
 4.1.27 requires a changed setting at the iPlanet web server.
  
 We spent considerable time by changing the different attributes to connector
 tag in server.xml and we could not derive any solution for this issue. Can
 anyone help us with this issue? Your timely inputs are highly appreciated.
  
 Best regards,
 Sridhar
 
 
 -
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product search




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



Re: jk/jk2 - time for apr

2003-10-16 Thread jean-frederic clere
Mladen Turk wrote:

-Original Message-
From: Henri Gomez
Mladen Turk a écrit :

+1 to use the APR as mandatory for the mod_jk.
You can rename it to the mod_jk2 after that easily :-)
Heu, the idea is to make jk2 (native2) apr mandatory.

We'll keep jk as it is today.



And I was thinking you have all the time in the world ;-).


* the plan

- update jk2 (native2) to use APR only



Well, that's mostly delete all outside HAS_APR.

Other would be to use the full APR/APR-UTILS api where ever possible,
like for shm, get rid of apr_pool wrapper, etc...
AND of course drop the all unsupported channels like (fast unix
sockets).
The AF_UNIX sockets feature needs to have a C part in the Tomcat and that brings 
problems similar to the JNI problems.

(What about JNI? This is very non-portable due to forked servers, but
that's another story).
IIS and Apache2 uses the APR by default, as well as Apache1.3x (WIN32),
so no problem there.

- port jk add-ons like ping/pong to jk2



OK.


- test, test and re-test



OK.


- mark jk as deprecated



OK.


The rule will be to use the latest APR release, ie the one 
which goes with the latest Apache 2.0 release.

We could handle more recent APR via :

/* deprecated with apr 0.9.3 */
#include apr_version.h
#if (APR_MAJOR_VERSION == 0)  \
(APR_MINOR_VERSION = 9)  \
(APR_PATCH_VERSION  3)
#define apr_filepath_name_get apr_filename_of_pathname
#endif


Why would you do that?
Just use the post 0.9.3 API.

It will make jk2 ideally suited for Apache 2, and since we 
could find apr.dll for Windows Box, it should be usable with 
IIS (Domino ?).



MT.

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



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


socket.setSendBufferSize(int) support?

2003-10-16 Thread Wolfgang Hoschek
Hi,

As part of a webapp, I'm abusing tomcat as as high-performance static 
file download service over high bandwidth long latency network links. 
Here, tuning TCP windows sizes can make a drastic difference.

Is there any support in tomcat-4.1 to configure the socket SO_SNDBUF, to 
be set via
http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSendBufferSize(int)

For more background on why these things matter, see, for example:

	http://www-didc.lbl.gov/tcp-wan-perf.pdf

Wolfgang.

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


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

2003-10-16 Thread hgomez
hgomez  2003/10/16 00:37:32

  Modified:jk/java/org/apache/jk/common HandlerRequest.java
   jk/java/org/apache/ajp Ajp13.java RequestHandler.java
   jk/java/org/apache/ajp/tomcat33 Ajp14Interceptor.java
  Log:
  My latest patches to jk/ajp broke the AJP14 logon phase since I was 
  using the PING message which ask container to take control for
  PING/PONG control.
  Created CPING/CPONG message instead ...
  
  
  
  Revision  ChangesPath
  1.28  +7 -6  
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java
  
  Index: HandlerRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- HandlerRequest.java   30 Sep 2003 07:39:58 -  1.27
  +++ HandlerRequest.java   16 Oct 2003 07:37:32 -  1.28
  @@ -111,13 +111,14 @@
   public static final byte JK_AJP13_FORWARD_REQUEST   = 2;
public static final byte JK_AJP13_SHUTDOWN  = 7;
public static final byte JK_AJP13_PING_REQUEST  = 8;
  + public static final byte JK_AJP13_CPING_REQUEST = 10;
   
   // Prefix codes for message types from container to server
   public static final byte JK_AJP13_SEND_BODY_CHUNK   = 3;
   public static final byte JK_AJP13_SEND_HEADERS  = 4;
   public static final byte JK_AJP13_END_RESPONSE  = 5;
public static final byte JK_AJP13_GET_BODY_CHUNK= 6;
  - public static final byte JK_AJP13_PONG_REPLY= 9;
  + public static final byte JK_AJP13_CPONG_REPLY   = 9;
   
   // Integer codes for common response header strings
   public static final int SC_RESP_CONTENT_TYPE= 0xA001;
  @@ -238,9 +239,9 @@
 JK_AJP13_SHUTDOWN,
 this, null); // 7
   
  - dispatch.registerMessageType( JK_AJP13_PING_REQUEST,
  -   
JK_AJP13_PING_REQUEST,
  -   
this, null); // 8
  + dispatch.registerMessageType( JK_AJP13_CPING_REQUEST,
  +   
JK_AJP13_CPING_REQUEST,
  +   
this, null); // 10
   
   // register outgoing messages handler
   dispatch.registerMessageType( JK_AJP13_SEND_BODY_CHUNK, // 3
  @@ -424,9 +425,9 @@
return OK;
   
// We got a PING REQUEST, quickly respond with a PONG
  - case JK_AJP13_PING_REQUEST:
  + case JK_AJP13_CPING_REQUEST:
msg.reset();
  - msg.appendByte(JK_AJP13_PONG_REPLY);
  + msg.appendByte(JK_AJP13_CPONG_REPLY);
ep.setType( JkHandler.HANDLE_SEND_PACKET );
ep.getSource().invoke( msg, ep );

  
  
  
  1.27  +2 -2  jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp13.java
  
  Index: Ajp13.java
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp13.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Ajp13.java25 Sep 2003 15:24:44 -  1.26
  +++ Ajp13.java16 Oct 2003 07:37:32 -  1.27
  @@ -307,8 +307,8 @@
case RequestHandler.JK_AJP13_FORWARD_REQUEST:
return reqHandler.decodeRequest(this, hBuf, req);

  - case RequestHandler.JK_AJP13_PING_REQUEST:
  - return reqHandler.sendPong(this, outBuf);
  + case RequestHandler.JK_AJP13_CPING_REQUEST:
  + return reqHandler.sendCPong(this, outBuf);

case RequestHandler.JK_AJP13_SHUTDOWN:
return -2;
  
  
  
  1.19  +8 -7  
jakarta-tomcat-connectors/jk/java/org/apache/ajp/RequestHandler.java
  
  Index: RequestHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/RequestHandler.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- RequestHandler.java   25 Sep 2003 15:24:44 -  1.18
  +++ RequestHandler.java   16 Oct 2003 07:37:32 -  1.19
  @@ -99,13 +99,14 @@
public static final byte JK_AJP13_FORWARD_REQUEST   = 2;
public static final byte JK_AJP13_SHUTDOWN  = 7;
public static final byte JK_AJP13_PING_REQUEST  = 8;
  + public static final byte JK_AJP13_CPING_REQUEST = 

cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp_common.c jk_ajp_common.h jk_ajp13.h

2003-10-16 Thread hgomez
hgomez  2003/10/16 00:37:43

  Modified:jk/native/common jk_ajp_common.c jk_ajp_common.h jk_ajp13.h
  Log:
  My latest patches to jk/ajp broke the AJP14 logon phase since I was 
  using the PING message which ask container to take control for
  PING/PONG control.
  Created CPING/CPONG message instead ...
  
  
  
  Revision  ChangesPath
  1.41  +19 -19jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
  
  Index: jk_ajp_common.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- jk_ajp_common.c   4 Oct 2003 09:20:59 -   1.40
  +++ jk_ajp_common.c   16 Oct 2003 07:37:42 -  1.41
  @@ -661,7 +661,7 @@
int rc;

FD_ZERO(rset);
  - FD_ZERO(eset);
  + FD_ZERO(eset);
FD_SET(ae-sd, rset);
FD_SET(ae-sd, eset);
   
  @@ -681,11 +681,11 @@
   

   /*
  - * Handle the PING/PONG initial query
  + * Handle the CPING/CPONG initial query
*/
  -int ajp_handle_ping_pong(ajp_endpoint_t *ae,
  -  inttimeout,
  - jk_logger_t*l)
  +int ajp_handle_cping_cpong(ajp_endpoint_t *ae,
  +int  timeout,
  +   jk_logger_t*l)
   {
int cmd;
jk_msg_buf_t * msg;
  @@ -693,12 +693,12 @@
msg = jk_b_new(ae-pool);
jk_b_set_buffer_size(msg, 16);  /* 16 is way too large but I'm lazy :-) */
jk_b_reset(msg);
  - jk_b_append_byte(msg, AJP13_PING_REQUEST); 
  + jk_b_append_byte(msg, AJP13_CPING_REQUEST); 
   
  - /* Send Ping query */   
  + /* Send CPing query */  
if (ajp_connection_tcp_send_message(ae, msg, l) != JK_TRUE)
{
  - jk_log(l, JK_LOG_ERROR, Error ajp13:ping: can't send ping query\n);
  + jk_log(l, JK_LOG_ERROR, Error ajp13:cping: can't send cping query\n);
return JK_FALSE;
}

  @@ -706,7 +706,7 @@
 */
if (ajp_is_input_event(ae, timeout, l) == JK_FALSE)
{
  - jk_log(l, JK_LOG_ERROR, Error ajp13:ping: timeout in reply pong\n);
  + jk_log(l, JK_LOG_ERROR, Error ajp13:cping: timeout in reply pong\n);
return JK_FALSE;
}

  @@ -714,12 +714,12 @@
 */
if (ajp_connection_tcp_get_message(ae, msg, l) != JK_TRUE)
{
  - jk_log(l, JK_LOG_ERROR, Error ajp13:ping: awaited reply pong, not 
received\n);
  + jk_log(l, JK_LOG_ERROR, Error ajp13:cping: awaited reply cpong, not 
received\n);
return JK_FALSE;
}

  - if ((cmd = jk_b_get_byte(msg)) != AJP13_PONG_REPLY) {
  - jk_log(l, JK_LOG_ERROR, Error ajp13:ping: awaited reply pong, 
received %d instead\n, cmd);
  + if ((cmd = jk_b_get_byte(msg)) != AJP13_CPONG_REPLY) {
  + jk_log(l, JK_LOG_ERROR, Error ajp13:cping: awaited reply cpong, 
received %d instead\n, cmd);
return JK_FALSE;
}
   
  @@ -746,9 +746,9 @@
   if (ae-worker-logon != NULL)
   return (ae-worker-logon(ae, l));
   
  - /* should we send a PING to validate connection ? */
  + /* should we send a CPING to validate connection ? */
if (ae-worker-connect_timeout != 0)
  - return (ajp_handle_ping_pong(ae, 
ae-worker-connect_timeout, l));
  + return (ajp_handle_cping_cpong(ae, 
ae-worker-connect_timeout, l));

   return JK_TRUE;
   }
  @@ -1015,10 +1015,10 @@
   {
err = 0;

  - /* handle ping/pong before request if timeout is set */
  + /* handle cping/cpong before request if timeout is set */
if (ae-worker-prepost_timeout != 0)
{
  - if (ajp_handle_ping_pong(ae, ae-worker-prepost_timeout, l) 
== JK_FALSE)
  + if (ajp_handle_cping_cpong(ae, ae-worker-prepost_timeout, l) 
== JK_FALSE)
err++;
}   
   
  @@ -1037,7 +1037,7 @@
*/
   if (ae-sd  0) {
   
  - /* no need to handle ping/pong here since it should be at connection time */
  + /* no need to handle cping/cpong here since it should be at connection time */
   
   if (ajp_connect_to_endpoint(ae, l) == JK_TRUE) {
   /*
  @@ -1521,7 +1521,7 @@
   
   if (pThis  pThis-worker_private) {
   ajp_worker_t *p = pThis-worker_private;
  -int cache_sz = jk_get_worker_cache_size(props, p-name, cache);
  +int cache_sz = 

cvs commit: jakarta-tomcat-connectors/jk/xdocs/common AJPv13.xml

2003-10-16 Thread hgomez
hgomez  2003/10/16 00:37:56

  Modified:jk/xdocs/common AJPv13.xml
  Log:
  Fix docs
  
  Revision  ChangesPath
  1.7   +9 -4  jakarta-tomcat-connectors/jk/xdocs/common/AJPv13.xml
  
  Index: AJPv13.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/common/AJPv13.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AJPv13.xml25 Sep 2003 16:03:07 -  1.6
  +++ AJPv13.xml16 Oct 2003 07:37:56 -  1.7
  @@ -255,7 +255,12 @@
 tr
   td8/td
   tdPing/td
  -tdThe web server asks the container to respond quickly with a Pong./td
  +tdThe web server asks the container to take control (secure login phase)./td
  +  /tr
  +  tr
  +td10/td
  +tdCPing/td
  +tdThe web server asks the container to respond quickly with a CPong./td
 /tr
   /table
   
  @@ -293,8 +298,8 @@
 /tr
 tr
   td9/td
  -tdPong Reply/td
  -tdThe reply to a PING request/td
  +tdCPong Reply/td
  +tdThe reply to a CPing request/td
 /tr
   /table
   /p
  
  
  

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



cvs commit: jakarta-tomcat-site/xdocs resources.xml

2003-10-16 Thread remm
remm2003/10/16 00:46:16

  Modified:docs resources.html
   docs/faq connectors.html misc.html security.html
   docs/faq/printer connectors.html misc.html security.html
   xdocsresources.xml
  Log:
  - Add John Turner's howtos to the articles list.
  
  Revision  ChangesPath
  1.19  +4 -0  jakarta-tomcat-site/docs/resources.html
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-site/docs/resources.html.diff?r1=1.18r2=1.19
  
  
  1.8   +330 -330  jakarta-tomcat-site/docs/faq/connectors.html
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-site/docs/faq/connectors.html.diff?r1=1.7r2=1.8
  
  
  1.10  +626 -626  jakarta-tomcat-site/docs/faq/misc.html
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-site/docs/faq/misc.html.diff?r1=1.9r2=1.10
  
  
  1.9   +139 -139  jakarta-tomcat-site/docs/faq/security.html
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-site/docs/faq/security.html.diff?r1=1.8r2=1.9
  
  
  1.7   +329 -329  jakarta-tomcat-site/docs/faq/printer/connectors.html
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-site/docs/faq/printer/connectors.html.diff?r1=1.6r2=1.7
  
  
  1.7   +625 -625  jakarta-tomcat-site/docs/faq/printer/misc.html
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-site/docs/faq/printer/misc.html.diff?r1=1.6r2=1.7
  
  
  1.6   +138 -138  jakarta-tomcat-site/docs/faq/printer/security.html
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-site/docs/faq/printer/security.html.diff?r1=1.5r2=1.6
  
  
  1.10  +4 -0  jakarta-tomcat-site/xdocs/resources.xml
  
  
http://cvs.apache.org/viewcvs/jakarta-tomcat-site/xdocs/resources.xml.diff?r1=1.9r2=1.10
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native2 CHANGES.txt

2003-10-16 Thread hgomez
hgomez  2003/10/16 00:51:26

  Modified:jk/native2 CHANGES.txt
  Log:
  First works on jk2, may even not compile ;(
  
  Revision  ChangesPath
  1.9   +8 -1  jakarta-tomcat-connectors/jk/native2/CHANGES.txt
  
  Index: CHANGES.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/CHANGES.txt,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CHANGES.txt   3 Jan 2003 13:52:38 -   1.8
  +++ CHANGES.txt   16 Oct 2003 07:51:26 -  1.9
  @@ -1,6 +1,13 @@
   JAKARTA TOMCAT CONNECTORS 2 (JK2) CHANGELOG: -*-text-*-
   Last modified at [$Date$]
   
  +Changes in JK2 HEAD:
  + * Port from jk of connect_timeout, reply_timeout, prepost_timeout (AJP13 
PING/PONG)
  +   [Henri Gomez]
  + * Add hasinput method for channel, which will check if datas are
  +   available on input channel (TC-WEBSERVER).
  +   [Henri Gomez]
  +   
   Changes with JK2 2.0.4:
   * Added the load balancer stickySession property. If set to 0
 requests with servlet SESSION ID's can be routed to any Tomcat
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_channel.h jk_workerEnv.h jk_worker.h

2003-10-16 Thread hgomez
hgomez  2003/10/16 00:51:48

  Modified:jk/native2/common jk_handler_logon.c jk_channel_un.c
jk_mutex.c jk_channel_apr_socket.c
jk_channel_socket.c jk_handler_response.c
jk_channel_jni.c jk_channel.c jk_worker_ajp13.c
   jk/native2/include jk_channel.h jk_workerEnv.h jk_worker.h
  Log:
  Start to port back jk cping/cpong
  
  Revision  ChangesPath
  1.22  +3 -3  jakarta-tomcat-connectors/jk/native2/common/jk_handler_logon.c
  
  Index: jk_handler_logon.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_handler_logon.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- jk_handler_logon.c25 Sep 2003 15:23:23 -  1.21
  +++ jk_handler_logon.c16 Oct 2003 07:51:48 -  1.22
  @@ -179,7 +179,7 @@
   
   if (nego == 0x) {
   env-l-jkLog(env, env-l, JK_LOG_ERROR,
  -  handler.log_ok()  can't get negociated data\n);
  +  handler.logok()  can't get negociated data\n);
   return JK_HANDLER_FATAL;
   }
   
  @@ -187,7 +187,7 @@
   
   if (! sname) {
   env-l-jkLog(env, env-l, JK_LOG_ERROR,
  -  handler.logon() Error getting servlet engine name\n);
  +  handler.logok() Error getting servlet engine name\n);
   return JK_HANDLER_FATAL;
   }
   
  
  
  
  1.17  +17 -0 jakarta-tomcat-connectors/jk/native2/common/jk_channel_un.c
  
  Index: jk_channel_un.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_un.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- jk_channel_un.c   4 Mar 2003 23:56:37 -   1.16
  +++ jk_channel_un.c   16 Oct 2003 07:51:48 -  1.17
  @@ -238,6 +238,22 @@
   return rc;
   }
   
  +
  +/*
  + * Wait input event on socket for timeout ms
  + */
  +static int JK_METHOD jk2_channel_un_hasinput(jk_env_t *env,
  + jk_channel_t *ch,
  + jk_endpoint_t *endpoint,
  +  
int timeout)
  +
  +{
  + /*
  +  * Should implements the select/poll for UN here
  +  */
  + return (JK_TRUE) ;
  +}
  +
   /** connect to Tomcat (jk_open_socket)
*/
   static int JK_METHOD jk2_channel_un_open(jk_env_t *env,
  @@ -490,6 +506,7 @@
   ch-send= jk2_channel_un_send; 
   ch-open= jk2_channel_un_open; 
   ch-close= jk2_channel_un_close; 
  +ch-hasinput= jk2_channel_un_hasinput; 
   ch-is_stream=JK_TRUE;
   ch-serverSide=JK_FALSE;
   
  
  
  
  1.6   +3 -3  jakarta-tomcat-connectors/jk/native2/common/jk_mutex.c
  
  Index: jk_mutex.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_mutex.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk_mutex.c4 Feb 2003 07:39:58 -   1.5
  +++ jk_mutex.c16 Oct 2003 07:51:48 -  1.6
  @@ -83,17 +83,17 @@
   switch( code ) {
   case MUTEX_LOCK: {
   if( mutex-mbean-debug  0 )
  -env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.open()\n);
  +env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.lock()\n);
   return mutex-lock(env, mutex);
   }
   case MUTEX_TRYLOCK: {
   if( mutex-mbean-debug  0 )
  -env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.close()\n);
  +env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.trylock()\n);
   return mutex-tryLock(env, mutex);
   }
   case MUTEX_UNLOCK: {
   if( mutex-mbean-debug  0 )
  -env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.recv()\n);
  +env-l-jkLog(env, env-l, JK_LOG_DEBUG, mutex.unlock()\n);
   return mutex-unLock(env, mutex);
   }
   }/* switch */
  
  
  
  1.32  +61 -1 
jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c
  
  Index: jk_channel_apr_socket.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- jk_channel_apr_socket.c   30 Sep 2003 13:42:02 -  1.31
  +++ jk_channel_apr_socket.c   16 Oct 2003 07:51:48 -  1.32
  @@ -91,6 +91,7 @@
   short port;
   int keepalive;
   int timeout;
  +int 
   };
   
   typedef struct jk_channel_apr_private jk_channel_apr_private_t;
  @@ -111,6 +112,11 @@
 

ClassCastException in GzipOutputFilter

2003-10-16 Thread Torsten Fohrer

After cvs checkout and build i got this exception:

SEVERE: Error finishing response
java.lang.ClassCastException
at
org.apache.coyote.http11.filters.GzipOutputFilter.end(GzipOutputFilter.java:
165)
at
org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffe
r.java:437)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:817)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:549)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
at java.lang.Thread.run(Thread.java:536)
java.lang.ClassCastException
at
org.apache.coyote.http11.filters.GzipOutputFilter.end(GzipOutputFilter.java:
165)
at
org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffe
r.java:437)
at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:919)
at org.apache.coyote.Response.action(Response.java:222)
at org.apache.coyote.Response.finish(Response.java:343)
at
org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:328)
at
org.apache.coyote.tomcat5.CoyoteResponse.finishResponse(CoyoteResponse.java:
497)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:780)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:549)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
at java.lang.Thread.run(Thread.java:536)

Mit freundlichen Grüssen

Torsten Fohrer
DCSI AG

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



cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_apr_socket.c jk_channel_socket.c jk_worker_ajp13.c

2003-10-16 Thread hgomez
hgomez  2003/10/16 01:41:06

  Modified:jk/native2/common jk_channel_apr_socket.c
jk_channel_socket.c jk_worker_ajp13.c
  Log:
  Now it compile
  
  Revision  ChangesPath
  1.33  +2 -3  
jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c
  
  Index: jk_channel_apr_socket.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- jk_channel_apr_socket.c   16 Oct 2003 07:51:48 -  1.32
  +++ jk_channel_apr_socket.c   16 Oct 2003 08:41:06 -  1.33
  @@ -91,7 +91,6 @@
   short port;
   int keepalive;
   int timeout;
  -int 
   };
   
   typedef struct jk_channel_apr_private jk_channel_apr_private_t;
  @@ -146,8 +145,8 @@
   char *name )
   {
   jk_channel_t *ch=(jk_channel_t *)bean-object;
  -jk_channel_socket_private_t *socketInfo=
  -(jk_channel_socket_private_t *)(ch-_privatePtr);
  +jk_channel_apr_private_t *socketInfo=
  +(jk_channel_apr_private_t *)(ch-_privatePtr);
   
   if( strcmp( name, name )==0 ) {
   return  bean-name;
  
  
  
  1.58  +2 -2  jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
  
  Index: jk_channel_socket.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- jk_channel_socket.c   16 Oct 2003 07:51:48 -  1.57
  +++ jk_channel_socket.c   16 Oct 2003 08:41:06 -  1.58
  @@ -244,7 +244,7 @@
   static int JK_METHOD jk2_channel_socket_hasinput(jk_env_t *env,
jk_channel_t *ch,
jk_endpoint_t *endpoint,
  -
  int timeout)
  + int timeout)
   {
fd_set  rset; 
fd_set  eset; 
  @@ -259,7 +259,7 @@
tv.tv_sec  = timeout / 1000;
tv.tv_usec = (timeout % 1000) * 1000;
   
  - rc = select(ae-sd + 1, rset, NULL, eset, tv);
  + rc = select(endpoint-sd + 1, rset, NULL, eset, tv);
 
   if ((rc  1) || (FD_ISSET(endpoint-sd, eset)))
{
  
  
  
  1.51  +4 -5  jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c
  
  Index: jk_worker_ajp13.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- jk_worker_ajp13.c 16 Oct 2003 07:51:48 -  1.50
  +++ jk_worker_ajp13.c 16 Oct 2003 08:41:06 -  1.51
  @@ -124,7 +124,7 @@
   } else if (strcmp( name, graceful )==0 ) {
   return jk2_env_itoa( env, worker-graceful );
   } else if (strcmp( name, connectTimeout )==0 ) {
  -return jk2_env_itoa( env, worket-connect_timeout);
  +return jk2_env_itoa( env, worker-connect_timeout);
   } else if (strcmp( name, replyTimeout )==0 ) {
   return jk2_env_itoa( env, worker-reply_timeout);
   } else if (strcmp( name, prepostTimeout )==0 ) {
  @@ -277,9 +277,9 @@
*/
   static int jk2_check_alive(jk_env_t *env, jk_endpoint_t *ae, int timeout) {
   
  +int err;
   jk_channel_t *channel=ae-worker-channel;
   jk_msg_t * msg=ae-reply;
  -;
   
jk2_serialize_cping( env, msg, ae );
err = ae-worker-channel-send( env, ae-worker-channel, ae, msg );
  @@ -312,7 +312,6 @@
return JK_ERR;
}

  - 
return JK_OK;
   }
   
  @@ -353,7 +352,7 @@
   /** XXX use a 'connected' field */
   if( ae-sd == -1 ) ae-sd=0;
   
  - if (ae-worker-connect_timeout != 0 )
  + if (ae-worker-connect_timeout != 0 ) {
if (jk2_check_alive(env, ae, ae-worker-connect_timeout) != JK_OK)
return JK_ERR;
}
  @@ -582,7 +581,7 @@
   s-content_read=0;
   
if (w-prepost_timeout != 0) {
  - if (jk2_check_alive(env, ae, ae-worker-prepost_timeout) != JK_OK)
  + if (jk2_check_alive(env, e, e-worker-prepost_timeout) != JK_OK)
return JK_ERR;
}

  
  
  

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



jk2 evolution plan

2003-10-16 Thread Henri Gomez
Ok, about everybody seems to agree on using apr for jk2
(still waiting Nacho for IIS).
APR side will be to :

- Update doc to indicate that APR is mandatory

- Remove #idef APR

- Use APR for all OS operation and sus will save us from
  handling all the #include for all the diverses IO operation
  (it's really a pain).
- For now still use_jk pool, but the version using apr_tools.

- Make socket use apr_socket for compatibility.

JK to JK2 fonctionnalities backport :

- Check features added in jk and not present in jk2 (ie cping/cpong).
  There was also some specific lb workers settings which should be
  studied.
- After this works, make a 2.0.4 release and start extensive
  testing.
On the channel side I added a new method, hasinput which should help
use determine if there is something to do on 'stream connections'.
For instance, it's used in jk/jk2 by the cping/cpong stage when
connectTimeout, prepostTimeout and replyTimeout are set.
And no the who's who ;)

I'd like to know who could works on jk2 evolution.

BTW, where could we find today the jk/jk2 documentation which is
regenerated each day  ?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_channel.h jk_workerEnv.h jk_worker.h

2003-10-16 Thread Mladen Turk


 -Original Message-
 From: [EMAIL PROTECTED]
   
   1.17  +17 -0 
 jakarta-tomcat-connectors/jk/native2/common/jk_channel_un.c
   
   
   1.6   +3 -3  
 jakarta-tomcat-connectors/jk/native2/common/jk_mutex.c
   
   
   1.57  +34 -1 
 jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c

Henri,

IMO all of those should be deprecated.

Instead of jk_mutex use the apr_anylock, or apr_thread_mutex cause it's
meant for thread locking, not as interposes mutex.
and remove the channel_un and channel_socket.

MT.




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



Re: cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_channel.h jk_workerEnv.h jk_worker.h

2003-10-16 Thread Henri Gomez
Mladen Turk a écrit :


-Original Message-
From: [EMAIL PROTECTED]
 
 1.17  +17 -0 
jakarta-tomcat-connectors/jk/native2/common/jk_channel_un.c
 
 
 1.6   +3 -3  
jakarta-tomcat-connectors/jk/native2/common/jk_mutex.c
 
 
 1.57  +34 -1 
jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c


Henri,

IMO all of those should be deprecated.

Instead of jk_mutex use the apr_anylock, or apr_thread_mutex cause it's
meant for thread locking, not as interposes mutex.
and remove the channel_un and channel_socket.
Ok for jk_mutex and channel_socket but we should keep channel_un which
is requested by many people.
In fact it's one of the features of jk2 would convince some admins to
use jk2 in favor of jk ;)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: jk2 evolution plan

2003-10-16 Thread Mladen Turk


 -Original Message-
 From: Henri Gomez
 
 Ok, about everybody seems to agree on using apr for jk2
 (still waiting Nacho for IIS).
 

IIS uses APR by default (staticaly linked) for a long time.


 APR side will be to :
 
 - Update doc to indicate that APR is mandatory
 
 - Remove #idef APR
 
 - Use APR for all OS operation and sus will save us from
handling all the #include for all the diverses IO operation
(it's really a pain).
 
 - For now still use_jk pool, but the version using apr_tools.
 



 - Make socket use apr_socket for compatibility.
 

Why? 
Just rename
  env-registerFactory( env, channel.socket,
jk2_channel_socket_factory );
to
  env-registerFactory( env,
channel.socket,jk2_channel_apr_socket_factory ); 

and drop the socket channel.



 
 And no the who's who ;)
 
 I'd like to know who could works on jk2 evolution.
 

+1


MT.


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



Re: jk2 evolution plan

2003-10-16 Thread Henri Gomez
Mladen Turk wrote:

-Original Message-
From: Henri Gomez
Ok, about everybody seems to agree on using apr for jk2
(still waiting Nacho for IIS).


IIS uses APR by default (staticaly linked) for a long time.



APR side will be to :

- Update doc to indicate that APR is mandatory

- Remove #idef APR

- Use APR for all OS operation and sus will save us from
  handling all the #include for all the diverses IO operation
  (it's really a pain).
- For now still use_jk pool, but the version using apr_tools.





- Make socket use apr_socket for compatibility.



Why? 
Just rename
  env-registerFactory( env, channel.socket,
jk2_channel_socket_factory );
to
  env-registerFactory( env,
channel.socket,jk2_channel_apr_socket_factory ); 

and drop the socket channel.
Exactly ...




And no the who's who ;)

I'd like to know who could works on jk2 evolution.



+1
Thanks.



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


RE: jk2 evolution plan

2003-10-16 Thread Mladen Turk


 -Original Message-
 From: Henri Gomez
 
 I'd like to know who could works on jk2 evolution.
 
  
  
  +1
 
 Thanks.
 

I can (not before friday):
1. Change all the (quasi boolean) functions to return the apr_status_t
instead int (0, 1)
2. aprize jk2_log to use the apr_file_t
3. aprize mutex and pool.

MT.



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



Re: jk2 evolution plan

2003-10-16 Thread Henri Gomez
Mladen Turk wrote:


-Original Message-
From: Henri Gomez
I'd like to know who could works on jk2 evolution.



+1
Thanks.



I can (not before friday):
1. Change all the (quasi boolean) functions to return the apr_status_t
instead int (0, 1)
2. aprize jk2_log to use the apr_file_t
3. aprize mutex and pool.
Ok,

You should know what apr call should be used to mimic select isn't it ?

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


RE: jk2 evolution plan

2003-10-16 Thread Mladen Turk


 -Original Message-
 From: Henri Gomez
 
 You should know what apr call should be used to mimic select 
 isn't it ?
 

PING/PONG right?

Nothing that simple :-).

The magick is apr_poll.
It will require some modifications to the channel in general.

MT.



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



Re: jk2 evolution plan

2003-10-16 Thread Henri Gomez
Mladen Turk wrote:


-Original Message-
From: Henri Gomez
You should know what apr call should be used to mimic select 
isn't it ?



PING/PONG right?

Nothing that simple :-).

The magick is apr_poll.
It will require some modifications to the channel in general.
hasinput method has been created ;)

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


Re: jk2 evolution plan

2003-10-16 Thread jean-frederic clere
Henri Gomez wrote:
Ok, about everybody seems to agree on using apr for jk2
(still waiting Nacho for IIS).
APR side will be to :

- Update doc to indicate that APR is mandatory

- Remove #idef APR

- Use APR for all OS operation and sus will save us from
  handling all the #include for all the diverses IO operation
  (it's really a pain).
- For now still use_jk pool, but the version using apr_tools.

- Make socket use apr_socket for compatibility.

JK to JK2 fonctionnalities backport :

- Check features added in jk and not present in jk2 (ie cping/cpong).
  There was also some specific lb workers settings which should be
  studied.
- After this works, make a 2.0.4 release and start extensive
  testing.
On the channel side I added a new method, hasinput which should help
use determine if there is something to do on 'stream connections'.
For instance, it's used in jk/jk2 by the cping/cpong stage when
connectTimeout, prepostTimeout and replyTimeout are set.
And no the who's who ;)

I'd like to know who could works on jk2 evolution.

BTW, where could we find today the jk/jk2 documentation which is
regenerated each day  ?
I used to generate it every night but I have stopped doing the generation.
Should I activate my cronjob again?


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



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


ResourceBundle problems

2003-10-16 Thread jean-frederic clere
Hi,

I have problem when using ResourceBundle on an EBCDIC machine.
Where is the implementation of the ResourceBundle used in HelloWorldExample.java 
for example?

+++
ResourceBundle rb =
ResourceBundle.getBundle(LocalStrings,request.getLocale());
out.println(html);
out.println(head);
String title = rb.getString(helloworld.title);
+++
Cheers

Jean-Frederic

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


cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common JkMX.java

2003-10-16 Thread hgomez
hgomez  2003/10/16 03:58:15

  Modified:jk/java/org/apache/jk/common JkMX.java
  Log:
  When adding jrmp support I added a sac of ...
  
  I win the Jaja D'Or contest this time
  
  Revision  ChangesPath
  1.14  +9 -7  jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java
  
  Index: JkMX.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- JkMX.java 25 Sep 2003 15:24:44 -  1.13
  +++ JkMX.java 16 Oct 2003 10:58:15 -  1.14
  @@ -179,12 +179,12 @@
   }
   }
   
  -if (classExists(mx4j.tools.naming.NamingService)) {
  +if (! adapterLoaded  classExists(mx4j.tools.naming.NamingService)) {
   try {
  -ObjectName serverName2 = new ObjectName(Naming:name=rmiregistry);
  -mserver.createMBean(mx4j.tools.naming.NamingService, serverName2, 
null);
  -mserver.invoke(serverName2, start, null, null);
  -log.info( Creating  + serverName2 );
  +serverName = new ObjectName(Naming:name=rmiregistry);
  +mserver.createMBean(mx4j.tools.naming.NamingService, serverName, 
null);
  +mserver.invoke(serverName, start, null, null);
  +log.info( Creating  + serverName );
   
   // Create the JRMP adaptor
   ObjectName adaptor = new ObjectName(Adaptor:protocol=jrmp);
  @@ -218,11 +218,12 @@
   adapterLoaded = true;
   
   } catch( Exception ex ) {
  -log.info( MX4j RMI adapter not loaded:  + ex.toString());
  + serverName = null;
  +log.error( MX4j RMI adapter not loaded:  + ex.toString());
   }
   }
   
  -if (classExists(com.sun.jdmk.comm.HtmlAdaptorServer)) {
  +if (! adapterLoaded  classExists(com.sun.jdmk.comm.HtmlAdaptorServer)) {
   try {
   Class c=Class.forName( com.sun.jdmk.comm.HtmlAdaptorServer );
   Object o=c.newInstance();
  @@ -237,6 +238,7 @@
   
   adapterLoaded = true;
   } catch( Throwable t ) {
  + serverName = null;
   log.error( Can't load the JMX_RI http adapter  + t.toString()  );
   }
   }
  
  
  

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



Re: jk2 evolution plan

2003-10-16 Thread Henri Gomez
jean-frederic clere wrote:

Henri Gomez wrote:

Ok, about everybody seems to agree on using apr for jk2
(still waiting Nacho for IIS).
APR side will be to :

- Update doc to indicate that APR is mandatory

- Remove #idef APR

- Use APR for all OS operation and sus will save us from
  handling all the #include for all the diverses IO operation
  (it's really a pain).
- For now still use_jk pool, but the version using apr_tools.

- Make socket use apr_socket for compatibility.

JK to JK2 fonctionnalities backport :

- Check features added in jk and not present in jk2 (ie cping/cpong).
  There was also some specific lb workers settings which should be
  studied.
- After this works, make a 2.0.4 release and start extensive
  testing.
On the channel side I added a new method, hasinput which should help
use determine if there is something to do on 'stream connections'.
For instance, it's used in jk/jk2 by the cping/cpong stage when
connectTimeout, prepostTimeout and replyTimeout are set.
And no the who's who ;)

I'd like to know who could works on jk2 evolution.

BTW, where could we find today the jk/jk2 documentation which is
regenerated each day  ?


I used to generate it every night but I have stopped doing the generation.
Should I activate my cronjob again?
Yes please, but we should find a stable place (where ?)

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


cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common JkMX.java

2003-10-16 Thread hgomez
hgomez  2003/10/16 04:05:56

  Modified:jk/java/org/apache/jk/common JkMX.java
  Log:
  Better check the class than the package isn't it ?
  
  Revision  ChangesPath
  1.15  +1 -1  jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java
  
  Index: JkMX.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- JkMX.java 16 Oct 2003 10:58:15 -  1.14
  +++ JkMX.java 16 Oct 2003 11:05:56 -  1.15
  @@ -132,7 +132,7 @@
   public void loadAdapter() throws IOException {
   boolean adapterLoaded = false;
   
  -if (classExists(mx4j.adaptor.http)) {
  +if (classExists(mx4j.adaptor.http.HttpAdaptor)) {
   try {
   serverName = new ObjectName(Http:name=HttpAdaptor);
   mserver.createMBean(mx4j.adaptor.http.HttpAdaptor, serverName, 
null);
  
  
  

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



please help me:a question about tomcat

2003-10-16 Thread zjj
My friend,I have a question about tomcat.My tomcat_root is set to c:\tomcat,so the 
default root path will be c:\tomcat\webapps\root,but my web application source 
file(i.e .jsp or .html) is located in the positon of d:\myweb.I want to change the 
default root directory to d:\myweb,how can I update the server.xml?Can you give me the 
correct statement?thank you very much.
Eldon   2003/10/16


cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common JkMX.java

2003-10-16 Thread hgomez
hgomez  2003/10/16 04:41:18

  Modified:jk/java/org/apache/jk/common JkMX.java
  Log:
  Update code to be able to select HTTP + JRMP support,
  also you should use now mx.enabled
  
  mx.enabled=true
  mx.httpPort=8098
  mx.httpHost=mymachine
  mx.jrmpPort=8098
  mx.jrmpHost=mymachine
  
  
  
  Revision  ChangesPath
  1.17  +73 -47jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java
  
  Index: JkMX.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JkMX.java 16 Oct 2003 11:09:09 -  1.16
  +++ JkMX.java 16 Oct 2003 11:41:18 -  1.17
  @@ -76,9 +76,10 @@
   public class JkMX extends JkHandler
   {
   MBeanServer mserver;
  - private int port=-1;
  - private String host;
  - private int jrmpport=1099;
  + private boolean enabled=false;
  + private int httpport=-1;
  + private String httphost=localhost;
  + private int jrmpport=-1;
private String jrmphost=localhost;
   
   public JkMX()
  @@ -87,22 +88,42 @@
   
   /*  Public methods  */
   
  - /** Enable the MX4J internal adapter
  + /** Enable the MX4J adapters (new way)
 */
  - public void setPort( int i ) {
  - port=i;
  + public void setEnabled(boolean b) {
  + enabled=b;
}
  -
  + 
  + public boolean getEnabled() {
  + return enabled;
  + }
  + 
  + /** Enable the MX4J adapters (old way, compatible)
  +  */
  + public void setPort(int i) {
  + enabled=(i != -1);
  + }
  + 
public int getPort() {
  - return port;
  + return ((httpport != -1) ? httpport : jrmpport);
}
   
  - public void setHost(String host ) {
  - this.host=host;
  + /** Enable the MX4J HTTP internal adapter
  +  */ 
  + public void setHTTPPort( int i ) {
  + httpport=i;
}
   
  - public String getHost() {
  - return host;
  + public int getHTTPPort() {
  + return httpport;
  + }
  +
  + public void setHTTPHost(String host ) {
  + this.httphost=host;
  + }
  +
  + public String getHTTPHost() {
  + return httphost;
}
   
/** Enable the MX4J JRMP internal adapter
  @@ -124,21 +145,23 @@
}
   
   /*  Start/stop  */
  -ObjectName serverName=null;
  + ObjectName httpServerName=null;
  + ObjectName jrmpServerName=null;
   
   /** Initialize the worker. After this call the worker will be
*  ready to accept new requests.
*/
   public void loadAdapter() throws IOException {
  -boolean adapterLoaded = false;
  + boolean httpAdapterLoaded = false;
  + boolean jrmpAdapterLoaded = false;
   
  -if (classExists(mx4j.adaptor.http.HttpAdaptor)) {
  +if ((httpport != -1)  classExists(mx4j.adaptor.http.HttpAdaptor)) {
   try {
  -serverName = new ObjectName(Http:name=HttpAdaptor);
  -mserver.createMBean(mx4j.adaptor.http.HttpAdaptor, serverName, 
null);
  -if( host!=null )
  -mserver.setAttribute(serverName, new Attribute(Host, host));
  -mserver.setAttribute(serverName, new Attribute(Port, new 
Integer(port)));
  + httpServerName = new 
ObjectName(Http:name=HttpAdaptor);
  +mserver.createMBean(mx4j.adaptor.http.HttpAdaptor, 
httpServerName, null);
  +if( httphost!=null )
  +mserver.setAttribute(httpServerName, new Attribute(Host, 
httphost));
  +mserver.setAttribute(httpServerName, new Attribute(Port, new 
Integer(httpport)));
   
   ObjectName processorName = new 
ObjectName(Http:name=XSLTProcessor);
   mserver.createMBean(mx4j.adaptor.http.XSLTProcessor, 
processorName, null);
  @@ -146,7 +169,7 @@
   //mserver.setAttribute(processorName, new Attribute(File, 
/opt/41/server/lib/openjmx-tools.jar));
   //mserver.setAttribute(processorName, new Attribute(UseCache, new 
Boolean(false)));
   //mserver.setAttribute(processorName, new Attribute(PathInJar, 
/openjmx/adaptor/http/xsl));
  -mserver.setAttribute(serverName, new Attribute(ProcessorName, 
processorName));
  +mserver.setAttribute(httpServerName, new Attribute(ProcessorName, 
processorName));
   
   //server.invoke(serverName, addAuthorization,
   // new Object[] {openjmx, openjmx},
  @@ -166,25 +189,25 @@
   // 

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common JkMX.java

2003-10-16 Thread hgomez
hgomez  2003/10/16 04:41:56

  Modified:jk/java/org/apache/jk/common JkMX.java
  Log:
  Oups, no my day ;(
  
  Revision  ChangesPath
  1.18  +1 -1  jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java
  
  Index: JkMX.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- JkMX.java 16 Oct 2003 11:41:18 -  1.17
  +++ JkMX.java 16 Oct 2003 11:41:56 -  1.18
  @@ -266,7 +266,7 @@
   }
   }
   
  -if ((!httpAdapterLoaded) || (!jrmpAdapterLoaded))
  +if ((!httpAdapterLoaded)  (!jrmpAdapterLoaded))
   log.warn( No adaptors were loaded but mx.enabled was defined.);
   
   }
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common JkMX.java

2003-10-16 Thread hgomez
hgomez  2003/10/16 04:51:16

  Modified:jk/xdocs/jk2 configweb.xml
   jk/java/org/apache/jk/common JkMX.java
  Log:
  Fix getters/setters and update documentation
  
  Revision  ChangesPath
  1.18  +4 -3  jakarta-tomcat-connectors/jk/xdocs/jk2/configweb.xml
  
  Index: configweb.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/jk2/configweb.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- configweb.xml 6 Mar 2003 19:45:27 -   1.17
  +++ configweb.xml 16 Oct 2003 11:51:16 -  1.18
  @@ -111,8 +111,9 @@
   pThis is very experimental. On tomcat side, you must enable the JMX 
proxy. This is done by
   setting modjk.webServerHost and modjk.webServerPort in jk2.properties to point 
to the web server 
   port that contains /jkstatus. ( recent versions of jk and mod_jk are required ). 
You can also add mx4j-tools.jar to 
  -server/lib and set mx.port=PORT in jk2.properties to enable the console, or use 
your favorite JMX
  -console or tools./p
  +server/lib and set mx.enable=true in jk2.properties to enable the console, or use 
your favorite JMX
  +console or tools. You could also select http and/or jrmp protocol, with 
mx.httpPort, mx.httpHost, mxjrmpPort
  +and mx.jrmpPort/p
  
pWhen tomcat starts up, it'll connect to the web server and create JMX 
mbean proxies for each
   mod_jk component. The data will be refreshed when JMX operations are performed - a 
set or invoke will
  
  
  
  1.19  +11 -9 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java
  
  Index: JkMX.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- JkMX.java 16 Oct 2003 11:41:56 -  1.18
  +++ JkMX.java 16 Oct 2003 11:51:16 -  1.19
  @@ -70,7 +70,9 @@
   /**
* Load the HTTP or RMI adapters for MX4J and JMXRI.
*
  - * Add mx.port=PORT in jk2.properties to enable it.
  + * Add mx.enabled=true in jk2.properties to enable it.
  + * You could also select http and/or jrmp protocol, 
  + * with mx.httpPort, mx.httpHost, mxjrmpPort and mx.jrmpPort
*
*/
   public class JkMX extends JkHandler
  @@ -110,37 +112,37 @@
   
/** Enable the MX4J HTTP internal adapter
 */ 
  - public void setHTTPPort( int i ) {
  + public void setHttpPort( int i ) {
httpport=i;
}
   
  - public int getHTTPPort() {
  + public int getHttpPort() {
return httpport;
}
   
  - public void setHTTPHost(String host ) {
  + public void setHttpHost(String host ) {
this.httphost=host;
}
   
  - public String getHTTPHost() {
  + public String getHttpHost() {
return httphost;
}
   
/** Enable the MX4J JRMP internal adapter
 */
  - public void setJRMPPort( int i ) {
  + public void setJrmpPort( int i ) {
jrmpport=i;
}
   
  - public int getJRMPPort() {
  + public int getJrmpPort() {
return jrmpport;
}
   
  - public void setJRMPHost(String host ) {
  + public void setJrmpHost(String host ) {
this.jrmphost=host;
}
   
  - public String getJRMPHost() {
  + public String getJrmpHost() {
return jrmphost;
}
   
  
  
  

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



RE: jk2 evolution plan

2003-10-16 Thread Angus Mezick
Oh, don't forget COMPLETE documentation for everything in jkstatus!

 -Original Message-
 From: Henri Gomez [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 16, 2003 4:59 AM
 To: Tomcat Developers List
 Subject: jk2 evolution plan
 
 
 Ok, about everybody seems to agree on using apr for jk2
 (still waiting Nacho for IIS).
 
 APR side will be to :
 
 - Update doc to indicate that APR is mandatory
 
 - Remove #idef APR
 
 - Use APR for all OS operation and sus will save us from
handling all the #include for all the diverses IO operation
(it's really a pain).
 
 - For now still use_jk pool, but the version using apr_tools.
 
 - Make socket use apr_socket for compatibility.
 
 
 JK to JK2 fonctionnalities backport :
 
 - Check features added in jk and not present in jk2 (ie cping/cpong).
There was also some specific lb workers settings which should be
studied.
 
 - After this works, make a 2.0.4 release and start extensive
testing.
 
 
 On the channel side I added a new method, hasinput which should help
 use determine if there is something to do on 'stream connections'.
 
 For instance, it's used in jk/jk2 by the cping/cpong stage when
 connectTimeout, prepostTimeout and replyTimeout are set.
 
 
 And no the who's who ;)
 
 I'd like to know who could works on jk2 evolution.
 
 BTW, where could we find today the jk/jk2 documentation which is
 regenerated each day  ?
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Jkstatus, What does it mean?

2003-10-16 Thread Angus Mezick

Tried tomcat-user, they don't have a clue about this it seems.


I have this on my jkStatus page when using jk2.
id  namelb_factor   lb_valueroute   errorState
gracefulepCount errorTime
2   web02WWW:8019   1   43  web02WWW:8019   N   N
10  0

What do lb_factor, lb_value, graceful, epCount, and errorTime actually
stand for?  What do they mean to someone who is trying to figure out how
their server is running?  Where are the docs on this stuff?


Angus Mezick
GuideStar - Philanthropic Research Inc.
427 Scotland St.
Williamsburg, Virginia 23185
PHONE: (757)299-4631 x35  FAX:(757)229-8912
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
www.guidestar.org http://www.guidestar.org


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



jk2/tc4/jkstatus problems ;(

2003-10-16 Thread Henri Gomez
Hi

I could get jkstatus via :

http://mysystem/jkstatus/

But it failed to find

http://mysystem/jkstatus/jkstatus?cfgOrig=1
http://mysystem/jkstatus/jkstatus?cfgParsed=1
http://mysystem/jkstatus/jkstatus?scoreboard=1
My original conf was :

[status:]
info=Status worker, displays runtime informations
[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:
debug=10
I add to add the following in workers2.properties to make it works :

[uri:/jkstatus/jkstatus]
info=Display status information and checks the config file for changes.
group=status:
debug=10
BTW, I could'nt get access from TC 4.1.x since this one call :

http://mysystem:80/jkstatus?lst=*
http://mysystem:80/jkstatus?dmp=*
What's the problem ?

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


DO NOT REPLY [Bug 23745] - jsp.error.unterminated.tag received when doing struts tags - improve error messages for misbuilt tags!

2003-10-16 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23745.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23745

jsp.error.unterminated.tag received when doing struts tags - improve error messages 
for misbuilt tags!





--- Additional Comments From [EMAIL PROTECTED]  2003-10-16 12:04 ---
Also, sometimes, it appears that valid struts expression do not need to valid xml?

At least

td 
  logic:equal name=abc value=false
  class=italic_css
  /logic:equal
bean:write name=inMsgList property=subject ...

works for me as a way to selectively load a CSS style for rendering a table
cell, but doesn't really look like valid xml to me.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23860

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



Re: Jkstatus, What does it mean?

2003-10-16 Thread Henri Gomez
Angus Mezick wrote:

Tried tomcat-user, they don't have a clue about this it seems.

I have this on my jkStatus page when using jk2.
id  namelb_factor   lb_valueroute   errorState
gracefulepCount errorTime
2   web02WWW:8019   1   43  web02WWW:8019   N   N
10  0
What do lb_factor, lb_value, graceful, epCount, and errorTime actually
stand for?  What do they mean to someone who is trying to figure out how
their server is running?  Where are the docs on this stuff?
All these informations are commented in jk2 documentation :

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html

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


RE: Jkstatus, What does it mean?

2003-10-16 Thread Angus Mezick
Where?  I looked there (I think).  Could have missed it but I don't see
and documentation on status aside from how to create it.  Can you please
tell me the exact page you looked at before replying to my mail that
references epCount, errorTime, lb_value, and lb_factor?
--Angus

 -Original Message-
 From: Henri Gomez [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 16, 2003 8:05 AM
 To: Tomcat Developers List
 Subject: Re: Jkstatus, What does it mean?
 
 
 Angus Mezick wrote:
 
  Tried tomcat-user, they don't have a clue about this it seems.
  
  
  I have this on my jkStatus page when using jk2.
  id  namelb_factor   lb_valueroute   errorState
  gracefulepCount errorTime
  2   web02WWW:8019   1   43  web02WWW:8019   N   N
  10  0
  
  What do lb_factor, lb_value, graceful, epCount, and 
 errorTime actually
  stand for?  What do they mean to someone who is trying to 
 figure out how
  their server is running?  Where are the docs on this stuff?
 
 All these informations are commented in jk2 documentation :
 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html


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


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



Re: Jkstatus, What does it mean?

2003-10-16 Thread Henri Gomez
Angus Mezick wrote:

Where?  I looked there (I think).  Could have missed it but I don't see
and documentation on status aside from how to create it.  Can you please
tell me the exact page you looked at before replying to my mail that
references epCount, errorTime, lb_value, and lb_factor?
Should be asked in tomcat-user list instead of tomcat-dev.

epCount is the number of connections in connectionCache (x conn for 1 
worker).

errorTime must be the time of the latest error encountered

lb_value and lb_factor are load-balancing informations.

Please reread the doc, and if you don't find infos in jk2 doc,
read the one in jk.
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workershowto.html

many settings in jk2 came from the same one in jk

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


RE: Jkstatus, What does it mean?

2003-10-16 Thread Angus Mezick
All for jk2.

 -Original Message-
 From: Henri Gomez [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 16, 2003 8:26 AM
 To: Tomcat Developers List
 Subject: Re: Jkstatus, What does it mean?
 
 
 Angus Mezick wrote:
 
  Where?  I looked there (I think).  Could have missed it but 
 I don't see
  and documentation on status aside from how to create it.  
 Can you please
  tell me the exact page you looked at before replying to my mail that
  references epCount, errorTime, lb_value, and lb_factor?
 
 Should be asked in tomcat-user list instead of tomcat-dev.
Tried that two days ago.  Didn't work.

 
 epCount is the number of connections in connectionCache (x conn for 1 
 worker).
What is the connectionCache?  Is that how many tomcat will allow?  If
so, why does jkstatus say 10 and my server.xml say 75?

 
 errorTime must be the time of the latest error encountered
 
 lb_value and lb_factor are load-balancing informations.
Do these reflect the value in this hunk of code:
[channel.socket:web02WWW:8019]
port=8019
host=web02.guidestarisp.net
lbfactor=100
group=lbWWW

If so, why when one host in a group is at 100 and the rest are at 1 do
all the numbers in lb_value and lb_factor appear to be zero?

 
 Please reread the doc, and if you don't find infos in jk2 doc,
 read the one in jk.
 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workershowto.html
 many settings in jk2 came from the same one in jk

This document doesn't describe these entries in detail either.  I have
jk2 up and running very nicely.  I am trying to figure out what I am
seeing when I view the diagnostics and there is no help on that page.

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


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



Re: Jkstatus, What does it mean?

2003-10-16 Thread Henri Gomez
Angus Mezick wrote:

All for jk2.


-Original Message-
From: Henri Gomez [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 16, 2003 8:26 AM
To: Tomcat Developers List
Subject: Re: Jkstatus, What does it mean?

Angus Mezick wrote:


Where?  I looked there (I think).  Could have missed it but 
I don't see

and documentation on status aside from how to create it.  
Can you please

tell me the exact page you looked at before replying to my mail that
references epCount, errorTime, lb_value, and lb_factor?
Should be asked in tomcat-user list instead of tomcat-dev.
Tried that two days ago.  Didn't work.


epCount is the number of connections in connectionCache (x conn for 1 
worker).
What is the connectionCache?  Is that how many tomcat will allow?  If
so, why does jkstatus say 10 and my server.xml say 75?

errorTime must be the time of the latest error encountered

lb_value and lb_factor are load-balancing informations.
Do these reflect the value in this hunk of code:
[channel.socket:web02WWW:8019]
port=8019
host=web02.guidestarisp.net
lbfactor=100
group=lbWWW
If so, why when one host in a group is at 100 and the rest are at 1 do
all the numbers in lb_value and lb_factor appear to be zero?

Please reread the doc, and if you don't find infos in jk2 doc,
read the one in jk.
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workershowto.html

many settings in jk2 came from the same one in jk


This document doesn't describe these entries in detail either.  I have
jk2 up and running very nicely.  I am trying to figure out what I am
seeing when I view the diagnostics and there is no help on that page.
We don't have many documentation commiters on jk/jk2 and
any help is of course more than welcome.


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


Re: jk2 evolution plan

2003-10-16 Thread jean-frederic clere
Henri Gomez wrote:
jean-frederic clere wrote:

Henri Gomez wrote:

Ok, about everybody seems to agree on using apr for jk2
(still waiting Nacho for IIS).
APR side will be to :

- Update doc to indicate that APR is mandatory

- Remove #idef APR

- Use APR for all OS operation and sus will save us from
  handling all the #include for all the diverses IO operation
  (it's really a pain).
- For now still use_jk pool, but the version using apr_tools.

- Make socket use apr_socket for compatibility.

JK to JK2 fonctionnalities backport :

- Check features added in jk and not present in jk2 (ie cping/cpong).
  There was also some specific lb workers settings which should be
  studied.
- After this works, make a 2.0.4 release and start extensive
  testing.
On the channel side I added a new method, hasinput which should help
use determine if there is something to do on 'stream connections'.
For instance, it's used in jk/jk2 by the cping/cpong stage when
connectTimeout, prepostTimeout and replyTimeout are set.
And no the who's who ;)

I'd like to know who could works on jk2 evolution.

BTW, where could we find today the jk/jk2 documentation which is
regenerated each day  ?


I used to generate it every night but I have stopped doing the 
generation.
Should I activate my cronjob again?


Yes please, but we should find a stable place (where ?)
Done. The machine where it runs is stable but inside FSC firmwall.



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



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


Re: jk2 evolution plan

2003-10-16 Thread Henri Gomez

Done. The machine where it runs is stable but inside FSC firmwall.
Could we copy it somewhere on apache.org to have it mirrored ?

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


Re: jk2 evolution plan

2003-10-16 Thread jean-frederic clere
Henri Gomez wrote:

Done. The machine where it runs is stable but inside FSC firmwall.


Could we copy it somewhere on apache.org to have it mirrored ?
I have copied and adapted it to my account in minotaur.



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



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


DO NOT REPLY [Bug 23865] New: - Cannot access admin webapp from a host other than 'localhost'

2003-10-16 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23865.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23865

Cannot access admin webapp from a host other than 'localhost'

   Summary: Cannot access admin webapp from a host other than
'localhost'
   Product: Tomcat 4
   Version: 4.1.27
  Platform: Sun
OS/Version: Solaris
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Webapps:Administration
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The admin webapp is only accessible from the 'localhost'. 
An attempt to access the admin webapp from another host produces 
the following error after a successful login to the admin webapp 
 
   HTTP Status 400 - Invalid direct reference to form login page 
   type Status report 
   message Invalid direct reference to form login page 
   description The request sent by the client was syntactically incorrect 
   (Invalid direct reference to form login page). 
   Apache Tomcat/4.1.27 
 
It appears that the 'redirection to original' does not work, however 
I don't quite understand why the client host would affect this. 
 
Techincal Details regarding the problem... 
 
There is a comment in the admin.xml file specifying that remote access 
can be adjusted via the org.apache.catalina.valves.RemoteAddrValve 
however I do not believe this is the issue since it appears that after 
'adjusting' the RemoteAddrValve, one does not even get the admin 
login page. 
 
I set debug to 99 in admin.xml... 
 
Using a browser on a remote host. 
Clicking on the Tomcat Administrator link takes me to the admin 
login page and produces the following in the admin log... 
 
 Excerpt from localhost_admin_log  
 
2003-10-16 09:59:38 Authenticator[/admin]: Security checking request GET 
/admin 
2003-10-16 09:59:38 Authenticator[/admin]:   Checking constraint 
'SecurityConstraint[Protected Area]' against GET  -- false 
2003-10-16 09:59:38 Authenticator[/admin]:   No applicable constraint located 
2003-10-16 09:59:38 Authenticator[/admin]:  Not subject to any constraint 
2003-10-16 09:59:38 StandardContext[/admin]: Mapping contextPath='/admin' with 
requestURI='/admin' and relativeURI='' 
2003-10-16 09:59:38 StandardContext[/admin]:   Trying exact match 
2003-10-16 09:59:38 StandardContext[/admin]:   Trying prefix match 
2003-10-16 09:59:38 StandardContext[/admin]:   Trying extension match 
2003-10-16 09:59:38 StandardContext[/admin]:   Trying default match 
2003-10-16 09:59:38 StandardContext[/admin]:  Mapped to servlet 'default' with 
servlet path '' and path info 'null' and update=true 
2003-10-16 09:59:38 Authenticator[/admin]: Security checking request GET 
/admin/ 
2003-10-16 09:59:38 Authenticator[/admin]:   Checking constraint 
'SecurityConstraint[Protected Area]' against GET / -- false 
2003-10-16 09:59:38 Authenticator[/admin]:   No applicable constraint located 
2003-10-16 09:59:38 Authenticator[/admin]:  Not subject to any constraint 
2003-10-16 09:59:38 StandardContext[/admin]: Mapping contextPath='/admin' with 
requestURI='/admin/' and relativeURI='/' 
2003-10-16 09:59:38 StandardContext[/admin]:   Trying exact match 
2003-10-16 09:59:38 StandardContext[/admin]:   Trying prefix match 
2003-10-16 09:59:38 StandardContext[/admin]:   Trying extension match 
2003-10-16 09:59:38 StandardContext[/admin]:   Trying default match 
2003-10-16 09:59:38 StandardContext[/admin]:  Mapped to servlet 'default' with 
servlet path '/' and path info 'null' and update=true 
2003-10-16 09:59:39 Authenticator[/admin]: Security checking request GET 
/admin/index.jsp 
2003-10-16 09:59:39 Authenticator[/admin]:   Checking constraint 
'SecurityConstraint[Protected Area]' against GET /index.jsp -- true 
2003-10-16 09:59:39 Authenticator[/admin]:  Subject to constraint 
SecurityConstraint[Protected Area] 
2003-10-16 09:59:39 Authenticator[/admin]:  Calling checkUserData() 
2003-10-16 09:59:39 Authenticator[/admin]:   User data constraint has no 
restrictions 
2003-10-16 09:59:39 Authenticator[/admin]:  Calling authenticate() 
2003-10-16 09:59:39 Authenticator[/admin]: Save request in session 
'7B93E21E9FBE96CE8500B8DA438FA72D' 
2003-10-16 09:59:39 Authenticator[/admin]: Redirect to login page 
'/admin/login.jsp' 
2003-10-16 09:59:39 Authenticator[/admin]:  Failed authenticate() test 
2003-10-16 09:59:40 Authenticator[/admin]: Security checking request GET 
/admin/login.jsp 
2003-10-16 09:59:40 Authenticator[/admin]:   Checking constraint 
'SecurityConstraint[Protected Area]' against GET /login.jsp -- true 
2003-10-16 09:59:40 Authenticator[/admin]:  Subject to constraint 
SecurityConstraint[Protected Area] 
2003-10-16 09:59:40 Authenticator[/admin]:  

Re: jk2 evolution plan

2003-10-16 Thread Henri Gomez
jean-frederic clere wrote:

Henri Gomez wrote:


Done. The machine where it runs is stable but inside FSC firmwall.


Could we copy it somewhere on apache.org to have it mirrored ?


I have copied and adapted it to my account in minotaur.
So we'll have an URL available ?

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


Re: jk2 evolution plan

2003-10-16 Thread Costin Manolache
Henri Gomez wrote:

 And no the who's who ;)
 
 I'd like to know who could works on jk2 evolution.
 

Until December is very unlikely I'll have any free time. 


I would like to help with the unix domain channel and JNI - but
it'll be very limitted... Sorry.


Costin


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



Re: jk2 evolution plan

2003-10-16 Thread Henri Gomez
Costin Manolache wrote:

Henri Gomez wrote:


And no the who's who ;)

I'd like to know who could works on jk2 evolution.



Until December is very unlikely I'll have any free time. 

I would like to help with the unix domain channel and JNI - but
it'll be very limitted... Sorry.
You're more than welcome of course Costin.

The more I look in jk2, the more I like the 'object' oriented
methods of jk2 :-)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JK/ajp13 connection reuse problem

2003-10-16 Thread Andy Armstrong
I'm trying to bring the Domino connector up to date with the latest 
codebase and I'm running into a problem with connection reuse. The 
characteristic is that with connection reuse working normally the first 
message from Domino to Tomcat round trips without any problem but a 
second message repeatedly re-sends without getting any response.

If I modify ajp_send_request() not to recycle connections everything 
works fine.

I'm going to investigate more but I'm wondering if those symptoms ring a 
bell with anyone... FWIW it's the same whether I configure Tomcat to 
listen with a Coyote connector or the old AJP 1.3 one.

Thanks :)

--
Andy Armstrong, Tagish


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


Re: JK/ajp13 connection reuse problem

2003-10-16 Thread Henri Gomez
Andy Armstrong wrote:

I'm trying to bring the Domino connector up to date with the latest 
codebase and I'm running into a problem with connection reuse. The 
characteristic is that with connection reuse working normally the first 
message from Domino to Tomcat round trips without any problem but a 
second message repeatedly re-sends without getting any response.

If I modify ajp_send_request() not to recycle connections everything 
works fine.

I'm going to investigate more but I'm wondering if those symptoms ring a 
bell with anyone... FWIW it's the same whether I configure Tomcat to 
listen with a Coyote connector or the old AJP 1.3 one.

Thanks :)

mod_jk 1.2.5 ?

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


Re: JK/ajp13 connection reuse problem

2003-10-16 Thread Andy Armstrong
Henri Gomez wrote:
mod_jk 1.2.5 ?
1.2.6 - the latest code from the CVS yesterday.

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


Re: JK/ajp13 connection reuse problem

2003-10-16 Thread Henri Gomez
Andy Armstrong wrote:

I'm trying to bring the Domino connector up to date with the latest 
codebase and I'm running into a problem with connection reuse. The 
characteristic is that with connection reuse working normally the first 
message from Domino to Tomcat round trips without any problem but a 
second message repeatedly re-sends without getting any response.

If I modify ajp_send_request() not to recycle connections everything 
works fine.

I'm going to investigate more but I'm wondering if those symptoms ring a 
bell with anyone... FWIW it's the same whether I configure Tomcat to 
listen with a Coyote connector or the old AJP 1.3 one.
Could you get an ethereal dump ?

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


Re: JK/ajp13 connection reuse problem

2003-10-16 Thread Andy Armstrong
Henri Gomez wrote:
Could you get an ethereal dump ?
That mail coincided exactly with my trying to remember whether I had a 
network tracing tool installed on this PC - and fortunately I do :)

Ethereal dump coming up.

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


Re: JK/ajp13 connection reuse problem

2003-10-16 Thread Henri Gomez
Andy Armstrong wrote:

Henri Gomez wrote:

Could you get an ethereal dump ?


That mail coincided exactly with my trying to remember whether I had a 
network tracing tool installed on this PC - and fortunately I do :)

Ethereal dump coming up.
In such case ethereal is allways your friend.

I'll have to leave (Europe GMT end of day).



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


Re: JK/ajp13 connection reuse problem

2003-10-16 Thread Andy Armstrong
Henri Gomez wrote:
I'll have to leave (Europe GMT end of day).
UK time here. Still trying to get Ethereal to trace local (intra 
machine) traffic. I'm not around tomorrow so it may be Monday before 
there's anything to dissect.

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


DO NOT REPLY [Bug 19965] - mod_jk2 connection fails, workerEnv.init() create slot epStat.0 failed

2003-10-16 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19965.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19965

mod_jk2 connection fails, workerEnv.init() create slot epStat.0 failed





--- Additional Comments From [EMAIL PROTECTED]  2003-10-16 18:48 ---
I had the same problem.  A review of the JK2 code revealed that the epStat slot 
objects are created in the shared memory area.  Setting up a shared memory file 
should resolve this issue.

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



Re: How to make CLIENT-CERT protection work?

2003-10-16 Thread Bill Barker

- Original Message -
From: Jan Luehe [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 6:38 PM
Subject: How to make CLIENT-CERT protection work?


 Consider the following scenario:

 1. Client sends POST request (with content type other than
 application/x-www-form-urlencoded) to SSL-enabled server (with
 client auth turned off).

 2. Server parses request header, and determines that the resource
 identified by the request-URI is CLIENT-CERT protected.

 3. Server's SSLAuthenticator valve reinitiates SSL handshake, w/
 client auth turned on.

 4. The server sends its HelloRequest, and expects to read the client's
 ClientHello. However, what it gets is the POST request's body which
 hadn't been read yet.

 5. SSL handshake fails.


 In order to avoid this problem, SSLAuthenticator.authenticate()
 clears the socket in the case of a POST request by reading the POST
 request's body *before* reinitiating the handshake. To read the POST
 body, it calls CoyoteRequest.getParameterMap(), which reads and
 processes the POST body only if the content type equals
 application/x-www-form-urlencoded.

 Therefore, the SSL re-handshake works according to plan if the content
 type equals application/x-www-form-urlencoded, but fails for any
 other content type.

 Should we always read the POST body in getParameterMap(), and cache it
 in a byte[] if content type is different from
 application/x-www-form-urlencoded, and have
 CoyoteRequest.getInputStream()/getReader() return wrappers around this
 byte[]?

 Any better suggestions?

It would probably be better to remove the POST check from SSLAuthenticator,
and move it to Http11Processor.action.  Then when it is processing
ACTION_REQ_SSL_CERTIFICATE, it simply need to add a new InputFilter (say,
BufferedInputFilter) that does a full read of the Request data.


 Thanks,


 Jan



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



This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication in 
error, please notify us immediately by e-mail and then delete all copies of this 
message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through the 
Internet is not secure. Do not send confidential or sensitive information, such as 
social security numbers, account numbers, personal identification numbers and 
passwords, to us via ordinary (unencrypted) e-mail.

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

cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf CharChunk.java

2003-10-16 Thread kinman
kinman  2003/10/16 16:53:03

  Modified:util/java/org/apache/tomcat/util/buf CharChunk.java
  Log:
  - Avoid some copying on a common case, when a JSP page is flushing its
own buffer.
  
  Revision  ChangesPath
  1.9   +9 -1  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java
  
  Index: CharChunk.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/CharChunk.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CharChunk.java2 Sep 2003 21:34:38 -   1.8
  +++ CharChunk.java16 Oct 2003 23:53:03 -  1.9
  @@ -290,6 +290,14 @@
end+=len;
return;
}
  +
  +// Optimize on a common case.
  +// If the source is going to fill up all the space in buffer, may
  +// as well write it directly to the output, and avoid an extra copy
  +if ( len == limit  end == 0) {
  +out.realWriteChars( src, off, len );
  +return;
  +}

// if we have limit and we're below
if( len = limit - end ) {
  @@ -487,7 +495,7 @@
   
// limit  buf.length ( the buffer is already big )
// or we already have space XXX
  - if( desiredSize  buff.length ) {
  + if( desiredSize = buff.length ) {
return;
}
// grow in larger chunks
  
  
  

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



Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf CharChunk.java

2003-10-16 Thread Bill Barker
   +
   +// Optimize on a common case.
   +// If the source is going to fill up all the space in buffer,
may
   +// as well write it directly to the output, and avoid an extra
copy
   +if ( len == limit  end == 0) {
   +out.realWriteChars( src, off, len );
   +return;
   +}

It should be end == start (although start == 0 is the most common case).



This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication in 
error, please notify us immediately by e-mail and then delete all copies of this 
message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through the 
Internet is not secure. Do not send confidential or sensitive information, such as 
social security numbers, account numbers, personal identification numbers and 
passwords, to us via ordinary (unencrypted) e-mail.

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

DO NOT REPLY [Bug 23880] New: - ANT_HOME should not include /bin in JSPC docs

2003-10-16 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23880.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23880

ANT_HOME should not include /bin in JSPC docs

   Summary: ANT_HOME should not include /bin in JSPC docs
   Product: Tomcat 4
   Version: 4.1.27
  Platform: All
   URL: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-
howto.html#Production%20Configuration
OS/Version: All
Status: NEW
  Severity: Minor
  Priority: Other
 Component: Jasper 2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Only a minor issue, but $ANT_HOME would not normally include the /bin 
component of the path, so the following line (as suggested in the howto for 
precompiling JSPs) is slightly incorrect:

$ANT_HOME/ant -Dtomcat.home=$TOMCAT_HOME -Dwebapp.path=$WEBAPP_PATH

This should probably be

$ANT_HOME/bin/ant -Dtomcat.home=$TOMCAT_HOME -Dwebapp.path=$WEBAPP_PATH

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



RE: SESSION REPLICATION: RedHat 9 and Sun JDK 1.4.2 do not like t o play

2003-10-16 Thread Euan Guttridge
FYI regarding using IBM JDK on RH9 - we also experienced core dumps and had
to roll back to SUN.. The RH9 release notes state that the IBM JDK has
'problems' with RH9 'NPTL' which is on by default but can easily be *turned
off*..

http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/release-notes/x86/ 
- search for NPTL



Thanks
Euan



-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: 16 October 2003 03:04
To: Tomcat-User
Cc: Tomcat-Dev
Subject: SESSION REPLICATION: RedHat 9 and Sun JDK 1.4.2 do not like to play
Importance: High


All,
I have an announcement to make since myself and some colleagues found during
some serious debugging on why session replication failed miserably on their
systems.

When running session replication for Tomcat 4.1.24
(http://cvs.apache.org/~fhanik/) on Redhat 9 using Sun JDK 1.4.2 nothing
works for me at home during my regression testing. As soon as I switch to
IBM JDK 1.4.1 everything goes back to normal. The problem is that with the
Sun JDK the Socket.getOutputStream().write() hangs and locks forever.

I will add this to the Cluster FAQ for Tomcat 5. If you have any questions

Important Note: Although I switched to IBM JDK 1.4.1 I did experience one
core dump with the JDK, so at this point, I would not recommend anyone using
RedHat 9 when running tomcat and session replication.

For those of you who have tried other platforms,versions OS:s, let us know
your experience

Filip


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

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