Re: Dynamic updates and Apache v2.0

2004-07-30 Thread Costin Manolache
Graham Leggett wrote:
Costin Manolache wrote:
Hard == replicating the configuration data to all the nodes, instead 
of having it in a central place ( file or a config server ). Not 
impossible, but it's a different problem, and not very commonly used
Ldap, nis, ldap and most other config servers are using the later.

The admin might choose to populate the server list on just the seed 
tomcat server, instead of all the tomcat servers. proxy_ajp would have 
to handle this situation.

Or tomcat might use the session sharing mechanism to spread the info on 
all the servers in the pool.

The idea is to use knowledge where we already have it - for example, if 
we're sharing sessions between servers, that mechanism already has the 
list of servers in the cluster, so we're using info we already have. 
We're also not expecting the admin to give us info we can work out by 
ourselves if it can be avoided, thus adding to the admin's workload.
I agree. When a new server is added to the pool, the admin should only 
have to configure the new server - and it should be able to register 
itself with the seed or master config.

BTW, there are quite a few protocols related with discovery ( zeroconf, 
etc ), but I'm not sure people would be comfortable with this as a default.


In the ideal case, 95% of users should just be able to do this:
ProxyPass /myWebapp ajp://cluster-seed/myWebapp
And the cluster should be autodetected and handled for the admin.
Ok. ( with 2-3 comma separated seed servers ? )
Costin

Regards,
Graham
--

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


Re: [5.next] Refactoring save-to-XML

2004-07-30 Thread Costin Manolache
Remy Maucherat wrote:
Costin Manolache wrote:
The major problem is intercepting the changes. It can be done:
- inside the jmx impl ( interceptors, etc )
- using the property changed events
- by wrapping each mbean when it is registered.
One important question is if we need to save server.xml, or
just say that server.xml is for legacy manual config, and use a 
different jmx-oriented format for settings.

Another radical approach is to  use java settings api for 
storing/retrieving the settings - again, deprecate server.xml and you 
also need to intercept settings from jmx.

So after thinking about it quite a bit this evening, I'm leaning towards 
DOM + using the property changed events. Obviously this will add a bit 
to the development time (good thing I didn't propose any release plan 
yet), as a replacement for digester is needed, the serializer (Xerces 
used to have one we could steal) as well, and the logic to keep the DOM 
tree and the Catalina objects in sync.
We still have the problem of getting changes from JMX ( made via console 
) into the config. Property change events are ok, but it means all
plugins will be required to support them.

To be honest, I was hoping server.xml will disapear. Tomcat is now very 
JMX based, it is easily integrable into a lot of apps, it is used in 
large sites.  I don't think server.xml is the right choice for long term.

What we need IMO is to separate the setting storage ( including 
updates). If tomcat is embedded in jboss, it should use jboss config 
style. It should also be able to use LDAP, NDS, win registry ( via 
java.prefs ) or any other config storage.
All we really need is a list of mbeans and some attributes for each.

Costin

Thanks for the comments from everyone about various technologies, but 
the big problem right now is that the save-to-xml really messes up the 
XML configuration,so that people won't want to edit it manually ever 
again once they start using the admin webapp (and then we know what 
happens, there's a limitation/bug in the tool, and the user is stuck - 
it's the M$ syndrome). DOM seems the only thing which keeps everything 
(of course, it's the reason why it's slow, bloated and everyone hates it 
;) ).

I'll keep on using the repackaged digester for web.xml parsing unless 
someone has a better idea.

Rémy

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


cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp.h

2004-07-30 Thread mturk
mturk   2004/07/29 23:27:09

  Modified:ajp/ajplib/test ajp.h
  Log:
  Add prototypes for read_header and peek_byte.
  
  Revision  ChangesPath
  1.16  +21 -1 jakarta-tomcat-connectors/ajp/ajplib/test/ajp.h
  
  Index: ajp.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ajp.h 29 Jul 2004 08:04:49 -  1.15
  +++ ajp.h 30 Jul 2004 06:27:09 -  1.16
  @@ -250,6 +250,16 @@
   apr_status_t ajp_msg_get_byte(ajp_msg_t *msg, apr_byte_t *rvalue);
   
   /**
  + * Peek a 8bits unsigned value from AJP Message, position in message
  + * is not updated
  + *
  + * @param msg   AJP Message to get value from
  + * @param rvaluePointer where value will be returned
  + * @return  APR_SUCCESS or error
  + */
  +apr_status_t ajp_msg_peek_byte(ajp_msg_t *msg, apr_byte_t *rvalue);
  +
  +/**
* Get a String value from AJP Message
*
* @param msg   AJP Message to get value from
  @@ -330,7 +340,7 @@
*/
   apr_status_t ajp_ilink_receive(apr_socket_t *sock, ajp_msg_t *msg);
   
  -/*
  +/**
* Build the ajp header message and send it
* @param sock  backend socket
* @param r current request
  @@ -338,6 +348,16 @@
*/
   apr_status_t ajp_send_header(apr_socket_t *sock, request_rec  *r);
   
  +/**
  + * Read the ajp message and return the type of the message.
  + * @param sock  backend socket
  + * @param r current request
  + * @param data  return data
  + * @return  APR_SUCCESS or error
  + */
  +apr_status_t ajp_read_header(apr_socket_t *sock,
  + request_rec  *r,
  + void **data);
   
   #endif /* AJP_H */
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c

2004-07-30 Thread mturk
mturk   2004/07/29 23:27:57

  Modified:ajp/ajplib/test ajp_header.c
  Log:
  cast msg-buf cause it is unsigned char.
  
  Revision  ChangesPath
  1.14  +8 -4  jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c
  
  Index: ajp_header.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ajp_header.c  29 Jul 2004 15:04:20 -  1.13
  +++ ajp_header.c  30 Jul 2004 06:27:57 -  1.14
  @@ -733,8 +733,8 @@
* Read the ajp message and return the type of the message.
*/
   apr_status_t ajp_read_header(apr_socket_t *sock,
  -  request_rec  *r,
  -  void **data)
  + request_rec  *r,
  + void **data)
   {
   apr_byte_t result;
   ajp_msg_t *msg;
  @@ -759,6 +759,7 @@
   *data = msg;
   return APR_SUCCESS;
   }
  +
   /* parse the msg to read the type */
   int ajp_parse_type(request_rec  *r, void *data)
   {
  @@ -770,6 +771,7 @@
  ajp_parse_type: got %02x, result);
   return (int) result;
   }
  +
   /* parse the headers */
   apr_status_t ajp_parse_headers(request_rec  *r, void *data)
   {
  @@ -791,8 +793,10 @@
   }
   return ajp_unmarshal_response(msg, r);
   }
  +
   /* parse the header and return data address and length */
  -apr_status_t  ajp_parse_data(request_rec  *r, void *data, apr_uint16_t *len, char 
**ptr)
  +apr_status_t  ajp_parse_data(request_rec  *r, void *data, apr_uint16_t *len,
  + char **ptr)
   {
   ajp_msg_t *msg;
   apr_byte_t result;
  @@ -814,6 +818,6 @@
   if (rc != APR_SUCCESS) {
   return APR_EGENERAL;
   }
  -*ptr = (msg-buf[msg-pos]);
  +*ptr = (char *)(msg-buf[msg-pos]);
   return APR_SUCCESS;
   }
  
  
  

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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c ajp.h

2004-07-30 Thread mturk
mturk   2004/07/29 23:32:54

  Modified:ajp/ajplib/test ajp_header.c ajp.h
  Log:
  Change the casting from void* to msg*. We don't need that, cause
  the ajp_msg_t is public.
  
  Revision  ChangesPath
  1.15  +8 -16 jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c
  
  Index: ajp_header.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ajp_header.c  30 Jul 2004 06:27:57 -  1.14
  +++ ajp_header.c  30 Jul 2004 06:32:54 -  1.15
  @@ -734,38 +734,34 @@
*/
   apr_status_t ajp_read_header(apr_socket_t *sock,
request_rec  *r,
  - void **data)
  + ajp_msg_t **msg)
   {
   apr_byte_t result;
  -ajp_msg_t *msg;
   apr_status_t rc;
   
  -rc = ajp_msg_create(r-pool, msg);
  +rc = ajp_msg_create(r-pool, msg);
   if (rc != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  ajp_read_header: ajp_msg_create failed);
   return rc;
   }
  -ajp_msg_reset(msg);
  -rc = ajp_ilink_receive(sock, msg);
  +ajp_msg_reset(*msg);
  +rc = ajp_ilink_receive(sock, *msg);
   if (rc != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  ajp_read_header: ajp_ilink_receive failed);
   return rc;
   }
  -rc = ajp_msg_peek_byte(msg, result);
  +rc = ajp_msg_peek_byte(*msg, result);
   ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  ajp_read_header: ajp_ilink_received %02x, result);
  -*data = msg;
   return APR_SUCCESS;
   }
   
   /* parse the msg to read the type */
  -int ajp_parse_type(request_rec  *r, void *data)
  +int ajp_parse_type(request_rec  *r, ajp_msg_t *msg)
   {
   apr_byte_t result;
  -ajp_msg_t *msg;
  -msg = (ajp_msg_t *)data;
   ajp_msg_peek_byte(msg, result);
   ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  ajp_parse_type: got %02x, result);
  @@ -773,13 +769,11 @@
   }
   
   /* parse the headers */
  -apr_status_t ajp_parse_headers(request_rec  *r, void *data)
  +apr_status_t ajp_parse_headers(request_rec  *r, ajp_msg_t *msg)
   {
  -ajp_msg_t *msg;
   apr_byte_t result;
   apr_status_t rc;
   
  -msg = (ajp_msg_t *)data;
   rc = ajp_msg_get_byte(msg, result);
   if (rc != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  @@ -795,14 +789,12 @@
   }
   
   /* parse the header and return data address and length */
  -apr_status_t  ajp_parse_data(request_rec  *r, void *data, apr_uint16_t *len,
  +apr_status_t  ajp_parse_data(request_rec  *r, ajp_msg_t *msg, apr_uint16_t *len,
char **ptr)
   {
  -ajp_msg_t *msg;
   apr_byte_t result;
   apr_status_t rc;
   
  -msg = (ajp_msg_t *)data;
   rc = ajp_msg_get_byte(msg, result);
   if (rc != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  
  
  
  1.17  +2 -2  jakarta-tomcat-connectors/ajp/ajplib/test/ajp.h
  
  Index: ajp.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ajp.h 30 Jul 2004 06:27:09 -  1.16
  +++ ajp.h 30 Jul 2004 06:32:54 -  1.17
  @@ -352,12 +352,12 @@
* Read the ajp message and return the type of the message.
* @param sock  backend socket
* @param r current request
  - * @param data  return data
  + * @param msg   returned AJP message
* @return  APR_SUCCESS or error
*/
   apr_status_t ajp_read_header(apr_socket_t *sock,
request_rec  *r,
  - void **data);
  + void **msg);
   
   #endif /* AJP_H */
   
  
  
  

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



Re: cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_ajp.c

2004-07-30 Thread jean-frederic clere
Graham Leggett wrote:
[EMAIL PROTECTED] wrote:
  First try to get proxy using ajp (Note that is for httpd-2.1).

Couple of comments (realising this is first try code):
  /*
   * Canonicalise http-like URLs.
   *  scheme is the scheme for the URL
   *  urlis the URL starting with the first '/'
   *  def_port is the default port for this scheme.
   */
  int ap_proxy_ajp_canon(request_rec *r, char *url)
^^
As I understand it, the canonicalisation step should only try touch 
ajp:// URLs (I am assuming that proxy_ajp will serve URLs with a scheme 
of ajp: - is that correct?
That is correct.

  {
  char *host, *path, *search, sport[7];
  const char *err;
  const char *scheme;
  apr_port_t port, def_port;
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
   proxy: HTTP: canonicalising URL %s, url);
 
Log messages should all say proxy: AJP throughtout.
Of course ;-)
Regards,
Graham
--

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


cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardContext.java

2004-07-30 Thread remm
remm2004/07/30 00:32:36

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - Add two missing events.
  
  Revision  ChangesPath
  1.139 +4 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.138
  retrieving revision 1.139
  diff -u -r1.138 -r1.139
  --- StandardContext.java  29 Jul 2004 15:33:38 -  1.138
  +++ StandardContext.java  30 Jul 2004 07:32:36 -  1.139
  @@ -2262,6 +2262,7 @@
   results[watchedResources.length] = name;
   watchedResources = results;
   }
  +fireContainerEvent(addWatchedResource, name);
   
   }
   
  @@ -3335,6 +3336,8 @@
   watchedResources = results;
   
   }
  +
  +fireContainerEvent(removeWatchedResource, name);
   
   }
   
  
  
  

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



Re: cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c ajp.h

2004-07-30 Thread jean-frederic clere
[EMAIL PROTECTED] wrote:
mturk   2004/07/29 23:32:54
  Modified:ajp/ajplib/test ajp_header.c ajp.h
  Log:
  Change the casting from void* to msg*. We don't need that, cause
  the ajp_msg_t is public.
The ideas was to prevent including of ajp.h in proxy_ajp.c
Now ajp_header.c doesn't compile:
+++
ajp_header.c:738: error: conflicting types for `ajp_read_header'
ajp.h:360: error: previous declaration of `ajp_read_header'
make: *** [ajp_header.lo] Error 1
+++
Cheers
Jean-Frederic
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [5.next] Refactoring save-to-XML

2004-07-30 Thread Remy Maucherat
Costin Manolache wrote:
Remy Maucherat wrote:
Costin Manolache wrote:
The major problem is intercepting the changes. It can be done:
- inside the jmx impl ( interceptors, etc )
- using the property changed events
- by wrapping each mbean when it is registered.
One important question is if we need to save server.xml, or
just say that server.xml is for legacy manual config, and use a 
different jmx-oriented format for settings.

Another radical approach is to  use java settings api for 
storing/retrieving the settings - again, deprecate server.xml and 
you also need to intercept settings from jmx.

So after thinking about it quite a bit this evening, I'm leaning 
towards DOM + using the property changed events. Obviously this will 
add a bit to the development time (good thing I didn't propose any 
release plan yet), as a replacement for digester is needed, the 
serializer (Xerces used to have one we could steal) as well, and the 
logic to keep the DOM tree and the Catalina objects in sync.

We still have the problem of getting changes from JMX ( made via 
console ) into the config. Property change events are ok, but it means 
all
plugins will be required to support them.

To be honest, I was hoping server.xml will disapear. Tomcat is now 
very JMX based, it is easily integrable into a lot of apps, it is used 
in large sites.  I don't think server.xml is the right choice for long 
term.

What we need IMO is to separate the setting storage ( including 
updates). If tomcat is embedded in jboss, it should use jboss config 
style. It should also be able to use LDAP, NDS, win registry ( via 
java.prefs ) or any other config storage.
All we really need is a list of mbeans and some attributes for each.
Ah, ok. I thought you were ok with the DOM/server.xml solution. You 
mention technical problems, but there are none: container events will 
also need to be used.

I think a JMX based config file would be more complex than server.xml to 
manipulate for end users (more verbose, even less error checking, 
because we won't be able to come up with a DTD or schema even if we 
wanted to, and finally it doesn't represent the actual server 
structure). So that's a number of problems as far as I'm concerned.
A resource abstraction is quite complex as well (either it's XML or it's 
not ;) ), and I'm not going to do it. If you want some scheme where 
Tomcat gets its XML config files from somewhere on startup, then I'm ok 
with someone adding that.

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


Patricio Brain está ausente de la oficina.

2004-07-30 Thread PBrain
Estaré ausente de la oficina desde el  28-07-2004 y no volveré hasta el
02-08-2004.

Dear Sir,

I will out of office since July 28 until  Augost 02 of 2004
Please, contact with Mr. Mario Valderrama ( [EMAIL PROTECTED])



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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



DO NOT REPLY [Bug 30404] New: - default charset for conten-type header

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

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

default charset for conten-type header

   Summary: default charset for conten-type header
   Product: Tomcat 4
   Version: 4.1.29
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Connector:Coyote HTTP/1.1
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hello,

In our web-app that runs with Tomcat 4.1.29 we set the content-type 
to text/xml in a servlet that serves an XML file. The XML encoding normally 
is UTF-8. We observed that special characters show up wrong in the browser. 
Packet sniffing showed that Tomcat changed the content-type 
to text/xml;charset=ISO-8859-1 which was not the case with 
earlier Tomcat versions.

I looked up the bug database and the mailing list for this behaviour and read 
that Tomcat does this for alle text/* content types where the charset is 
mising.

To fix this I can change the mime-type-definition in web.xml to 
text/xml;charset=UTF-8 or add this in my servlet. But If my servlet has to 
serve ISO-8859-1 XML files that would be also wrong. Should I parse the 
resource prior to serving it in order to determine the encoding?

I cannot find the strong requirement to add the default charset in the HTTP 
spec. I read a discussion in the list that the JSP spec requires it - but also 
for a servlet? 
I think the charset is added by the Coyote connector so from the connector's 
point of view servlets and JSP-servlets are the same.

Doesn't it make sense to omit the default charset for XML files because XML 
files normally should carry their encoding in the header? Then the browser 
could get the encoding from there as it was done with earlier Tomcat versions.

Michael

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



Illegal IMail List Server Command!

2004-07-30 Thread List Server
IMail List Server for Windows NT, Ipswitch, Inc. 


   Valid Commands are:

   To subscribe to a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   subscribe listname your_full_name

   To unsubscribe from a list, send a mail message to imailsrv at
   this address with the following in the body of the message:

   unsubscribe listname

   To receive a list of the lists supported here:

   list

   To receive a list of users on a given list
   (If enabled for that particular list):

   list listname

   To receive help send:

   help [listname]

   To change to digest mode, send a mail message to imailsrv at
   this address with the following in the body of the message:

   set mode digest listname

   To change back to standard mode, send a mail message to imailsrv at
   this address with the following in the body of the 

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



RE: cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c ajp.h

2004-07-30 Thread Mladen Turk
 

 -Original Message-
 From: jean-frederic clere 
 
 The ideas was to prevent including of ajp.h in proxy_ajp.c 
 Now ajp_header.c doesn't compile:


But the ajp.h is a public API for libajp, so, it should be included in any
project using it.
It has defined 

MT.


smime.p7s
Description: S/MIME cryptographic signature


cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test httpd_wrap.h httpd_wrap.c

2004-07-30 Thread mturk
mturk   2004/07/30 01:26:37

  Modified:ajp/ajplib/test httpd_wrap.h httpd_wrap.c
  Log:
  Added client_block functions for reading post data.
  
  Revision  ChangesPath
  1.7   +59 -1 jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.h
  
  Index: httpd_wrap.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- httpd_wrap.h  29 Jul 2004 06:52:32 -  1.6
  +++ httpd_wrap.h  30 Jul 2004 08:26:37 -  1.7
  @@ -337,6 +337,11 @@
   /** The handler string that we use to call a handler function */
   const char *handler;/* What we *really* dispatch on */
   
  +/** Remaining bytes left to read from the request body */
  +apr_off_t remaining;
  +/** Number of bytes that have been read  from the request body */
  +apr_off_t read_length;
  +
   /** How to encode the data */
   const char *content_encoding;
   /** Array of strings representing the content languages */
  @@ -366,7 +371,7 @@
   void *per_dir_config;
   /** Notes on *this* request */
   void *request_config;
  - 
  + 
   };
   
   /** Structure to store things which are per connection */
  @@ -402,6 +407,8 @@
   void *sbh; 
   /** The bucket allocator to use for all bucket/brigade creations */
   struct apr_bucket_alloc_t *bucket_alloc;
  +/** This doesn't exists in the original, but it is here to simulate the network 
*/
  +apr_bucket_brigade *bb;
   };
   
   /** A structure to be used for Per-vhost config */
  @@ -621,6 +628,57 @@
*/
   AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int 
type, int *str_is_ip);
   
  +/* Reading a block of data from the client connection (e.g., POST arg) */
  +
  +/**
  + * Setup the client to allow Apache to read the request body.
  + * @param r The current request
  + * @param read_policy How the server should interpret a chunked 
  + *transfer-encoding.  One of: pre
  + *REQUEST_NO_BODY  Send 413 error if message has any body
  + *REQUEST_CHUNKED_ERRORSend 411 error if body without Content-Length
  + *REQUEST_CHUNKED_DECHUNK  If chunked, remove the chunks for me.
  + * /pre
  + * @return either OK or an error code
  + * @deffunc int ap_setup_client_block(request_rec *r, int read_policy)
  + */
  +AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy);
  +
  +/**
  + * Determine if the client has sent any data.  This also sends a 
  + * 100 Continue response to HTTP/1.1 clients, so modules should not be called
  + * until the module is ready to read content.
  + * @warning Never call this function more than once.
  + * @param r The current request
  + * @return 0 if there is no message to read, 1 otherwise
  + * @deffunc int ap_should_client_block(request_rec *r)
  + */
  +AP_DECLARE(int) ap_should_client_block(request_rec *r);
  +
  +/**
  + * Call this in a loop.  It will put data into a buffer and return the length
  + * of the input block
  + * @param r The current request
  + * @param buffer The buffer in which to store the data
  + * @param bufsiz The size of the buffer
  + * @return Number of bytes inserted into the buffer.  When done reading, 0
  + * if EOF, or -1 if there was an error
  + * @deffunc long ap_get_client_block(request_rec *r, char *buffer, apr_size_t 
bufsiz)
  + */
  +AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t 
bufsiz);
  +
  +/**
  + * In HTTP/1.1, any method can have a body.  However, most GET handlers
  + * wouldn't know what to do with a request body if they received one.
  + * This helper routine tests for and reads any message body in the request,
  + * simply discarding whatever it receives.  We need to do this because
  + * failing to read the request body would cause it to be interpreted
  + * as the next request on a persistent connection.
  + * @param r The current request
  + * @return error status if request is malformed, OK otherwise 
  + * @deffunc int ap_discard_request_body(request_rec *r)
  + */
  +AP_DECLARE(int) ap_discard_request_body(request_rec *r);
   
   /**
* create the request_rec structure from fake client connection 
  
  
  
  1.9   +69 -2 jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.c
  
  Index: httpd_wrap.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- httpd_wrap.c  29 Jul 2004 06:52:32 -  1.8
  +++ httpd_wrap.c  30 Jul 2004 08:26:37 -  1.9
  @@ -555,7 +555,74 @@
   apr_table_addn(r-headers_in, Accept-Charset, iso-8859-2);
   apr_table_addn(r-headers_in, Accept-Language, hr);
   
  -/* 

Re: Dynamic updates and Apache v2.0

2004-07-30 Thread Henri Gomez
Costin Manolache wrote:
Graham Leggett wrote:
Costin Manolache wrote:
Hard == replicating the configuration data to all the nodes, instead 
of having it in a central place ( file or a config server ). Not 
impossible, but it's a different problem, and not very commonly used
Ldap, nis, ldap and most other config servers are using the later.

The admin might choose to populate the server list on just the seed 
tomcat server, instead of all the tomcat servers. proxy_ajp would have 
to handle this situation.

Or tomcat might use the session sharing mechanism to spread the info 
on all the servers in the pool.

The idea is to use knowledge where we already have it - for example, 
if we're sharing sessions between servers, that mechanism already has 
the list of servers in the cluster, so we're using info we already 
have. We're also not expecting the admin to give us info we can work 
out by ourselves if it can be avoided, thus adding to the admin's 
workload.

I agree. When a new server is added to the pool, the admin should only 
have to configure the new server - and it should be able to register 
itself with the seed or master config.
+1 :-)
BTW, there are quite a few protocols related with discovery ( zeroconf, 
etc ), but I'm not sure people would be comfortable with this as a default.


In the ideal case, 95% of users should just be able to do this:
ProxyPass /myWebapp ajp://cluster-seed/myWebapp
And the cluster should be autodetected and handled for the admin.

Ok. ( with 2-3 comma separated seed servers ? )
Graham suggested something like this :
ProxyPass /myWebapp ajp://cluster-seed/myWebapp 
ajp://cluster-seed2/myWebapp ajp://cluster-seed3/myWebapp

So we're in a situation where the URI mapping is hardcoded in httpd.conf
but where the pool tomcat to handle such mapping could be updated 
dynamically ?

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


cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test testajp.c

2004-07-30 Thread mturk
mturk   2004/07/30 01:53:32

  Modified:ajp/ajplib/test testajp.c
  Log:
  Added simple post data and read_header.
  What we need is function to send the post data to the backend.
  
  Revision  ChangesPath
  1.7   +17 -4 jakarta-tomcat-connectors/ajp/ajplib/test/testajp.c
  
  Index: testajp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/testajp.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- testajp.c 29 Jul 2004 08:12:57 -  1.6
  +++ testajp.c 30 Jul 2004 08:53:31 -  1.7
  @@ -39,6 +39,12 @@
   #include arpa/inet.h
   #endif
   
  +#define TEST_POST_DATA This document is a proposal of evolution of the current  \
  +   Apache JServ Protocol version 1.3, also known as ajp13.  \
  +   I'll not cover here the full protocol but only the add-on 
from ajp13.  \
  +   This nth pass include comments from the tomcat-dev list and 
 \
  +   misses discovered during developpment.
  +
   #define TEST_CASE_URL http://localhost/servlets-examples/HelloWorldExample;
   
   /* Main process */
  @@ -78,7 +84,6 @@
   return APR_SUCCESS;
   }
   
  -
   #if APR_HAS_THREADS
   
   #define TEST_THREAD_COUNT   10
  @@ -157,6 +162,7 @@
   conn_rec *c, *con;
   request_rec *r;
   apr_socket_t *sock;
  +ajp_msg_t *msg;
   
   apr_app_initialize(argc, argv, env);
   
  @@ -186,7 +192,9 @@
   
   /* 0. Fill in the request data  */
   if (ap_wrap_make_request(r, TEST_CASE_URL,
  - NULL, NULL, NULL, 0, NULL) != APR_SUCCESS) {
  + POST, NULL, NULL,
  + 0,
  + NULL) != APR_SUCCESS) {
   goto finished;
   }
   /*
  @@ -198,20 +206,25 @@
   /* 1. Obtain a connection to backend*/
   if ((rc = connect_to_backend(sock, con, 127.0.0.1, 8009,
   main_server, r-pool)) != APR_SUCCESS) {
  -ap_log_error(APLOG_MARK, APLOG_INFO, rc, NULL, connect_to_backend);
  +ap_log_error(APLOG_MARK, APLOG_ERR, rc, NULL, connect_to_backend);
   rv = -1;
   goto finished;
   }
   
   /* 2. Create AJP message*/
   if ((rc = ajp_send_header(sock, r)) != APR_SUCCESS) {
  -ap_log_error(APLOG_MARK, APLOG_INFO, rc, NULL, ajp_send_header);
  +ap_log_error(APLOG_MARK, APLOG_ERR, rc, NULL, ajp_send_header);
   rv = -1;
   goto finished;
   }
   /* 3. Send AJP message  */
   
   /* 4. Read AJP response */
  +if ((rc = ajp_read_header(sock, r, msg)) != APR_SUCCESS) {
  +ap_log_error(APLOG_MARK, APLOG_ERR, rc, NULL, ajp_read_header);
  +rv = -1;
  +goto finished;
  +}
   
   /* 5. Display results   */
   
  
  
  

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



DO NOT REPLY [Bug 30362] - Tomcat eats up file handers

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

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

Tomcat eats up file handers





--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 08:55 ---
Thanks for the lsof hint. 
I analyzed the situation on a different machine and first thing was really the 
huge amount of open files from Tomcat uses. This must have been an issue 
already in the past, cause I found the comment:
// Close all JARs right away to avoid always opening a peak number 
// of files on startup
if (getLoader() instanceof WebappLoader) {
((WebappLoader) getLoader()).closeJARs(true);
}
(StandardContext.java). Nevertheless this seems to be the only point where open 
jar-files are closed, later on they might reopened and onle be closed if a 
webapp will stop() (btw: there the try-catch is inside the for-loop). On the 
machine we have normally 7 Webapps and 1763 open handles reported by lsof to 
jar files. The same jar files are opened up to 40 times according to lsof, 
sorry to say so, but I don't think this is necessary and is messing up with 
system resources. On the test machine we often deploy new versions and then we 
come to the ulimit limits sometimes (also sometimes we see a Failed to close 
JAR error, which leads to additional unclosed and forgotten jars).
I would like to make a patch which will do two things:
- reduce the amount of open handles to same file, by using a global jar-file 
cache such that jar-fiels with same path are opened only once.
- restrict the number of parallel open handles by using an LRU-Cache for the 
global cache (e.g. hard limit to 500).
Since this might affect design issues, I would like to get a comment about 
this, before start programming it.

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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp.h

2004-07-30 Thread mturk
mturk   2004/07/30 01:59:53

  Modified:ajp/ajplib/test ajp.h
  Log:
  Added ajp_msg_dump proto.
  
  Revision  ChangesPath
  1.18  +9 -0  jakarta-tomcat-connectors/ajp/ajplib/test/ajp.h
  
  Index: ajp.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp.h,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ajp.h 30 Jul 2004 06:32:54 -  1.17
  +++ ajp.h 30 Jul 2004 08:59:53 -  1.18
  @@ -322,6 +322,15 @@
*/
   apr_status_t ajp_msg_serialize_cping(ajp_msg_t *msg);
   
  +/**
  + * Dump up to the first 1024 bytes on an AJP Message
  + *
  + * @param msg   AJP Message to dump
  + * @param err   error string to display
  + * @return  APR_SUCCESS or error
  + */
  +apr_status_t ajp_msg_dump(ajp_msg_t *msg, char *err);
  +
   /** 
* Send an AJP message to backend
*
  
  
  

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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test testajp.c

2004-07-30 Thread mturk
mturk   2004/07/30 02:00:22

  Modified:ajp/ajplib/test testajp.c
  Log:
  Dump the message after receiving.
  
  Revision  ChangesPath
  1.8   +1 -0  jakarta-tomcat-connectors/ajp/ajplib/test/testajp.c
  
  Index: testajp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/testajp.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- testajp.c 30 Jul 2004 08:53:31 -  1.7
  +++ testajp.c 30 Jul 2004 09:00:22 -  1.8
  @@ -228,6 +228,7 @@
   
   /* 5. Display results   */
   
  +ajp_msg_dump(msg, );
   /* 6. Release the connection*/
   
   
  
  
  

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



DO NOT REPLY [Bug 30362] - Tomcat eats up file handers

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

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

Tomcat eats up file handers





--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 09:12 ---
This makes little sense to me so far, sorry.
About the comment, your conslusion is wrong. About never closing JARs: look closer.
Don't implement waht wou propose, I would refuse it. There's no need for a
global structure, because one JAR belongs to a classloader, which is unique
for a given webapp. When the classloader is stopped, the JARs are closed. Where
is that resource leak that nobody else is seeing ?

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



Re: cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c ajp.h

2004-07-30 Thread jean-frederic clere
Mladen Turk wrote:
 


-Original Message-
From: jean-frederic clere 

The ideas was to prevent including of ajp.h in proxy_ajp.c 
Now ajp_header.c doesn't compile:

But the ajp.h is a public API for libajp, so, it should be included in any
project using it.
It has defined 
OK but I want to keep the AJP things as headen as possible in the proxy_ajp.c so 
 we need another include.

MT.

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


cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test httpd_wrap.c

2004-07-30 Thread mturk
mturk   2004/07/30 02:44:16

  Modified:ajp/ajplib/test httpd_wrap.c
  Log:
  Typo.
  
  Revision  ChangesPath
  1.10  +1 -1  jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.c
  
  Index: httpd_wrap.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- httpd_wrap.c  30 Jul 2004 08:26:37 -  1.9
  +++ httpd_wrap.c  30 Jul 2004 09:44:15 -  1.10
  @@ -509,7 +509,7 @@
   }
   if (!method)
   method = GET;
  -if ((r-method_number == lookup_builtin_method(method, strlen(method))) ==
  +if ((r-method_number = lookup_builtin_method(method, strlen(method))) ==
   UNKNOWN_METHOD) {
   ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, Unknown HTTP metdod %s,
 method);
  
  
  

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



RE: cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c ajp.h

2004-07-30 Thread Mladen Turk
 

jean-frederic clere wrote: 
  
  But the ajp.h is a public API for libajp, so, it should be 
 included in 
  any project using it.
  It has defined
 
 OK but I want to keep the AJP things as headen as possible in 
 the proxy_ajp.c so
   we need another include.


Sure thing.
Only the ajp.h will be needed.

MT.


smime.p7s
Description: S/MIME cryptographic signature


cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c

2004-07-30 Thread jfclere
jfclere 2004/07/30 02:50:00

  Modified:ajp/ajplib/test ajp_header.c
  Log:
  Arrange small things and temporaly modify ajp_read_header().
  
  Revision  ChangesPath
  1.16  +21 -10jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c
  
  Index: ajp_header.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ajp_header.c  30 Jul 2004 06:32:54 -  1.15
  +++ ajp_header.c  30 Jul 2004 09:50:00 -  1.16
  @@ -34,6 +34,7 @@
   static const char *long_res_header_for_sc(int sc) 
   {
   const char *rc = NULL;
  +sc = sc  0X00FF;
   if(sc = SC_RES_HEADERS_NUM  sc  0) {
   rc = response_trans_headers[sc - 1];
   }
  @@ -503,7 +504,7 @@
   ajp_msg_append_string(msg, s-ssl_cert)) {
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  Error ajp_marshal_into_msgb - 
  -   Error appending the SSL certificates\n);
  +   Error appending the SSL certificates);
   return APR_EGENERAL;
   }
   }
  @@ -619,7 +620,7 @@
   
   rc = ajp_msg_get_string(msg, ptr);
   if (rc == APR_SUCCESS) {
  -r-status_line = apr_pstrdup(r-connection-pool, ptr);
  +r-status_line =  apr_psprintf(r-pool, %d %s, status, ptr);
   #if defined(AS400) || defined(_OSD_POSIX)
   ap_xlate_proto_from_ascii(r-status_line, strlen(r-status_line));
   #endif
  @@ -653,17 +654,16 @@
   
   if ((name  0XFF00) == 0XA000) {
   ajp_msg_peek_uint16(msg, name);
  -name = name  0X00FF;
  -if (name = SC_RES_HEADERS_NUM) {
  -stringname = (char *)long_res_header_for_sc(name);
  -} else {
  +stringname = (char *)long_res_header_for_sc(name);
  +if (stringname == NULL) {
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  Error ajp_unmarshal_response - 
  -   No such sc (%d),
  +   No such sc (%08x),
  name);
   return APR_EGENERAL;
   }
   } else {
  +name = 0;
   rc = ajp_msg_get_string(msg, stringname);
   if (rc != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  @@ -687,10 +687,19 @@
   #if defined(AS400) || defined(_OSD_POSIX)
   ap_xlate_proto_from_ascii(value, strlen(value));
   #endif
  -ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  -   ajp_unmarshal_response: Header[%d] [%s] = [%s]\n, 
  +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  +   ajp_unmarshal_response: Header[%d] [%s] = [%s], 
  i, stringname, value);
   apr_table_add(r-headers_out, stringname, value);
  +
  +/* Content-type needs an additional handling */
  +if (memcmp(stringname, Content-Type,12) == 0) {
  +char *ptr;
  +ptr = apr_pstrdup(r-pool, value);
  +ap_set_content_type(r, ptr); /* add corresponding filter */
  +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  +   ajp_unmarshal_response: ap_set_content_type done);
  +}
   }
   
   return APR_SUCCESS;
  @@ -734,11 +743,13 @@
*/
   apr_status_t ajp_read_header(apr_socket_t *sock,
request_rec  *r,
  - ajp_msg_t **msg)
  + void **data)
   {
   apr_byte_t result;
   apr_status_t rc;
  +ajp_msg_t **msg;
   
  +msg = data;
   rc = ajp_msg_create(r-pool, msg);
   if (rc != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  
  
  

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



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

2004-07-30 Thread remm
remm2004/07/30 02:43:32

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Move the try/catch IOE inside the loop, as suggested in bug 30362.
  
  Revision  ChangesPath
  1.41  +14 -14
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- WebappClassLoader.java26 Jul 2004 15:52:17 -  1.40
  +++ WebappClassLoader.java30 Jul 2004 09:43:32 -  1.41
  @@ -1512,21 +1512,21 @@
*/
   public void closeJARs(boolean force) {
   if (jarFiles.length  0) {
  -try {
   synchronized (jarFiles) {
   if (force || (System.currentTimeMillis() 
  (lastJarAccessed + 9))) {
   for (int i = 0; i  jarFiles.length; i++) {
  -if (jarFiles[i] != null) {
  -jarFiles[i].close();
  -jarFiles[i] = null;
  +try {
  + if (jarFiles[i] != null) {
  + jarFiles[i].close();
  + jarFiles[i] = null;
  + }
  +} catch (IOException e) {
  +log.warn(Failed to close JAR, e);
   }
   }
   }
   }
  -} catch (IOException e) {
  -log.warn(Failed to close JAR, e);
  -}
   }
   }
   
  @@ -1541,12 +1541,12 @@
   if (started  (jarFiles.length  0)) {
   lastJarAccessed = System.currentTimeMillis();
   if (jarFiles[0] == null) {
  -try {
  -for (int i = 0; i  jarFiles.length; i++) {
  -jarFiles[i] = new JarFile(jarRealFiles[i]);
  -}
  -} catch (IOException e) {
  -log.warn(Failed to open JAR, e);
  +for (int i = 0; i  jarFiles.length; i++) {
  + try {
  + jarFiles[i] = new JarFile(jarRealFiles[i]);
  + } catch (IOException e) {
  + log.warn(Failed to open JAR, e);
  + }
   }
   }
   }
  
  
  

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



DO NOT REPLY [Bug 30358] - Direct JNDI lookup java:comp/env/cfg/test fails

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

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

Direct JNDI lookup java:comp/env/cfg/test fails

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |



--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 10:12 ---
As a consequence, EJB lookups on Windows XP fail.
the code below throws a NameNotFoundException.

InitialContext initial = new InitialContext();
Context ejbCtx = (Context) initial.lookup(java:comp/env/ejb)

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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c

2004-07-30 Thread mturk
mturk   2004/07/30 03:16:30

  Modified:ajp/ajplib/test ajp_header.c
  Log:
  Few typos.
  
  Revision  ChangesPath
  1.17  +5 -5  jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c
  
  Index: ajp_header.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ajp_header.c  30 Jul 2004 09:50:00 -  1.16
  +++ ajp_header.c  30 Jul 2004 10:16:29 -  1.17
  @@ -240,9 +240,9 @@
   p += 6;
   if (memcmp(p, CHARSET, 7) == 0)
   return SC_ACCEPT_CHARSET;
  -else if (memcmp(p,  ENCODING, 8))
  +else if (memcmp(p,  ENCODING, 8) == 0)
   return SC_ACCEPT_ENCODING;
  -else if (memcmp(p, LANGUAGE, 8))
  +else if (memcmp(p, LANGUAGE, 8) == 0)
   return SC_ACCEPT_LANGUAGE;
   else
   return UNKNOWN_METHOD;
  @@ -260,9 +260,9 @@
   return SC_COOKIE;
   else if(memcmp(p, ONNECTION, 9) == 0)
   return SC_CONNECTION;
  -else if(memcmp(p, ONTENT_TYPE, 11) == 0)
  +else if(memcmp(p, ONTENT-TYPE, 11) == 0)
   return SC_CONTENT_TYPE;
  -else if(memcmp(p, ONTENT_LENGTH, 13) == 0)
  +else if(memcmp(p, ONTENT-LENGTH, 13) == 0)
   return SC_CONTENT_LENGTH;
   else if(memcmp(p, OOKIE2, 6) == 0)
   return SC_COOKIE2;
  @@ -288,7 +288,7 @@
   return UNKNOWN_METHOD;
   break;
   case 'U':
  -if(memcmp(p, SER_AGENT, 9) == 0)
  +if(memcmp(p, SER-AGENT, 9) == 0)
   return SC_USER_AGENT;
   else
   return UNKNOWN_METHOD;
  
  
  

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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test httpd_wrap.h httpd_wrap.c

2004-07-30 Thread mturk
mturk   2004/07/30 03:20:00

  Modified:ajp/ajplib/test httpd_wrap.h httpd_wrap.c
  Log:
  Added ap_set_content_type.
  
  Revision  ChangesPath
  1.8   +24 -0 jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.h
  
  Index: httpd_wrap.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- httpd_wrap.h  30 Jul 2004 08:26:37 -  1.7
  +++ httpd_wrap.h  30 Jul 2004 10:20:00 -  1.8
  @@ -250,6 +250,20 @@
   /** Minor part of HTTP protocol */
   #define HTTP_VERSION_MINOR(number) ((number)%1000)
   
  +/**
  + * @defgroup values_request_rec_body Possible values for request_rec.read_body 
  + * @{
  + * Possible values for request_rec.read_body (set by handling module):
  + */
  +
  +/** Send 413 error if message has any body */
  +#define REQUEST_NO_BODY  0
  +/** Send 411 error if body without Content-Length */
  +#define REQUEST_CHUNKED_ERROR1
  +/** If chunked, remove the chunks for me. */
  +#define REQUEST_CHUNKED_DECHUNK  2
  +/** @} */
  + 
   
   /* fake structure declarations */
   typedef struct process_rec  process_rec;
  @@ -679,6 +693,16 @@
* @deffunc int ap_discard_request_body(request_rec *r)
*/
   AP_DECLARE(int) ap_discard_request_body(request_rec *r);
  +
  +/**
  + * Set the content type for this request (r-content_type). 
  + * @param r The current request
  + * @param ct The new content type
  + * @deffunc void ap_set_content_type(request_rec *r, const char* ct)
  + * @warning This function must be called to set r-content_type in order 
  + * for the AddOutputFilterByType directive to work correctly.
  + */
  +AP_DECLARE(void) ap_set_content_type(request_rec *r, const char *ct);
   
   /**
* create the request_rec structure from fake client connection 
  
  
  
  1.11  +6 -0  jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.c
  
  Index: httpd_wrap.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- httpd_wrap.c  30 Jul 2004 09:44:15 -  1.10
  +++ httpd_wrap.c  30 Jul 2004 10:20:00 -  1.11
  @@ -318,6 +318,12 @@
   return r-server-server_hostname;
   } 
   
  +AP_DECLARE(void) ap_set_content_type(request_rec *r, const char *ct)
  +{
  +r-content_type = ct;
  +}
  +
  +
   #define UNKNOWN_METHOD (-1)
   
   static int lookup_builtin_method(const char *method, apr_size_t len)
  
  
  

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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c

2004-07-30 Thread jfclere
jfclere 2004/07/30 03:21:06

  Modified:ajp/ajplib/test ajp_header.c
  Log:
  Add a trace.
  
  Revision  ChangesPath
  1.18  +3 -0  jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c
  
  Index: ajp_header.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ajp_header.c  30 Jul 2004 10:16:29 -  1.17
  +++ ajp_header.c  30 Jul 2004 10:21:06 -  1.18
  @@ -447,6 +447,9 @@
  Error appending the header value);
   return APR_EGENERAL;
   }
  +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  +   ajp_marshal_into_msgb: Header[%d] [%s] = [%s],
  +   i, elts[i].key, elts[i].val);
   }
   
   /*  need to figure out how to do this
  
  
  

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



RE: cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c

2004-07-30 Thread Mladen Turk
 

[EMAIL PROTECTED] commited:
   Log:
   Arrange small things and temporaly modify ajp_read_header().


I really don't understand why is unacceptable to include ajp.h in mod_proxy.
For example my compiler is complaining about missing prototypes in
proxy_ajp.

So either we'll make another header or just use the ajp.h
BTW there is nothing in the ajp.h that would brake the proxy_ajp thought.
Also I don't think that we need to hide msg using abstraction since we will
not use the .so for libajp inside proxy or we will?

MT.


smime.p7s
Description: S/MIME cryptographic signature


Jsp compilation

2004-07-30 Thread Yuri
Hi,
Can i use an IDE like EditPuls to compile Jsp and
servlets. 
Is there a way to avoid deploying the servlets and
Jsps to see any Runtime errors.

Also, pl. suggest any good editor compatible with J2EE
development.

Thanks.

Yogesh.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



DO NOT REPLY [Bug 30362] - Tomcat eats up file handers

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

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

Tomcat eats up file handers

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 10:48 ---
As far as I can see each classloader also loads the global jars from 
Catalina, which would be the same for all web applications, so they are opened 
more than once and are not unique to the classloader. These could be shared 
easily with a global structure. Also leaving all jar's open all the time a web-
app is running is still messy for servers with lot of webapps. And why did 
someone bother to close the jars after starting, if it wasn't necessary at some 
point ? You're right about closing all jars when stopping, I saw this, but 
still habe concerns about unreferenced jarfiles, because of the ioe catch 
outside the loop, may be this could be at least patched.
Anyway we're testing now with a subclass of the classloader changing the 
openJARs method to avoid system limitations and it looks promising, so we'll 
follow that path instead of providing a patch (I wasn't really glad about this 
idea). We'll use an LRU with in-/decreasing upper limit, such that any IOE will 
increase the maximum amount of open jars with some lower notification limit. At 
least we don't have so many open file handles as before, and we will probably 
no longer see the original exception at this point.

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



cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_ajp.c

2004-07-30 Thread jfclere
jfclere 2004/07/30 05:21:28

  Modified:ajp/proxy proxy_ajp.c
  Log:
  Clean useless code.
  
  Revision  ChangesPath
  1.2   +4 -261jakarta-tomcat-connectors/ajp/proxy/proxy_ajp.c
  
  Index: proxy_ajp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_ajp.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- proxy_ajp.c   29 Jul 2004 15:13:59 -  1.1
  +++ proxy_ajp.c   30 Jul 2004 12:21:28 -  1.2
  @@ -51,7 +51,7 @@
   apr_port_t port, def_port;
   
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  - proxy: HTTP: canonicalising URL %s, url);
  + proxy: AJP: canonicalising URL %s, url);
   
   /* ap_port_of_scheme() */
   if (strncasecmp(url, http:, 5) == 0) {
  @@ -113,120 +113,6 @@
   return OK;
   }

  -static const char *ap_proxy_location_reverse_map(request_rec *r, proxy_server_conf 
*conf, const char *url)
  -{
  -struct proxy_alias *ent;
  -int i, l1, l2;
  -char *u;
  -
  -/* XXX FIXME: Make sure this handled the ambiguous case of the :80
  - * after the hostname */
  -
  -l1 = strlen(url);
  -ent = (struct proxy_alias *)conf-raliases-elts;
  -for (i = 0; i  conf-raliases-nelts; i++) {
  -l2 = strlen(ent[i].real);
  -if (l1 = l2  strncasecmp(ent[i].real, url, l2) == 0) {
  -u = apr_pstrcat(r-pool, ent[i].fake, url[l2], NULL);
  -return ap_construct_url(r-pool, u, r);
  -}
  -}
  -return url;
  -}
  -/* cookies are a bit trickier to match: we've got two substrings to worry
  - * about, and we can't just find them with strstr 'cos of case.  Regexp
  - * matching would be an easy fix, but for better consistency with all the
  - * other matches we'll refrain and use apr_strmatch to find path=/domain=
  - * and stick to plain strings for the config values.
  - */
  -static const char *proxy_cookie_reverse_map(request_rec *r,
  -  proxy_server_conf *conf, const char *str)
  -{
  -struct proxy_alias *ent;
  -size_t len = strlen(str);
  -const char* newpath = NULL ;
  -const char* newdomain = NULL ;
  -const char* pathp ;
  -const char* domainp ;
  -const char* pathe = NULL;
  -const char* domaine = NULL;
  -size_t l1, l2, i, poffs = 0, doffs = 0 ;
  -int ddiff = 0 ;
  -int pdiff = 0 ;
  -char* ret ;
  -
  -/* find the match and replacement, but save replacing until we've done
  -   both path and domain so we know the new strlen
  -*/
  -if ( pathp = apr_strmatch(conf-cookie_path_str, str, len) , pathp ) {
  -pathp += 5 ;
  -poffs = pathp - str ;
  -pathe = ap_strchr_c(pathp, ';') ;
  -l1 = pathe ? (pathe-pathp) : strlen(pathp) ;
  -pathe = pathp + l1 ;
  -ent = (struct proxy_alias *)conf-cookie_paths-elts;
  -for (i = 0; i  conf-cookie_paths-nelts; i++) {
  -l2 = strlen(ent[i].fake);
  -if (l1 = l2  strncmp(ent[i].fake, pathp, l2) == 0) {
  -newpath = ent[i].real ;
  -pdiff = strlen(newpath) - l1 ;
  -break ;
  -}
  -}
  -}
  -if ( domainp = apr_strmatch(conf-cookie_domain_str, str, len) , domainp ) {
  -domainp += 7 ;
  -doffs = domainp - str ;
  -domaine = ap_strchr_c(domainp, ';') ;
  -l1 = domaine ? (domaine-domainp) : strlen(domainp) ;
  -domaine = domainp + l1 ;
  -ent = (struct proxy_alias *)conf-cookie_domains-elts;
  -for (i = 0; i  conf-cookie_domains-nelts; i++) {
  -l2 = strlen(ent[i].fake);
  -if (l1 = l2  strncasecmp(ent[i].fake, domainp, l2) == 0) {
  -newdomain = ent[i].real ;
  -ddiff = strlen(newdomain) - l1 ;
  -break ;
  -}
  -}
  -}
  -if ( newpath ) {
  -ret = apr_palloc(r-pool, len+pdiff+ddiff+1) ;
  -l1 = strlen(newpath) ;
  -if ( newdomain ) {
  -l2 = strlen(newdomain) ;
  -if ( doffs  poffs ) {
  -memcpy(ret, str, poffs) ;
  -memcpy(ret+poffs, newpath, l1) ;
  -memcpy(ret+poffs+l1, pathe, domainp-pathe) ;
  -memcpy(ret+doffs+pdiff, newdomain, l2) ;
  -strcpy(ret+doffs+pdiff+l2, domaine) ;
  -} else {
  -memcpy(ret, str, doffs) ;
  -memcpy(ret+doffs, newdomain, l2) ;
  -memcpy(ret+doffs+l2, domaine, pathp-domaine) ;
  -memcpy(ret+poffs+ddiff, newpath, l1) ;
  -strcpy(ret+poffs+ddiff+l1, pathe) ;
  -}
  -} else {
  -memcpy(ret, str, poffs) ;
  -memcpy(ret+poffs, newpath, l1) ;
  -strcpy(ret+poffs+l1, pathe) ;
  -}
  -} else 

RE: [5.next] Refactoring save-to-XML

2004-07-30 Thread Shapira, Yoav

Hi,
I think a gradual transition might be OK.  Server.xml, as Remy said, nicely conveys 
the structure of the server's configuration.  That's possible to replicate in a JMX- 
or JBoss-style configuration file, but it tends to look uglier and more verbose IMHO.  
However, your desired a good long-term goal also, I think.

So for now I like the DOM + PropertyChangeEvent model that Remy has proposed.  
Especially combined with the increased use of setAllProperties, the configuration will 
be both less verbose and easier to save/restore.

Xerces still provide an XML Serializer, two actually.  One is what I think we should 
use, the DOM Level 3 Standard (meaning there's a shot this thing is portable ;)): 
http://xml.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSSerializer.html, 
specified in http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/.  But as you see 
these things are fairly new, and as such might be buggy: 
http://xml.apache.org/xerces2-j/dom3.html.  There's also at least one unimplemented 
method of the LSSerializer (normalize-characters) but we might not need that one.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Costin Manolache
Sent: Friday, July 30, 2004 2:24 AM
To: [EMAIL PROTECTED]
Subject: Re: [5.next] Refactoring save-to-XML

Remy Maucherat wrote:
 Costin Manolache wrote:

 The major problem is intercepting the changes. It can be done:
 - inside the jmx impl ( interceptors, etc )
 - using the property changed events
 - by wrapping each mbean when it is registered.

 One important question is if we need to save server.xml, or
 just say that server.xml is for legacy manual config, and use a
 different jmx-oriented format for settings.

 Another radical approach is to  use java settings api for
 storing/retrieving the settings - again, deprecate server.xml and you
 also need to intercept settings from jmx.


 So after thinking about it quite a bit this evening, I'm leaning towards
 DOM + using the property changed events. Obviously this will add a bit
 to the development time (good thing I didn't propose any release plan
 yet), as a replacement for digester is needed, the serializer (Xerces
 used to have one we could steal) as well, and the logic to keep the DOM
 tree and the Catalina objects in sync.

We still have the problem of getting changes from JMX ( made via console
) into the config. Property change events are ok, but it means all
plugins will be required to support them.

To be honest, I was hoping server.xml will disapear. Tomcat is now very
JMX based, it is easily integrable into a lot of apps, it is used in
large sites.  I don't think server.xml is the right choice for long term.

What we need IMO is to separate the setting storage ( including
updates). If tomcat is embedded in jboss, it should use jboss config
style. It should also be able to use LDAP, NDS, win registry ( via
java.prefs ) or any other config storage.
All we really need is a list of mbeans and some attributes for each.

Costin



 Thanks for the comments from everyone about various technologies, but
 the big problem right now is that the save-to-xml really messes up the
 XML configuration,so that people won't want to edit it manually ever
 again once they start using the admin webapp (and then we know what
 happens, there's a limitation/bug in the tool, and the user is stuck -
 it's the M$ syndrome). DOM seems the only thing which keeps everything
 (of course, it's the reason why it's slow, bloated and everyone hates it
 ;) ).

 I'll keep on using the repackaged digester for web.xml parsing unless
 someone has a better idea.

 Rémy


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



New committer: Peter Rossbach

2004-07-30 Thread Remy Maucherat
Hi,
I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a 
committer on the Tomcat project. Peter submitted a significant amount of 
useful patches for Tomcat, and wants to contribute more.

He has my +1.
Rémy
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


DO NOT REPLY [Bug 24970] - charset appended to content-type even if not text/*

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

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

charset appended to content-type even if not text/*

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Priority|Other   |High
 Resolution|FIXED   |



--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 13:11 ---
I agree with Paul Brohman, the bug is still present in 4.1.30.

response.setContentType( application/pdf );
gives Content-Type: application/pdf;charset=ISO-8859-1

I've tried with Response.class from attachment 9309 first in {TOMCAT
INSTALL}/server/classes/org/apache/coyote/Response.class and then by replacing
Response.class in tomcat-coyote.jar with the same result.

So I looked the source of Response.java and found in setContentType :

if (!hasCharset) {
this.contentType = type;
return;
}

In the other case (if hasCharset is true), and if charsetValue is valid, then
charsetSet is set to true.

The problem is the folowing :
- I'm using J2EE 1.3 so the method setCharacterEncoding() can't be used.
- When compiling a JSP, tomcat adds automaticaly
response.setContentType(text/html;charset=ISO-8859-1); in the _jsp.java file.

Doing this, charsetSet is set to true in response and characterEncoding is set
to ISO-8859-1.

Then my own code says :
response.setContentType( application/pdf );
But in this case, charsetSet is NOT reset to false, and characterEncoding keeps
it's old value.

I think the above code should almost be :
if (!hasCharset) {
this.contentType = type;
charsetSet=false;
return;
}

Or charsetSet should be set to false at the begining of setContentType;

But this means for those who can use setCharacterEncoding(), to use it AFTER
setContentType();

So to completely fix the problem, I think that setCharacterEncoding() should set
a special boolean and setContentType() another one.

Then getContentType() should append the charset expression to Content-Type if
one the the two boolean is true.

In this case we will have the folowing results :

response.setCharacterEncoding( ISO-8859-1 );
response.setContentType( application/pdf );
response.getContentType(  ) - Content-Type: 
application/pdf;charset=ISO-8859-1;

response.setCharacterEncoding( ISO-8859-1 );
response.setContentType( plain/text;charset=UTF-8 );
response.getContentType(  ) - Content-Type: plain/text;charset=UTF-8;

response.setContentType( plain/text;charset=UTF-8 );
response.setCharacterEncoding( ISO-8859-1 );
response.getContentType(  ) - Content-Type: plain/text;ISO-8859-1;

response.setContentType(text/html;charset=ISO-8859-1);
response.setContentType( application/pdf );
response.getContentType(  ) - Content-Type: application/pdf



Nevertheless waiting for the bug to be fixed, a workaround is to use the reset()
method who sets charsetSet to false.

response.reset();
response.addHeader( Content-Disposition, inline; filename=\ + strFileName
+ \ ) ;
response.setContentType( application/pdf );
response.setContentLength(data.length);
response.getOutputStream().write( data ) ;
response.getOutputStream().close() ;

Regards

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



Re: New committer: Peter Rossbach

2004-07-30 Thread Tim Funk
+1
-Tim
Remy Maucherat wrote:
Hi,
I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a 
committer on the Tomcat project. Peter submitted a significant amount of 
useful patches for Tomcat, and wants to contribute more.

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


Re: New committer: Peter Rossbach

2004-07-30 Thread Filip Hanik - Dev
+1
- Original Message - 
From: Tim Funk [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Friday, July 30, 2004 8:10 AM
Subject: Re: New committer: Peter Rossbach


+1

-Tim

Remy Maucherat wrote:

 Hi,
 
 I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a 
 committer on the Tomcat project. Peter submitted a significant amount of 
 useful patches for Tomcat, and wants to contribute more.


-
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: New committer: Peter Rossbach

2004-07-30 Thread Shapira, Yoav

Hola,
+1 ;)  More JMX help is a good thing given the direction we're going.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 9:05 AM
To: Tomcat Developers List
Subject: New committer: Peter Rossbach

Hi,

I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a
committer on the Tomcat project. Peter submitted a significant amount of
useful patches for Tomcat, and wants to contribute more.

He has my +1.

Rémy


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



DO NOT REPLY [Bug 30409] New: - Bad error message when taglib shortname is null

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

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

Bad error message when taglib shortname is null

   Summary: Bad error message when taglib shortname is null
   Product: Tomcat 4
   Version: 4.1.29
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Major
  Priority: Other
 Component: Jasper 2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


This code:
public abstract class TagLibraryInfo {
...
public TagInfo getTag(String shortname) {

...

/* 190*/for (int i = 0; i  tags.length; i++)
/* 191*/if (tags[i].getTagName().equals(shortname))
/* 192*/return tags[i];
...
}
...
}

Causes an NPE if shortName is an empty element.  Thank god for the eclipse
sysdeo debugger!  The code should either check for null:

if(shortname == null || shortname.length()==0){
System.err(a tags name is null, please check your .tld);
return null;
}

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



DBCP in Tomcat 5.0: must deploy some artifacts in /common/lib (classes) ?!

2004-07-30 Thread Jerome Lacoste
This is question I asked to the tomcat-user list, without a satisfying
answer.

Maybe I will have more luck here...

Summary:

 Jerome Wrote:
 Q: I've found out that if I don't put the jocl file AND the DB
 drivers in the $CATALINA_HOME/common/lib/ (classes) directory, the
 DBCP would fail.

 Caused by: java.sql.SQLException: Configuration file not found
at org.apache.commons.dbcp.PoolingDriver.getConnectionPool
 (PoolingDriver.java:132)
 [...]
 or
 Caused by: java.sql.SQLException: No suitable driver
 at java.sql.DriverManager.getConnection(DriverManager.java:532)
 [...]
 I've tried to put those in the WEB-INF/lib/ (classes) and the
 shared/lib/ (classes) but none solution worked.
 
 That sounds like a ClassLoader issue to me, but according to the
 Tomcat 5.0 doc, I am doing the right thing.
 
 Putting them in common/lib is a workaround I can accept now, but 
 not for long!
Yoav Wrote:
 That's because Tomcat bundles DBCP.  If you want to separate them
 completely, put your copy in WEB-INF/lib, and the bundled copy in
 server/lib, and nothing for DBCP in the common or shared classloader
 repositories.

I still don't get why it doesn't work. 

The Tomcat ClassLoader doc [1] says: When a request to load a class
from the web application's WebappX class loader is processed, this class
loader will look in the local repositories first, instead of delegating
before looking.

To me that would mean that the ClassLoader that tries to load these
classes is not the web application ClassLoader, otherwise the resources
would be loaded.

But my application seems to be the one that tries to load the
class/resource: the failure to load the resource happens below the web
application's code and not in some special tomcat initialization code.

Is it possible for you (or someone else) to explain me why ?

Jerome

---
The question answer can be found here:
http://marc.theaimsgroup.com/?l=tomcat-userm=109095682027335w=2


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



Re: New committer: Peter Rossbach

2004-07-30 Thread Jeanfrancois Arcand
+1
-- Jeanfrancois
Remy Maucherat wrote:
Hi,
I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a 
committer on the Tomcat project. Peter submitted a significant amount 
of useful patches for Tomcat, and wants to contribute more.

He has my +1.
Rémy
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


DO NOT REPLY [Bug 30409] - Bad error message when taglib shortname is null

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

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

Bad error message when taglib shortname is null





--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 14:26 ---
I'm not sure.  This test works without an error or an NPE:
public class Test {
  public static void main(String[] args) {
String shortname = null;
String[] tagFiles = new String[] { A, B, C };
for(int i = 0; i  tagFiles.length; i++) {
  if(tagFiles[i].equals(shortname)) {
System.out.println(found);
  }
}
System.out.println(Finished with no error.);
  }
}

The program finishes with no error.  

Of course, if tags[i].getTagName() is null, then an NPE would occur.

In addition, I suggest you try this against Tomcat 5: filing bugs that aren't 
showstopper or spec-related against Tomcat 4 is not recommended, as that branch 
is not actively developed.

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



DO NOT REPLY [Bug 28219] - Dolar sign in password of JNDI-Datasource disappears

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

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

Dolar sign in password of JNDI-Datasource disappears





--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 14:34 ---
This is related to the encoding issue with saving the Admin webapp.  I'm 
unifying this with the EBCDIC issue and the non-ASCII characters issue.

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



DO NOT REPLY [Bug 28219] - Dolar sign in password of JNDI-Datasource disappears

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

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

Dolar sign in password of JNDI-Datasource disappears

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 14:34 ---


*** This bug has been marked as a duplicate of 29091 ***

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



DO NOT REPLY [Bug 29091] - Non-ascii characters are not handled correctly...

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

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

Non-ascii characters are not handled correctly...

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 14:34 ---
*** Bug 28219 has been marked as a duplicate of this bug. ***

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



DO NOT REPLY [Bug 29836] - Problems with EBCDIC host

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

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

Problems with EBCDIC host

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 14:35 ---
Same issue, the encoding of the admin webapp.  It needs to be i18n'ed 
properly.  URLEncoder is all over the place.  Tomcat 5.5 will address this in 
the new persistence mechanism.

*** This bug has been marked as a duplicate of 29091 ***

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



DO NOT REPLY [Bug 29091] - Non-ascii characters are not handled correctly...

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

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

Non-ascii characters are not handled correctly...

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 14:36 ---
*** Bug 29836 has been marked as a duplicate of this bug. ***

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



Re: New committer: Peter Rossbach

2004-07-30 Thread Henri Gomez
Remy Maucherat wrote:
Hi,
I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a 
committer on the Tomcat project. Peter submitted a significant amount of 
useful patches for Tomcat, and wants to contribute more.

He has my +1.
Rémy
+1 welcome on board.
Question: On what part of TC, Peter is expected to work ?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


DO NOT REPLY [Bug 24970] - charset appended to content-type even if not text/*

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

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

charset appended to content-type even if not text/*

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 14:44 ---
The servlet spec expert group has decided that all Servlets that use a Writer 
(and this includes all JSPs) must include a charset in the 2.4 servlet spec.  
Since Tomcat 4 uses the same connectors as Tomcat 5, and Tomcat 5 must set the 
charset, this will certainly not be fixed.

I'm glad to see that you've discovered that you can work around this with 
response.reset.  That is the only way that sending pdfs from a JSP is supported.

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



Re: New committer: Peter Rossbach

2004-07-30 Thread Bill Barker
+1
- Original Message - 
From: Remy Maucherat [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Friday, July 30, 2004 6:04 AM
Subject: New committer: Peter Rossbach


Hi,

I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a
committer on the Tomcat project. Peter submitted a significant amount of
useful patches for Tomcat, and wants to contribute more.

He has my +1.

Rémy


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

RE: New committer: Peter Rossbach

2004-07-30 Thread Larry Isaacs
+1

Larry

-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 30, 2004 9:05 AM
To: Tomcat Developers List
Subject: New committer: Peter Rossbach


Hi,

I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a 
committer on the Tomcat project. Peter submitted a significant amount of 
useful patches for Tomcat, and wants to contribute more.

He has my +1.

Rémy


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


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



Re: New committer: Peter Rossbach

2004-07-30 Thread Costin Manolache
Remy Maucherat wrote:
Hi,
I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a 
committer on the Tomcat project. Peter submitted a significant amount of 
useful patches for Tomcat, and wants to contribute more.

He has my +1.
Rémy

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


DO NOT REPLY [Bug 30415] New: - DocBase folders that end with .war are incorrectly handled as WAR files

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

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

DocBase folders that end with .war are incorrectly handled as WAR files

   Summary: DocBase folders that end with .war are incorrectly
handled as WAR files
   Product: Tomcat 5
   Version: 5.0.27
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


If a Context is defined with a doc base that is a folder ending with .war, 
the SetDocBaseRule class misinterprets that as a WAR file that it needs to read 
using ExpandWar.  This fails with the following stack trace:

java.util.zip.ZipException: Access is denied
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.init(ZipFile.java:112)
at java.util.jar.JarFile.init(JarFile.java:127)
at java.util.jar.JarFile.init(JarFile.java:65)
at sun.net.www.protocol.jar.URLJarFile.init(URLJarFile.java:55)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:40)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:78)
at sun.net.www.protocol.jar.JarURLConnection.connect
(JarURLConnection.java:85)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile
(JarURLConnection.java:69)
at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:155)
at org.apache.catalina.startup.SetDocBaseRule.begin
(SetDocBaseRule.java:129)
at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at org.apache.catalina.util.CatalinaDigester.startElement
(CatalinaDigester.java:65)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown 
Source)
...

What should happen is that the folder is recognized as such and read like 
normal.  This bug (or at least the effect) has existed since at least tomcat 
4.1.27.

Possible fix note:
The problem comes from SetDocBaseRule line 123.  If the test first looked to 
see if it was a folder, this problem could be avoided.

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



Re: [5.next] Refactoring save-to-XML

2004-07-30 Thread Remy Maucherat
Shapira, Yoav wrote:
Hi,
I think a gradual transition might be OK.  Server.xml, as Remy said, nicely conveys 
the structure of the server's configuration.  That's possible to replicate in a JMX- 
or JBoss-style configuration file, but it tends to look uglier and more verbose IMHO.  
However, your desired a good long-term goal also, I think.
So for now I like the DOM + PropertyChangeEvent model that Remy has proposed.  
Especially combined with the increased use of setAllProperties, the configuration will 
be both less verbose and easier to save/restore.
Xerces still provide an XML Serializer, two actually.  One is what I think we should use, the DOM Level 3 Standard (meaning there's a shot this thing is portable ;)): http://xml.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSSerializer.html, specified in http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/.  But as you see these things are fairly new, and as such might be buggy: http://xml.apache.org/xerces2-j/dom3.html.  There's also at least one unimplemented method of the LSSerializer (normalize-characters) but we might not need that one.
 

This is a big plus in favor of DOM 3. +1 for using it.
I see this stuff is available bundled on JDK 1.5 (like JMX and JMX 
remote), so if we choose to use this, I think I'll advocate having the 
default download for JDK 1.5, and a download for JDK 1.4 compatibility.

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


cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c

2004-07-30 Thread jfclere
jfclere 2004/07/30 10:06:20

  Modified:ajp/ajplib/test ajp_header.c
  Log:
  Add logic to process what is after the headers ;-)
  
  Revision  ChangesPath
  1.19  +51 -0 jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c
  
  Index: ajp_header.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ajp_header.c  30 Jul 2004 10:21:06 -  1.18
  +++ ajp_header.c  30 Jul 2004 17:06:19 -  1.19
  @@ -827,3 +827,54 @@
   *ptr = (char *)(msg-buf[msg-pos]);
   return APR_SUCCESS;
   }
  +
  +/*
  + * Allocate a msg to send data
  + */
  +apr_status_t  ajp_alloc_data_msg(request_rec *r, char **ptr, apr_size_t *len,
  + void **data)
  +{
  +apr_status_t rc;
  +ajp_msg_t **msg;
  +
  +msg = data;
  +rc = ajp_msg_create(r-pool, msg);
  +if (rc != APR_SUCCESS) {
  +ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  +   ajp_alloc_data_msg: ajp_msg_create failed);
  +return rc;
  +}
  +ajp_msg_reset(*msg);
  +*ptr = (char *)((*msg)-buf[6]);
  +*len = AJP_MSG_BUFFER_SZ-6;
  +
  +return APR_SUCCESS;
  +}
  +
  +/*
  + * Send the data message
  + */
  +apr_status_t  ajp_send_data_msg(apr_socket_t *sock, request_rec  *r,
  + void *data, apr_size_t len)
  +{
  +apr_status_t rc;
  +ajp_msg_t *msg;
  +
  +msg = data;
  +msg-buf[4] = (apr_byte_t)((len  8)  0xFF);
  +msg-buf[5] = (apr_byte_t)(len  0xFF);
  +
  +msg-len += len + 2; /* + 1  where is '\0' */
  +
  +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  +   ajp_send_data_msg: sending %d, len);
  +
  +rc = ajp_ilink_send(sock, msg);
  +if (rc != APR_SUCCESS) {
  +ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  +   ajp_send_data_msg: ajp_ilink_send failed);
  +return rc;
  +}
  +
  +return APR_SUCCESS;
  +}
  
  
  

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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test Makefile.netware

2004-07-30 Thread fuankg
fuankg  2004/07/30 10:06:28

  Added:   ajp/ajplib/test Makefile.netware
  Log:
  Initial check-in so we can play on NetWare too.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/ajp/ajplib/test/Makefile.netware
  
  Index: Makefile.netware
  ===
  #
  # Makefile for ajplib (NetWare version - gnu make)
  # created by Guenter Knauf [EMAIL PROTECTED]
  #
  
  # Edit the path below to point to the base of your Apache 2.x includes.
  ifndef AP_HOME
  AP_HOME   = c:/projects/gccnlm/apache_2.0.50-sdk
  endif
  # Edit the path below to point to the base of your NetWare Java SDK.
  ifndef NW_JDK
  NW_JDK= c:/projects/sdks/java-nw
  endif
  # Edit the path below to point to the base of your Novell NDK.
  ifndef NDKBASE
  NDKBASE   = c:/novell
  endif
  
  ifndef INSTDIR
  INSTDIR   = ../dist-$(AJP_VERSION_STR)-bin-nw
  endif
  
  # Edit the vars below to change NLM target settings.
  TARGETS = testajp.nlm
  LTARGET = libajp.lib
  VERSION   = $(AJP_VERSION)
  COPYR = Copyright (c) 2000-2004 The Apache Software Foundation. All rights reserved.
  DESCR = AJP lib for Jakarta/Tomcat $(AJP_VERSION_STR)
  MTSAFE= YES
  STACK = 64000
  #SCREEN   = none
  MODULES   = aprlib
  #EXPORTS  =
  # Comment the line below if you dont want to load protected automatically.
  LDRING= 3
  
  # Edit the var below to point to your lib architecture.
  ifndef LIBARCH
  LIBARCH = LIBC
  endif
  NW_WINSOCK = 1
  
  # must be equal to DEBUG or NDEBUG
  DB= NDEBUG
  # DB  = DEBUG
  # DB  = CURLDEBUG
  # Optimization: -On or debugging: -g
  ifeq ($(DB),NDEBUG)
OPT = -O2
OBJDIR  = release
  else
OPT = -g
OBJDIR  = debug
  endif
  
  # Include the version info retrieved from ajp.h
  #-include $(OBJDIR)/version.inc
  AJP_VERSION = 1,0,0
  AJP_VERSION_STR = 1.0.0-dev-beta
  
  # Check if we are on Linux in order to set the echo delimiter if needed.
  ifeq ($(findstring linux,$(OSTYPE)),linux)
  DL= '
  #-include $(NDKBASE)/nlmconv/ncpfs.inc
  endif
  
  # The following line defines your compiler.
  ifdef METROWERKS
CC = mwccnlm
  else
CC = gcc
  endif
  YACC  = bison -y
  CP= cp -afv
  # RM  = rm -f
  # if you want to mark the target as MTSAFE you will need a tool for
  # generating the xdc data for the linker; here's a minimal tool:
  # http://www.gknw.com/development/prgtools/mkxdc.zip
  MPKXDC= mkxdc
  
  # Global flags for all compilers
  CFLAGS= $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
  CFLAGS+= -DAJP_USE_HTTPD_WRAP
  
  ifeq ($(CC),mwccnlm)
  LD= mwldnlm
  LDFLAGS   = -nostdlib $(PRELUDE) $(OBJS) $(OBJWRAP) $(:.def=.o) -o $@ 
-commandfile
  AR= mwldnlm
  ARFLAGS   = -type library -w nocmdline $(OBJDIR)/*.o -o
  CFLAGS+= -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586
  CFLAGS+= -relax_pointers
  CFLAGS+= -w on,nounused
  ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
CFLAGS += -align 4
  else
PRELUDE = $(METROWERKS)/Novell Support/libraries/runtime/prelude.obj
  # CFLAGS += -include $(METROWERKS)/Novell Support/headers/nlm_prefix.h
CFLAGS += -align 1
  endif
  else
  LD= nlmconv
  LDFLAGS   = -T
  AR= ar
  ARFLAGS   = -cq
  CFLAGS+= -fno-builtin -fpack-struct -fpcc-struct-return
  CFLAGS+= -Wall -Wno-format # -pedantic
  ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
  else
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
  endif
  endif
  
  NDK_ROOT = $(NDKBASE)/ndk
  SDK_CLIB = $(NDK_ROOT)/nwsdk
  SDK_LIBC = $(NDK_ROOT)/libc
  
  INCLUDES += -I$(AP_HOME)/include
  
  ifeq ($(LIBARCH),LIBC)
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
INCLUDES += -I$(SDK_LIBC)/include/winsock
CFLAGS += -D_POSIX_SOURCE
  # CFLAGS += -D__ANSIC__
  else
INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
CFLAGS += -DNETDB_USE_INTERNET
  endif
  CFLAGS+= -I. $(INCLUDES)
  
  ifeq ($(MTSAFE),YES)
XDCOPT = -n
  endif
  ifeq ($(MTSAFE),NO)
XDCOPT = -u
  endif
  
  OBJS  = \
$(OBJDIR)/ajp_header.o \
$(OBJDIR)/ajp_link.o \
$(OBJDIR)/ajp_msg.o
  
  OBJWRAP   = $(OBJDIR)/httpd_wrap.o
  
  .PHONY: lib nlm prebuild dist install clean
  
  nlm: prebuild $(TARGETS) 
  
  lib: prebuild $(LTARGET)
  
  prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h
  
  dist: all
-$(RM) $(OBJS) $(OBJDIR)/*.map $(OBJDIR)/*.ncv
-$(RM) $(OBJDIR)/*.def $(OBJDIR)/*.xdc $(OBJDIR)/version.inc
  
  install: $(INSTDIR) all
@$(CP) *.nlm $(INSTDIR)
@$(CP) ../CHANGES $(INSTDIR)
@$(CP) ../COPYING $(INSTDIR)

cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_ajp.c

2004-07-30 Thread jfclere
jfclere 2004/07/30 10:12:09

  Modified:ajp/proxy proxy_ajp.c
  Log:
  Add the logic to read the body.
  
  Revision  ChangesPath
  1.3   +58 -29jakarta-tomcat-connectors/ajp/proxy/proxy_ajp.c
  
  Index: proxy_ajp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/proxy/proxy_ajp.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- proxy_ajp.c   30 Jul 2004 12:21:28 -  1.2
  +++ proxy_ajp.c   30 Jul 2004 17:12:08 -  1.3
  @@ -68,7 +68,7 @@
   def_port = apr_uri_port_of_scheme(scheme);
   
   ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  - proxy: HTTP: canonicalising URL %s, url);
  + proxy: AJP: canonicalising URL %s, url);
   
   /* do syntatic check.
* We break the URL into host, port, path, search
  @@ -113,30 +113,6 @@
   return OK;
   }

  -/* Clear all connection-based headers from the incoming headers table */
  -static void ap_proxy_clear_connection(apr_pool_t *p, apr_table_t *headers)
  -{
  -const char *name;
  -char *next = apr_pstrdup(p, apr_table_get(headers, Connection));
  -
  -apr_table_unset(headers, Proxy-Connection);
  -if (!next)
  -return;
  -
  -while (*next) {
  -name = next;
  -while (*next  !apr_isspace(*next)  (*next != ',')) {
  -++next;
  -}
  -while (*next  (apr_isspace(*next) || (*next == ','))) {
  -*next = '\0';
  -++next;
  -}
  -apr_table_unset(headers, name);
  -}
  -apr_table_unset(headers, Connection);
  -}
  -
   static
   apr_status_t ap_proxy_http_determine_connection(apr_pool_t *p, request_rec *r,
   proxy_ajp_conn_t *p_conn,
  @@ -166,7 +142,7 @@
   }
   
   ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  - proxy: HTTP connecting %s to %s:%d, *url, uri-hostname,
  + proxy: AJP connecting %s to %s:%d, *url, uri-hostname,
uri-port);
   
   /* do a DNS lookup for the destination host */
  @@ -282,7 +258,7 @@
   apr_socket_timeout_set(p_conn-sock, current_timeout);
   if ( APR_STATUS_IS_EOF(socket_status) ) {
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
  - proxy: HTTP: previous connection is closed);
  + proxy: AJP: previous connection is closed);
   new = 1;
   }
   }
  @@ -368,6 +344,7 @@
   {
   apr_status_t status;
   int result;
  +apr_bucket_brigade *input_brigade;
   
   /*
* Send the AJP request to the remote server
  @@ -382,8 +359,60 @@
   return status;
   }
   
  +/* read the first bloc of data */
  +input_brigade = apr_brigade_create(p, r-connection-bucket_alloc);
  +status = ap_get_brigade(r-input_filters, input_brigade,
  +AP_MODE_READBYTES, APR_BLOCK_READ,
  +8186);
  + 
  +if (status != APR_SUCCESS) {
  +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  + proxy: ap_get_brigade failed);
  +apr_brigade_destroy(input_brigade);
  +return status;
  +}
  +
  +/* have something */
  +if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(input_brigade))) {
  +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  + proxy: APR_BUCKET_IS_EOS);
  +}
  +
  +if (1) { /*  only when something to send ? */
  +void *msg;
  +apr_size_t bufsiz;
  +char *buff;
  +long len;
  +status = ajp_alloc_data_msg(r, buff, bufsiz, msg);
  +if (status != APR_SUCCESS) {
  +return status;
  +}
  +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  + proxy: data to read (max %d at %08x), bufsiz, buff);
  +
  +/*  calls apr_brigade_flatten... */
  +status = apr_brigade_flatten(input_brigade, buff, bufsiz);
  +if (status != APR_SUCCESS) {
  + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  + proxy: apr_brigade_flatten);
  +return status;
  +}
  +
  +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  + proxy: got %d byte of data, bufsiz);
  +if (bufsiz  0) {
  +status = ajp_send_data_msg(p_conn-sock, r, msg, bufsiz);
  +if (status != APR_SUCCESS) {
  +ap_log_error(APLOG_MARK, APLOG_ERR, status, r-server,
  + proxy: request failed to %pI (%s),
  + p_conn-addr, p_conn-name);
  +return status;
  +}
  +}
  +}
  +
   /* read the response */
  -status = ajp_read_header(p_conn-sock,r,(p_conn-data));
  +status 

Re: [5.next] Refactoring save-to-XML

2004-07-30 Thread Filip Hanik - Dev
Xerces still provide an XML Serializer, two actually

they all do, it is part of the standard Java XML API
see below, this way you don't have to import any outside libraries of the JDK

Filip

public static void writeXmlToFile(java.io.File f, Document d) {
Transformer transformer =
TransformerFactory.newInstance().newTransformer();
java.io.FileOutputStream out = new java.io.FileOutputStream(f);
StreamResult result = new StreamResult(out);
DOMSource source = new DOMSource(d);
transformer.setOutputProperty(OutputKeys.INDENT,yes);
//depending on which library you have

transformer.setOutputProperty({http://xml.apache.org/xalan%7dindent-amount,4;);

transformer.setOutputProperty({http://xml.apache.org/xslt%7dindent-amount,4;);
transformer.setOutputProperty(OutputKeys.METHOD,xml);
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,yes);
transformer.transform(source, result);


- Original Message -
From: Remy Maucherat [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Friday, July 30, 2004 11:57 AM
Subject: Re: [5.next] Refactoring save-to-XML


Shapira, Yoav wrote:

Hi,
I think a gradual transition might be OK.  Server.xml, as Remy said, nicely conveys 
the structure of the server's configuration.
That's possible to replicate in a JMX- or JBoss-style configuration file, but it tends 
to look uglier and more verbose IMHO.
However, your desired a good long-term goal also, I think.

So for now I like the DOM + PropertyChangeEvent model that Remy has proposed.  
Especially combined with the increased use of
setAllProperties, the configuration will be both less verbose and easier to 
save/restore.

Xerces still provide an XML Serializer, two actually.  One is what I think we should 
use, the DOM Level 3 Standard (meaning there's
a shot this thing is portable ;)): 
http://xml.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSSerializer.html, 
specified in
http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/.  But as you see these things 
are fairly new, and as such might be buggy:
http://xml.apache.org/xerces2-j/dom3.html.  There's also at least one unimplemented 
method of the LSSerializer
(normalize-characters) but we might not need that one.


This is a big plus in favor of DOM 3. +1 for using it.

I see this stuff is available bundled on JDK 1.5 (like JMX and JMX
remote), so if we choose to use this, I think I'll advocate having the
default download for JDK 1.5, and a download for JDK 1.4 compatibility.

Rémy


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


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



DO NOT REPLY [Bug 30052] - JSVC instability

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

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

JSVC instability





--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 17:24 ---
I've also run this test under windows with the standard procrun 2.0 
installation, which runs OK without error.

The problem only occurs when using jsvc. It's not a problem with detecting the 
configuration, or if it is, then there is no error message on two different 
hardware platforms.

It could be some sort of memory leak (a fair amount of web server work happens 
for the test), but the actual crash seems to be some re-entrant (thread safe) 
issue with glibc, because it requires (at least) TWO web sessions.

There is no error at all if TOMCAT is started from the shell script, no matter 
how many web sessions or how long the test is run for.

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



DO NOT REPLY [Bug 30415] - DocBase folders that end with .war are incorrectly handled as WAR files

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

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

DocBase folders that end with .war are incorrectly handled as WAR files





--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 17:53 ---
How about not using .war as a docBase? ;)

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



DO NOT REPLY [Bug 30217] - ROOT.war does not correctly unpack if contains context.xml with a path= attribute

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

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

ROOT.war does not correctly unpack if contains context.xml with a path= attribute





--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 17:56 ---
Are you sure you have unpackWARs=true in your Host definition?

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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test testajp.c

2004-07-30 Thread mturk
mturk   2004/07/30 11:01:48

  Modified:ajp/ajplib/test testajp.c
  Log:
  Send some post data to the backend
  
  Revision  ChangesPath
  1.9   +26 -7 jakarta-tomcat-connectors/ajp/ajplib/test/testajp.c
  
  Index: testajp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/testajp.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- testajp.c 30 Jul 2004 09:00:22 -  1.8
  +++ testajp.c 30 Jul 2004 18:01:47 -  1.9
  @@ -40,10 +40,11 @@
   #endif
   
   #define TEST_POST_DATA This document is a proposal of evolution of the current  \
  -   Apache JServ Protocol version 1.3, also known as ajp13.  \
  -   I'll not cover here the full protocol but only the add-on 
from ajp13.  \
  -   This nth pass include comments from the tomcat-dev list and 
 \
  -   misses discovered during developpment.
  +   Apache JServ Protocol version 1.3, also known as ajp13. 
  +
  +//I'll not cover here the full protocol but only the add-on from ajp13.  \
  +//   This nth pass include comments from the tomcat-dev list 
and  \
  +//   misses discovered during developpment.
   
   #define TEST_CASE_URL http://localhost/servlets-examples/HelloWorldExample;
   
  @@ -163,6 +164,8 @@
   request_rec *r;
   apr_socket_t *sock;
   ajp_msg_t *msg;
  +char *buf;
  +apr_size_t len;
   
   apr_app_initialize(argc, argv, env);
   
  @@ -192,9 +195,11 @@
   
   /* 0. Fill in the request data  */
   if (ap_wrap_make_request(r, TEST_CASE_URL,
  - POST, NULL, NULL,
  - 0,
  - NULL) != APR_SUCCESS) {
  + POST,
  + application/x-www-form-urlencoded,
  + NULL,
  + sizeof(TEST_POST_DATA) - 1,
  + TEST_POST_DATA) != APR_SUCCESS) {
   goto finished;
   }
   /*
  @@ -218,6 +223,20 @@
   goto finished;
   }
   /* 3. Send AJP message  */
  +ajp_alloc_data_msg(r, buf, len, msg);
  +
  +/* Send the initial POST BODY */
  +if (ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) {
  +ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  +   Error ajp_marshal_into_msgb - 
  +   Can't setting client block);
  +}
  +if (ap_should_client_block(r)) {
  +len = ap_get_client_block(r, buf, len);
  +}
  +
  +ajp_send_data_msg(sock, r, msg, len);
  +
   
   /* 4. Read AJP response */
   if ((rc = ajp_read_header(sock, r, msg)) != APR_SUCCESS) {
  
  
  

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



RE: cvs commit: jakarta-tomcat-connectors/ajp/proxy proxy_ajp.c

2004-07-30 Thread Mladen Turk
 

[EMAIL PROTECTED] commited
 

   +/* read the first bloc of data */

   +if (bufsiz  0) {
   +status = ajp_send_data_msg(p_conn-sock, r, 

Just wondering. Can we send initial POST data together with header?
Not sure what the spec are saying abut that, but think we can.

Also I think you can use client_block logic, cause it is using the same
logic like you've witten.
Take a look at ap_get_client_block inside http_request.c

MT.


smime.p7s
Description: S/MIME cryptographic signature


DO NOT REPLY [Bug 30358] - Direct JNDI lookup java:comp/env/cfg/test fails

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

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

Direct JNDI lookup java:comp/env/cfg/test fails

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 19:16 ---
To repeat:

I have tested this with the latest code from CVS.
It works as expected.

Please do not open this bug report unless you have a test case (a ready to 
deploy WAR file) that exhibts this error when used with the latest code from 
CVS.

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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test testajp.c

2004-07-30 Thread mturk
mturk   2004/07/30 12:18:59

  Modified:ajp/ajplib/test testajp.c
  Log:
  And finaly, read the returned data from the container.
  
  Revision  ChangesPath
  1.10  +25 -9 jakarta-tomcat-connectors/ajp/ajplib/test/testajp.c
  
  Index: testajp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/testajp.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- testajp.c 30 Jul 2004 18:01:47 -  1.9
  +++ testajp.c 30 Jul 2004 19:18:59 -  1.10
  @@ -40,13 +40,12 @@
   #endif
   
   #define TEST_POST_DATA This document is a proposal of evolution of the current  \
  -   Apache JServ Protocol version 1.3, also known as ajp13. 
  +   Apache JServ Protocol version 1.3, also known as ajp13.  \
  +   I'll not cover here the full protocol but only the add-on 
from ajp13.  \
  +   This nth pass include comments from the tomcat-dev list and 
 \
  +   misses discovered during developpment.
   
  -//I'll not cover here the full protocol but only the add-on from ajp13.  \
  -//   This nth pass include comments from the tomcat-dev list 
and  \
  -//   misses discovered during developpment.
  -
  -#define TEST_CASE_URL http://localhost/servlets-examples/HelloWorldExample;
  +#define TEST_CASE_URL 
http://localhost/servlets-examples/servlet/RequestHeaderExample;
   
   /* Main process */
   static process_rec *main_process;
  @@ -196,7 +195,7 @@
   /* 0. Fill in the request data  */
   if (ap_wrap_make_request(r, TEST_CASE_URL,
POST,
  - application/x-www-form-urlencoded,
  + NULL, //application/x-www-form-urlencoded,
NULL,
sizeof(TEST_POST_DATA) - 1,
TEST_POST_DATA) != APR_SUCCESS) {
  @@ -223,6 +222,7 @@
   goto finished;
   }
   /* 3. Send AJP message  */
  +
   ajp_alloc_data_msg(r, buf, len, msg);
   
   /* Send the initial POST BODY */
  @@ -234,9 +234,11 @@
   if (ap_should_client_block(r)) {
   len = ap_get_client_block(r, buf, len);
   }
  +else
  +len = ap_get_client_block(r, buf, len);
   
  -ajp_send_data_msg(sock, r, msg, len);
   
  +ajp_send_data_msg(sock, r, msg, len);
   
   /* 4. Read AJP response */
   if ((rc = ajp_read_header(sock, r, msg)) != APR_SUCCESS) {
  @@ -245,9 +247,23 @@
   goto finished;
   }
   
  -/* 5. Display results   */
  +ajp_msg_create(r-pool, msg);
  +ajp_msg_reset(msg);
  +ajp_ilink_receive(sock, msg);
   
  +/* 5. Display results   */
  +#if 1
   ajp_msg_dump(msg, );
  +#endif
  +{
  +/* XXX we will need a function for this */
  +apr_byte_t t;
  +/* Get Type */
  +ajp_msg_get_byte(msg, t);
  +fprintf(stdout, Message Len Type %d should be (SC_BODY_CHUNK 3)\n, t);
  +ajp_msg_get_string(msg, buf);
  +fputs(buf, stdout);
  +}
   /* 6. Release the connection*/
   
   
  
  
  

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



Re: New committer: Peter Rossbach

2004-07-30 Thread Günter Knauf
 I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a
 committer on the Tomcat project. Peter submitted a significant amount of
 useful patches for Tomcat, and wants to contribute more.

++1.

Guenter.



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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c

2004-07-30 Thread mturk
mturk   2004/07/30 12:26:37

  Modified:ajp/ajplib/test ajp_header.c
  Log:
  Fix naming confusion. It is method not header
  
  Revision  ChangesPath
  1.20  +6 -6  jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c
  
  Index: ajp_header.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ajp_header.c  30 Jul 2004 17:06:19 -  1.19
  +++ ajp_header.c  30 Jul 2004 19:26:37 -  1.20
  @@ -301,7 +301,7 @@
   }
   
   /* Apache method number to SC methods transform table */
  -static const unsigned char sc_for_req_header_table[] = {
  +static const unsigned char sc_for_req_method_table[] = {
   SC_M_GET,
   SC_M_PUT,
   SC_M_POST,
  @@ -331,13 +331,13 @@
   0   /* M_INVALID */
   };
   
  -static int sc_for_req_header_by_id(int method_id)
  +static int sc_for_req_method_by_id(int method_id)
   {
   if (method_id  0 || method_id  M_INVALID)
   return UNKNOWN_METHOD;
   else
  -return sc_for_req_header_table[method_id] ?
  -   sc_for_req_header_table[method_id] : UNKNOWN_METHOD;
  +return sc_for_req_method_table[method_id] ?
  +   sc_for_req_method_table[method_id] : UNKNOWN_METHOD;
   }
   
   /*
  @@ -384,7 +384,7 @@
   ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
Into ajp_marshal_into_msgb);
   
  -if ((method = sc_for_req_header_by_id(r-method_number)) == UNKNOWN_METHOD) { 
  +if ((method = sc_for_req_method_by_id(r-method_number)) == UNKNOWN_METHOD) { 
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
  Error ajp_marshal_into_msgb - No such method %s,
  r-method);
  @@ -571,7 +571,7 @@
  Error appending the message end);
   return APR_EGENERAL;
   }
  -
  +
   ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
  ajp_marshal_into_msgb - Done);
   return APR_SUCCESS;
  
  
  

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



DO NOT REPLY [Bug 30404] - default charset for conten-type header

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

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

default charset for conten-type header

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 19:36 ---
This is a known bug with 4.1.29 that has been fixed (I think in 4.1.30 and 
certainly in current CVS HEAD). See bug 28170 for a report of this working in 
4.1.30

See laso bug 24970 for more background information.

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



RE: New committer: Peter Rossbach

2004-07-30 Thread Mark Thomas
+1

Mark 

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 30, 2004 2:05 PM
 To: Tomcat Developers List
 Subject: New committer: Peter Rossbach
 
 Hi,
 
 I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a 
 committer on the Tomcat project. Peter submitted a 
 significant amount of 
 useful patches for Tomcat, and wants to contribute more.
 
 He has my +1.
 
 Rémy
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp.h testajp.c

2004-07-30 Thread fuankg
fuankg  2004/07/30 12:57:47

  Modified:ajp/ajplib/test ajp.h testajp.c
  Log:
  introduce default host and port.
  
  Revision  ChangesPath
  1.20  +7 -0  jakarta-tomcat-connectors/ajp/ajplib/test/ajp.h
  
  Index: ajp.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ajp.h 30 Jul 2004 18:01:11 -  1.19
  +++ ajp.h 30 Jul 2004 19:57:47 -  1.20
  @@ -40,6 +40,13 @@
   #include arpa/inet.h
   #endif
   
  +#define AJP13_DEF_HOST 127.0.0.1
  +#ifdef NETWARE
  +#define AJP13_DEF_PORT 9009 /* default to 9009 since 8009 is used by OS */
  +#else
  +#define AJP13_DEF_PORT 8009
  +#endif
  +
   #if APR_CHARSET_EBCDIC
   
   #define USE_CHARSET_EBCDIC
  
  
  
  1.11  +1 -1  jakarta-tomcat-connectors/ajp/ajplib/test/testajp.c
  
  Index: testajp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/testajp.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- testajp.c 30 Jul 2004 19:18:59 -  1.10
  +++ testajp.c 30 Jul 2004 19:57:47 -  1.11
  @@ -208,7 +208,7 @@
*/
   
   /* 1. Obtain a connection to backend*/
  -if ((rc = connect_to_backend(sock, con, 127.0.0.1, 8009,
  +if ((rc = connect_to_backend(sock, con, AJP13_DEF_HOST, AJP13_DEF_PORT,
   main_server, r-pool)) != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_ERR, rc, NULL, connect_to_backend);
   rv = -1;
  
  
  

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



Re: New committer: Peter Rossbach

2004-07-30 Thread Amy Roh
+1

Amy

 I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a 
 committer on the Tomcat project. Peter submitted a 
 significant amount of 
 useful patches for Tomcat, and wants to contribute more.

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



Re: New committer: Peter Rossbach

2004-07-30 Thread Peter Rossbach
Hi all,
thank for all your votes!
I want to introduce a bit who I am and what I'm doing.
I am a freelancer and have a lot of experience at
servlet technologie and J2EE architecture development. I started 
servlet web development at 1997. The first project was
to design, organize and implement a distribute information
system with more than 1000 Linux nodes. And it works very fine. With
this knowlege I wrote with Hendrik Schreiber the Java
Servlets and Server Book and help to implement the 
first servlet 2.1 API conform servlet engine jo! 
( cool work from Hendrik) and the webapp framework (http://www.webapp.de).
This was the start writing a lot of german articles 
about web technologies.
In 2002 I wrote the frist german Tomcat Book (Tomcat 4X).
The last year I wrote the monthly german Tomcat columne at 
Java Magazin and start a new german book project for 
Tomcat 5.next (http://tomcat.objektpark.org). Now I am working
with Thorsten Kamann at the Centaurus-Platform (http://centaurus.sourceforge.net).
We want to build a secure and easy Java web hosting platform.
Since the last four years I coach a lot of people at german 
conferences for tomcat knowledge, setup build verification systems 
and advanced web development.

I want start to help Remy with the new deployment method, made 
more JMX possible and hope to help save correct server.xml 
configuration. 

Thanks, I am very proud today to start more active tomcat development.
Peter
PS: I hope to get a good internet access by my family holiday place ...  :-D 


Remy Maucherat schrieb:
Hi,
I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a 
committer on the Tomcat project. Peter submitted a significant amount 
of useful patches for Tomcat, and wants to contribute more.

He has my +1.
Rémy
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


DO NOT REPLY [Bug 30418] New: - jasper2 character translation issue

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

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

jasper2 character translation issue

   Summary: jasper2 character translation issue
   Product: Tomcat 5
   Version: 5.0.27
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Minor
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The following bug occurs when precompiling jsp's following the instructions in
the Tomcat 5 documenation.

For the following line in the jsp, 

a href=c:out value=${item.feed.link}/c:out
value=${item.feed.title}//a - a href=c:out
value=${item.link}/c:out value=${item.title}//a

a source file is generated with the following :
 
.
out.write(/a Â? a href=\);
.

instead of 
..
out.write(/a Â? a href=\);
..

I tested other characters that the dash (colons and hyphens) and jasper2
generates correct HTML, its just that it mistranslates the dash for some reason.

The problem does not occur if you allow Tomcat to compile pages on the fly while
the application is running.  Also, I never saw this issue with versions of
Tomcat 5 less than 5.0.25.

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



DO NOT REPLY [Bug 30418] - jasper2 character translation issue

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

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

jasper2 character translation issue





--- Additional Comments From [EMAIL PROTECTED]  2004-07-30 21:32 ---
I meant that the source line expected is 

out.write(/a - a href=\);

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



Re: New committer: Peter Rossbach

2004-07-30 Thread Jan Luehe
+1
Jan
Remy Maucherat wrote:
Hi,
I'd like to nominate Peter Rossbach pr _at_ objektpark.de as a 
committer on the Tomcat project. Peter submitted a significant amount of 
useful patches for Tomcat, and wants to contribute more.

He has my +1.
Rémy
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


DO NOT REPLY [Bug 30217] - ROOT.war does not correctly unpack if contains context.xml with a path= attribute

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

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

ROOT.war does not correctly unpack if contains context.xml with a path= attribute





--- Additional Comments From [EMAIL PROTECTED]  2004-07-31 05:14 ---
Yes, all other wars unpack and deploy correctly. Only the case I mention fails.
My host configurations alway have:

unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false

Thanks.

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