[4.1.2] Milestone available for testing

2002-05-15 Thread Remy Maucherat

The 4.1.2 milestone is available for testing.
The vote on how much the build should be publicized will happen next week
(unless a showstopper bug is found before, in which case a new milestone
will be released).

Binaries are available at:
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.2/

WARNING: This is not an official Tomcat release and should be considered as
stable as a nightly build. The build is available for testing purposes only.

NOTE: There is the problem with the server.xml the Windows installer uses.
See bug 9112 for more details.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ant tools for 3.3

2002-05-15 Thread Keith Wannamaker

Ok, I added it to the build, but not the distribution
(no good place for it?).  Also, I didn't put ant.props
in META-INF because it could not be found by the app 
there.  It's just in the top level of the jar.  I know
I'm missing something here.. 

Also, I went ahead and put the adapter in j-t for now,
rather than j-t-j.  It can always be moved later, especially
since I know nothing about the mangler j-t-j.  Yes, optimally,
mangling support would be more flexible and it should go over
there, but it's ok for now in j-t.

Keith


| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, May 15, 2002 7:06 PM
| To: Tomcat Developers List
| Subject: Re: ant tools for 3.3
| 
| 
| On Wed, 15 May 2002, Keith Wannamaker wrote:
| 
| > I've written some ant tools that allow builds to populate 
| > the Tomcat work directories with precompiled JSPs.  I'm
| > trying to decide a home for them, if any, and was thinking
| > of a new package org.apache.tomcat.ant .. any other
| > preference?
| 
| +1
| 
| Just make sure the build.xml is able to exclude the tasks from
| the 'main' jars and create separate jars for the new tasks.
| 
| Also - please include META-INF/ant.properties ( for multiple
| taskdefs with resource= )
| 
| Costin
| 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/ant Tomcat3JSPVersionFile.java Tomcat3Precompiler.java ant.properties

2002-05-15 Thread keith

keith   02/05/15 20:15:13

  Modified:.build.xml
  Added:   src/share/org/apache/tomcat/ant Tomcat3JSPVersionFile.java
Tomcat3Precompiler.java ant.properties
  Log:
  Add Tomcat related Ant tasks for precompiling JSPs.
  
  Revision  ChangesPath
  1.178 +25 -1 jakarta-tomcat/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/build.xml,v
  retrieving revision 1.177
  retrieving revision 1.178
  diff -u -r1.177 -r1.178
  --- build.xml 24 Apr 2002 12:26:23 -  1.177
  +++ build.xml 16 May 2002 03:15:13 -  1.178
  @@ -590,7 +590,7 @@
   
 
   
  -  
  +  
 
   
 
  @@ -599,6 +599,30 @@
 
 
   
  +  
  +
  +  
  +  
  +  
  +
  +   
  +   
  +  
  +  
  +  
  +   
  +
  +
  +
  +   
  + 
  +
  +   
  +
 
   
 
  
  
  
  1.1  
jakarta-tomcat/src/share/org/apache/tomcat/ant/Tomcat3JSPVersionFile.java
  
  Index: Tomcat3JSPVersionFile.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Ant", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * .
   */
  
  package org.apache.tomcat.ant;
  
  import java.io.File;
  import java.io.FileOutputStream;
  import java.io.FileInputStream;
  import java.io.IOException;
  import java.util.Vector;
  import org.apache.tools.ant.BuildException;
  import org.apache.tools.ant.DirectoryScanner;
  import org.apache.tools.ant.Project;
  import org.apache.tools.ant.Task;
  import org.apache.tools.ant.util.regexp.RegexpMatcher;
  import org.apache.tools.ant.util.regexp.RegexpMatcherFactory;
  
  /**
   * Task to create version files used by Tomcat to determine the
   * appropriate class to load for a JSP.
   *
   * This task can accept the following attribute:
   * 
   * srcdir
   * 
   * srcdir is required.
   * 
   * When this task executes, it will scan the files in srcdir which have
   * the form name_nnn.class.  For each class, if a corresponding
   * version file of the form name.ver does not exist, it is created
   * with version nnn.  If the version file exists, this task verifies that
   * it contains the correct version nnn.  If not, a new version file is 
   * created.
   *
   * Use this task with the Tomcat3Precom

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/ant - New directory

2002-05-15 Thread keith

keith   02/05/15 20:12:14

  jakarta-tomcat/src/share/org/apache/tomcat/ant - New directory

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-05-15 Thread remm

remm02/05/15 18:06:29

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Slightly experimental change.
  - Slightly modify the class filters: now, the filtered classes will be delegated to
the parent CL. If the parent doesn't load them, the webapp CL will try to load
them.
  - Add filter for all javax.*, Xerces and Xalan. This should put an end to whatever
problems still existed with the XML parsers and XSL processors.
  
  Revision  ChangesPath
  1.38  +41 -25
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- WebappClassLoader.java29 Apr 2002 12:46:54 -  1.37
  +++ WebappClassLoader.java16 May 2002 01:06:29 -  1.38
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.37 2002/04/29 12:46:54 remm Exp $
  - * $Revision: 1.37 $
  - * $Date: 2002/04/29 12:46:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.38 2002/05/16 01:06:29 remm Exp $
  + * $Revision: 1.38 $
  + * $Date: 2002/05/16 01:06:29 $
*
* 
*
  @@ -145,7 +145,7 @@
*
* @author Remy Maucherat
* @author Craig R. McClanahan
  - * @version $Revision: 1.37 $ $Date: 2002/04/29 12:46:54 $
  + * @version $Revision: 1.38 $ $Date: 2002/05/16 01:06:29 $
*/
   public class WebappClassLoader
   extends URLClassLoader
  @@ -187,16 +187,14 @@
   
   /**
* Set of package names which are not allowed to be loaded from a webapp
  - * class loader.
  + * class loader without delegating first.
*/
   private static final String[] packageTriggers = {
  -"javax.naming",  // JNDI
  -"javax.naming.directory",// JNDI
  -"javax.xml.parsers", // JAXP
  +"javax", // Java extensions
   "org.xml.sax",   // SAX 1 & 2
  -"org.xml.sax.ext",   // SAX 1 & 2
  -"org.xml.sax.helpers",   // SAX 1 & 2
  -"org.w3c.dom"// DOM 1 & 2
  +"org.w3c.dom",   // DOM 1 & 2
  +"org.apache.xerces", // Xerces 1 & 2
  +"org.apache.xalan"   // Xalan
   };
   
   
  @@ -1344,8 +1342,10 @@
   }
   }
   
  +boolean delegateLoad = delegate || filter(name);
  +
   // (1) Delegate to our parent if requested
  -if (delegate) {
  +if (delegateLoad) {
   if (debug >= 3)
   log("  Delegating to parent classloader");
   ClassLoader loader = parent;
  @@ -1382,7 +1382,7 @@
   }
   
   // (3) Delegate to parent unconditionally
  -if (!delegate) {
  +if (!delegateLoad) {
   if (debug >= 3)
   log("  Delegating to parent classloader");
   ClassLoader loader = parent;
  @@ -1907,21 +1907,15 @@
   
   
   /**
  - * Validate a classname. As per SRV.9.7.2, we must restict loading of 
  - * classes from J2SE (java.*) and classes of the servlet API 
  - * (javax.servlet.*). That should enhance robustness and prevent a number
  - * of user error (where an older version of servlet.jar would be present
  - * in /WEB-INF/lib).
  + * Filter classes.
* 
* @param name class name
  - * @return true if the name is valid
  + * @return true if the class should be filtered
*/
  -protected boolean validate(String name) {
  +protected boolean filter(String name) {
   
   if (name == null)
   return false;
  -if (name.startsWith("java."))
  -return false;
   
   // Looking up the package
   String packageName = null;
  @@ -1929,12 +1923,34 @@
   if (pos != -1)
   packageName = name.substring(0, pos);
   else
  -return true;
  +return false;
   
   for (int i = 0; i < packageTriggers.length; i++) {
  -if (packageName.equals(packageTriggers[i]))
  -return false;
  +if (packageName.startsWith(packageTriggers[i]))
  +return true;
   }
  +
  +return false;
  +
  +}
  +
  +
  +/**
  + * Validate a clas

DO NOT REPLY [Bug 7007] - Invalid names in web.xml generated by JspC for top-level JSP pages

2002-05-15 Thread bugzilla

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

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

Invalid names in web.xml generated by JspC for top-level JSP pages

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-05-16 00:46 ---
Fixed (really this time) in the head and 4.0 branch, and in jasper2.  Should
appear in the nightly and the next release.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspC.java

2002-05-15 Thread kinman

kinman  02/05/15 17:43:15

  Modified:jasper2/src/share/org/apache/jasper JspC.java
  Log:
  - Fixed 7007: Invalid names generated in web.xml by jspc.
  
  Revision  ChangesPath
  1.4   +4 -4  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JspC.java 6 May 2002 04:33:15 -   1.3
  +++ JspC.java 16 May 2002 00:43:15 -  1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v 1.3 
2002/05/06 04:33:15 glenn Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/05/06 04:33:15 $
  + * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v 1.4 
2002/05/16 00:43:15 kinman Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/05/16 00:43:15 $
*
* 
* 
  @@ -428,7 +428,7 @@
   
   targetClassName = null;
   String thisServletName;
  -if  (clc.getPackageName() == null) {
  +if  ("".equals(clc.getPackageName())) {
   thisServletName = clc.getClassName();
} else {
   thisServletName = clc.getPackageName()
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-05-15 Thread kinman

kinman  02/05/15 17:42:42

  Modified:jasper/src/share/org/apache/jasper Tag: tomcat_40_branch
JspC.java
  Log:
  - Fixed 7007: Invalid names generated in web.xml by jspc.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.12.2.3  +5 -5  jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.12.2.2
  retrieving revision 1.12.2.3
  diff -u -r1.12.2.2 -r1.12.2.3
  --- JspC.java 27 Feb 2002 01:02:38 -  1.12.2.2
  +++ JspC.java 16 May 2002 00:42:42 -  1.12.2.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v 1.12.2.2 
2002/02/27 01:02:38 kinman Exp $
  - * $Revision: 1.12.2.2 $
  - * $Date: 2002/02/27 01:02:38 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v 1.12.2.3 
2002/05/16 00:42:42 kinman Exp $
  + * $Revision: 1.12.2.3 $
  + * $Date: 2002/05/16 00:42:42 $
*
* 
* 
  @@ -408,9 +408,9 @@
   
   targetClassName = null;
   String thisServletName;
  -if  (clc.getPackageName() == null) {
  +if ("".equals(clc.getPackageName())) {
   thisServletName = clc.getClassName();
  - } else {
  +} else {
   thisServletName = clc.getPackageName()
   + '.' + clc.getClassName();
   }
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-05-15 Thread kinman

kinman  02/05/15 17:41:26

  Modified:jasper/src/share/org/apache/jasper JspC.java
  Log:
  - Fixed 7007: Invalid names generated in web.xml by jspc.
  
  Revision  ChangesPath
  1.15  +5 -5  jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- JspC.java 27 Feb 2002 01:01:00 -  1.14
  +++ JspC.java 16 May 2002 00:41:26 -  1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v 1.14 
2002/02/27 01:01:00 kinman Exp $
  - * $Revision: 1.14 $
  - * $Date: 2002/02/27 01:01:00 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v 1.15 
2002/05/16 00:41:26 kinman Exp $
  + * $Revision: 1.15 $
  + * $Date: 2002/05/16 00:41:26 $
*
* 
* 
  @@ -408,9 +408,9 @@
   
   targetClassName = null;
   String thisServletName;
  -if  (clc.getPackageName() == null) {
  +if ("".equals(clc.getPackageName())) {
   thisServletName = clc.getClassName();
  - } else {
  +} else {
   thisServletName = clc.getPackageName()
   + '.' + clc.getClassName();
   }
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: ant tools for 3.3

2002-05-15 Thread costinm

On Wed, 15 May 2002, Keith Wannamaker wrote:

> I've written some ant tools that allow builds to populate 
> the Tomcat work directories with precompiled JSPs.  I'm
> trying to decide a home for them, if any, and was thinking
> of a new package org.apache.tomcat.ant .. any other
> preference?

BTW, for jasper tasks: it may be a good idea to include them
in jakarta-tomcat-jasper. 

Maybe we'll generalize them and make it work with the new
jasper. I haven't looked at the new mangler, but porting
the 3.3 mangler or supporting multiple styles in the tasks
would be usefull.

( I think it's reasonably easy to use the new jasper with 3.3,
modulo few minor changes - and porting the tag pooling if 
it hasn't been done yet )

Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: ant tools for 3.3

2002-05-15 Thread costinm

On Wed, 15 May 2002, Keith Wannamaker wrote:

> I've written some ant tools that allow builds to populate 
> the Tomcat work directories with precompiled JSPs.  I'm
> trying to decide a home for them, if any, and was thinking
> of a new package org.apache.tomcat.ant .. any other
> preference?

+1

Just make sure the build.xml is able to exclude the tasks from
the 'main' jars and create separate jars for the new tasks.

Also - please include META-INF/ant.properties ( for multiple
taskdefs with resource= )

Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




ant tools for 3.3

2002-05-15 Thread Keith Wannamaker

I've written some ant tools that allow builds to populate 
the Tomcat work directories with precompiled JSPs.  I'm
trying to decide a home for them, if any, and was thinking
of a new package org.apache.tomcat.ant .. any other
preference?

code is @ http://apache.org/~keith/

Keith

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 7319] - codeBase in catalina.policy broken with jars

2002-05-15 Thread bugzilla

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

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

codeBase in catalina.policy broken with jars





--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 23:25 ---
You can see this if you have an XML parser in your /WEB-INF/lib directory.
Jasper will use that XML parser instead of the global XML parser installed
with Tomcat.  The parser in your /WEB-INF/lib does not have the permissions
required to read the dtd from the jasper-runtime.jar.

Hmmm... This might be fixable if there is a way to force the JSP Page
Compiler in Jasper to use the Tomcat XML parser classes rather than the
xml parser installed in /WEB-INF/lib.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 7008] - facade.HttpServletRequestFacade.getParameter(HttpServletRequestFacade.java:277) --> java.lang.ArrayIndexOutOfBoundsException

2002-05-15 Thread bugzilla

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

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

facade.HttpServletRequestFacade.getParameter(HttpServletRequestFacade.java:277) --> 
java.lang.ArrayIndexOutOfBoundsException





--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 21:02 ---
The bug is coming from IE which troncate the parameters to transmit :
see '..&listesCommunes=70515&listesCommunes=70544&listesCommunes=70577&listes'
(for info my parameters there comes from a multiple select list) 

With Mozilla RC2, it is working !

workaround : less data. < 2066 characters.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native/common jk_lb_worker.c jk_util.c jk_util.h

2002-05-15 Thread costin

costin  02/05/15 14:00:29

  Modified:jk/native build.xml
   jk/native/common jk_lb_worker.c jk_util.c jk_util.h
  Log:
  Patch from  Bernd Koecke, adding better support for hw balancers
  
  Submitted by: Bernd Keocke [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.33  +4 -1  jakarta-tomcat-connectors/jk/native/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/build.xml,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- build.xml 7 May 2002 01:43:52 -   1.32
  +++ build.xml 15 May 2002 21:00:29 -  1.33
  @@ -82,7 +82,7 @@

   
   
  -
  +
   
 
 
  @@ -162,6 +162,7 @@
   
   
   
  +

 
 
  @@ -223,6 +224,7 @@
 


  + 
   
   
 
  @@ -365,6 +367,7 @@
   


  +
   


  
  
  
  1.10  +55 -20jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c
  
  Index: jk_lb_worker.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_lb_worker.c3 May 2002 23:32:43 -   1.9
  +++ jk_lb_worker.c15 May 2002 21:00:29 -  1.10
  @@ -60,7 +60,7 @@
*  several workers.   *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Based on:   *
  - * Version: $Revision: 1.9 $   *
  + * Version: $Revision: 1.10 $   *
***/
   
   #include "jk_pool.h"
  @@ -84,6 +84,7 @@
   char*name;
   double  lb_factor;
   double  lb_value;
  +int is_local_worker;
   int in_error_state;
   int in_recovering;
   time_t  error_time;
  @@ -100,6 +101,8 @@
   
   char *name; 
   jk_worker_t worker;
  +int  in_local_worker_mode;
  +int  local_worker_only;
   };
   typedef struct lb_worker lb_worker_t;
   
  @@ -270,28 +273,29 @@
   }
   
   for(i = 0 ; i < p->num_of_workers ; i++) {
  -if(p->lb_workers[i].in_error_state) {
  -if(!p->lb_workers[i].in_recovering) {
  -time_t now = time(0);
  -
  -if((now - p->lb_workers[i].error_time) > WAIT_BEFORE_RECOVER) {
  -
  -p->lb_workers[i].in_recovering  = JK_TRUE;
  -p->lb_workers[i].error_time = now;
  +if (!p->in_local_worker_mode || p->lb_workers[i].is_local_worker || 
!p->local_worker_only) {
  +if(p->lb_workers[i].in_error_state) {
  +if(!p->lb_workers[i].in_recovering) {
  +time_t now = time(0);
  +if((now - p->lb_workers[i].error_time) > WAIT_BEFORE_RECOVER) {
  +p->lb_workers[i].in_recovering  = JK_TRUE;
  +p->lb_workers[i].error_time = now;
  +rc = &(p->lb_workers[i]);
  +
  +break;
  +}
  +}
  +} else {
  +if(p->lb_workers[i].lb_value < lb_min || !rc) {
  +lb_min = p->lb_workers[i].lb_value;
   rc = &(p->lb_workers[i]);
  -
  -break;
  +if (rc->is_local_worker) break;
   }
   }
  -} else {
  -if(p->lb_workers[i].lb_value < lb_min || !rc) {
  -lb_min = p->lb_workers[i].lb_value;
  -rc = &(p->lb_workers[i]);
  -}
  -}
  +}
   }
   
  -if(rc && rc->lb_value != 0 ) {
  +if(rc && !rc->is_local_worker) {
   rc->lb_value += rc->lb_factor;
   }
   
  @@ -415,12 +419,15 @@
   lb_worker_t *p = pThis->worker_private;
   char **worker_names;
   unsigned num_of_workers;
  +p->in_local_worker_mode = JK_FALSE;
  +p->local_worker_only = jk_get_local_worker_only_flag(props, p->name);
   
   if(jk_get_lb_worker_list(props,
p->name,
&worker_names, 
&num_of_workers) && num_of_workers) {
   unsigned i = 0;
  +unsigned j = 0;
   
   p->lb_workers = jk_pool_alloc(&p->p, 

DO NOT REPLY [Bug 7007] - Invalid names in web.xml generated by JspC for top-level JSP pages

2002-05-15 Thread bugzilla

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

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

Invalid names in web.xml generated by JspC for top-level JSP pages

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |
Version|4.0.4 Beta 1|4.0.4 Beta 3



--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 20:43 ---
This bug is still present in TC 4.0.4 B3, exactly as described in the initial
report.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime PageContextImpl.java

2002-05-15 Thread kinman

kinman  02/05/15 13:42:03

  Modified:jasper2/src/share/org/apache/jasper/compiler
ErrorDispatcher.java Generator.java Node.java
Validator.java
   jasper2/src/share/org/apache/jasper/runtime
PageContextImpl.java
  Log:
  - Fixed ErrorDispatcher is show javac error message even if there is no mapping.
  - Fixed codegen for plugins: allow rt expressions for width and height
attributes; and a missing java_code attribute.
  
  Revision  ChangesPath
  1.2   +13 -5 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ErrorDispatcher.java
  
  Index: ErrorDispatcher.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ErrorDispatcher.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ErrorDispatcher.java  28 Mar 2002 18:46:18 -  1.1
  +++ ErrorDispatcher.java  15 May 2002 20:42:03 -  1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ErrorDispatcher.java,v
 1.1 2002/03/28 18:46:18 kinman Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/03/28 18:46:18 $
  + * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ErrorDispatcher.java,v
 1.2 2002/05/15 20:42:03 kinman Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/05/15 20:42:03 $
*
* 
* 
  @@ -479,9 +479,11 @@
ErrorVisitor errVisitor = new ErrorVisitor(lineNum);
page.visit(errVisitor);
errNode = errVisitor.getJspSourceNode();
  +/* XXX Supress map exception to display the original error
if (errNode == null) {
jspError("jsp.error.source.map", lineNumStr);
}
  +*/
   }
partialErrMsg.append(line);
partialErrMsg.append('\n');
  @@ -490,10 +492,16 @@
   reader.close();
   
// add last error to error vector
  + String pageFile = null;
  + int pageLine = -1;
  + if (errNode != null) {
  + pageFile = errNode.getStart().getFile();
  + pageLine = errNode.getStart().getLineNumber();
  + }
errVec.add(new JavacErrorDetail(fname,
lineNum,
  - errNode.getStart().getFile(),
  - errNode.getStart().getLineNumber(),
  + pageFile,
  + pageLine,
partialErrMsg.toString()));
   
JavacErrorDetail[] errDetails = null;
  
  
  
  1.14  +47 -25
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
  
  Index: Generator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Generator.java11 May 2002 01:19:57 -  1.13
  +++ Generator.java15 May 2002 20:42:03 -  1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
 1.13 2002/05/11 01:19:57 kinman Exp $
  - * $Revision: 1.13 $
  - * $Date: 2002/05/11 01:19:57 $
  + * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
 1.14 2002/05/15 20:42:03 kinman Exp $
  + * $Revision: 1.14 $
  + * $Date: 2002/05/15 20:42:03 $
*
* 
* 
  @@ -668,8 +668,8 @@
String type = n.getAttributeValue("type");
String code = n.getAttributeValue("code");
String name = n.getAttributeValue("name");
  - String width = n.getAttributeValue("width");
  - String height = n.getAttributeValue("height");
  + Node.JspAttribute height = n.getHeight();
  + Node.JspAttribute width = n.getWidth();
String hspace = n.getAttributeValue("hspace");
String vspace = n.getAttributeValue("vspace");
String align = n.getAttributeValue("align");
  @@ -689,17 +689,28 @@
// IE style plugin
// 
// First compose the runtime output string 
  - String s0 = "';
  + String s0 = "');
// Then print the output string to the java file
  - out.printil("out.println(" + quote(s0) + ");");
  + out.printil("out.println(" + s1 + " + " + s2 + " + " + s3 + ");");
   
//  for java_code
s0 = "';
  @@ -741,16 +752,27 @@
   

cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_service_apache2.c mod_jk2.c

2002-05-15 Thread costin

costin  02/05/15 12:46:46

  Modified:jk/native2/jni jk_jni_aprImpl.c
   jk/native2/server/apache2 jk_service_apache2.c mod_jk2.c
  Log:
  Save the request start time.
  
  Few small fixes.
  
  Remove unused fields.
  
  Revision  ChangesPath
  1.21  +0 -7  jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c
  
  Index: jk_jni_aprImpl.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- jk_jni_aprImpl.c  14 May 2002 17:28:15 -  1.20
  +++ jk_jni_aprImpl.c  15 May 2002 19:46:46 -  1.21
  @@ -743,13 +743,6 @@
 "jkInvoke() NullPointerException 2\n");
return -1;
   }
  -
  -/* Simulate a receive on the incoming packet. e->reply is what's
  -   used when receiving data from java. 
  -*/
  -ep->currentData = nbuf;
  -ep->currentOffset=0;
  -/* This was an workaround, no longer used ! */
   
   ep->reply->reset(env, ep->reply);
   
  
  
  
  1.20  +2 -1  
jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c
  
  Index: jk_service_apache2.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- jk_service_apache2.c  9 May 2002 21:13:12 -   1.19
  +++ jk_service_apache2.c  15 May 2002 19:46:46 -  1.20
  @@ -59,7 +59,7 @@
* Description: Apache 2 plugin for Jakarta/Tomcat 
* Author:  Gal Shachor <[EMAIL PROTECTED]>   
* Henri Gomez <[EMAIL PROTECTED]>
  - * Version: $Revision: 1.19 $   
  + * Version: $Revision: 1.20 $   
*/
   
   #include "apu_compat.h"
  @@ -388,6 +388,7 @@
   s->no_more_chunks = 0;
   s->query_string   = r->args;
   
  +s->startTime = r->request_time;
   /*
* The 2.2 servlet spec errata says the uri from
* HttpServletRequest.getRequestURI() should remain encoded.
  
  
  
  1.22  +4 -3  jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c
  
  Index: mod_jk2.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- mod_jk2.c 14 May 2002 20:44:21 -  1.21
  +++ mod_jk2.c 15 May 2002 19:46:46 -  1.22
  @@ -59,7 +59,7 @@
* Description: Apache 2 plugin for Jakarta/Tomcat *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.21 $   *
  + * Version: $Revision: 1.22 $   *
***/
   
   /*
  @@ -106,8 +106,6 @@
*/
   static jk_workerEnv_t *workerEnv;
   
  -#define NO_APACHE_POOL 1
  -
   /*  Options setters  */
   
   /*
  @@ -441,6 +439,8 @@
   /* This is the first step */
   env->l->jkLog(env, env->l, JK_LOG_INFO,
 "mod_jk.post_config() first invocation\n");
  +
  +
   apr_pool_userdata_set( "INITOK", "mod_jk_init", NULL, gPool );
   return OK;
   }
  @@ -448,6 +448,7 @@
   env->l->jkLog(env, env->l, JK_LOG_INFO,
 "mod_jk.post_config() second invocation\n" ); 
   
  +workerEnv->parentInit( env, workerEnv);
   
   /* if(!workerEnv->was_initialized) { */
   /* workerEnv->was_initialized = JK_OK; */
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_handler_logon.c jk_handler_response.c jk_registry.c jk_shm.c jk_uriEnv.c jk_worker_lb.c

2002-05-15 Thread costin

costin  02/05/15 12:45:45

  Modified:jk/native2/common jk_handler_logon.c jk_handler_response.c
jk_registry.c jk_shm.c jk_uriEnv.c jk_worker_lb.c
  Log:
  Various other fixes / cosmetic changes.
  
  Note that 'recoverable' in endpoint is used to indicate a protocol ( ajp )
  failure, and will disconnect tomcat. We do this more consistently now.
  'reuse' is no longer used, we disconnect only if a protocol error happens.
  ( reuse wasn't used in the past - tomcat sent 'true' in all cases)
  
  Revision  ChangesPath
  1.16  +8 -7  jakarta-tomcat-connectors/jk/native2/common/jk_handler_logon.c
  
  Index: jk_handler_logon.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_handler_logon.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- jk_handler_logon.c14 May 2002 17:27:21 -  1.15
  +++ jk_handler_logon.c15 May 2002 19:45:45 -  1.16
  @@ -58,7 +58,7 @@
   /**
* Description: AJP14 Login handler
* Author:  Henri Gomez <[EMAIL PROTECTED]>
  - * Version: $Revision: 1.15 $  
  + * Version: $Revision: 1.16 $  
*/
   
   #include "jk_global.h"
  @@ -193,16 +193,17 @@
   
   /* take care of removing previously allocated data */
   /* X NEED A SUB POOL  */
  -if (ae->servletContainerName == NULL || 
  -strcmp( sname, ae->servletContainerName) != 0 )  {
  -ae->servletContainerName=
  -(char *)ae->pool->pstrdup( env, ae->pool,sname );
  -}
  +/*
  +  if (ae->servletContainerName == NULL || 
  +  strcmp( sname, ae->servletContainerName) != 0 )  {
  +  ae->servletContainerName=
  +  (char *)ae->pool->pstrdup( env, ae->pool,sname );
  +  }
   
   env->l->jkLog(env, env->l, JK_LOG_INFO,
 "handler.logok() Successfully connected to %s\n",
 ae->servletContainerName);
  -
  +*/
   return JK_HANDLER_LAST;
   }
   
  
  
  
  1.19  +6 -3  
jakarta-tomcat-connectors/jk/native2/common/jk_handler_response.c
  
  Index: jk_handler_response.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_handler_response.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- jk_handler_response.c 9 May 2002 21:12:15 -   1.18
  +++ jk_handler_response.c 15 May 2002 19:45:45 -  1.19
  @@ -207,14 +207,17 @@
   static int JK_METHOD jk2_handler_endResponse(jk_env_t *env, void *target, 
  jk_endpoint_t *ae, jk_msg_t   *msg )
   {
  -ae->reuse = (int)msg->getByte(env, msg);
  +int reuse = (int)msg->getByte(env, msg);
   
  -if((ae->reuse & 0X01) != ae->reuse) {
  +if((reuse & 0X01) != reuse) {
   /*
* Strange protocol error.
*/
  -ae->reuse = JK_FALSE;
  +reuse = JK_FALSE;
   }
  +if( reuse==JK_FALSE )
  +ae->recoverable=JK_FALSE;
  +
   return JK_HANDLER_LAST;
   }
   
  
  
  
  1.22  +1 -5  jakarta-tomcat-connectors/jk/native2/common/jk_registry.c
  
  Index: jk_registry.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_registry.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- jk_registry.c 10 May 2002 23:45:18 -  1.21
  +++ jk_registry.c 15 May 2002 19:45:45 -  1.22
  @@ -62,16 +62,12 @@
   #include "jk_service.h"
   #include "jk_env.h" 
   
  -#ifdef HAS_APR
  -#include "apr.h"
  -#endif
  -
   #include "jk_registry.h"
   
   
   /***
* Description: Worker list*
  - * Version: $Revision: 1.21 $   *
  + * Version: $Revision: 1.22 $   *
***/
   
   /** Static declarations for all 'hardcoded' modules. This is a hack, 
  
  
  
  1.15  +3 -0  jakarta-tomcat-connectors/jk/native2/common/jk_shm.c
  
  Index: jk_shm.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_shm.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- jk_shm.c  13 May 2002 08:57:56 -  1.14
  +++ jk_shm.c  15 May 2002 19:45:45 -  1.15
  @@ -330,6 +330,8 @@
   /* XXX interprocess sync */
   slotId=shm->head->lastSlot++;
   slot=shm->getSlot( env, shm, s

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_status.c

2002-05-15 Thread costin

costin  02/05/15 12:42:56

  Modified:jk/native2/common jk_worker_status.c
  Log:
  Display the stat info and totals.
  
  Revision  ChangesPath
  1.21  +71 -12jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c
  
  Index: jk_worker_status.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_status.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- jk_worker_status.c14 May 2002 20:42:14 -  1.20
  +++ jk_worker_status.c15 May 2002 19:42:56 -  1.21
  @@ -75,24 +75,27 @@
   #include "jk_registry.h"
   #include "jk_endpoint.h"
   
  +
   static void jk2_worker_status_displayScoreboardInfo(jk_env_t *env, jk_ws_service_t 
*s,
   jk_workerEnv_t *wenv)
   {
   jk_map_t *map=wenv->initData;
   int i;
   int j;
  +int totalReq=0;
  +int totalErr=0;
  +long totalTime=0;
  +long maxTime=0;
   int needHeader=JK_TRUE;
   
   if( wenv->shm==NULL || wenv->shm->head==NULL)
   return;
   
  -s->jkprintf(env, s, "Scoreboard info\n");
  -
  +s->jkprintf(env, s, "Scoreboard info (ver=%d slots=%d)\n", 
  +wenv->shm->head->lbVer, wenv->shm->head->lastSlot );
  +
   s->jkprintf(env, s, "\n");
   
  -s->jkprintf(env, s, "Version%d\n", 
wenv->shm->head->lbVer );
  -s->jkprintf(env, s, "Slots%d\n", 
wenv->shm->head->lastSlot );
  -
   for( i=1; i < wenv->shm->head->lastSlot; i++ ) {
   jk_shm_slot_t *slot= wenv->shm->getSlot( env, wenv->shm, i );
   
  @@ -102,21 +105,77 @@
   /* This is an endpoint slot */
   void *data=slot->data;
   
  -s->jkprintf(env, s, "%s\n", slot->name );
  -s->jkprintf(env, s, "StructCnt%d\n", 
slot->structCnt );
  -s->jkprintf(env, s, "StructSize%d\n", 
slot->structSize );
  -s->jkprintf(env, s, "RequestsErrors\n" );
  +s->jkprintf(env, s, "%s\n", slot->name );
  +s->jkprintf(env, s, "Cnt=%dsize=%d\n",
  +slot->structCnt, slot->structSize );
  +
  +s->jkprintf(env, s, "ReqErr");
  +s->jkprintf(env, s,"LastReq\n" );
  +
  +#ifdef HAVE_APR
  +s->jkprintf(env, s, 
"ConnectionTimeTotalTimeMaxTimeAvgTime" );
  +s->jkprintf(env, s, "ReqStart+jk+end" );
  +#endif
   
   /* XXX Add info about number of slots */
   for( j=0; jstructCnt ; j++ ) {
   jk_stat_t *stat=(jk_stat_t *) ( data + j * sizeof( jk_stat_t ));
   
  -s->jkprintf(env, s, "%d%d\n", 
stat->reqCnt, stat->errCnt );
  +s->jkprintf(env, s, "%d%d\n", stat->reqCnt, 
stat->errCnt );
  +s->jkprintf(env, s, "%s\n",  stat->active );
  +
  +totalReq+=stat->reqCnt;
  +totalErr+=stat->errCnt;
  +#ifdef HAVE_APR
  +{
  +char ctimeBuf[APR_CTIME_LEN];
  +apr_ctime( ctimeBuf, stat->connectedTime );
  +s->jkprintf(env, s, "%s\n", ctimeBuf );
  +
  +s->jkprintf(env, s, "%ld\n", stat->totalTime );
  +s->jkprintf(env, s, "%ld\n", stat->maxTime );
  +
  +if( stat->reqCnt + stat->errCnt > 0 ) 
  +s->jkprintf(env, s, "%ld\n",
  +(stat->totalTime / ( stat->reqCnt + 
stat->errCnt )) );
  +else
  +s->jkprintf(env, s, "-\n");
  +
  +s->jkprintf(env, s, "%ld\n", stat->startTime );
  +s->jkprintf(env, s, "%ld\n",
  +stat->jkStartTime - stat->startTime );
  +s->jkprintf(env, s, "%ld\n",
  +stat->endTime - stat->startTime );
  +
  +totalTime += stat->totalTime;
  +if( maxTime < stat->maxTime )
  +maxTime=stat->maxTime;
  +}
  +#endif
  +s->jkprintf(env, s, "\n");
   }
   
   }
   }
   s->jkprintf(env, s, "\n");
  +
  +s->jkprintf(env, s, "Totals:\n");
  +
  +s->jkprintf(env, s, "ReqErrMaxAvg");
  +
  +s->jkprintf(env, s, "%d\n", totalReq );
  +s->jkprintf(env, s, "%d\n", totalErr );
  +
  +s->jkprintf(env, s, "%ld\n", maxTime );
  +
  +if( totalErr + totalReq > 0 ) {
  +long avg=totalTime / ( totalReq + totalErr );
  +s->jkprintf(env, s, "%ld\n", avg );
  +} else {
  +s->jkprintf(env, s, "-\n" );
  +}
  +
  +s->jkprintf(env, s, "\n");
   }
   
   /** Use 'introspection' data to find what getters an type support,
  @@ -285,9 +344,9 @@
   
   /* Body */
   jk2_

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

2002-05-15 Thread costin

costin  02/05/15 12:41:27

  Modified:jk/native2/common jk_worker_ajp13.c
  Log:
  Time the requests.
  
  Revision  ChangesPath
  1.21  +56 -41jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c
  
  Index: jk_worker_ajp13.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_worker_ajp13.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- jk_worker_ajp13.c 14 May 2002 20:41:05 -  1.20
  +++ jk_worker_ajp13.c 15 May 2002 19:41:26 -  1.21
  @@ -74,7 +74,6 @@
   #include "jk_objCache.h"
   #include "jk_registry.h"
   
  -
   #define AJP_DEF_RETRY_ATTEMPTS(2)
   #define AJP14_PROTO 14
   #define AJP13_PROTO 13
  @@ -213,10 +212,13 @@
   env->l->jkLog(env, env->l, JK_LOG_INFO, "endpoint.close() %s\n",
 ae->worker->mbean->name);
   
  -ae->reuse = JK_FALSE;
  +/* ae->reuse = JK_FALSE; */
   if( ae->worker->channel != NULL )
   ae->worker->channel->close( env, ae->worker->channel, ae );
   
  +ae->sd=-1;
  +ae->recoverable=JK_TRUE;
  +
   ae->cPool->reset( env, ae->cPool );
   /* ae->cPool->close( env, ae->cPool ); */
   
  @@ -254,7 +256,11 @@
   
   /* We just reconnected, reset error state
*/
  -ae->worker->in_error_state=0;
  +ae->worker->in_error_state=JK_FALSE;
  +
  +#ifdef HAS_APR
  +ae->stats->connectedTime=apr_time_now();
  +#endif
   
   /** XXX use a 'connected' field */
   if( ae->sd == -1 ) ae->sd=0;
  @@ -297,8 +303,8 @@
   */
   static int JK_METHOD
   jk2_worker_ajp14_sendAndReconnect(jk_env_t *env, jk_worker_t *worker,
  -  jk_ws_service_t *s,
  -  jk_endpoint_t   *e )
  +  jk_ws_service_t *s,
  +  jk_endpoint_t   *e )
   {
   int attempt;
   int err=JK_OK;
  @@ -319,10 +325,12 @@
   env->l->jkLog(env, env->l, JK_LOG_ERROR,
 "ajp14.service() failed to connect endpoint errno=%d 
%s\n",
 errno, strerror( errno ));
  +
  +e->worker->in_error_state=JK_TRUE;
   return err;
   }
   }
  -/* e->request->dump(env, e->request, "Before sending "); */
  +
   err=e->worker->channel->send( env, e->worker->channel, e,
 e->request );
   
  @@ -334,32 +342,12 @@
   break;
   }
   
  -if( e->recoverable != JK_TRUE ) {
  -env->l->jkLog(env, env->l, JK_LOG_ERROR,
  - "ajp14.service() error sending request %s, giving up\n",
  - worker->mbean->name);
  -return JK_ERR;
  -}
  -
   env->l->jkLog(env, env->l, JK_LOG_ERROR,
 "ajp14.service() error sending, reconnect %s %d %d %s\n",
 e->worker->channelName, err, errno, strerror(errno));
   
   channel->close( env, channel, e );
  -err=jk2_worker_ajp14_connect(env, e); 
  -
  -if( err != JK_OK ) {
  -env->l->jkLog(env, env->l, JK_LOG_ERROR,
  - "ajp14.service() failed to reconnect endpoint errno=%d\n",
  - errno);
  -return JK_ERR;
  -}
  -
  -/*
  - * After we are connected, each error that we are going to
  - * have is probably unrecoverable
  - */
  -e->recoverable = JK_FALSE;
  +e->sd=-1;
   }
   return JK_OK;
   }
  @@ -372,13 +360,14 @@
   {
   int err;
   
  +e->recoverable = JK_TRUE;
  +s->is_recoverable_error = JK_TRUE;
  +
   err=jk2_worker_ajp14_sendAndReconnect( env, worker, s, e );
   if( err!=JK_OK )
   return err;
   
   /* We should have a channel now, send the post data */
  -s->is_recoverable_error = JK_TRUE;
  -e->recoverable = JK_TRUE;
   
   /* Prepare to send some post data ( ajp13 proto ). We do that after the
request was sent ( we're receiving data from client, can be slow, no
  @@ -405,6 +394,13 @@
   }
   err= e->worker->channel->send( env, e->worker->channel, e,
  e->post );
  +if( err != JK_OK ) {
  +e->recoverable = JK_FALSE;
  +s->is_recoverable_error = JK_FALSE;
  +env->l->jkLog(env, env->l, JK_LOG_ERROR,
  +  "ajp14.service() Error receiving initial post \n");
  +return JK_ERR;
  +}
   }
   
   err = e->worker->workerEnv->processCallbacks(env, e->worker->workerEnv,
  @@ -471,13 +467,15 @@
   }
   
   e->currentRequest=s;
  +
  +/* XXX configurable ? */
  +strncpy( e->stats->active, s->req_uri, 64);
   
 

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_workerEnv.c

2002-05-15 Thread costin

costin  02/05/15 12:40:44

  Modified:jk/native2/common jk_workerEnv.c
  Log:
  Add the timing option.
  
  Add a CS to support concurent operation ( non-critical since this is not
  per request ).
  
  addEndpoint - will assign an index to the endpoint. We also assign an
  index to channels and workers, based on the position in the worker/channel
  tables.
  
  Revision  ChangesPath
  1.42  +85 -23jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c
  
  Index: jk_workerEnv.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- jk_workerEnv.c14 May 2002 20:40:22 -  1.41
  +++ jk_workerEnv.c15 May 2002 19:40:44 -  1.42
  @@ -59,7 +59,7 @@
* Description: Workers controller *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Author:  Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.41 $   *
  + * Version: $Revision: 1.42 $   *
***/
   
   #include "jk_env.h"
  @@ -89,6 +89,8 @@
*/
   if( strcmp( name, "sslEnable" )==0 ) {
   wEnv->ssl_enable = JK_TRUE;
  +} else if( strcmp( name, "timing" )==0 ) {
  +wEnv->timing= atoi( value );
   } else if( strcmp( name, "httpsIndicator" )==0 ) {
   wEnv->https_indicator = value;
   } else if( strcmp( name, "certsIndicator" )==0 ) {
  @@ -297,6 +299,31 @@
   return JK_OK;
   }
   
  +static int jk2_workerEnv_parentInit(jk_env_t *env, jk_workerEnv_t *wEnv)
  +{
  +char *configFile;
  +
  +env->l->init( env, env->l );
  +
  +configFile=wEnv->config->file;
  +if(  configFile == NULL ) {
  +wEnv->config->setPropertyString( env, wEnv->config,
  + "config.file",
  + "${serverRoot}/conf/workers2.properties" );
  +configFile=wEnv->config->file;
  +}
  +
  +if( wEnv->shm != NULL && ! wEnv->shm->mbean->disabled ) {
  +wEnv->shm->init( env, wEnv->shm );
  +}
  +
  +if( wEnv->shm != NULL && wEnv->shm->head != NULL ) {
  +wEnv->shm->reset( env, wEnv->shm);
  +env->l->jkLog(env, env->l, JK_LOG_ERROR, "workerEnv.init() Reset shm\n" );
  +}
  +}
  +
  +
   static int jk2_workerEnv_init(jk_env_t *env, jk_workerEnv_t *wEnv)
   {
   int err;
  @@ -322,7 +349,7 @@
   if( w==NULL ) {
   jk_bean_t *jkb=env->createBean2(env, wEnv->pool, "worker.lb", "lb" );
   w=jkb->object;
  -if( wEnv->debug > 0 )
  +if( wEnv->mbean->debug > 0 )
   env->l->jkLog(env, env->l, JK_LOG_ERROR, "workerEnv.init() create 
default worker %s\n",  jkb->name );
   }
   wEnv->defaultWorker= w;
  @@ -432,14 +459,15 @@
   if( rc!=JK_OK ) {
   env->l->jkLog(env, env->l, JK_LOG_ERROR,
 "workerEnv.processCallbacks() Error reading reply\n");
  -/* We can recover */
  -return JK_ERR;
  +/* Probably protocol error, we can't recover
  + */
  +ep->recoverable=JK_FALSE;
  +return rc;
   }
   
   if( ep->worker->mbean->debug > 10 )
   ep->request->dump( env, msg, "Received" );
   
  -/*  ep->reply->dump(env, ep->reply, "Received ");   */
   code = (int)msg->getByte(env, msg);
   rc=jk2_workerEnv_dispatch( env, wEnv, req, ep, code, msg );
   
  @@ -461,7 +489,7 @@
* A possible work-around could be to store the uploaded
* data to file and replay for it
*/
  -ep->recoverable = JK_FALSE;
  +req->is_recoverable_error = JK_FALSE;
   if( ep->worker->mbean->debug > 10 )
   ep->request->dump( env, ep->post, "Apache->tomcat" );
   
  @@ -469,28 +497,27 @@
   if (rc < 0) {
   env->l->jkLog(env, env->l, JK_LOG_ERROR,
 "ajp14.processCallbacks() error sending response 
data\n");
  -return JK_ERR;
  +ep->recoverable = JK_FALSE;
  +return rc;
   }
   break;
   case JK_HANDLER_ERROR:
  -/*
  - * we won't be able to gracefully recover from this so
  - * set recoverable to false and get out.
  +/* Normal error ( for example writing to the client failed ).
  + * The ajp connection is still in a stable state.
*/
  -ep->recoverable = JK_FALSE;
 

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_endpoint.c

2002-05-15 Thread costin

costin  02/05/15 12:37:44

  Modified:jk/native2/common jk_endpoint.c
  Log:
  Remove the getAttribute - there's no usefull information in endpoint, all
  the stuff has moved to the scoreboard.
  
  We currently use the scoreboard info directly, as a struct - i.e. without
  encapsulation or accessors. That's not nice from an OO point of view, but
  is probably cleaner.
  
  Revision  ChangesPath
  1.13  +40 -59jakarta-tomcat-connectors/jk/native2/common/jk_endpoint.c
  
  Index: jk_endpoint.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_endpoint.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- jk_endpoint.c 14 May 2002 20:39:26 -  1.12
  +++ jk_endpoint.c 15 May 2002 19:37:44 -  1.13
  @@ -73,48 +73,46 @@
   #include "jk_objCache.h"
   #include "jk_registry.h"
   
  -static char *myAttInfo[]={ "channel", "active", "reqCnt", "errCnt", NULL };
   
  -/** Will return endpoint specific runtime properties
  - *
  - *uri  The uri that is beeing processed, NULL if the endpoing is 
inactive
  - *channelName  The channel that is using this endpoint
  - *workerName   The name of the worker using this endpoint
  - *requests Number of requests beeing serviced by this
  - *avg_time, max_time
  - *
  - */
  -static void * JK_METHOD jk2_endpoint_getAttribute(jk_env_t *env, jk_bean_t *bean, 
char *name ) {
  +static int JK_METHOD jk2_endpoint_init(jk_env_t *env, jk_bean_t *bean ) {
   jk_endpoint_t *ep=(jk_endpoint_t *)bean->object;
  -
  -if( strcmp( name, "channel" )==0 ) {
  -return ep->worker->channel->mbean->name;
  -} else if (strcmp( name, "active" )==0 ) {
  -if( ep->currentRequest != NULL )
  -return ep->currentRequest->req_uri;
  -} else if (strcmp( name, "reqCnt" )==0 ) {
  -char *buf=env->tmpPool->calloc( env, env->tmpPool, 20 );
  -sprintf( buf, "%d", ep->stats->reqCnt );
  -return buf;
  -} else if (strcmp( name, "errCnt" )==0 ) {
  -char *buf=env->tmpPool->calloc( env, env->tmpPool, 20 );
  -sprintf( buf, "%d", ep->stats->errCnt );
  -return buf;
  +jk_stat_t *stats;
  +
  +/* alloc it inside the shm if possible */
  +if( ep->workerEnv->epStat != NULL && ep->workerEnv->childId >= 0 ) {
  +jk_stat_t *statArray=(jk_stat_t *)ep->workerEnv->epStat->data;
  +stats= & statArray[ ep->id ];
  +ep->workerEnv->epStat->structSize=sizeof( jk_stat_t );
  +ep->workerEnv->epStat->structCnt=ep->id + 1;
  +env->l->jkLog(env, env->l, JK_LOG_INFO,
  +  "SHM stats %d %p %p %s %s childId=%d\n", ep->id,
  +  ep->workerEnv->epStat->data, stats,
  +  ep->mbean->localName, ep->mbean->name, 
ep->workerEnv->childId);
  +} else {
  +stats = (jk_stat_t *)ep->mbean->pool->calloc( env, ep->mbean->pool, sizeof( 
jk_stat_t ) );
  +env->l->jkLog(env, env->l, JK_LOG_INFO,
  +  "Local stats %d %p %d\n", ep->id, ep->workerEnv->epStat, 
ep->workerEnv->childId );
   }
   
  -return NULL;
  +ep->stats=stats;
  +
  +ep->stats->reqCnt=0;
  +ep->stats->errCnt=0;
  +#ifdef HAVE_APR
  +ep->stats->maxTime=0;
  +ep->stats->totalTime=0;
  +#endif
  +
   }
   
   int JK_METHOD
   jk2_endpoint_factory( jk_env_t *env, jk_pool_t *pool,
  -  jk_bean_t *result,
  +  jk_bean_t *result,
 const char *type, const char *name)
   {
   jk_endpoint_t *e = (jk_endpoint_t *)pool->alloc(env, pool,
   sizeof(jk_endpoint_t));
   jk_workerEnv_t *workerEnv;
  -jk_stat_t *stats;
  -jk_pool_t *endpointPool = pool->create( env, pool, HUGE_POOL_SIZE );
   int epId;
   
   if (e==NULL) {
  @@ -123,46 +121,29 @@
   return JK_ERR;
   }
   
  -e->pool = endpointPool;
  -
   /* Init message storage areas. Protocol specific.
*/
  -e->request = jk2_msg_ajp_create( env, e->pool, 0);
  -e->reply = jk2_msg_ajp_create( env, e->pool, 0);
  -e->post = jk2_msg_ajp_create( env, e->pool, 0);
  -result->getAttributeInfo=myAttInfo;
  -result->getAttribute= jk2_endpoint_getAttribute;
  -e->reuse = JK_FALSE;
  -
  -e->cPool=endpointPool->create(env, endpointPool, HUGE_POOL_SIZE );
  +e->request = jk2_msg_ajp_create( env, pool, 0);
  +e->reply = jk2_msg_ajp_create( env, pool, 0);
  +e->post = jk2_msg_ajp_create( env, pool, 0);
  +
  +e->readBuf=pool->alloc( env, pool, 8096 );
  +e->bufPos=0;
  +
  +result->init=jk2_endpoint_init;
  +
  +e->sd=-1;
  +e->recoverable=JK_TRUE;
  +e->cPool=pool->create(env, pool, HUGE_POOL_SIZE );
   
   e->channelData = NULL;
   e

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

2002-05-15 Thread costin

costin  02/05/15 12:36:16

  Modified:jk/native2/common jk_channel_socket.c
  Log:
  One experimental optimization - use fewer read() calls and do some buffering.
  
  The new function is not enabled, and it seems to have only minimal benefits.
  ( it does more if coupled with a write buffering on tomcat side, but
  that's not easy with 4.x and requires few changes in 3.x as well ).
  
  Revision  ChangesPath
  1.26  +114 -33   jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
  
  Index: jk_channel_socket.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- jk_channel_socket.c   14 May 2002 20:42:49 -  1.25
  +++ jk_channel_socket.c   15 May 2002 19:36:16 -  1.26
  @@ -94,12 +94,6 @@
   short port;
   };
   
  -/** Informations for each connection
  - */
  -typedef struct jk_channel_socket_data {
  -int sock;
  -} jk_channel_socket_data_t;
  -
   typedef struct jk_channel_socket_private jk_channel_socket_private_t;
   
   /*
  @@ -313,16 +307,8 @@
   env->l->jkLog(env, env->l, JK_LOG_INFO,
 "channelSocket.connect(), sock = %d\n", sock);
   
  -{
  -jk_channel_socket_data_t *sd=endpoint->channelData;
  -if( sd==NULL ) {
  -sd=(jk_channel_socket_data_t *)
  -endpoint->pool->calloc( env, endpoint->pool,
  -sizeof( jk_channel_socket_data_t ));
  -endpoint->channelData=sd;
  -}
  -sd->sock=sock;
  -}
  +endpoint->sd=sock;
  +
   return JK_OK;
   }
   
  @@ -333,12 +319,9 @@
jk_endpoint_t *endpoint)
   {
   int sd;
  -jk_channel_socket_data_t *chD=endpoint->channelData;
  -if( chD==NULL ) 
  - return JK_ERR;
   
  -sd=chD->sock;
  -chD->sock=-1;
  +sd=endpoint->sd;
  +endpoint->sd=-1;
   /* nothing else to clean, the socket_data was allocated ouf of
*  endpoint's pool
*/
  @@ -364,17 +347,16 @@
   int len;
   int sd;
   int  sent=0;
  -jk_channel_socket_data_t *chD=endpoint->channelData;
   
  -if( chD==NULL ) {
  +sd=endpoint->sd;
  +if( sd<0 )
   return JK_ERR;
  -}
  -
  +
   msg->end( env, msg );
   len=msg->len;
   b=msg->buf;
  -sd=chD->sock;
   
  +
   while(sent < len) {
   int this_time = send(sd, (char *)b + sent , len - sent,  0);

  @@ -404,14 +386,13 @@
 jk_endpoint_t *endpoint,
 char *b, int len )
   {
  -jk_channel_socket_data_t *chD=endpoint->channelData;
   int sd;
   int rdlen;
   
  -if( chD==NULL ) 
  - return JK_ERR;
  -sd=chD->sock;
  +sd=endpoint->sd;
   rdlen = 0;
  +
  +if( sd<0 ) return JK_ERR;
   
   while(rdlen < len) {
int this_time = recv(sd, 
  @@ -438,6 +419,45 @@
   return rdlen; 
   }
   
  +static int JK_METHOD jk2_channel_socket_readN2( jk_env_t *env,
  +jk_channel_t *ch,
  +jk_endpoint_t *endpoint,
  +char *b, int minLen, int maxLen )
  +{
  +int sd;
  +int rdlen;
  +
  +sd=endpoint->sd;
  +rdlen = 0;
  +
  +if( sd<0 ) return JK_ERR;
  +
  +while(rdlen < minLen ) {
  + int this_time = recv(sd, 
  +  (char *)b + rdlen, 
  +  maxLen - rdlen, 
  +  0);
  +/* fprintf(stderr, "XXX received %d\n", this_time ); */
  + if(-1 == this_time) {
  +#ifdef WIN32
  + if(SOCKET_ERROR == this_time) { 
  + errno = WSAGetLastError() - WSABASEERR;
  + }
  +#endif /* WIN32 */
  + 
  + if(EAGAIN == errno) {
  + continue;
  + } 
  + return -1;
  + }
  + if(0 == this_time) {
  + return -1; 
  + }
  + rdlen += this_time;
  +}
  +return rdlen; 
  +}
  +
   
   /** receive len bytes.
* @param sd  opened socket.
  @@ -448,13 +468,12 @@
* Was: tcp_socket_recvfull
*/
   static int JK_METHOD jk2_channel_socket_recv( jk_env_t *env, jk_channel_t *ch,
  - jk_endpoint_t *endpoint,
  - jk_msg_t *msg )
  +  jk_endpoint_t *endpoint,
  +  jk_msg_t *msg )
   {
   int hlen=msg->headerLength;
   int blen;
   int rc;
  -
   
   jk2_channel_socket_readN( env, ch, endpoint, msg->buf, hlen );
   
  @@ -479,7 +49

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

2002-05-15 Thread costin

costin  02/05/15 12:34:09

  Modified:jk/native2/common jk_channel_apr_socket.c jk_channel_jni.c
  Log:
  Few cosmetic changes - simplify the code
  
  Revision  ChangesPath
  1.17  +13 -27
jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c
  
  Index: jk_channel_apr_socket.c
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- jk_channel_apr_socket.c   12 May 2002 01:08:45 -  1.16
  +++ jk_channel_apr_socket.c   15 May 2002 19:34:09 -  1.17
  @@ -89,12 +89,6 @@
   short port;
   };
   
  -/** Informations for each connection
  - */
  -typedef struct jk_channel_apr_data {
  -apr_socket_t *sock;
  -} jk_channel_apr_data_t;
  -
   typedef struct jk_channel_apr_private jk_channel_apr_private_t;
   
   /*
  @@ -214,9 +208,8 @@
   
   apr_sockaddr_t *remote_sa=socketInfo->addr;
   int ndelay=socketInfo->ndelay;
  -jk_channel_apr_data_t *sd=endpoint->channelData;
   
  -apr_socket_t *sock;
  +apr_socket_t *sock=endpoint->channelData;
   apr_status_t ret;
   apr_interval_time_t timeout = 2 * APR_USEC_PER_SEC;
   char msg[128];
  @@ -270,13 +263,7 @@
   */
   
   /* store the channel information */
  -if( sd==NULL ) {
  -sd=(jk_channel_apr_data_t *)
  -endpoint->pool->calloc( env, endpoint->pool,
  -sizeof( jk_channel_apr_data_t ));
  -endpoint->channelData=sd;
  -}
  -sd->sock = sock;
  +endpoint->channelData=sock;
   
   return JK_OK;
   }
  @@ -290,12 +277,13 @@
   apr_socket_t *sd;
   apr_status_t rc;
   
  -jk_channel_apr_data_t *chD=endpoint->channelData;
  -if( chD==NULL ) 
  +sd=endpoint->channelData;
  +if( sd==NULL ) 
   return JK_ERR;
   
  -sd=chD->sock;
  -chD->sock=NULL; /* XXX check it. */
  +endpoint->channelData=NULL; /* XXX check it. */
  +endpoint->sd=-1;
  +
   /* nothing else to clean, the socket_data was allocated ouf of
*  endpoint's pool
*/
  @@ -330,17 +318,15 @@
   int this_time;
   int unixsock;
   
  -jk_channel_apr_data_t *chD=endpoint->channelData;
  +sock=endpoint->channelData;
   
  -if( chD==NULL ) 
  +if( sock==NULL ) 
   return JK_ERR;
   
   msg->end( env, msg );
   len=msg->len;
   b=msg->buf;
   
  -sock=chD->sock;
  -
   length = (apr_size_t) len;
   stat = apr_send(sock, b, &length);
   if (stat!= APR_SUCCESS) {
  @@ -366,8 +352,6 @@
   jk_endpoint_t *endpoint,
   char *b, int len ) 
   {
  -jk_channel_apr_data_t *chD=endpoint->channelData;
  -
   apr_socket_t *sock;
   apr_size_t length;
   apr_status_t stat;
  @@ -375,9 +359,11 @@
   int sd;
   int rdlen;
   
  -if( chD==NULL ) 
  +sock=endpoint->channelData;
  +
  +if( sock==NULL ) 
   return JK_ERR;
  -sock=chD->sock;
  +
   rdlen = 0;
   
   length = (apr_size_t) len;
  
  
  
  1.18  +4 -23 jakarta-tomcat-connectors/jk/native2/common/jk_channel_jni.c
  
  Index: jk_channel_jni.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_jni.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- jk_channel_jni.c  11 May 2002 00:02:53 -  1.17
  +++ jk_channel_jni.c  15 May 2002 19:34:09 -  1.18
  @@ -176,8 +176,8 @@
  solution
   */
   epData=(jk_ch_jni_ep_private_t *)
  -endpoint->pool->calloc( env,endpoint->pool,
  -sizeof( jk_ch_jni_ep_private_t ));
  +endpoint->mbean->pool->calloc( env,endpoint->mbean->pool,
  +   sizeof( jk_ch_jni_ep_private_t ));
   
   endpoint->channelData=epData;
   /** XXX make it customizable */
  @@ -250,8 +250,8 @@
   
   /* XXX > ajp buffer size. Don't know how to fragment or reallocate
  yet */
  -epData->carray=(char *)endpoint->pool->calloc( env, endpoint->pool,
  -   epData->arrayLen);
  +epData->carray=(char *)endpoint->mbean->pool->calloc( env, 
endpoint->mbean->pool,
  +  epData->arrayLen);
   
   jniCh->writeMethod =
   (*jniEnv)->GetStaticMethodID(jniEnv, jniCh->jniBridge,
  @@ -469,24 +469,6 @@
   if( worker->mbean->debug > 0 )
   env->l->jkLog(env, env->l, JK_LOG_INFO, "service() attaching to vm\n");
   
  -
  -jniEnv=(JNIEnv *)endpoint->endpoint_private;
  -if(jniEnv==NULL) { /*! attached */
  -/* Try to attach */

cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_channel.h jk_endpoint.h jk_global.h jk_service.h jk_shm.h jk_uriEnv.h jk_worker.h jk_workerEnv.h

2002-05-15 Thread costin

costin  02/05/15 12:32:43

  Modified:jk/native2/include jk_channel.h jk_endpoint.h jk_global.h
jk_service.h jk_shm.h jk_uriEnv.h jk_worker.h
jk_workerEnv.h
  Log:
  More cosmetic changes - removing fields that are no longer used, adding
  comments.
  
  Added several timing fields in the data we collect on the scoreboard,
  and flags to turn on/off the collection ( per uri or globally ).
  
  The time collection uses apr - it won't work in Apache1.3 ( or IIS ) unless
  apr support is enabled.
  
  In my test the time collection adds about 2 ms per request ( 33->35 ms average
  for a simple request, with ab -c 20 ). I don't think this is much, but
  if you don't use the info there's no need to collect it.
  
  Also added a new function to workerEnv - to be called by the 'parent'
  process in a multi-process server ( i.e. apache :-). This will allow
  jk to acquire the scoreboard ( at least HPUX is picky about this ),
  and will be used to reset the sb on startup.
  
  Revision  ChangesPath
  1.10  +2 -0  jakarta-tomcat-connectors/jk/native2/include/jk_channel.h
  
  Index: jk_channel.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_channel.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_channel.h  11 Apr 2002 19:28:01 -  1.9
  +++ jk_channel.h  15 May 2002 19:32:42 -  1.10
  @@ -102,6 +102,8 @@
   struct jk_channel {
   struct jk_bean *mbean;
   
  +int id;
  +
   /* JK_TRUE if the channel is 'stream' based, i.e. it works using
  send() followed by blocking reads().
  XXX make it type and define an enum of supported types ?
  
  
  
  1.14  +56 -39jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h
  
  Index: jk_endpoint.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_endpoint.h 14 May 2002 17:04:09 -  1.13
  +++ jk_endpoint.h 15 May 2002 19:32:42 -  1.14
  @@ -61,12 +61,13 @@
* Author:  Gal Shachor <[EMAIL PROTECTED]>   
* Author:  Dan Milstein <[EMAIL PROTECTED]>
* Author:  Henri Gomez <[EMAIL PROTECTED]>   
  - * Version: $Revision: 1.13 $  
  + * Version: $Revision: 1.14 $  
***/
   
   #ifndef JK_ENDPOINT_H
   #define JK_ENDPOINT_H
   
  +#include "jk_global.h"
   #include "jk_env.h"
   #include "jk_map.h"
   #include "jk_service.h"
  @@ -121,46 +122,40 @@
*/
   struct jk_endpoint {
   struct jk_bean *mbean;
  -/* 
  - * A 'this' pointer which is used by the subclasses of this class to
  - * point to data/functions which are specific to a given protocol 
  - * (e.g. ajp12 or ajp13 or ajp14).  
  +
  +int id;
  +
  +/* Parent
*/
  -void *endpoint_private;
  +struct jk_worker *worker;
   
  -/** Data specific to a channel connection
  +struct jk_workerEnv *workerEnv;
  +
  +/** Data specific to a channel connection. Usually a struct
  + * containing info about the active connection ( sd, jniEnv, etc ).
*/
   void *channelData;
   
  -/* Ok, this is going to be a Notes - similar with what we have on the
  - * java side. Various channels need to be able to store private data.
  +/* Channel-specific data. Usually a file descriptor. ( avoids
  +   using a struct for typical socket channels )
*/
  -void *currentData;
  -int currentOffset;
  -int currentLen;
  +int sd;
   
  +/** Current request beeing processed.
  + *  Used by JNI worker mostly ( XXX remove it, pass it explicitely )
  + */
   struct jk_ws_service *currentRequest;
  -
  -struct jk_worker *worker;
  -
  -/** 'main' pool for this endpoint. Used to store properties of the
  -endpoint. Will be alive until the endpoint is destroyed.
  -*/
  -struct jk_pool *pool;
   
   /** Connection pool. Used to store temporary data. It'll be
  -recycled after each transaction.
  -*/
  + *  recycled after each transaction.
  + *  XXX Do we need it ? env->tmpPool can be used as well.
  + */
   struct jk_pool *cPool;
  -
  -int sd;
  -int reuse;
   
  -/* Buffers for req/res */
  -/* Used to be ajp_operation */
  +/* Buffers */
   
   /* Incoming messages ( from tomcat ). Will be overriten after each
  -   message, you must safe any data you want to keep.
  +   message, you must save any data you 

DO NOT REPLY [Bug 7319] - codeBase in catalina.policy broken with jars

2002-05-15 Thread bugzilla

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

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

codeBase in catalina.policy broken with jars

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 OS/Version|Other   |Linux
 Resolution|WORKSFORME  |



--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 19:18 ---
I get the same error you do:

2002-05-15 14:29:23 action: Mapping for servlet 'action' = '*.do'
2002-05-15 14:29:23 jsp: init
2002-05-15 14:29:24 Exception initializing TldLocationsCache: XML parsing error
on file /WEB-INF/web.xml:
 Internal Error: File /javax/servlet/resources/web-app_2_3.dtd not found
2002-05-15 14:29:24 debugjsp: init
2002-05-15 14:29:24 Specified compiler plugin class
com.borland.jbuilder.webserverglue.tomcat.jsp.JasperS
unJavaCompiler not found. Will default to Sun Java Compiler.
2002-05-15 14:29:24 Exception initializing TldLocationsCache: XML parsing error
on file /WEB-INF/web.xml:
 Internal Error: File /javax/servlet/resources/web-app_2_3.dtd not found

This started with tomcat 4.0.1, when I was trying to deploy another webapp I've
just written that requires RMI.  When I enabled the security manager it broke my
other webapp (that up till now was working fine).  I decided to focus on the
webapp that works without the security manager.  I couldn't get the codebase
property to work, but if I just grant without it I could get my app to work.  I
upgraded to 4.0.3, and the previous problem went away to be replaced with this
problem.  When I try to load the app from a browser,  I get:

Apache Tomcat/4.0.3 - Error
report
Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server
Errortype Exception
reportmessage Internal Server
Errordescription The server encountered an internal error
(Internal Server Error) that prevented it from fulfilling this
request.exception org.apache.jasper.JasperException: XML
parsing error on file /WEB-INF/struts-bean.tld: Internal Error: File
/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd not found

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-05-15 Thread keith

keith   02/05/15 11:53:46

  Modified:util/java/org/apache/tomcat/util/net PoolTcpEndpoint.java
  Log:
  Wrap acceptSocket in a try to be more robust
  
  Revision  ChangesPath
  1.3   +9 -4  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java
  
  Index: PoolTcpEndpoint.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PoolTcpEndpoint.java  6 Apr 2002 16:34:02 -   1.2
  +++ PoolTcpEndpoint.java  15 May 2002 18:53:46 -  1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java,v
 1.2 2002/04/06 16:34:02 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/04/06 16:34:02 $
  + * $Header: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java,v
 1.3 2002/05/15 18:53:46 keith Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/05/15 18:53:46 $
*
* 
*
  @@ -470,7 +470,12 @@

// Create per-thread cache
while(endpoint.isRunning()) {
  - Socket s = endpoint.acceptSocket();
  + Socket s = null;
  + try {
  + s = endpoint.acceptSocket();
  + } catch (Throwable t) {
  + endpoint.log("Exception in acceptSocket", t);
  + }   
if(null != s) {
// Continue accepting on another thread...
endpoint.tp.runIt(this);
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: found 3.3-head thread problem

2002-05-15 Thread Keith Wannamaker

This is why-- in PoolThreadEndpoint, a new thread is 
started only when a socket is accepted.  Since the npe
happened  before this, the whole thing shut down without
running another thread.

So, we need to wrap for Throwable, and I think the best
place to do it is around the accept in PTE.runIt.  I'll
add it right now..

Keith


| Great finding. 
| 
| I would also add another round of try/catch for Throwable 
| to catch any other NPE in the catch().
| 
| Not sure about the logic - it is supposed to detect and start
| new threads... If you can take a look...
| 
| Costin
| 
| 
| --
| To unsubscribe, e-mail:   
| For additional commands, e-mail: 
| 
| 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: found 3.3-head thread problem

2002-05-15 Thread costinm

On Wed, 15 May 2002, Keith Wannamaker wrote:

> Remember last week when I mentioned the thread problem in 3.3-head?
> 
> In PoolTcpEndpoint, when there is a SocketException, we log a
> non-fatal error message.  The problem began when Remy pointed
> the string manager to an empty bundle.  StringManager.getString
> will return a null rather than throw a missing resource, and a
> null check is not done by JDK 1.3 prior to trying to format the
> message.  The resulting npe terminated the thread.  Gradually
> over time, all accepting threads are terminated.
> 
> So, no big deal, add the missing resources, but I'm wondering, 
> why don't we check to see if our accepting thread count dwindles
> or vanishes, and start more up?  Is this logic non-existant or broken?

Great finding. 

I would also add another round of try/catch for Throwable 
to catch any other NPE in the catch().

Not sure about the logic - it is supposed to detect and start
new threads... If you can take a look...

Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




found 3.3-head thread problem

2002-05-15 Thread Keith Wannamaker

Remember last week when I mentioned the thread problem in 3.3-head?

In PoolTcpEndpoint, when there is a SocketException, we log a
non-fatal error message.  The problem began when Remy pointed
the string manager to an empty bundle.  StringManager.getString
will return a null rather than throw a missing resource, and a
null check is not done by JDK 1.3 prior to trying to format the
message.  The resulting npe terminated the thread.  Gradually
over time, all accepting threads are terminated.

So, no big deal, add the missing resources, but I'm wondering, 
why don't we check to see if our accepting thread count dwindles
or vanishes, and start more up?  Is this logic non-existant or broken?

Keith


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4690] - sessions not scoped according to spec section 7.3

2002-05-15 Thread bugzilla

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

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

sessions not scoped according to spec section 7.3

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 17:50 ---
*** Bug 9116 has been marked as a duplicate of this bug. ***

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9116] - session gets shared across webapps with forward/incude

2002-05-15 Thread bugzilla

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

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

session gets shared across webapps with forward/incude

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 17:50 ---
This is a known issue.

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

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 8290] - Problem in the code generated by jasper 2

2002-05-15 Thread bugzilla

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

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

Problem in the code generated by jasper 2

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 17:46 ---
*** Bug 9120 has been marked as a duplicate of this bug. ***

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9120] - JSPs "hang" for a short period

2002-05-15 Thread bugzilla

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

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

JSPs "hang" for a short period

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Component|Unknown |Jasper
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 17:46 ---
As being demonstrated by bug 8290, there are performance issues with Jasper 1
when running with tag libraries, caused by a bug in the JVM. This looks like
it's the thing causing your problem here.
Jasper 2 fixes it, and is currently under testing.

You can get the latest version of it in Tomcat 4.1.x milestones if you'd like to
test it, like 4.1.2
(http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.2/).

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

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/res LocalStrings.properties

2002-05-15 Thread keith

keith   02/05/15 10:38:37

  Modified:util/java/org/apache/tomcat/util/net/res
LocalStrings.properties
  Log:
  Add PoolTcpEndpoint messages
  
  Revision  ChangesPath
  1.2   +4 -0  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocalStrings.properties   6 Apr 2002 16:34:02 -   1.1
  +++ LocalStrings.properties   15 May 2002 17:38:37 -  1.2
  @@ -0,0 +1,4 @@
  +# net resources
  +endpoint.err.fatal=Endpoint {0} shutdown due to exception: {1}
  +endpoint.err.nonfatal=Endpoint {0} ignored exception: {1}
  +
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9120] New: - JSPs "hang" for a short period

2002-05-15 Thread bugzilla

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

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

JSPs "hang" for a short period

   Summary: JSPs "hang" for a short period
   Product: Tomcat 4
   Version: 4.0.3 Final
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Major
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have several JSP pages specified in the XML view. Viewing them with the
very same GET arguments they sometimes "hangs" for a short period of time. I
"instrumented" the page to find out where it hangs (thinking it hangs in my
own code somewhere), but I found that it "hangs" in different places within 
the page. 

When no such "hang" occurs, the thing takes 10ms max to complete. With the
hang I get a consistent hang time ddepending on the page only. On some pages
it is around 3 seconds, on another it is 5 seconds. The hangs occur _anwhere_
within the page.

I already tried two different VMs: Blackdown 1.3.1_02a and Sun 1.3.1_03, both
show the same problem.

The pages are part of a very complex application, making heavy use of custom 
tag libraries, JDBC, JNDI (LDAP), Filters and about 200 custom classes.

I tried to use a java profiling tool to attach to tomcat, but for some reason 
that doesn't work.

I cannot deploy this application with the bug present, that is why I marked it
"major".

I should note that I have tried it on two completly different systems: A RH 6.2
based system and a RH7.3 based system (one running a 2.2 Kernel, the other
running a recent 2.4 kernel). They have different glibc library versions but
use the same java stuff. Both systems behave in the very same strange way. 
This makes me believe that it must be a tomcat problem.

I could not come up with a simple test case. However, if I strip parts of the 
JSP page (reducing complexity) hanging occurs less often and does not take that
much time. I honestly do not know what can cause this, however after taking
the time measurements, I do not think it is my code...

The problem exists with both the WARP (through apache) and the HTTP connector,
BTW.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [ANNOUCEMENT] Tomcat 4.0.2 Final released

2002-05-15 Thread Pier Fumagalli

"jean-frederic clere" <[EMAIL PROTECTED]> wrote:

> Pae Choi wrote:
>> 
>> We already have v4.0.3. You menat 4.0.4? If not, what am I missing here?
> 
> The date! - That is a mail from the 11 th of February - (problem is
> nagoya?)

No problems on nagoya... As I mentioned on my post to general@

Pier

--
I think that it's extremely foolish to name a server after the current U.S.
President. B.W. Fitzpatrick



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: local worker patch for JK1

2002-05-15 Thread costinm

On Wed, 15 May 2002 [EMAIL PROTECTED] wrote:

> 
> Hi,
> 
> there is  something that bothers me  in the patch Bernd  sent, that is
> the local_worker  property of  workers, I think  the concept  of local
> worker is linked  with that of load balancing worker,  and not to that
> of worker.  Nothing forbids  to have an  ajp13 worker in  several load
> balancing workers, if the local worker property is linked to the ajp13
> worker, the worker  will be considered local for  every load balancing
> worker it appears in which is something I think should be avoided.

I agree, but this is too complicated. If anyone really need this
feature ( or different lb factors on different load balancers ) we can
add more settings.

Most people use a single lb, and things are already complex if you 
have multiple lbs. Let's leave this for jk2.x.

Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/webapp/docs faq.xml

2002-05-15 Thread jfclere

jfclere 02/05/15 09:20:26

  Modified:webapp/docs faq.xml
  Log:
  Add 2 more.
  
  Revision  ChangesPath
  1.2   +39 -2 jakarta-tomcat-connectors/webapp/docs/faq.xml
  
  Index: faq.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/docs/faq.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- faq.xml   15 May 2002 15:18:43 -  1.1
  +++ faq.xml   15 May 2002 16:20:26 -  1.2
  @@ -26,7 +26,8 @@
   gzip -dc xalan-j_2_3_1-bin.tar.gz | tar xvf -
 
 
  -   2.3.1 was the lastest version available when writting the document.
  +   Xalan 2.3.1 was the lastest xalan version available when writting the
  +   document.
  tar must be a gnu tar. And it probably accept the option z.
 
 
  @@ -42,8 +43,44 @@
   java.lang.NoClassDefFoundError: org/w3c/dom/traversal/NodeIterator
 
 
  -   No idea for the moment ;-(
  +The xerces files are missing (xerces.jar or xercesImpl.jar and 
  +xmlParserAPIs.jar).
  +xercesImpl.jar and xmlParserAPIs.jar are for xerces-2.x
  +Download the xerces files and copy them in $ant.home/lib.
  +The 
 
  +  
  +wget http://xml.apache.org/dist/xerces-j/Xerces-J-bin.2.0.1.tar.gz
  +  
  +gzip -dc Xerces-J-bin.2.0.1.tar.gz | tar xvf -
  +  
  +cp ${xerces.home}/xercesImpl.jar ${ant.home}/bin
  +  
  +cp ${xerces.home}/xmlParserAPIs.jar ${ant.home}/bin
  +  
  +  
  +   Xerces 2.0.1 was the lastest xerces version available when writting the
  +   document.
  +  
  +
  +
  +
  +  
  +/export/home/apache20/jakarta-tomcat-connectors/webapp/build.xml:197:
  +javax.xml.transform.TransformerException: Unknown error in XPath
  +  
  +  
  +The ant-optional.jar file is missing.
  +Download a ant-optional.jar corresponding to the ant version you use.
  +For example for ant1.4.1:
  +  
  +  
  +cd ${ant.home}/lib
  +  
  +wget wget 
http://jakarta.apache.org/builds/jakarta-ant/release/v1.4.1/bin/jakarta-ant-1.4.1-optional.jar
  +  
  +mv jakarta-ant-1.4.1-optional.jar optional.jar
  +  
   
   
 
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9116] New: - session gets shared across webapps with forward/incude

2002-05-15 Thread bugzilla

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

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

session gets shared across webapps with forward/incude

   Summary: session gets shared across webapps with forward/incude
   Product: Tomcat 4
   Version: 4.0.3 Final
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Major
  Priority: Other
 Component: Servlet & JSP API
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When forward/include is done to a servlet/jsp in an
another webapp, session can be shared across webapps.

In first servlet get the session and then forward/include
to an another webapp and access the session in the second
one. Session from first webapp is returned in second webapp.

But if i access the servlet in second webapp directly then
i get a different session.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JSPC bug with pacakge option

2002-05-15 Thread Arvind Gudipati

Seems like im hitting a bug in the class
org.apache.jasper.JspC

When i run the jspc without any package specified it works fine.
However when i specify the package with option "-p jsp" i get .java files
for each .jsp files created with package specified as "package jsp.;", and
this fails to compile as it is not valid java file.

Im using tocmat 4.0.3 release build and following is the command im using to
precompile my jsp files

c:\jdk1.3.1\bin\java -classpath
..\lib\catalina.jar;..\lib\jasper-runtime.jar;..\lib\jasper-compiler.jar;..\
lib\xerces.jar;..\lib\tomcat-util.jar;..\lib\servlet.jar;..\lib\servlets-com
mon.jar;..\lib\bootstrap.jar;..\build\dist\common.jar;..\build\dist\baware.j
ar org.apache.jasper.JspC -d .\temp -p jsp -webxml
./java/webapps/dpserver/WEB-INF/web.xml -webapp ./java/webapps/dpserver

* This E-mail is from PANACYA
Inc. The E-mail and any files transmitted with it are confidential and may
also be privileged and intended solely for the use of the individual or
entity to whom they are addressed. Any unauthorized direct or indirect
dissemination, distribution or copying of this message and any attachments
is strictly prohibited. If you have received the E-mail in error please
notify [EMAIL PROTECTED] or telephone (410) 910-3300.





DO NOT REPLY [Bug 9112] - Error on startup

2002-05-15 Thread bugzilla

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

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

Error on startup

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 15:34 ---
Unfortunately, the resource name used in the conf/server.xml config file used 
by the service is out of date.
To fix it, replace "java:UserDatabase" with "UserDatabase" in conf/server.xml 
(there's only one occurrence).

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [ANNOUCEMENT] Tomcat 4.0.2 Final released

2002-05-15 Thread Remy Maucherat

> Pae Choi wrote:
> >
> > We already have v4.0.3. You menat 4.0.4? If not, what am I missing here?
>
> The date! - That is a mail from the 11 th of February - (problem is
> nagoya?)

I didn't resend the mail, and the date is indeed incorrect.
Don't know what's going on ...

Remy

> > - Original Message -
> > From: "Remy Maucherat" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Monday, February 11, 2002 10:05 AM
> > Subject: [ANNOUCEMENT] Tomcat 4.0.2 Final released
> >
> > > <[EMAIL PROTECTED]>
> > >
> > > The Tomcat Team is proud to announce the final release of Tomcat
4.0.2.
> > >
> > > Highlights in this release include:
> > > - Full support for the AJP 1.3 and 1.4 native connector protocols,
> > including
> > > load balancing
> > > - Updated mod_webapp native connector
> > > - Performance improvements for single thread model servlets
> > > - And many bugfixes
> > >
> > > Downloads (source and binary):
> > > http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.2/
> > > Note: RPMs and binaries of native connectors will be made available
> > shortly.
> > >
> > > Release notes (including the full list of changes, bugfixes, as well
as
> > the
> > > known issues with this release):
> > >
> >
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.2/RELEASE-N
> > > OTES
> > >
> > > Remy
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >   For additional
> > >  commands, e-mail: 
> > >
> > > ---
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> > >
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/resources/confinstall server_2.xml

2002-05-15 Thread remm

remm02/05/15 08:28:56

  Modified:resources/confinstall server_2.xml
  Log:
  - Update the resource name (#9112).
  
  Revision  ChangesPath
  1.4   +1 -1  jakarta-tomcat-4.0/resources/confinstall/server_2.xml
  
  Index: server_2.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/resources/confinstall/server_2.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- server_2.xml  16 Apr 2002 00:16:34 -  1.3
  +++ server_2.xml  15 May 2002 15:28:56 -  1.4
  @@ -96,7 +96,7 @@
  that are performed against this UserDatabase are immediately
  available for use by the Realm.  -->
 
  + debug="0" resourceName="UserDatabase"/>
   
 
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/webapp/docs faq.xml

2002-05-15 Thread jfclere

jfclere 02/05/15 08:18:43

  Added:   webapp/docs faq.xml
  Log:
  A FAQ could be usefull, no?
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/webapp/docs/faq.xml
  
  Index: faq.xml
  ===
  
  
  

  Foire Aux Questions de mod_webapp

  

  
FAQ about building mod_webapp
  
  
  

  ${warp.home}/build.xml:169: Cannot find the Apache Xalan XSLT processor


  The xalan.jar file is missing in ${ant.home}/lib.


  Dowload it from xml.apache.org:


  wget http://xml.apache.org/dist/xalan-j/xalan-j_2_3_1-bin.tar.gz

  gzip -dc xalan-j_2_3_1-bin.tar.gz | tar xvf -


 2.3.1 was the lastest version available when writting the document.
 tar must be a gnu tar. And it probably accept the option z.


  Extract it and copy it in ${ant.home}/lib


  cp ${xalan.home}/bin/xalan.jar ${ant.home}/lib

  
  
  

  java.lang.NoClassDefFoundError: org/w3c/dom/traversal/NodeIterator


 No idea for the moment ;-(

  
  

  
  
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [ANNOUCEMENT] Tomcat 4.0.2 Final released

2002-05-15 Thread jean-frederic clere

Pae Choi wrote:
> 
> We already have v4.0.3. You menat 4.0.4? If not, what am I missing here?

The date! - That is a mail from the 11 th of February - (problem is
nagoya?)

> 
> Pae
> 
> - Original Message -
> From: "Remy Maucherat" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, February 11, 2002 10:05 AM
> Subject: [ANNOUCEMENT] Tomcat 4.0.2 Final released
> 
> > <[EMAIL PROTECTED]>
> >
> > The Tomcat Team is proud to announce the final release of Tomcat 4.0.2.
> >
> > Highlights in this release include:
> > - Full support for the AJP 1.3 and 1.4 native connector protocols,
> including
> > load balancing
> > - Updated mod_webapp native connector
> > - Performance improvements for single thread model servlets
> > - And many bugfixes
> >
> > Downloads (source and binary):
> > http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.2/
> > Note: RPMs and binaries of native connectors will be made available
> shortly.
> >
> > Release notes (including the full list of changes, bugfixes, as well as
> the
> > known issues with this release):
> >
> http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.2/RELEASE-N
> > OTES
> >
> > Remy
> >
> >
> > --
> > To unsubscribe, e-mail:
> >   For additional
> >  commands, e-mail: 
> >
> > ---
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: startup.bat window

2002-05-15 Thread Bill Blackmon

Thanks for the note. I added 'pause' and the startup.bat screen stays up.
However, when the server.xml file is read by whatever wherever it crashes on
a bad JDBC Realm I'm trying to set up. Then the catalina.bat file
disappears and I have no idea what happened. There is nothing in any of the
logs. I put 'pause' at the end of
the catalina.bat file but it still disappears at a certain point.

Thanks,
Bill
- Original Message -
From: "Mark Gash" <[EMAIL PROTECTED]>
To: "'Tomcat Developers List'" <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 10:56 AM
Subject: RE: startup.bat window


Bill,

It sounds daft - but have you tried editing the startup.bat and adding a
'pause' at the end?

Kind Regards,

Mark Gash
Consultant
TriSystems Ltd.
020 7264 0440
[EMAIL PROTECTED]



-Original Message-
From: Bill Blackmon [mailto:[EMAIL PROTECTED]]
Sent: 15 May 2002 15:47
To: Tomcat Developers List
Subject: Re: startup.bat window


thanks - didnt' work but i'm not surprised! i'll keep at it.
- Original Message -
From: "Hans Schmid" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 9:26 AM
Subject: AW: startup.bat window


> First, this is clearly a tomcat-user question.
>
> To find out, what is wrong, execute
> tomcat.bat run
> This will start tomcat in the same window. (TC 3.3.1 at least)
>
> I can't help you with the mySQL question though.
>
> Regards,
> Hans
>
> > -Ursprüngliche Nachricht-
> > Von: Bill Blackmon [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 15. Mai 2002 14:16
> > An: Tomcat Developers List
> > Betreff: startup.bat window
> >
> >
> > I'm trying to set the following JDBC Realm up:
> > 
> > to use with mySQL. Obviously there is an error because the startup.bat
> > window flits off of the screen.
> > What can I do in startup.bat to make it stay opened so I can see what
the
> > problem is? Also, can anyone point me
> > to a good example or a book that covers using mySQL and Tomcat together?
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




---
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: startup.bat window

2002-05-15 Thread Mark Gash

Bill,

It sounds daft - but have you tried editing the startup.bat and adding a
'pause' at the end?

Kind Regards,

Mark Gash
Consultant
TriSystems Ltd.
020 7264 0440
[EMAIL PROTECTED]



-Original Message-
From: Bill Blackmon [mailto:[EMAIL PROTECTED]]
Sent: 15 May 2002 15:47
To: Tomcat Developers List
Subject: Re: startup.bat window


thanks - didnt' work but i'm not surprised! i'll keep at it.
- Original Message -
From: "Hans Schmid" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 9:26 AM
Subject: AW: startup.bat window


> First, this is clearly a tomcat-user question.
>
> To find out, what is wrong, execute
> tomcat.bat run
> This will start tomcat in the same window. (TC 3.3.1 at least)
>
> I can't help you with the mySQL question though.
>
> Regards,
> Hans
>
> > -Ursprüngliche Nachricht-
> > Von: Bill Blackmon [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 15. Mai 2002 14:16
> > An: Tomcat Developers List
> > Betreff: startup.bat window
> >
> >
> > I'm trying to set the following JDBC Realm up:
> > 
> > to use with mySQL. Obviously there is an error because the startup.bat
> > window flits off of the screen.
> > What can I do in startup.bat to make it stay opened so I can see what
the
> > problem is? Also, can anyone point me
> > to a good example or a book that covers using mySQL and Tomcat together?
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




---
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: startup.bat window

2002-05-15 Thread Bill Blackmon

thanks - didnt' work but i'm not surprised! i'll keep at it.
- Original Message -
From: "Hans Schmid" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 9:26 AM
Subject: AW: startup.bat window


> First, this is clearly a tomcat-user question.
>
> To find out, what is wrong, execute
> tomcat.bat run
> This will start tomcat in the same window. (TC 3.3.1 at least)
>
> I can't help you with the mySQL question though.
>
> Regards,
> Hans
>
> > -Ursprüngliche Nachricht-
> > Von: Bill Blackmon [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 15. Mai 2002 14:16
> > An: Tomcat Developers List
> > Betreff: startup.bat window
> >
> >
> > I'm trying to set the following JDBC Realm up:
> > 
> > to use with mySQL. Obviously there is an error because the startup.bat
> > window flits off of the screen.
> > What can I do in startup.bat to make it stay opened so I can see what
the
> > problem is? Also, can anyone point me
> > to a good example or a book that covers using mySQL and Tomcat together?
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9112] - Error on startup

2002-05-15 Thread bugzilla

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

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

Error on startup





--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 
14:22 ---
Created an attachment (id=1872)
Standard out with more exception info

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9112] - Error on startup

2002-05-15 Thread bugzilla

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

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

Error on startup





--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 
14:22 ---
Created an attachment (id=1871)
Standard error with more exception info

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9112] - Error on startup

2002-05-15 Thread bugzilla

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

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

Error on startup





--- Additional Comments From [EMAIL PROTECTED]  2002-05-15 
14:22 ---
Created an attachment (id=1870)
Catalina log file with exception

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9112] New: - Error on startup

2002-05-15 Thread bugzilla

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

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

Error on startup

   Summary: Error on startup
   Product: Tomcat 4
   Version: 4.1.1
  Platform: Sun
OS/Version: Windows XP
Status: NEW
  Severity: Major
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


After a install from scratch using the windows installer with 4.1.1 and 4.1.2 I 
get the following exception in catalina_log
javax.naming.NameNotFoundException: Name java:UserDatabase is not bound in this 
Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at org.apache.catalina.realm.UserDatabaseRealm.start
(UserDatabaseRealm.java:304)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1175)
at org.apache.catalina.core.StandardEngine.start
(StandardEngine.java:347)
at org.apache.catalina.core.StandardService.start
(StandardService.java:499)
at org.apache.catalina.core.StandardServer.start
(StandardServer.java:707)
at org.apache.catalina.startup.CatalinaService.start
(CatalinaService.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.BootstrapService.start
(BootstrapService.java:219)
at org.apache.catalina.startup.BootstrapService.main
(BootstrapService.java:279)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: local worker patch for JK1

2002-05-15 Thread Bernd Koecke

[EMAIL PROTECTED] wrote:
> Hi,
> 
> there is  something that bothers me  in the patch Bernd  sent, that is
> the local_worker  property of  workers, I think  the concept  of local
> worker is linked  with that of load balancing worker,  and not to that
> of worker.  Nothing forbids  to have an  ajp13 worker in  several load
> balancing workers, if the local worker property is linked to the ajp13
> worker, the worker  will be considered local for  every load balancing
> worker it appears in which is something I think should be avoided.
> 
> Mathias.
> 

Sorry, but I asked for, how to handle this flag yesterday and I got no response. 
Costin said, that he'll wait for my patch, and I don't want to let him wait for 
days.

If we add a list to the lb_worker, how should this be handled? Lets say it is 
called 'local_workers'. Should the local workers be in the list of balanced 
workers too? If yes, I think this makes the config look a little bit unclean. If 
not, we have to change the validate function more than I want to, because it 
depends on having balanced workers. And with a second list it is possible to 
have only local workers.

By the way, with the same motivation we should ask about the lb_value. It is not 
possible to have one worker with different values in different lb_workers. But 
it may be that one worker is the most powerful in one group (lb_worker) and less 
powerful in another. Ok normaly the lb_values should be choosen in order to the 
power of all workers and not because of one group. :)

I build the patch for the described simple situation. When I understand jk2 
right, this would be the right choice for a more complex environment.

Which way should be implemented? We should find one position and implement it 
then. May be I was a little bit to fast this time :).

Bernd
-- 
Dipl.-Inform. Bernd Koecke
UNIX-Entwicklung
Schlund+Partner AG
Fon: +49-721-91374-0
E-Mail: [EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




AW: startup.bat window

2002-05-15 Thread Hans Schmid

First, this is clearly a tomcat-user question.

To find out, what is wrong, execute
tomcat.bat run
This will start tomcat in the same window. (TC 3.3.1 at least)

I can't help you with the mySQL question though.

Regards,
Hans

> -Ursprüngliche Nachricht-
> Von: Bill Blackmon [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 15. Mai 2002 14:16
> An: Tomcat Developers List
> Betreff: startup.bat window
>
>
> I'm trying to set the following JDBC Realm up:
> 
> to use with mySQL. Obviously there is an error because the startup.bat
> window flits off of the screen.
> What can I do in startup.bat to make it stay opened so I can see what the
> problem is? Also, can anyone point me
> to a good example or a book that covers using mySQL and Tomcat together?
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9111] New: - URL encoding fails for relative paths in contexts containing "unsafe" characters

2002-05-15 Thread bugzilla

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

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

URL encoding fails for relative paths in contexts containing "unsafe" characters

   Summary: URL encoding fails for relative paths in contexts
containing "unsafe" characters
   Product: Tomcat 3
   Version: 3.3.1 Final
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I recently moved from Tomcat 3.2.3 to Tomcat 3.3.1 final.
When using a context path containing a '~' character, relative URLs within this 
context were not properly URL encoded when turning off cookies. Since this had 
worked up to now with Tomcat 3.2.3, I went searching the source code and found 
the following in org.apache.tomcat.facade.HttpServletResponseFacade:

When calling encodeURL() for a relative URL, it is made absolute based on the 
request URL retrieved by calling javax.servlet.http.HttpUtils.getRequestURL() 
on the current request object. Now, with Tomcat 3.3.1 the request object 
returns an encoded string for getRequestURI(), which is called by HttpUtils 
internally in getRequestURL(). This is due to the Servlet 2.2 Specification 
Errata (4/27/00).
Before returning the current request URI, which is already decoded, it 
therefore has to be reencoded by using the org.apache.tomcat.util.buf.UEncoder. 
UEncoder encodes all characters in a given string with the proper hexadecimal 
escape sequence except certain "safe" characters which are allowed to be 
unescaped. These "safe" characters include by default "unreserved" characters 
as defined by RFC1738. In contrast to the newer RFC2396 this "unreserved" set 
doesn't include the '~' character. The '~' in our request's path is therefore 
encoded by '%7e'.

Now that the absolute URL for the given relative one is found, it is checked if 
it contains the current request's context path. If it doesn't, no URL encoding 
is desired for this URL. But, since this context path is returned unencoded, 
there is no match between '~' in the context path and '%7e' in the absolute URL 
to encode. This means that our relative URL is not encoded as it should be.

To solve the encountered problem I propose the following patch:

Index: src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java
===
RCS file: /home/cvspublic/jakarta-
tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java,v
retrieving revision 1.28
diff -u -r1.28 HttpServletResponseFacade.java
--- src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java
22 Mar 2002 02:54:34 -  1.28
+++ src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java
15 May 2002 07:45:04 -
@@ -64,6 +64,7 @@

 package org.apache.tomcat.facade;

+import org.apache.tomcat.util.buf.UDecoder;
 import org.apache.tomcat.util.res.StringManager;
 import org.apache.tomcat.util.http.*;
 import org.apache.tomcat.core.*;
@@ -416,8 +417,9 @@
Request request = response.getRequest();
HttpServletRequestFacade reqF=(HttpServletRequestFacade)request.
getFacade();
-   String requrl =
-   HttpUtils.getRequestURL(reqF).toString();
+   UDecoder udecoder = request.getURLDecoder();
+   String requrl = udecoder.convert(
+   HttpUtils.getRequestURL(reqF).toString());
try {
url = new URL(new URL(requrl), location);
} catch (MalformedURLException e2) {

It could be more sensible though, to change the way the current request's URL 
is retrieved, or to change UEncoder to conform to RFC2396. I don't have enough 
insight into Tomcat code and the underlying specifications to know about 
possible implications. The patch above worked for me however.

Thanks for regarding my proposal.

Alex.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




local worker patch for JK1

2002-05-15 Thread Mathias . Herberts


Hi,

there is  something that bothers me  in the patch Bernd  sent, that is
the local_worker  property of  workers, I think  the concept  of local
worker is linked  with that of load balancing worker,  and not to that
of worker.  Nothing forbids  to have an  ajp13 worker in  several load
balancing workers, if the local worker property is linked to the ajp13
worker, the worker  will be considered local for  every load balancing
worker it appears in which is something I think should be avoided.

Mathias.

-- 
--  Credit Mutuel de Bretagne  --  DST / Reseaux et Systemes Distribues
--  32 rue Mirabeau -- Le Relecq-Kerhuon -- 29808 Brest Cedex 9, FRANCE
--  Tel +33298004653 - Fax +33298284005 - Mail: [EMAIL PROTECTED]
--  Key Fingerprint: 8778 D2FD 3B4A 6B33 10AB  F503 63D0 ADAE 9112 03E4

--
Ce message et  toutes les pieces jointes (ci-apres  le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute  utilisation ou  diffusion  non autorisee  est interdite.   Tout
message  etant  susceptible  d'alteration,  l'emetteur  decline  toute
responsabilite au titre de  ce message  s'il a  ete altere, deforme ou
falsifie.
---
This message and any  attachments (the "message") are confidential and
intended  solely   for  the   addressees.  Any  unauthorised   use  or
dissemination is prohibited. As e-mails are susceptible to alteration,
the issuer shall  not be  liable for  the  message if altered, changed
or falsified.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




startup.bat window

2002-05-15 Thread Bill Blackmon

I'm trying to set the following JDBC Realm up:

to use with mySQL. Obviously there is an error because the startup.bat
window flits off of the screen.
What can I do in startup.bat to make it stay opened so I can see what the
problem is? Also, can anyone point me
to a good example or a book that covers using mySQL and Tomcat together?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 9107] New: - error in or incomplete documentation ?

2002-05-15 Thread bugzilla

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

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

error in or incomplete documentation ?

   Summary: error in or incomplete documentation ?
   Product: Tomcat 4
   Version: 4.0.3 Final
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have installed apache2 and tomcat 4.0.2
and i have build the mod_jk.so module following the manual on 
http://www.galatea.com/flashguides/apache-tomcat-24-unix.xml
like it also says on the 4.0.x documentation on the jakarte website
the line 
was added after the line 
when trying to start tomcat following output is generated in catalina.out
ERROR reading /var/tomcat4/conf/server.xml
At Line 29 /Server/Service/Engine/Listener/ className=org.apache.ajp.tomcat4.con
fig.ApacheConfig append=true

Catalina.start: java.lang.NoSuchMethodException: addLifecycleListener
java.lang.NoSuchMethodException: addLifecycleListener
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getMethod(Class.java:920)
at org.apache.catalina.util.xml.AddChild.end(XmlMapper.java:810)
at org.apache.catalina.util.xml.XmlMapper.matchEnd(XmlMapper.java:419)
at org.apache.catalina.util.xml.XmlMapper.endElement(XmlMapper.java:119)
at org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java
)
at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java)
at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLVa
lidator.java)
at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen
tScanner.java)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java)
 at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java)
at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java)
at javax.xml.parsers.SAXParser.parse(SAXParser.java)
at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)


tomcat is not running then ...
(listener line to Server-tag was also added)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[PATCH] for lb_worker in jk1 with local workers

2002-05-15 Thread Bernd Koecke

Hi,

here is the patch for lb_worker in jk1. I tested it on a testcluster and it 
worked for me.

It adds two config params:
'local_worker_only' on the lb_worker
'local_worker' on the balanced workers, e.g. an ajp13 worker

Example environment:
A cluster with two nodes (TC1+TC2), running apache+tomcat tandem on each node, a 
loadbalancer in front of the nodes.

Example conf of TC1:

workers.tomcat_home=
workers.java_home=$(JAVA_HOME)
ps=/
worker.list=router

worker.TC1.port=8009
worker.TC1.host=node1.domain.tld
worker.TC1.type=ajp13
worker.TC1.lbfactor=1
worker.TC1.local_worker=1

worker.TC2.port=8009
worker.TC2.host=node2.domain.tld
worker.TC2.type=ajp13
worker.TC2.lbfactor=1
worker.TC2.local_worker=0

worker.router.type=lb
worker.router.balanced_workers=TC1,TC2
worker.router.local_worker_only=1

The 'local_worker' flag on TC1 and TC2 tells the lb_worker which connections are 
going to the local worker. If local_worker is an int and is not 0 it is set to 
JK_TRUE and marked as local worker, JK_FALSE otherwise. If in minimum one worker 
is marked as local worker, lb_worker is in local worker mode. All local worker 
are moved to the beginning of the internal worker list in lb_worker during 
validation.

This means that if a request with a session id comes in it would be routed to 
the appropriate worker. If this worker is down it will be send to the first 
local worker which is not in error state.

If a request without a session comes in, it would be routed to the first local 
worker. If all local worker are in error state, then the 'local_worker_only' 
flag is important. If it was set to an int and this wasn't 0 it is set to 
JK_TRUE, JK_FALSE otherwise. With set to JK_TRUE, this request gets an error 
response. If set to JK_FALSE lb_worker tries to route the request to another 
balanced worker.

If one of the worker was in error state and has recovered nothing changes. The 
local worker will be check for requests without a session id (and with a session 
on himself) and the other worker will only be checked if a request with a 
session id of this worker comes in.

In this environment, with a load balancer in front, it is an error if the 
balancer sends a request without a session to an apache without a running local 
worker. And if the looad balancer determines that a node is down no other node 
is allowed to send a request without a session to it. This is necessary for me, 
because on a switched off node apache and tomcat can still be up and running, 
but they are in an old state and should only be asked for old sessions.

Defaults:
local_worker: 0
local_worker_only:0

Internals:
The local workers are at the binning of the worker list. Additionaly I don't 
change the lb_value for local workers, but because of the workers order this 
should not be necessary.

I didn't changed the name of the local_worker_only flag because it suits the 
name with local_worker. But the flags are defines in jk_util.c its easy to 
change them.

I hope its usefull, the patch was geenrated against cvs with diff -u.

Bernd
-- 
Dipl.-Inform. Bernd Koecke
UNIX-Entwicklung
Schlund+Partner AG
Fon: +49-721-91374-0
E-Mail: [EMAIL PROTECTED]


Index: jk_lb_worker.c
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,v
retrieving revision 1.9
diff -u -r1.9 jk_lb_worker.c
--- jk_lb_worker.c  3 May 2002 23:32:43 -   1.9
+++ jk_lb_worker.c  15 May 2002 08:10:50 -
@@ -84,6 +84,7 @@
 char*name;
 double  lb_factor;
 double  lb_value;
+int is_local_worker;
 int in_error_state;
 int in_recovering;
 time_t  error_time;
@@ -100,6 +101,8 @@
 
 char *name; 
 jk_worker_t worker;
+int  in_local_worker_mode;
+int  local_worker_only;
 };
 typedef struct lb_worker lb_worker_t;
 
@@ -270,28 +273,29 @@
 }
 
 for(i = 0 ; i < p->num_of_workers ; i++) {
-if(p->lb_workers[i].in_error_state) {
-if(!p->lb_workers[i].in_recovering) {
-time_t now = time(0);
-
-if((now - p->lb_workers[i].error_time) > WAIT_BEFORE_RECOVER) {
-
-p->lb_workers[i].in_recovering  = JK_TRUE;
-p->lb_workers[i].error_time = now;
+if (!p->in_local_worker_mode || p->lb_workers[i].is_local_worker || 
+!p->local_worker_only) {
+if(p->lb_workers[i].in_error_state) {
+if(!p->lb_workers[i].in_recovering) {
+time_t now = time(0);
+if((now - p->lb_workers[i].error_time) > WAIT_BEFORE_RECOVER) {
+p->lb_workers[i].in_recovering  = JK_TRUE;
+p->lb_workers[i].error_time = now;
+rc = &(p->lb_workers[i]);
+
+break;
+}
+}
+} else {
+if(p->lb_workers[

Re: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_worker_lb.c

2002-05-15 Thread Bernd Koecke

[EMAIL PROTECTED] wrote:
> On Tue, 14 May 2002, Bernd Koecke wrote:
> 
> 
>>Hi Costin,
>>
>>the new patch seems to work, but I'll test it more exactly tomorrow. Then I'll 
>>create the patches and the functional description.
>>
>>In short, the patched lb_worker uses an additinal flag on the other workers (e.g 
>>worker.ajp13.local_worker=1) to determine if it should be moved to the beginning 
>>of the balanced_workers. So we don't need to deal with two lists in lb_worker 
>>and the lb_value '0' has no special meaning. The flag for sending requests only 
>>to local workers is 'local_worker_only' on the lb_worker. More when the patch is 
>>tested and ready.
> 
> 
> Ok. I already commited part of the changes for jk2 - but my version is 
> called 'hwBalanceErr', on worker_lb.
> 
> If 0 normal selection of non-local workers takes place if all locals are 
> in error state. If non 0, we'll return the value as the error code - for 
> a front-end balancer to detect and stop forwarding requests for this 
> instance. 
> 
> I think that's the behavior you need - and it also allows customization
> for the returned error code.
> 

That sounds great, many thanks!

The patch for jk1 is on the way and I added some explanation how it works and 
about the two config flags.

Bernd


> Costin
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



-- 
Dipl.-Inform. Bernd Koecke
UNIX-Entwicklung
Schlund+Partner AG
Fon: +49-721-91374-0
E-Mail: [EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




test

2002-05-15 Thread jean-frederic clere

please ignore

--
To unsubscribe, e-mail:   
For additional commands, e-mail: