RE: [PATCH]TC3.3 - org.apache.tomcat.startup.Main

2001-02-26 Thread Ignacio J. Ortega

  Some comments on format and condign conventions ( in
  not the most
  appropiate for this :) :

A i said, I'm not the right one to say that :), because I love your job,
and is my failure to not follow ALL the guidelines.. this was my point
..

The Rest of the message, is devoted to the very different formatting you
have used on the code.. comparing with the code already present here ..
a aesthetics question only.., i have made the adjustments to your code
to follow indentations from the rest of the source ( mostly bad written,
not following guidelines, by myself :)

But i know about the code is not following guidelines now.., i'll be
glad reformatting your patches, to put it in line with actual
formatting, if you continue adding Javadoc comments to it..:), 

TIA

Saludos ,
Ignacio J. Ortega


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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Main.java

2001-02-26 Thread nacho

nacho   01/02/26 01:42:30

  Modified:src/share/org/apache/tomcat/startup Main.java
  Log:
  Added :
  
  org.apache.tomcat.common.classpath
  org.apache.tomcat.shared.classpath
  
  System properties to set the shared and common classpath, this are added prior
  to adding the internal lib directories ..
  
  Submitted by Mel Martinez [[EMAIL PROTECTED]]
  
  Revision  ChangesPath
  1.26  +222 -85   jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java
  
  Index: Main.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- Main.java 2001/02/10 19:17:28 1.25
  +++ Main.java 2001/02/26 09:42:30 1.26
  @@ -1,4 +1,4 @@
  -/*
  +/* $Id: Main.java,v 1.26 2001/02/26 09:42:30 nacho Exp $
* 
*
* The Apache Software License, Version 1.1
  @@ -69,22 +69,101 @@
   import org.apache.tomcat.util.IntrospectionUtils;
   import org.apache.tomcat.util.compat.Jdk11Compat;
   
  -// Depends:
  -// JDK1.1
  -// tomcat.util.IntrospectionUtils, util.compat
   
   /**
  - * Starter for Tomcat.
  - *
  - * This is a replacement/enhancement for the .sh and .bat files - you can
  - * use JDK1.2 "java -jar tomcat.jar", or ( for jdk 1.1 ) you just need to
  - * include a single jar file in the classpath.
  - *
  - * @author Costin Manolache
  - * @author Ignacio J. Ortega
  - *
  + Starter class for Tomcat.
  + p
  + This is a replacement/enhancement for the .sh and .bat files - you can
  + use JDK1.2 "java -jar tomcat.jar", or ( for jdk 1.1 ) you just need to
  + include a single jar file in the classpath.
  + p
  + This class creates three class loader instances: 
  + ol
  + lia 'common' loader to be the parent of both the server
  + container and also webapp loaders./li
  + lia 'shared' loader to load classes used by all webapps, but
  + not the servlet engine./i
  + lia 'server' loader exclusively for the tomcat servlet engine./li
  + /ol
  + Both the 'shared' loader and 'server' loader have the common loader as
  + the parent class loader.  The class path for each is assembled like so:
  + ul
  + licommon - all elements of the 
codeorg.apache.tomcat.common.classpath/code
  +   property plus all *.jar files found in ${TOMCAT_HOME}/lib/common/./li
  + lishared - all elements of the 
codeorg.apache.tomcat.shared.classpath/code
  +   property plus all *.jar files found in ${TOMCAT_HOME}/lib/shared/./i
  + liserver - all jar files found in ${TOMCAT_HOME}/lib, plus the class
  +   folder ${TOMCAT_HOME}/classes and finally also the utility jar
  +   file ${JAVA_HOME}/lib/tools.jar./li
  + /ol
  + After creating the above class loaders, this class instantiates, initializes
  + and starts an instance of the class 
codeorg.apache.tomcat.startup.Tomcat/code.
  + p
  + @author Costin Manolache
  + @author Ignacio J. Ortega
  + @author Mel Martinez [EMAIL PROTECTED]
  + @version $Revision: 1.26 $ $Date: 2001/02/26 09:42:30 $
*/
   public class Main {
  +
  +/**
  +name of configuration property to set (using the -D option at
  +startup or via .properties file) to specify the classpath
  +to be used by the ClassLoader shared amongst all web applications
  +(but not by the servlet container).  Specify this string as
  +normal file paths separated by the path.seperator delimiter for
  +the host platform.  Example (unix):
  +precode
  +* org.apache.tomcat.shared.classpath = /home/mypath/lib/mylib.jar: \
  +*  /home/mypath/classes/
  +/code/pre
  +*/
  +public static final String TOMCAT_SHARED_CLASSPATH_PROPERTY =
  +"org.apache.tomcat.shared.classpath";
  +
  +/**
  +the classpath shared among all web apps (in addition to any
  +jar files placed directly in $TOMCAT_HOME/lib/shared/).
  +*/
  +public static final String TOMCAT_SHARED_CLASSPATH;
  +
  +/**
  +name of configuration property to set (using the -D option at
  +startup or via .properties file) to specify the classpath
  +to be used by the ClassLoader common to both the servlet engine
  +and all web applications.  Specify this string as
  +normal file paths separated by the path.seperator delimiter for
  +the host platform.  Example (unix):
  +precode
  +* org.apache.tomcat.common.classpath = /home/mypath/lib/mylib.jar: \
  +*  /home/mypath/classes/
  +/code/pre
  +

Re: [patch] jsvc signal handling code

2001-02-26 Thread Pier P. Fumagalli

Marcus Crafter [EMAIL PROTECTED] wrote:

 Hi All,
 
 I've added some code to the native service source to test restarting and
 stopping jsvc via SIGHUP and SIGTERM respectively, and also to fix a small
 compile error when the DEBUG define is set. Please let me know if the changes
 are appropriate. Patch is attached.
 
 With the supplied functions I've seen good results restarting and stopping the
 SimpleService example via kill -HUP and kill -TERM. Good stuff.
 
 Now Tomcat - does the Tomcat 3  4 source base currently support the service
 interface for stopping and restarting tomcat via signals ? A quick grep
 through
 the 4.0b1 source code didn't yield anything (but then I'm quite new to the
 source). Any information would be greatly appreciated.
 
 Hope everyone had a great weekend.

Cool... Thank you... I'm going to check out and apply the patch tomorrow to
the repository... I'm working right now on the new documentation for the
Invocation API in accordance with what is being discussed on JSR-096 and I'd
love to try to release it in the upcoming two weeks, before I fly to
London...

Pier

-- 

Pier Fumagalli  http://www.betaversion.org/  mailto:[EMAIL PROTECTED]


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




Re: jsvc_unix.c broken under linux ?

2001-02-26 Thread Pier P. Fumagalli

Marcus Crafter [EMAIL PROTECTED] wrote:

 Hi All,
 
 I've been trying to build the service code from the Tomcat 4.0b1 source base
 under my Linux system. Unfortunately there seems to be a problem with the
 systeminfo.h (and underlying sysinfo system call) header file.
 
 systeminfo.h does not exist under Linux (at least on my system, it's
 sysinfo.h), and the sysinfo system call made (jsvc_unix.c, line 158) also
 doesn't exist. :-( There is a sysinfo system call, but it returns a struct
 containing system details like uptime, load, etc.
 
 sysinfo() is used in jsvc_unix.c to obtain the architecture, which is used to
 build up a string locating libjvm.so. Looks like under linux we'll have to do
 this another way, unless I've overlooked/missed something ?
 
 I've searched the man pages to find an equivalent system call. The best I
 could
 find was uname() in utsname.h which returns a struct including the
 architecture
 type, however it returns too specific information (ie. i686 where i386 is
 needed for our purposes).
 
 Any ideas, suggestions for a solution ?
 
 How should we manage platform dependancies/differences like this ? (configure
 script? etc)

The problem lies in the fact that I'm developing the native components under
Solaris, and up to this point, I've never tried a port to Linux or other
OSes (my next attempt is a build on MacOS/X, and then Yellow Dog Linux for
PPC - Can you tell I work on Macintoshes now?).

I'm kinda biased towards not using autoconf/automake (mainly because I don't
know them), but they worked well in JServ (yes Jon, you convinced me!). If
someone with more experience could come up with something along those lines,
I'll be happy to include it, otherwise we might just use a nasty BASH
script, we don't have to filter out _that_ many calls outside the ANSI C
specification.

Pier

-- 

Pier Fumagalli  http://www.betaversion.org/  mailto:[EMAIL PROTECTED]


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




Re: FW: [advanced-servlets] Session Load Balancing (was: To avoid

2001-02-26 Thread Nick Bauman

Pier,

 If the next request from that client is routed to server Y, then
 server Y will get a request with that same composite ID of
 "serverX:sessionPPP".  This tells server Y that the first thing it
 needs to do is get the canonical version of Session sessionPPP from
 server X. (The exact method for this may vary, but suffice to say it
 will not involve spawning Threads from Servlets. :-)  In the response

The only problem with this is you have N servers in a rotation (sprayed or
DNS round-robin) and one goes down, you lose 1/N sessions. 

Some people think that if you are going to bother with session load
balancing / distribution at all, why not try and ensure all the sessions are
safe, not just a majority.


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




JSPC scripts broken

2001-02-26 Thread Steve Downey

The JSPC scripts are broken. They need to pick up the new
jasper-compiler.jar from the jasper directory.

Also, although the catalina.sh script supports cygwin, the jasper script
does not.
This electronic mail transmission
may contain confidential information and is intended only for the person(s)
named.  Any use, copying or disclosure by any other person is strictly
prohibited.  If you have received this transmission in error, please notify
the sender via e-mail. 
  


 jcpc-fix.patch

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


Re: jsvc_unix.c broken under linux ?

2001-02-26 Thread jean-frederic clere

"Pier P. Fumagalli" wrote:
 
 Marcus Crafter [EMAIL PROTECTED] wrote:
 
  Hi All,
 
  I've been trying to build the service code from the Tomcat 4.0b1 source base
  under my Linux system. Unfortunately there seems to be a problem with the
  systeminfo.h (and underlying sysinfo system call) header file.
 
  systeminfo.h does not exist under Linux (at least on my system, it's
  sysinfo.h), and the sysinfo system call made (jsvc_unix.c, line 158) also
  doesn't exist. :-( There is a sysinfo system call, but it returns a struct
  containing system details like uptime, load, etc.
 
  sysinfo() is used in jsvc_unix.c to obtain the architecture, which is used to
  build up a string locating libjvm.so. Looks like under linux we'll have to do
  this another way, unless I've overlooked/missed something ?
 
  I've searched the man pages to find an equivalent system call. The best I
  could
  find was uname() in utsname.h which returns a struct including the
  architecture
  type, however it returns too specific information (ie. i686 where i386 is
  needed for our purposes).
 
  Any ideas, suggestions for a solution ?
 
  How should we manage platform dependancies/differences like this ? (configure
  script? etc)
 
 The problem lies in the fact that I'm developing the native components under
 Solaris, and up to this point, I've never tried a port to Linux or other
 OSes (my next attempt is a build on MacOS/X, and then Yellow Dog Linux for
 PPC - Can you tell I work on Macintoshes now?).
 
 I'm kinda biased towards not using autoconf/automake (mainly because I don't
 know them), but they worked well in JServ (yes Jon, you convinced me!). If
 someone with more experience could come up with something along those lines,
 I'll be happy to include it, otherwise we might just use a nasty BASH
 script, we don't have to filter out _that_ many calls outside the ANSI C
 specification.
 
 Pier
 
 --
 
 Pier Fumagalli  http://www.betaversion.org/  mailto:[EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

And that no easy... But what is needed is the patch to libjvm.so isn't
it?
On my Linux it is:
/home2/jdk1.2.2/jre/lib/i386/classic/libjvm.so
(JAVA_HOME is /home2/jdk1.2.2).
On a ReliantUnix it is:
/opt/java/jdk12/jre/lib/mips/classic/green_threads/libjvm.so

I would suggest to define it in the Makedefs:
I have tried the following Makedefs on Linux:
+++
JAVA_HOME = /home2/jdk1.2.2
 
JAVAC   = $(JAVA_HOME)/bin/javac
JAVACOPTS   = -O
JAVADOC = $(JAVA_HOME)/bin/javadoc
JAVADOCOPTS = -author -version -splitindex -windowtitle "Apache Service
Interface"
JAR = $(JAVA_HOME)/bin/jar
JVMLIB  = $(JAVA_HOME)/jre/lib/i386/classic/libjvm.so
 
CC= gcc
COPTS = -O6 -Wall -Wstrict-prototypes
CINCS = -I. -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
-DJVMLIB=\""$(JVMLIB)"\"
CLIBS =
-ldl   
 
+++

And I have applied the enclosed patch.

Cheers

Jean-frederic

? Makedefs
? service.jar
? cscope.list
? patch.txt
? cscope.out
? native/jsvc
Index: native/jsvc.h
===
RCS file: /home/cvs/mirror/jakarta-tomcat-4.0/service/src/native/jsvc.h,v
retrieving revision 1.3
diff -u -r1.3 jsvc.h
--- native/jsvc.h   2000/11/27 11:05:14 1.3
+++ native/jsvc.h   2001/02/26 16:23:36
@@ -61,7 +61,9 @@
 #ifndef _JSVC_H_
 #define _JSVC_H_
 
+#if HAVE_SYSTEMINFO_H
 #include sys/systeminfo.h
+#endif
 #include strings.h
 #include stdarg.h
 #include stdlib.h
@@ -163,4 +165,4 @@
 // Stop the service
 boolean jsvc_stop(jsvc_config *);
 
-#endif // #ifndef _JSVC_H_
\ No newline at end of file
+#endif // #ifndef _JSVC_H_
Index: native/jsvc_unix.c
===
RCS file: /home/cvs/mirror/jakarta-tomcat-4.0/service/src/native/jsvc_unix.c,v
retrieving revision 1.3
diff -u -r1.3 jsvc_unix.c
--- native/jsvc_unix.c  2000/11/27 11:05:18 1.3
+++ native/jsvc_unix.c  2001/02/26 16:23:37
@@ -155,14 +155,30 @@
 else xvm=strcat(strdup(cfg-vm),"/");
 
 // Check the processor architecture
+#if !HAVE_SYSTEMINFO_H
+#ifdef JVMLIB
+#else
+#error "JVMLIB should defined"
+#endif
+#else
 sysinfo(SI_ARCHITECTURE,arc,32);
+#endif
 
 // Calculate the Java Virtual Machine library filename (for JRE standard)
+#ifdef JVMLIB
+strcpy(lib,JVMLIB);
+#else
 sprintf(lib,"%s/lib/%s/%slibjvm.so",cfg-home,arc,xvm);
+#endif
 jsvc_debug(JSVC_MARK, "Attempting to load library from \"%s\"",lib);
+printf("Attempting to load library from \"%s\"",lib);
 x=open(lib,O_RDONLY);
 if (x0) {
+#ifdef JVMLIB
+   strcpy(lib,JVMLIB);
+#else
 sprintf(lib,"%s/jre/lib/%s/%slibjvm.so",cfg-home,arc,xvm);
+#endif
 

cvs commit: jakarta-tomcat/src/webpages index.html

2001-02-26 Thread marcsaeg

marcsaeg01/02/26 09:20:37

  Modified:src/share/org/apache/tomcat/core Tag: tomcat_32
Constants.java
   src/webpages Tag: tomcat_32 index.html
  Log:
  Changing version numbers to 3.2.2 beta 1
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.22.2.11 +1 -1  
jakarta-tomcat/src/share/org/apache/tomcat/core/Attic/Constants.java
  
  Index: Constants.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Attic/Constants.java,v
  retrieving revision 1.22.2.10
  retrieving revision 1.22.2.11
  diff -u -r1.22.2.10 -r1.22.2.11
  --- Constants.java2001/02/09 23:05:44 1.22.2.10
  +++ Constants.java2001/02/26 17:20:33 1.22.2.11
  @@ -67,7 +67,7 @@
   
   public class Constants {
   public static final String TOMCAT_NAME = "Tomcat Web Server";
  -public static final String TOMCAT_VERSION = "3.2.2-dev";
  +public static final String TOMCAT_VERSION = "3.2.2 beta 1";
   
   public static final String JSP_NAME = "JSP";
   public static final String JSP_VERSION = "1.1";
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.13.2.12 +2 -2  jakarta-tomcat/src/webpages/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/webpages/index.html,v
  retrieving revision 1.13.2.11
  retrieving revision 1.13.2.12
  diff -u -r1.13.2.11 -r1.13.2.12
  --- index.html2001/02/16 04:13:16 1.13.2.11
  +++ index.html2001/02/26 17:20:36 1.13.2.12
  @@ -4,13 +4,13 @@
   meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
   meta name="GENERATOR" content="Mozilla/4.72 [en] (WinNT; U) [Netscape]"
   meta name="Author" content="Anil K. Vijendran"
  -titleTomcat v3.2.2-dev/title
  +titleTomcat v3.2.2 beta 1/title
   /head
   body bgcolor="#FF"
   img SRC="tomcat.gif" height=92 width=130 align=LEFTbfont face="Arial, 
Helvetica, sans-serif"font size=+3Tomcat/font/font/b 
   br
   bfont face="Arial, Helvetica, sans-serif"font size=-1Version
  -3.2.2-dev/font/font/b
  +3.2.2 beta 1/font/font/b
   pThis is the default Tomcat home page. This page serves as a quick reference
   guide to related resources and is located at:
   ul
  
  
  

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




Re: FW: [advanced-servlets] Session Load Balancing (was: To avoid

2001-02-26 Thread Jason Brittain

Nick Bauman wrote:

 Pier,
 
 If the next request from that client is routed to server Y, then
 server Y will get a request with that same composite ID of
 "serverX:sessionPPP".  This tells server Y that the first thing it
 needs to do is get the canonical version of Session sessionPPP from
 server X. (The exact method for this may vary, but suffice to say it
 will not involve spawning Threads from Servlets. :-)  In the response
 
 
 The only problem with this is you have N servers in a rotation (sprayed or
 DNS round-robin) and one goes down, you lose 1/N sessions. 
 
 Some people think that if you are going to bother with session load
 balancing / distribution at all, why not try and ensure all the sessions are
 safe, not just a majority.


Yes, and the way I've seen people solve this issue is to make each server
constantly replicate its sessions to another server so that any session's
state is stored in two servers (not just one).  For example, if you've got
four servers, A, B, C, and D, you configure A to replicate to B, B to
replicate to C, C to replicate to D, and D to replicate to A.  Then the
"composite ID" would contain the primary server tag, secondary server tag,
and the session ID, like:  A:B:sessionXXX.  So, if server A went down,
the load balancer could still get session info from server B, and at the 
same
time let server D know that A is down and to replicate to B until further
notice.

This also works when each server replicates sessions to more than one
backup server so that you've got even higher fault tolerance (but you'll
probably never need that level of fault tolerance).

-- 
Jason Brittain
Software Engineer, Olliance Inc.http://www.Olliance.com
Current Maintainer, Locomotive Project  http://www.Locomotive.org


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




Few commits

2001-02-26 Thread cmanolache

Hi,

I'll start doing a number of commits that implement part of what was
proposed so far. Please review.

( the tree may be unstable - I'll try to send individual commits instead
of a big one ).

One of the changes that wasn't discussed so far - in Ajp13.java I
reproduced some of the changes from the standalone module. That results in
almost 50% increase in speed, and the changes are pretty minor ( just the
use of MessageBytes and OutputStream instead of Strings - it's fascinating
how a small change can have such an effect ! ). 

Costin


 


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




Re: jsvc_unix.c broken under linux ?

2001-02-26 Thread Marcus Crafter

Hi Jean-Frederic,

I like your patch. Thanks for your help. :-)

I'm also wondering why we dlopen libjvm.so in the first place ?

After all, on my linux machine I had to specify the location
of libjvm.so and other JRE .so files via LD_LIBRARY_PATH anyway
(otherwise I would receive a JVM init error while the VM was trying to
load other JRE libraries).

So, if the user has to specify the LD_LIBRARY_PATH to get everything
to work anyway, why not dynamically link jsvc against libjvm.so in the
first place ? This makes things much simpler and removes the need to
calculate which VM to use and where it is, and lets the user change it
via an environment variable ?

I'm interested in everyone's thoughts for and against ?

Cheers,

Marcus

"jean-frederic" wrote:

 "Pier P. Fumagalli" wrote:
  
  Marcus Crafter [EMAIL PROTECTED] wrote:
  
   systeminfo.h does not exist under Linux (at least on my system, it's
   sysinfo.h), and the sysinfo system call made (jsvc_unix.c, line 158) also
   doesn't exist. :-( There is a sysinfo system call, but it returns a struct
   containing system details like uptime, load, etc.
  
   sysinfo() is used in jsvc_unix.c to obtain the architecture, which is used to
   build up a string locating libjvm.so. Looks like under linux we'll have to do
   this another way, unless I've overlooked/missed something ?
 
  The problem lies in the fact that I'm developing the native components under
  Solaris, and up to this point, I've never tried a port to Linux or other
  OSes (my next attempt is a build on MacOS/X, and then Yellow Dog Linux for
  PPC - Can you tell I work on Macintoshes now?).
 
 And that no easy... But what is needed is the patch to libjvm.so isn't
 it?
 On my Linux it is:
 /home2/jdk1.2.2/jre/lib/i386/classic/libjvm.so
 (JAVA_HOME is /home2/jdk1.2.2).
 On a ReliantUnix it is:
 /opt/java/jdk12/jre/lib/mips/classic/green_threads/libjvm.so
 
 I would suggest to define it in the Makedefs:
 I have tried the following Makedefs on Linux:
 +++
 JAVA_HOME = /home2/jdk1.2.2
  
 JAVAC   = $(JAVA_HOME)/bin/javac
 JAVACOPTS   = -O
 JAVADOC = $(JAVA_HOME)/bin/javadoc
 JAVADOCOPTS = -author -version -splitindex -windowtitle "Apache Service
 Interface"
 JAR = $(JAVA_HOME)/bin/jar
 JVMLIB  = $(JAVA_HOME)/jre/lib/i386/classic/libjvm.so
  
 CC= gcc
 COPTS = -O6 -Wall -Wstrict-prototypes
 CINCS = -I. -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
 -DJVMLIB=\""$(JVMLIB)"\"
 CLIBS =
 -ldl 
   

-- 
.
 ,,$,  Marcus Crafter
;$'  ':Computer Systems Engineer
$: :   Open Software Associates GmbH
 $   o_)$$$:   82-84 Mainzer Landstrasse
 ;$,_/\ :'   60327 Frankfurt Germany
   ' /( 
   \_' Email : [EMAIL PROTECTED]
  .Business Hours : +49 69 9757 200
:   After Hours: +49 69 49086750


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




Re: TC3.2.1 - response commit on included JSPs

2001-02-26 Thread cmanolache

  " if that destination is another character or
   byte stream, flush it."
  
  In this case, the destination is the servlet output
  stream - and it has to be flushed.
 
 That is only because the particular servlet engine
 implementation implements the ServletOutputStream of
 the Response object passed to the included servlet by
 wrapping it around (or simply passing on) the current
 ServletOutputStream.  Technically, that does not have
 to be so.

Ok, the final destination is the user's browser
( where bits will eventually go ). The meaning of
flush() seems to be - empty all intermediary buffers.

 This is true.  My argument then is only that I think
 the spec is bad in this regard.  However, as I stated,
 I can live with it.

+1 on that :-)


 So, I'm trying to decide whether to use the latest
 milestone build, nightly build or to setup a cvs
 project and simply track the latest code with the
 eventual goal of helping to contribute.  Having to
 build one of my deployment tools from source is not
 something I really wanted to do from a project
 management perspective, but oh well

The release plan is to have a beta soon, and so
 far it seems to work fine (  or at least my optimistic
 look at the bugs doesn't show any stopper ).


 I presume I can hook up as a 'read only' user of the
 tc 3.3 cvs repositories with wincvs?  Where can I find
 the necessary repository url and authentication info? 
 Or can I actually checkout the whole project via
 cvsweb?  Looks like I need to do some poking around...

It's the main branch of jakarta-tomcat, with nightly
snapshots and builds available :-).


Costin


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




Tomcat 3.2.2 beta 1 Release Native components

2001-02-26 Thread Marc Saegesser

The Tomcat 3.2.2 beta 1 release is ready to go with the exception of some of
the native components.  Volunteers to build the following items (plus any
others) would appreciated.  You can send the binaries to me and I'll add
them to the binary distribution site.  Thanks.

Win32
   nsapi_redirect.dll
   ApacheModuleJServ.dll
   mod_jk.dll
Linux
   mod_jk.so
   mod_jserv_tomcat.so
netware
   jni_conn.nlm
   mod_jk.nlm
   nsapi_rd.nlm



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




Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Main.java

2001-02-26 Thread William Barker

This is a very nice feature.  Just for cleanliness, you might want to remove
the "tomcat.cp" property logic at line #426.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 26, 2001 1:42 AM
Subject: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup
Main.java


 nacho   01/02/26 01:42:30

   Modified:src/share/org/apache/tomcat/startup Main.java
   Log:
   Added :

   org.apache.tomcat.common.classpath
   org.apache.tomcat.shared.classpath

   System properties to set the shared and common classpath, this are added
prior
   to adding the internal lib directories ..

   Submitted by Mel Martinez [[EMAIL PROTECTED]]

   Revision  ChangesPath
   1.26  +222 -85
jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java

   Index: Main.java
   ===
   RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java,v
   retrieving revision 1.25
   retrieving revision 1.26
   diff -u -r1.25 -r1.26
   --- Main.java 2001/02/10 19:17:28 1.25
   +++ Main.java 2001/02/26 09:42:30 1.26
   @@ -1,4 +1,4 @@
   -/*
   +/* $Id: Main.java,v 1.26 2001/02/26 09:42:30 nacho Exp $
 * 
 *
 * The Apache Software License, Version 1.1
   @@ -69,22 +69,101 @@
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.compat.Jdk11Compat;

   -// Depends:
   -// JDK1.1
   -// tomcat.util.IntrospectionUtils, util.compat

/**
   - * Starter for Tomcat.
   - *
   - * This is a replacement/enhancement for the .sh and .bat files - you
can
   - * use JDK1.2 "java -jar tomcat.jar", or ( for jdk 1.1 ) you just need
to
   - * include a single jar file in the classpath.
   - *
   - * @author Costin Manolache
   - * @author Ignacio J. Ortega
   - *
   + Starter class for Tomcat.
   + p
   + This is a replacement/enhancement for the .sh and .bat files - you can
   + use JDK1.2 "java -jar tomcat.jar", or ( for jdk 1.1 ) you just need to
   + include a single jar file in the classpath.
   + p
   + This class creates three class loader instances:
   + ol
   + lia 'common' loader to be the parent of both the server
   + container and also webapp loaders./li
   + lia 'shared' loader to load classes used by all webapps, but
   + not the servlet engine./i
   + lia 'server' loader exclusively for the tomcat servlet engine./li
   + /ol
   + Both the 'shared' loader and 'server' loader have the common loader as
   + the parent class loader.  The class path for each is assembled like
so:
   + ul
   + licommon - all elements of the
codeorg.apache.tomcat.common.classpath/code
   +   property plus all *.jar files found in
${TOMCAT_HOME}/lib/common/./li
   + lishared - all elements of the
codeorg.apache.tomcat.shared.classpath/code
   +   property plus all *.jar files found in
${TOMCAT_HOME}/lib/shared/./i
   + liserver - all jar files found in ${TOMCAT_HOME}/lib, plus the class
   +   folder ${TOMCAT_HOME}/classes and finally also the utility jar
   +   file ${JAVA_HOME}/lib/tools.jar./li
   + /ol
   + After creating the above class loaders, this class instantiates,
initializes
   + and starts an instance of the class
codeorg.apache.tomcat.startup.Tomcat/code.
   + p
   + @author Costin Manolache
   + @author Ignacio J. Ortega
   + @author Mel Martinez [EMAIL PROTECTED]
   + @version $Revision: 1.26 $ $Date: 2001/02/26 09:42:30 $
 */
public class Main {
   +
   +/**
   +name of configuration property to set (using the -D option
at
   +startup or via .properties file) to specify the classpath
   +to be used by the ClassLoader shared amongst all web
applications
   +(but not by the servlet container).  Specify this string as
   +normal file paths separated by the path.seperator delimiter
for
   +the host platform.  Example (unix):
   +precode
   +* org.apache.tomcat.shared.classpath =
/home/mypath/lib/mylib.jar: \
   +*
/home/mypath/classes/
   +/code/pre
   +*/
   +public static final String TOMCAT_SHARED_CLASSPATH_PROPERTY =
   +"org.apache.tomcat.shared.classpath";
   +
   +/**
   +the classpath shared among all web apps (in addition to any
   +jar files placed directly in $TOMCAT_HOME/lib/shared/).
   +*/
   +public static final String TOMCAT_SHARED_CLASSPATH;
   +
   +/**
   +name of configuration property to set (using the -D option
at
   +startup or via .properties file) to specify the classpath
   +to be used by the ClassLoader common to both the servlet
engine
   +and all web applications.  Specify this string as
   +normal file paths separated by the path.seperator delimiter
for
   +the host platform.  

PROPOSAL: new commiter ( Mel Martinez )

2001-02-26 Thread cmanolache

Hi,

Please vote to add Mel Martinez [EMAIL PROTECTED] to the list of
commiters. 

Mel already made important contributions in desciphering and fixing the
buffering issues, and will be a great addition to the community.

Thanks,
Costin



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




RE: PROPOSAL: new commiter ( Mel Martinez )

2001-02-26 Thread GOMEZ Henri

Please vote to add Mel Martinez [EMAIL PROTECTED] to the list of
commiters. 

Mel already made important contributions in desciphering and fixing the
buffering issues, and will be a great addition to the community.

+1

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




RE: Tomcat 3.2.2 beta 1 Release Native components

2001-02-26 Thread GOMEZ Henri

I'll do 
Linux
   mod_jk.so
   mod_jserv_tomcat.so

Both binary and RPMs

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




Re: Help! Servlets and JSP

2001-02-26 Thread Adam Jenkins

ServletContext.getRequestDispatcher("myjsp.jsp").forward(ServletRequest, ServletResponse) can't do this with your resultset though 'cause result sets aren't serializableyou'll need to implement your own serializable result set that pulls the values out, then store them in the session object...want any more info, just email [EMAIL PROTECTED]

From: "k savvy" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED] 
To: [EMAIL PROTECTED] 
Subject: Help! Servlets and JSP 
Date: Mon, 26 Feb 2001 07:01:57 - 
MIME-Version: 1.0 
X-Originating-IP: [63.28.72.109] 
Received: from [64.208.42.41] by hotmail.com (3.2) with ESMTP id MHotMailBC634ACC00504004311940D02A290F990; Sun Feb 25 23:03:41 2001 
Received: (qmail 83222 invoked by uid 500); 26 Feb 2001 07:02:16 - 
Received: (qmail 83213 invoked from network); 26 Feb 2001 07:02:15 - 
From tomcat-dev-return-18076-adamjenkins Sun Feb 25 23:04:51 2001 
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm 
Precedence: bulk 
list-help: 
list-unsubscribe: 
list-post: 
Delivered-To: mailing list [EMAIL PROTECTED] 
Message-ID: <[EMAIL PROTECTED]>
X-OriginalArrivalTime: 26 Feb 2001 07:01:57.0425 (UTC) FILETIME=[021C3A10:01C09FC2] 
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 
 
Hi, Guys - Can anyone tell me what's the best way to pass values 
from 
servlets to JSP? I have a serlvets that connect to the database and 
retrieve the values using JDBC. Now I need to pass the values to a 
JSP page 
to display on the browser. What's the best way to implement it? Do 
I need 
to store the resultset into a Bean for JSP? What about the looping 
inside 
the resultset? Any input is greatly appreciated. 
_ 
Get your FREE download of MSN Explorer at http://explorer.msn.com 
 
 
- 
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, email: [EMAIL PROTECTED] 
 
Get your FREE download of MSN Explorer at http://explorer.msn.com

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



RE: PROPOSAL: new commiter ( Mel Martinez )

2001-02-26 Thread Marc Saegesser

+1

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Hi,
 
 Please vote to add Mel Martinez [EMAIL PROTECTED] to the list of
 commiters. 
 
 Mel already made important contributions in desciphering and fixing the
 buffering issues, and will be a great addition to the community.
 
 Thanks,
 Costin


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





Re: Tomcat 3.2.2 beta 1 Release Native components

2001-02-26 Thread Dave Oxley

I've build mod_jk.dll for Windows. Where should I EMail it.

Just tested 3.2.2 with my servlet, and the first request seems to be 
substantially faster (Creating HttpSession??). There used to be about a 1 
second delayish. Nice one.

Couple of bugs:

1. jaxp.jar and parser.jar aren't distributed with the binary release.

2. The virtual hosting section of tomcat-apache-howto.html contains a 
section from httpd.conf where it should contain the Host/ part of 
server.xml.

Dave.
[EMAIL PROTECTED]


From: "Marc Saegesser" [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Tomcat 3.2.2 beta 1 Release Native components
Date: Mon, 26 Feb 2001 15:16:18 -0600

The Tomcat 3.2.2 beta 1 release is ready to go with the exception of some 
of
the native components.  Volunteers to build the following items (plus any
others) would appreciated.  You can send the binaries to me and I'll add
them to the binary distribution site.  Thanks.

Win32
nsapi_redirect.dll
ApacheModuleJServ.dll
mod_jk.dll
Linux
mod_jk.so
mod_jserv_tomcat.so
netware
jni_conn.nlm
mod_jk.nlm
nsapi_rd.nlm



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


_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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




Re: Tomcat 3.2.2 beta 1 Release Native components

2001-02-26 Thread Dave Oxley

Stupid question. Sorry!

From: "Dave Oxley" [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Tomcat 3.2.2 beta 1 Release Native components
Date: Mon, 26 Feb 2001 22:46:03 -

I've build mod_jk.dll for Windows. Where should I EMail it.

Just tested 3.2.2 with my servlet, and the first request seems to be
substantially faster (Creating HttpSession??). There used to be about a 1
second delayish. Nice one.

Couple of bugs:

1. jaxp.jar and parser.jar aren't distributed with the binary release.

2. The virtual hosting section of tomcat-apache-howto.html contains a
section from httpd.conf where it should contain the Host/ part of
server.xml.

Dave.
[EMAIL PROTECTED]


From: "Marc Saegesser" [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Tomcat 3.2.2 beta 1 Release Native components
Date: Mon, 26 Feb 2001 15:16:18 -0600

The Tomcat 3.2.2 beta 1 release is ready to go with the exception of some
of
the native components.  Volunteers to build the following items (plus any
others) would appreciated.  You can send the binaries to me and I'll add
them to the binary distribution site.  Thanks.

Win32
nsapi_redirect.dll
ApacheModuleJServ.dll
mod_jk.dll
Linux
mod_jk.so
mod_jserv_tomcat.so
netware
jni_conn.nlm
mod_jk.nlm
nsapi_rd.nlm



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


_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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


_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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




Problem in Jakarta-Tomcat running in WinNT with multiple NICs

2001-02-26 Thread aneogi



Hi,
I'm using Jakarta-Tomcat as the servlet container and also as the
default web server listening to 8080 port for a Servlet-Jsp based application.
 The Servlet has a background thread running that communicates asynchrnously
(asynchronous to the HTTP requests) with an external process. This background
thread is implemented as a different object that gets instantiated from the
init() method of the Servlet. The external process executed (by
Runtime.getRuntime.exec()) is a proprietary command line tool. This background
thread, after being instantiated, executes this process, gets the output, input
and error streams associated with the process and then periodically writes to
the output stream and reads from the input stream.Everything works fine in both
Win32 and UNIX platforms.

If I start up Tomcat on a WINNT machine that has dual NICs (Network
Identification Card) connected to it, the  reading from the input stream never
happens as the inputstream.read() call never returns true.  If I just disconnect
one of the network connections then everything starts to work again. I've tried
changing the priorites of the background thread, yielding it, putting it to
sleep for a while but the inputstream just never gets ready to be read. I
actually wrap the InputStream out of the external process with an
InputStreamReader. In csae of multiple NICs, the InputStreamReader.ready() never
returns true.

The command line tool itself doesn't have any problem with multiple NICs as I
have tested. My java class (that runs as the background thread) also works fine
in multiple NIC environment if invoked as a NT service (after wrapping by C++)
or if simply started from the command line. Only when it's instantiated from the
Servlet running under jakarta-tomcat I face the problem mentioned above.

Any help/idea/pointers will be really appreciated.

Regards, Atanu



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




Re: mod_jk.so build problems with SunOS 5.6

2001-02-26 Thread Steve Spicer

I had the exact same problem, opening apxs up in vi noticed it was just a
perl script.. after installing mod_ssl, the script had been "recompiled" and
needed the linker name and parameters (-G) putting back in!

(Lines 78  79)

my $CFG_LD_SHLIB  = q();  # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = q(); # substituted via Makefile.tmpl

If they look like that, change them to:

my $CFG_LD_SHLIB  = q(ld);  # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = q(-G); # substituted via Makefile.tmpl

and try that!

--- Snip 


sorry.I don't know more UNIX so I don't know how can I do when I got error
message.
my work station:
Solaris 2.6
Apache1.3.14
TOMCAT3.2.1
what I done:
apxs -o
mod_jk.so -DSOLARIS -I../jk -I${JAVA_HOME}/include -I${JAVA_HOME}/include/so
laris -L/lib -lposix4 -c *.c ../jk/*.c
 and I get error
   apxs:Break: Command failed with rc=255
but the object jk*.o is done when I do apxs.so I  use
   gcc -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o
jk_pool.
o jk_nwmain.o jk_msg_buff.o jk_map.o jk_lb_worker.o jk_jni_worker.o
jk_connect.o
 jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker.o mod_jk.o$
to link object for doing my mod_jk.so but I get one error message too
 jk_jni_worker.o(the symbol is depend /usr/lib/libdl.so.1 tacitly)


- Original Message -
??? : "James Courtney" [EMAIL PROTECTED]
?? : [EMAIL PROTECTED]
CC : [EMAIL PROTECTED]
 : 2001?1?30? 4:32
?? : RE: mod_jk.so build problems with SunOS 5.6


 Here's a makefile that's been working for me on Solaris 2.7.
 -Jamey

 -Original Message-
 From: Timothy S. Tsai [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 29, 2001 8:03 AM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: mod_jk.so build problems with SunOS 5.6


 Hello,

 Has anyone gotten an answer for this post?  I ran into the same problem
 also.

 tt

 At 03:45 PM 1/29/01 +0900, you wrote:
 hi,
 I failed to build mod_jk.so.what can tell me how can I do.
 I get a error message when I use apxs
 -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o
 jk_pool.o
 jk_nwmain.o jk_msg_buff.o jk_map.o jk_lb_worker.o jk_jni_worker.o
 jk_connect.o j
 k_ajp13_worker.o jk_ajp13.o jk_ajp12_worker.o mod_jk.o -lrt
 apxs:Break: Command failed with rc=255
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]



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




Steve Spicer
Systems Manager

--
IT Worldwide | http://www.itworldwide.net
Providing Internet Services  | [EMAIL PROTECTED]
Integration and Innovation   | +44 020 8597 8901


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




[TOMCAT 4.x] SSI - Servlet Provided Functionality

2001-02-26 Thread Bip Thelin

I've started working on the SSI implementation for Tomcat 4.x. I don't know if
anyone else is working on that since I didn't see anyone volunteered. However
I've come a bit on the way and should have a beta due next week. Let you know
further when I have code to present.

Regards, Bip

/* This message is encrypted in a way that makes it look like an ordinary message */

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




Re: anyway to watch what tomcat is doing?

2001-02-26 Thread Michael Mealling

On Mon, Feb 26, 2001 at 03:10:24PM -0800, [EMAIL PROTECTED] wrote:
 What protocol do you use?

Ajp13

 What OS? 

Solaris 2.6...

 It's a serious problem, but hard to
 reproduce ( it never happened to me, and I'm doing all kind of requests ).

It never happened to me until I upgraded...

 Can you start tomcat in a debugger, and see what happens? 

Possibly... any recommendations for which one to use?

 Does it happens all the time ( i.e. start apache,tomcat, send 
 100 requests and you can reproduce it) or only sometimes ?

It pretty much happens all the time. I can do about 5 requests when
the entire thing comes to a standstill at 99% CPU use...

 Can you also send your config ? 

apache 1.3.17 with mod_jk on solaris 2.6 talks via ajp13 to
tomcat 3.3-m1. Here's my server.xml
?xml version="1.0" encoding="ISO-8859-1"?
Server

!-- You can add a "home" attribute to represent the "base" for
 all relative paths. If none is set, the TOMCAT_HOME property
 will be used, and if not set "." will be used.
 webapps/, work/ and log/ will be relative to this ( unless
 set explicitely to absolute paths ).
 You can also specify a "randomClass" attribute, which determines
 a subclass of java.util.Random will be used for generating session IDs.   
  By default this is "java.security.SecureRandom".
 Specifying "java.util.Random" will speed up Tomcat startup,
 but it will cause sessions to be less secure.
  --
ContextManager debug="99" workDir="work" 

  !--  Global modules  --

LogSetter name="tc_log" timestamps="true"
   verbosityLevel="INFORMATION"  /

LogEvents enabled="false" /

!-- Backward compat: read the Context declarations from server.xml--
ContextXmlReader config="conf/server.xml" /

!-- Separated Context --
ContextXmlReader config="conf/apps.xml" /

AutoDeploy source="webapps" target="webapps" /

AutoWebApp dir="webapps" host="DEFAULT" /

PolicyLoader securityManagerClass="java.lang.SecurityManager"
  policyFile="conf/tomcat.policy" /

SessionId cookiesFirst="true" noCookies="false" /

SimpleMapper1 debug="99" /


!-- == context processing modules == --
!-- This will be the "default" profile
 ( all except the "global" modules can be set per context )
  --
LogSetter name="servlet_log"
   timestamps="true"
   verbosityLevel = "INFORMATION"
   path="logs/servlet-${MMdd}.log"
   /

LogSetter  name="JASPER_LOG"
   timestamps="true"
   path="logs/jasper-${MMdd}.log"
   verbosityLevel = "INFORMATION"  /

LoaderInterceptor11  useApplicationLoader="true" /

WebXmlReader validate="true" /

ErrorHandler showDebugInfo="true" /

WorkDirSetup cleanWorkDir="false" /

Jdk12Interceptor /

!-- Non-standard invoker, for backward compat. ( /servlet/* ) --
InvokerInterceptor /

!-- you can add javaCompiler="jikes" --
JspInterceptor keepGenerated="true"
largeFile="false"
sendErrToClient="true"
useJspServlet="false"
/

StaticInterceptor  debug="99" listings="true" /

ReloadInterceptor fullReload="true" /

AccessInterceptor /

CredentialsInterceptor /

SimpleRealm  filename="conf/users/global-users.xml" /

   !-- UnComment the following and comment out the
above to get a JDBC realm.
Other options for driverName:
  driverName="oracle.jdbc.driver.OracleDriver"
  connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
  connectionName="scott"
  connectionPassword="tiger"

  driverName="org.gjt.mm.mysql.Driver"
  connectionURL="jdbc:mysql://localhost/authority"
  connectionName="test"
  connectionPassword="test"

"connectionName" and "connectionPassword" are optional.
--
!--
JDBCRealm
debug="99"
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
connectionURL="jdbc:odbc:TOMCAT"
userTable="users"
userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles"
roleNameCol="role_name" /
--

LoadOnStartupInterceptor /

Servlet22Interceptor /

  !--  Connectors  --

   !-- new http adapter. Attributes:
   secure - use SSL ( https )
   keystore, keypass - certs for SSL
   port
Http10Interceptor port="8080"
   secure="false"
  

Bug Report #813 fix

2001-02-26 Thread Brent R. Matzelle

Hello,

I have a bug fix for the above problem.  I got the same error that this 
person did.  This error is with ANT specifically.  The JAR file tools.jar 
must be in the CLASSPATH or in $JAVA_HOME/jre/lib/ext, which it is not in 
Sun's Java 1.3 (it is in $JAVA_HOME/lib).  

Also, I was getting several errors about deprecation during the ANT build and 
I found that the program was not finding the version of my compiler.  To fix 
these problems I edited Project.java file found in ANT's source tree here: 
/src/main/org/apache/tools/ant.  I altered the getJavaVersion function (line 
335) by adding a getProperty line:

public static String getJavaVersion() {
String javaVersion = System.getProperty("java.version");
   return javaVersion;
}

I hope this helps.  Thank you.

Brent

"First, they ignore you. Then they laugh at you. Then they fight you. Then 
you win."
-Mahatma Ghandi



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




Connection aborted by peer: socket write error

2001-02-26 Thread William_Diano

Whats causing tis error, and how can I get rid of it ?

Ctx( /Phase2 ): IOException in: R( /Phase2 +
/img/MapInfo.gif
+ null) Connection aborted by peer: socket write error



Billy Ciano
MapInfo
Internet Engineer
1 Global View
Troy,NY 12180
Main:(518)285-6000
E-mail: [EMAIL PROTECTED]


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




RE: Tomcat 3.2.2 beta 1 Release Native components

2001-02-26 Thread Marc Saegesser

Oops.  I forgot that we ship with the JAXP files in the binary distribution.
They're there now.

The PRNG initialization is *much* faster in 3.2.2 which greatly speeds up
the creates of the first HttpSession object.

I'll look into the tomcat-apache-howto.html problem.

Thanks for building mod_jk.dll!

 -Original Message-
 From: Dave Oxley [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 26, 2001 4:46 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Tomcat 3.2.2 beta 1 Release Native components


 I've build mod_jk.dll for Windows. Where should I EMail it.

 Just tested 3.2.2 with my servlet, and the first request seems to be
 substantially faster (Creating HttpSession??). There used to be about a 1
 second delayish. Nice one.

 Couple of bugs:

 1. jaxp.jar and parser.jar aren't distributed with the binary release.

 2. The virtual hosting section of tomcat-apache-howto.html contains a
 section from httpd.conf where it should contain the Host/ part of
 server.xml.

 Dave.
 [EMAIL PROTECTED]


 From: "Marc Saegesser" [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Tomcat 3.2.2 beta 1 Release Native components
 Date: Mon, 26 Feb 2001 15:16:18 -0600
 
 The Tomcat 3.2.2 beta 1 release is ready to go with the
 exception of some
 of
 the native components.  Volunteers to build the following items (plus any
 others) would appreciated.  You can send the binaries to me and I'll add
 them to the binary distribution site.  Thanks.
 
 Win32
 nsapi_redirect.dll
 ApacheModuleJServ.dll
 mod_jk.dll
 Linux
 mod_jk.so
 mod_jserv_tomcat.so
 netware
 jni_conn.nlm
 mod_jk.nlm
 nsapi_rd.nlm
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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


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




RE: Tomcat 3.2.2 beta 1 Release Native components

2001-02-26 Thread Jones, Stephen

Is it assumed that most people (and I don't mean just Redhat) are using a
mod_ssl-enabled (EAPI) version of Apache? The distribution should either
document this fact or distribute a non-EAPI version of the binaries as well.

Steve

 -Original Message-
 From: Marc Saegesser [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 26, 2001 2:16 PM
 To: [EMAIL PROTECTED]
 Subject: Tomcat 3.2.2 beta 1 Release Native components
 
 The Tomcat 3.2.2 beta 1 release is ready to go with the 
 exception of some of
 the native components.  Volunteers to build the following 
 items (plus any
 others) would appreciated.  You can send the binaries to me 
 and I'll add
 them to the binary distribution site.  Thanks.
 
 Win32
nsapi_redirect.dll
ApacheModuleJServ.dll
mod_jk.dll
 Linux
mod_jk.so
mod_jserv_tomcat.so
 netware
jni_conn.nlm
mod_jk.nlm
nsapi_rd.nlm

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

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




mod_jk and FreeBSD

2001-02-26 Thread Oskar ÂŚwida

Hi,

Has anyone tried to build mod_jk for FreeBSD ?

Oskar


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




Re: [TOMCAT 4.x] SSI - Servlet Provided Functionality

2001-02-26 Thread Craig R. McClanahan

Bip Thelin wrote:

 I've started working on the SSI implementation for Tomcat 4.x. I don't know if
 anyone else is working on that since I didn't see anyone volunteered. However
 I've come a bit on the way and should have a beta due next week. Let you know
 further when I have code to present.


Hans Bergsten had started down the path of SSI stuff, but focused on compatibility with
Tomcat 3.2.  I'd say "go for it".


 Regards, Bip


Craig



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




cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade HttpServletResponseFacade.java ServletWriterFacade.java

2001-02-26 Thread costin

costin  01/02/26 18:42:38

  Modified:src/facade22/org/apache/tomcat/facade
HttpServletResponseFacade.java
ServletWriterFacade.java
  Log:
  Another fix for the writer bug ( fixed by Nacho and Henri before M1 ).
  
  The new fix is reusing the writer, but makes sure close is not putting
  the PrintWriter in an un-usable state ( that was the original problem ).
  
  Nacho, Henri - please take a look ( I used jetspeed to reproduce and
  test and it seems the fix is good )
  
  Revision  ChangesPath
  1.18  +4 -21 
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java
  
  Index: HttpServletResponseFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- HttpServletResponseFacade.java2001/02/20 03:34:10 1.17
  +++ HttpServletResponseFacade.java2001/02/27 02:42:38 1.18
  @@ -88,20 +88,20 @@
   private boolean usingStream = false;
   private boolean usingWriter = false;
   ServletOutputStreamFacade osFacade=null;
  -PrintWriter writer = null; // XXX will go away when we add the convertor
  +ServletWriterFacade writer;
   
  -// Logger.Helper loghelper = new Logger.Helper("tc_log", 
"HttpServletResponseFacade");
  -
   /** Package
*/
   HttpServletResponseFacade(Response response) {
   this.response = response;
  + OutputBuffer oBuffer= response.getBuffer();
  + writer = new ServletWriterFacade( oBuffer, response);
   }
   
   void recycle() {
usingStream = false;
usingWriter= false;
  - writer=null; // no need - the OutputBuffer will deal with enc
  + //  writer=null; // fixed ( ? )
if( osFacade != null ) osFacade.recycle();
   }
   
  @@ -193,23 +193,6 @@
throw new IllegalStateException(msg);
}
usingWriter= true ;
  - //  response.setUsingWriter( true );
  -
  - // old mechanism
  - // if( osFacade==null  response.getOutputBuffer() == null )
  - //  return response.getWriter();
  -
  - if( writer != null ) return writer;
  - if(  osFacade == null ) {
  - osFacade=new ServletOutputStreamFacade(response);
  - }
  -
  - OutputBuffer oBuffer= response.getBuffer();
  - writer = new ServletWriterFacade( oBuffer, response);
  - 
  - // writer=((ResponseImpl)response).getWriter( osFacade );
  - //  response.setServletOutputStream( osFacade );
  - //  response.setWriter(  writer );
   
return writer;
   }
  
  
  
  1.4   +10 -0 
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/ServletWriterFacade.java
  
  Index: ServletWriterFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/ServletWriterFacade.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServletWriterFacade.java  2001/02/20 03:34:11 1.3
  +++ ServletWriterFacade.java  2001/02/27 02:42:38 1.4
  @@ -110,6 +110,16 @@
super.write( str );
   }
   
  +public void close() {
  + // We don't close the PrintWriter - super() is not called,
  + // so the stream can be reused. We close ob.
  + try {
  + ob.close();
  + } catch (IOException ex ) {
  + ex.printStackTrace();
  + }
  +}
  +
   /** Reuse the object instance, avoid GC
*  Called from BSOS
*/
  
  
  

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




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

2001-02-26 Thread costin

costin  01/02/26 18:45:02

  Modified:src/share/org/apache/tomcat/core OutputBuffer.java
  Log:
  Added few more checks for null and few more accessor methods.
  
  Revision  ChangesPath
  1.13  +31 -2 
jakarta-tomcat/src/share/org/apache/tomcat/core/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/OutputBuffer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- OutputBuffer.java 2001/02/10 23:28:15 1.12
  +++ OutputBuffer.java 2001/02/27 02:45:02 1.13
  @@ -112,6 +112,11 @@
cbuf=new char[defaultCharBufferSize];
   }
   
  +public OutputBuffer(int size) {
  + buf=new byte[size];
  + cbuf=new char[size];
  +}
  +
   public OutputBuffer(Response resp) {
buf=new byte[defaultBufferSize];
cbuf=new char[defaultCharBufferSize];
  @@ -124,6 +129,23 @@
cm=req.getContextManager();
   }
   
  +public byte[] getBuffer() {
  + return buf;
  +}
  +
  +/** Return the first available position in the byte buffer
  + ( or the number of bytes written ).
  +*/
  +public int getByteOff() {
  + return count;
  +}
  +
  +/** Set the write position in the byte buffer
  + */
  +public void setByteOff(int c) {
  + count=c;
  +}
  +
   void log( String s ) {
System.out.println("OutputBuffer: " + s );
   }
  @@ -134,6 +156,7 @@
   private void realWrite(Request req, Response res, byte buf[], int off, int cnt )
throws IOException
   {
  + if( res==null ) return;
// If this is the first write ( or flush )
if (!res.isBufferCommitted()) {
res.endHeaders();
  @@ -386,6 +409,10 @@
   Hashtable encoders=new Hashtable();
   WriteConvertor conv;
   
  +public void setEncoding(String s) {
  + enc=s;
  +}
  +
   void cWrite( char c[], int off, int len ) throws IOException {
if( debug  0 ) log("cWrite(c,o,l) " + ccount + " " + len);
if( !gotEnc ) setConverter();
  @@ -396,7 +423,8 @@
   }
   
   private void setConverter() {
  - enc = resp.getCharacterEncoding();
  + if( resp!=null ) 
  + enc = resp.getCharacterEncoding();
gotEnc=true;
if(enc==null) enc="8859_1";
conv=(WriteConvertor)encoders.get(enc);
  @@ -455,7 +483,8 @@
bytesWritten=0;
   ccount=0;
   charsWritten=0;
  -
  + gotEnc=false;
  + enc=null;
   }
   
   public int getBufferSize() {
  
  
  

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




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

2001-02-26 Thread costin

costin  01/02/26 18:47:39

  Modified:src/share/org/apache/tomcat/core Request.java
  Log:
  2 more fields converted to MessageBytes ( Ajp13 is setting them
  on every request - they were implemented as callbacks in standalone
  so the change was not absolutely needed - and it got postponed ).
  
  Revision  ChangesPath
  1.92  +14 -20jakarta-tomcat/src/share/org/apache/tomcat/core/Request.java
  
  Index: Request.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Request.java,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- Request.java  2001/02/20 03:17:56 1.91
  +++ Request.java  2001/02/27 02:47:39 1.92
  @@ -109,8 +109,8 @@
   //  properties 
   
   protected int serverPort;
  -protected String remoteAddr;
  -protected String remoteHost;
  +//protected String remoteAddr;
  +//protected String remoteHost;
   protected String localHost;
   
   protected int state;
  @@ -130,6 +130,10 @@
   protected MessageBytes servletPathMB=new MessageBytes();
   protected MessageBytes pathInfoMB=new MessageBytes();
   
  +// remote address/host
  +protected MessageBytes remoteAddrMB=new MessageBytes();
  +protected MessageBytes remoteHostMB=new MessageBytes();
  +
   // GS, used by the load balancing layer in the Web Servers
   // jvmRoute == the name of the JVM inside the plugin.
   protected String jvmRoute;
  @@ -139,7 +143,6 @@
   
   // Processed information ( redundant ! )
   protected Parameters params=new Parameters();
  -//protected Hashtable parametersH = new Hashtable();
   protected boolean didReadFormData=false;
   
   protected int contentLength = -1;
  @@ -177,9 +180,6 @@
   Container container;
   
   Cookies scookies;
  -//ServerCookie scookies[]=new ServerCookie[4];
  -// -1 = cookies not processed yet
  -//int cookieCount=-1;
   
   // sub-request support 
   Request top;
  @@ -300,21 +300,13 @@
   public void setServerPort(int serverPort ) {
this.serverPort=serverPort;
   }
  -
  -public String getRemoteAddr() {
  -return remoteAddr;
  -}
  -
  -public void setRemoteAddr( String remoteAddr ) {
  - this.remoteAddr=remoteAddr;
  -}
   
  -public String getRemoteHost() {
  - return remoteHost;
  +public MessageBytes remoteAddr() {
  + return remoteAddrMB;
   }
   
  -public void setRemoteHost(String remoteHost) {
  - this.remoteHost=remoteHost;
  +public MessageBytes remoteHost() {
  + return remoteHostMB;
   }
   
   public String getLocalHost() {
  @@ -873,6 +865,8 @@
queryMB.recycle();
methodMB.recycle();
protoMB.recycle();
  + remoteAddrMB.recycle();
  + remoteHostMB.recycle();
   
// XXX Do we need such defaults ?
   schemeMB.setString("http");
  @@ -880,7 +874,7 @@
   uriMB.setString("/");
   queryMB.setString("");
   protoMB.setString("HTTP/1.0");
  -remoteAddr="127.0.0.1";
  -remoteHost="localhost";
  +remoteAddrMB.setString("127.0.0.1");
  +remoteHostMB.setString("localhost");
   }
   }
  
  
  

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




cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade HttpServletRequestFacade.java

2001-02-26 Thread costin

costin  01/02/26 18:49:27

  Modified:src/facade22/org/apache/tomcat/facade
HttpServletRequestFacade.java
  Log:
  Update for the 2 fields converted to MessageBytes ( Request shouldn't
  have any String field that is changed per request, but so far only
  those that mattered are converted )
  
  ( This is the only change in the core required for Ajp13 optimization )
  
  Revision  ChangesPath
  1.19  +2 -2  
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java
  
  Index: HttpServletRequestFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- HttpServletRequestFacade.java 2001/02/20 03:34:10 1.18
  +++ HttpServletRequestFacade.java 2001/02/27 02:49:27 1.19
  @@ -341,11 +341,11 @@
   }
   
   public String getRemoteAddr() {
  -return request.getRemoteAddr();
  +return request.remoteAddr().toString();
   }
   
   public String getRemoteHost() {
  -return request.getRemoteHost();
  +return request.remoteHost().toString();
   }
   
   public String getRequestURI() {
  
  
  

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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/server JNIConnectionHandler.java Ajp12.java

2001-02-26 Thread costin

costin  01/02/26 18:55:42

  Modified:src/share/org/apache/tomcat/modules/server
JNIConnectionHandler.java Ajp12.java
  Log:
  String-MessageBytes
  
  Revision  ChangesPath
  1.9   +5 -5  
jakarta-tomcat/src/share/org/apache/tomcat/modules/server/JNIConnectionHandler.java
  
  Index: JNIConnectionHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/JNIConnectionHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JNIConnectionHandler.java 2001/02/07 07:01:27 1.8
  +++ JNIConnectionHandler.java 2001/02/27 02:55:41 1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/JNIConnectionHandler.java,v
 1.8 2001/02/07 07:01:27 costin Exp $
  - * $Revision: 1.8 $
  - * $Date: 2001/02/07 07:01:27 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/JNIConnectionHandler.java,v
 1.9 2001/02/27 02:55:41 costin Exp $
  + * $Revision: 1.9 $
  + * $Date: 2001/02/27 02:55:41 $
*
* 
*
  @@ -306,8 +306,8 @@
methodMB.setString( env[0] );
uriMB.setString( env[1] );
queryMB.setString( env[2] );
  - remoteAddr  = env[3];
  - remoteHost  = env[4];
  + remoteAddrMB.setString( env[3] );
  + remoteHostMB.setString( env[4] );
serverNameMB.setString( env[5] );
   serverPort  = Integer.parseInt(env[6]);
   authType= env[7];
  
  
  
  1.15  +2 -2  
jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp12.java
  
  Index: Ajp12.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp12.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Ajp12.java2001/02/25 18:00:34 1.14
  +++ Ajp12.java2001/02/27 02:55:41 1.15
  @@ -149,8 +149,8 @@
req.pathInfo().setString( readString(ajpin, null));
 //Apache parsed path-translated XXX Bug in mod_jserv !
dummy = readString(ajpin, null);
req.queryString().setString( readString(ajpin, null));  
  - req.setRemoteAddr(readString(ajpin, ""));
  - req.setRemoteHost( readString(ajpin, ""));
  + req.remoteAddr().setString(readString(ajpin, ""));
  + req.remoteHost().setString( readString(ajpin, ""));
   if (isTomcatAuthentication())
   dummy=readString(ajpin, null);
   else req.setRemoteUser( readString(ajpin, null));
  
  
  

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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/server Ajp13.java

2001-02-26 Thread costin

costin  01/02/26 19:02:47

  Modified:src/share/org/apache/tomcat/modules/server Ajp13.java
  Log:
  Apply the same recycling as in Http connector.
  - no Strings ( use MessageBytes )
  - use OutputBuffer instead of getBytes ( getBytes creates a stream and
  few buffers )
  
  Nothing else is changed - the only "trick" is appendString(), where
  the buffer is shared between the OutputBuffer and Ajp13Packet
  ( each adding bytes ). Probably having Ajp13Packet extend OutputBuffer
  would be cleaner - or even better, turning Ajp13Packet in a better
  marshaling tool.
  
  Revision  ChangesPath
  1.15  +100 -33   
jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java
  
  Index: Ajp13.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Ajp13.java2001/02/20 03:16:53 1.14
  +++ Ajp13.java2001/02/27 03:02:47 1.15
  @@ -66,7 +66,8 @@
   import java.net.Socket;
   import java.util.Enumeration;
   
  -import org.apache.tomcat.core.Request;
  +import org.apache.tomcat.core.*;
  +import org.apache.tomcat.util.*;
   import org.apache.tomcat.util.http.MimeHeaders;
   import org.apache.tomcat.util.buf.MessageBytes;
   import org.apache.tomcat.util.http.HttpMessages;
  @@ -182,7 +183,9 @@

   Ajp13Packet outBuf = new Ajp13Packet( MAX_PACKET_SIZE );
   Ajp13Packet inBuf  = new Ajp13Packet( MAX_PACKET_SIZE );
  -
  +OutputBuffer headersWriter=new OutputBuffer(MAX_PACKET_SIZE);
  +Ajp13Packet hBuf=new Ajp13Packet(headersWriter);
  +
   // Holds incoming reads of request body data (*not* header data)
   byte []bodyBuff = new byte[MAX_READ_SIZE];
   
  @@ -199,6 +202,7 @@
 // This is a touch cargo-cultish, but I think wise.
 blen = 0; 
 pos = 0;
  +  headersWriter.recycle();
   }
   
   /**
  @@ -264,13 +268,13 @@
   byte methodCode = msg.getByte();
   req.method().setString( methodTransArray[(int)methodCode - 1] );
   
  -req.protocol().setString( msg.getString());
  -req.requestURI().setString( msg.getString());
  +msg.getMessageBytes( req.protocol()); 
  +msg.getMessageBytes( req.requestURI());
   
  -req.setRemoteAddr(  msg.getString());
  -req.setRemoteHost(  msg.getString());
  -req.serverName().setString( msg.getString());
  -req.setServerPort(  msg.getInt());
  +msg.getMessageBytes( req.remoteAddr());
  +msg.getMessageBytes( req.remoteHost());
  +msg.getMessageBytes( req.serverName());
  +req.setServerPort( msg.getInt());
   
isSSL = msg.getBool();
   
  @@ -286,16 +290,19 @@
   int isc = msg.peekInt();
   int hId = isc  0xFF;
   
  + MessageBytes vMB=null;
   isc = 0xFF00;
   if(0xA000 == isc) {
   msg.getInt(); // To advance the read position
   hName = headerTransArray[hId - 1];
  + vMB= headers.addValue( hName );
   } else {
  -hName = msg.getString().toLowerCase();
  + // XXX Not very elegant
  + vMB=msg.addHeader( headers );
  + if( vMB==null) return 500; // wrong packet
   }
   
  -String hValue = msg.getString();
  -headers.addValue( hName ).setString( hValue );
  +msg.getMessageBytes( vMB ); 
   }
   
byte attributeCode;
  @@ -320,7 +327,7 @@
   break;

case SC_A_QUERY_STRING :
  - req.queryString().setString( msg.getString());
  + msg.getMessageBytes( req.queryString());
   break;

case SC_A_JVM_ROUTE:
  @@ -486,28 +493,30 @@
*/
   public void sendHeaders(int status, MimeHeaders headers) throws IOException 
   {
  - // XXX if more headers that MAX_SIZE, send 2 packets!   
  - outBuf.reset();
  -outBuf.appendByte(JK_AJP13_SEND_HEADERS);
  -outBuf.appendInt(status);
  -outBuf.appendString(HttpMessages.getMessage( status ));
  + // XXX if more headers that MAX_SIZE, send 2 packets!
  +
  + hBuf.reset();
  +hBuf.appendByte(JK_AJP13_SEND_HEADERS);
  +hBuf.appendInt(status);
  + 
  + hBuf.appendString(HttpMessages.getMessage( status ));
   
int numHeaders = headers.size();
  -outBuf.appendInt(numHeaders);
  +hBuf.appendInt(numHeaders);
   
for( int i=0 ; i  numHeaders ; i++ ) {
String headerName = headers.getName(i).toString();
int sc = headerNameToSc(headerName);
   if(-1 != sc) {
  -outBuf.appendInt(sc);
  +

Re: Some benchmarks

2001-02-26 Thread cmanolache

 Hi all.
 
 Here are the results of some measurements made with ab on Tomcat
 versions 3.2.1, 3.3.m1 and 4.0.b1 with different JDKs.

Hi,

Could you try again to run the test with 3.3 ( the next nightly build
) and Ajp13 ?

 3.3.m1 Ajp13  (952/488)

I did few changes and at least on my machine is now 30..50% better,
but it would be great if you could check.

Costin


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




Tomcat 3.2.1 mod_jk binaries for Solaris 8/SPARC and Linux (non-EAPI)

2001-02-26 Thread Jones, Stephen

Okay, I can't zip the non-EAPI ones small enough... (the group only takes
100k mesgs)

Email me if you actually want them and don't find me annoying...

Steve

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




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

2001-02-26 Thread glenn

glenn   01/02/26 19:18:15

  Modified:catalina/src/conf catalina.policy
  Log:
  Update policy for new lib/class file locations
  
  Revision  ChangesPath
  1.5   +15 -10jakarta-tomcat-4.0/catalina/src/conf/catalina.policy
  
  Index: catalina.policy
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/catalina.policy,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- catalina.policy   2001/02/18 17:18:40 1.4
  +++ catalina.policy   2001/02/27 03:18:15 1.5
  @@ -8,7 +8,7 @@
   //
   // * Read access to the document root directory
   //
  -// $Id: catalina.policy,v 1.4 2001/02/18 17:18:40 glenn Exp $
  +// $Id: catalina.policy,v 1.5 2001/02/27 03:18:15 glenn Exp $
   // 
   
   
  @@ -29,20 +29,18 @@
   // == CATALINA CODE PERMISSIONS ===
   
   
  -// These permissions apply to the server startup code, and the servlet API
  -// classes that are shared across all class loaders
  +// These permissions apply to the server startup code
   grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
   permission java.security.AllPermission;
   };
   
  -grant codeBase "file:${catalina.home}/bin/servlet.jar" {
  +// These permissions apply to the servlet API classes
  +// and those that are shared across all class loaders
  +// located in the "common" directory
  +grant codeBase "file:${catalina.home}/common/-" {
   permission java.security.AllPermission;
   };
   
  -grant codeBase "file:${catalina.home}/bin/naming.jar" {
  -permission java.security.AllPermission;
  -};
  -
   // These permissions apply to the container's core code, plus any additional
   // libraries installed in the "server" directory
   grant codeBase "file:${catalina.home}/server/-" {
  @@ -50,16 +48,22 @@
   };
   
   // These permissions apply to the jasper page compiler
  +// located in the "jasper" directory.
   grant codeBase "file:${catalina.home}/jasper/-" {
   permission java.security.AllPermission;
   };
   
  -// These permissions apply to all extension libraries (including Jasper,
  -// if present) installed in the "lib" directory
  +// These permissions apply to shared web application libraries
  +// including the Jasper runtime library installed in the "lib" directory
   grant codeBase "file:${catalina.home}/lib/-" {
   permission java.security.AllPermission;
   };
   
  +// These permissions apply to shared web application classes
  +// located in the "classes" directory
  +grant codeBase "file:${catalina.home}/classes/-" {
  +permission java.security.AllPermission;
  +};
   
   // == WEB APPLICATION PERMISSIONS =
   
  @@ -90,6 +94,7 @@
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
permission java.io.FilePermission "jndi:/WEB-INF/-", "read";
  + permission java.io.FilePermission "jar:jndi:/WEB-INF/lib/-", "read";
   };
   
   
  
  
  

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




Tomcat 3.2.1 mod_jk binaries for Solaris 8/SPARC and Linux (EAPI)

2001-02-26 Thread Jones, Stephen


Since my company is attempting to redistribute mod_jk in binary format to
simplify installing our web product, I compiled these versions of mod_jk for
SSL-enabled (EAPI) Apache 1.3.17.

The attached tarball includes:
mod_jk_bin/mod_ssl/linux-i386/mod_jk.so
mod_jk_bin/mod_ssl/solaris8-sparc/mod_jk.so

These were all made from the Tomcat 3.2.1 mod_jk source.

I am e-mailing them out for two reasons:
* to verify that they work
* to contribute the binaries to the Tomcat 3.2.1 binary
distribution, if they're wanted

Please let me know how it fares if you try any of them

Thanks,
Steve


 mod_jk_ssl.tar.gz

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


[ANNOUNCEMENT] Tomcat 3.2.2 beta 1 released

2001-02-26 Thread Marc Saegesser

I am pleased to announce that the Tomcat 3.2.2 beta 1 release is now
available for download at

http://jakarta.apache.org/builds/tomcat/release/v3.2.2-beta-1

Tomcat 3.2.2 contains bug fixes collected since the release of Tomcat 3.2.1.
The bugs known to be fixed in this release are listed in the RELEASE-NOTES
file.

Please download this release and give it a try in your environment.  If no
more critical bugs are found, this will become the basis for the final
release of Tomcat 3.2.2 in approximately two weeks.


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




Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/server Ajp13.java

2001-02-26 Thread Dan Milstein

Costin,

It's great to see you cleaning up Ajp13, performance-wise (and I'm glad the
comments/code cleanup have helped).

I do see something which seems like a major gotcha, though -- you remove a
lot of String creation by creating MessageBytes objects which point directly
into the underlying input buffer.  *However*, if there is any data posted as
part of the request, that will immediately overwrite the input buffer (l.
376), and any further data which is input will also overwrite the input
buffer (refillReadBuffer()).

Unless I'm missing something, this is going to result in the delayed string
creation creating the wrong string if the post data overwrites the
underlying input buffer.

You could solve this by devoting a buffer to just that initial header info
-- inHeadBuff, and then using a separate buffer for reading input.  Of
course, then you're adding an 8K buffer per Ajp13 thread.  I had thought at
one point that you could use a single buffer for input and output, but
that's not the case -- the servlet can be in the middle of reading its way
through the input stream when it starts to send output back to the browser.

Is there a reason you don't want to use your new hBuf Ajp13Packet for
general output as well as headers?  It kind of looks like you could merge it
with outBuf (since, even when it's built around an OutputBuffer, it still
supports appendBytes(), which is all that doWrite() needs).  If you did
this, you could get rid of one of those 8K buffers per thread.

-Dan

[EMAIL PROTECTED] wrote:
 
 costin  01/02/26 19:02:47
 
   Modified:src/share/org/apache/tomcat/modules/server Ajp13.java
   Log:
   Apply the same recycling as in Http connector.
   - no Strings ( use MessageBytes )
   - use OutputBuffer instead of getBytes ( getBytes creates a stream and
   few buffers )
 
   Nothing else is changed - the only "trick" is appendString(), where
   the buffer is shared between the OutputBuffer and Ajp13Packet
   ( each adding bytes ). Probably having Ajp13Packet extend OutputBuffer
   would be cleaner - or even better, turning Ajp13Packet in a better
   marshaling tool.
 
   Revision  ChangesPath
   1.15  +100 -33   
jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java
 
   Index: Ajp13.java

-- 

Dan Milstein // [EMAIL PROTECTED]

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




cvs commit: jakarta-tomcat/src/native/mod_jk/common jk_connect.c

2001-02-26 Thread danmil

danmil  01/02/26 20:20:41

  Modified:src/native/mod_jk/common jk_connect.c
  Log:
  Fixed bug which was bombing if a socket descriptor numbered 0 was created.
  
  Submitted by: Kevin Seguin ([EMAIL PROTECTED])
  
  Revision  ChangesPath
  1.3   +2 -2  jakarta-tomcat/src/native/mod_jk/common/jk_connect.c
  
  Index: jk_connect.c
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_connect.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_connect.c  2000/11/10 18:48:50 1.2
  +++ jk_connect.c  2001/02/27 04:20:40 1.3
  @@ -57,7 +57,7 @@
* Description: Socket/Naming manipulation functions   *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Based on:Various Jserv files*
  - * Version: $Revision: 1.2 $   *
  + * Version: $Revision: 1.3 $   *
***/
   
   
  @@ -108,7 +108,7 @@
   jk_log(l, JK_LOG_DEBUG, "Into jk_open_socket\n");
   
   sock = socket(AF_INET, SOCK_STREAM, 0);
  -if(sock  0) {
  +if(sock  -1) {
   int ret;
   /* Tries to connect to JServ (continues trying while error is EINTR) */
   do {
  
  
  

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




Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/serverAjp13.java

2001-02-26 Thread cmanolache

Hi Dan,

 I do see something which seems like a major gotcha, though -- you remove a
 lot of String creation by creating MessageBytes objects which point directly
 into the underlying input buffer.  *However*, if there is any data posted as
 part of the request, that will immediately overwrite the input buffer (l.
 376), and any further data which is input will also overwrite the input
 buffer (refillReadBuffer()).

That's why it's great to have the patches reviewed :-)

Yes, you are right.

I don't think it's a problem to add a 8K buffer per Ajp13 thread - as long
as the memory is constant and doesn't result in garbage ( the
getBytes() method is creating a buffer that is garbage-collected )

I'll make sure a different buffer is used for the body.

 course, then you're adding an 8K buffer per Ajp13 thread.  I had thought at
 one point that you could use a single buffer for input and output, but
 that's not the case -- the servlet can be in the middle of reading its way
 through the input stream when it starts to send output back to the browser.

True - using the same buffer for in/out was an idea ( to reduce memory
usage - the fact that GC is taking a lot of time was clear for a long
time), but it turned that the trick is to keep the memory constant and to
not generate garbage.


 Is there a reason you don't want to use your new hBuf Ajp13Packet for
 general output as well as headers?  It kind of looks like you could merge it
 with outBuf (since, even when it's built around an OutputBuffer, it still
 supports appendBytes(), which is all that doWrite() needs).  If you did
 this, you could get rid of one of those 8K buffers per thread.

I guess I do it the wrong way - instead of using 2 buffers for input,
where I should have, I got 2 buffers for output - where it wasn't needed. 
Well, I knew I need 2 buffers :-)

Thank you very much, Dan !

Costin



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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/server Ajp13.java

2001-02-26 Thread costin

costin  01/02/26 21:28:08

  Modified:src/share/org/apache/tomcat/modules/server Ajp13.java
  Log:
  Fix the buffer problem ( need 2 input, one output - not 2 output on input).
  
  Thanks again Dan.
  
  Revision  ChangesPath
  1.16  +20 -17
jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java
  
  Index: Ajp13.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Ajp13.java2001/02/27 03:02:47 1.15
  +++ Ajp13.java2001/02/27 05:28:08 1.16
  @@ -180,11 +180,14 @@
   
   OutputStream out;
   InputStream in;
  - 
  -Ajp13Packet outBuf = new Ajp13Packet( MAX_PACKET_SIZE );
  -Ajp13Packet inBuf  = new Ajp13Packet( MAX_PACKET_SIZE );
  +
  +// Buffer used of output body and headers
   OutputBuffer headersWriter=new OutputBuffer(MAX_PACKET_SIZE);
  -Ajp13Packet hBuf=new Ajp13Packet(headersWriter);
  +Ajp13Packet outBuf = new Ajp13Packet( headersWriter );
  +// Buffer used for input body
  +Ajp13Packet inBuf  = new Ajp13Packet( MAX_PACKET_SIZE );
  +// Boffer used for request head ( and headers )
  +Ajp13Packet hBuf=new Ajp13Packet( MAX_PACKET_SIZE );
   
   // Holds incoming reads of request body data (*not* header data)
   byte []bodyBuff = new byte[MAX_READ_SIZE];
  @@ -230,16 +233,16 @@
   {
// XXX The return values are awful.
   
  - int err = receive(inBuf);
  + int err = receive(hBuf);
if(err  0) {
return 500;
}

  - int type = (int)inBuf.getByte();
  + int type = (int)hBuf.getByte();
switch(type) {

case JK_AJP13_FORWARD_REQUEST:
  - return decodeRequest(req, inBuf);
  + return decodeRequest(req, hBuf);

case JK_AJP13_SHUTDOWN:
return -2;
  @@ -495,28 +498,28 @@
   {
// XXX if more headers that MAX_SIZE, send 2 packets!
   
  - hBuf.reset();
  -hBuf.appendByte(JK_AJP13_SEND_HEADERS);
  -hBuf.appendInt(status);
  + outBuf.reset();
  +outBuf.appendByte(JK_AJP13_SEND_HEADERS);
  +outBuf.appendInt(status);

  - hBuf.appendString(HttpMessages.getMessage( status ));
  + outBuf.appendString(HttpMessages.getMessage( status ));
   
int numHeaders = headers.size();
  -hBuf.appendInt(numHeaders);
  +outBuf.appendInt(numHeaders);
   
for( int i=0 ; i  numHeaders ; i++ ) {
String headerName = headers.getName(i).toString();
int sc = headerNameToSc(headerName);
   if(-1 != sc) {
  -hBuf.appendInt(sc);
  +outBuf.appendInt(sc);
   } else {
  -hBuf.appendString(headerName);
  +outBuf.appendString(headerName);
   }
  -hBuf.appendString(headers.getValue(i).toString() );
  +outBuf.appendString(headers.getValue(i).toString() );
   }
   
  -hBuf.end();
  -send(hBuf);
  +outBuf.end();
  +send(outBuf);
   } 
   
   /**
  
  
  

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




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

2001-02-26 Thread costin

costin  01/02/26 22:59:15

  Modified:src/share/org/apache/tomcat/core Container.java
  Log:
  Added the shortcuts for getNote/setNote ( as in all other core objects that
  support notes ) ( notes are similar with a Hashtable, but you can also
  do indexed access - for better speed )
  
  Revision  ChangesPath
  1.48  +12 -0 jakarta-tomcat/src/share/org/apache/tomcat/core/Container.java
  
  Index: Container.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Container.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Container.java2001/02/20 03:17:56 1.47
  +++ Container.java2001/02/27 06:59:14 1.48
  @@ -373,6 +373,18 @@
return notes[pos];
   }
   
  +public Object getNote( String name ) throws TomcatException {
  + int id=contextM.getNoteId( ContextManager.CONTAINER_NOTE, name );
  + return getNote( id );
  +}
  +
  +public void setNote( String name, Object value ) throws TomcatException {
  + int id=contextM.getNoteId( ContextManager.CONTAINER_NOTE, name );
  + setNote( id, value );
  +}
  +
  +
  +
   //  Interceptors 
   public static final int H_requestMap=0;
   public static final int H_contextMap=1;
  
  
  

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




RE: Connection aborted by peer: socket write error

2001-02-26 Thread Szegedi, Attila

The client (most notably, the browser) closed the socket. Maybe the user hit
the "Stop" button. Maybe the browser crashed. You can pretty much ignore
this, however you must be aware that writing to servlet's output stream can
result in this exception at any time (as users are free to hit "Stop" at any
time during connection).

Attila.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 26, 2001 8:57 PM
 To: [EMAIL PROTECTED]
 Subject: Connection aborted by peer: socket write error


 Whats causing tis error, and how can I get rid of it ?

 Ctx( /Phase2 ): IOException in: R( /Phase2 +
 /img/MapInfo.gif
 + null) Connection aborted by peer: socket write error

 

 Billy Ciano
 MapInfo
 Internet Engineer
 1 Global View
 Troy,NY 12180
 Main:(518)285-6000
 E-mail: [EMAIL PROTECTED]


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




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