cvs commit: jakarta-tomcat-4.0/connectors/webapplib Makefile

2000-11-29 Thread pier

pier00/11/29 01:01:38

  Modified:connectors Makedefs.orig
   connectors/webapplib Makefile
  Added:   connectors Makefile
   connectors/apache-1.3 Makefile
  Log:
  Updated makefiles for module build.
  
  Revision  ChangesPath
  1.2   +61 -0 jakarta-tomcat-4.0/connectors/Makedefs.orig
  
  Index: Makedefs.orig
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/Makedefs.orig,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makedefs.orig 2000/11/27 12:49:56 1.1
  +++ Makedefs.orig 2000/11/29 09:01:34 1.2
  @@ -1,3 +1,63 @@
  +# = #
  +#   #
  +# The Apache Software License,  Version 1.1 #
  +#   #
  +# Copyright (c) 1999, 2000  The Apache Software Foundation. #
  +#   All rights reserved.#
  +#   #
  +# = #
  +#   #
  +# Redistribution and use in source and binary forms,  with or without modi- #
  +# fication, are permitted provided that the following conditions are met:   #
  +#   #
  +# 1. Redistributions of source code  must retain the above copyright notice #
  +#notice, this list of conditions and the following disclaimer.  #
  +#   #
  +# 2. Redistributions  in binary  form  must  reproduce the  above copyright #
  +#notice,  this list of conditions  and the following  disclaimer in the #
  +#documentation and/or other materials provided with the distribution.   #
  +#   #
  +# 3. The end-user documentation  included with the redistribution,  if any, #
  +#must include the following acknowlegement: #
  +#   #
  +#   "This product includes  software developed  by the Apache  Software #
  +#Foundation http://www.apache.org/."  #
  +#   #
  +#Alternately, this acknowlegement may appear in the software itself, if #
  +#and wherever such third-party acknowlegements normally appear. #
  +#   #
  +# 4. The names  "The  Jakarta  Project",  "Tomcat",  and  "Apache  Software #
  +#Foundation"  must not be used  to endorse or promote  products derived #
  +#from this  software without  prior  written  permission.  For  written #
  +#permission, please contact [EMAIL PROTECTED].#
  +#   #
  +# 5. Products derived from this software may not be called "Apache" nor may #
  +#"Apache" appear in their names without prior written permission of the #
  +#Apache Software Foundation.#
  +#   #
  +# 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 indivi- #
  +# duals on behalf of the  Apache Software Foundation.  For more information #
  +# on 

Bugrat does not work (and I have a bug to submit) :^(

2000-11-29 Thread Studio Salvemini

Please help me, I have the following problem and the bugrat report didn't
work yesterday and today...


Best regards,
Fabio Vignoli

---
Fabio Vignoli  (email: [EMAIL PROTECTED],  tel: 0039.10.6012177)
SIMS Studio di Informatica Mauro Salvemini
Via Sestri 59/1 16154 Genova (ITALY)
--


Tomcat 3.1
Linux RedHat 6.2 kernel 2.2.x
686


SYNOPSYS 
More threads of the same servlet  share the same output stream

DESCRIPTION
When more threads of the same servlet are running it seems that they share
 the same output stream when called by a Java applet through a simple HTTP
connection. 

Suppose for instance a long connection to a DB: 
the first call is streaming back a set of records retrieved by the
database.   A second connection is requested from the same applet and the
output stream   happens to be the same as the one of the first thread. This
strange behaviour cause some problems :^(...

Is it a known bug ? (better is it a bug ?)
I did not find anything on the bug reports ...

WORKAROUND
I changed the servlet implenting the SingleThreadModel interface. The
behaviuor does not apply anymoure but I have
only one thread of the servlet at a time, and I need more simultaneous
connection to be satisfied.








tomcat-mssql 7.0 setup

2000-11-29 Thread Saladi Ram

hi

I am trying to use tomcat as servlet engine with apache.
It works fine. Now I would like to integrate MSSQL 7 as the dB Server.

Please suggest as to how i can integrate this.
Where is the jdbc driver available.

What should be the parameters in this piece of server.xml?

RequestInterceptor className="org.apache.tomcat.realm.JDBCRealm" debug="99"
 driverName="?"
 connectionURL="jdbc:?://localhost/authority?user=test;password=test"
 userTable="users" userNameCol="user_name" userCredCol="user_pass"
  /

Please suggest other resources or techniques.
I will be very much  thankful for the help.

Thanks
SRC RAO




Get free email and a permanent address at http://www.netaddress.com/?N=1



Netscape Enterprise Server 3.51

2000-11-29 Thread Morten Tollefsen

Hi!

Can anyone tell me if it's possible to run Tomcat together with NES 3.51, or
do I have to upgrade to NES 3.6 to get it work?

Best regards,
Morten Tollefsen
Systemkonsulent
Lindhard Multi AS
e-post: [EMAIL PROTECTED]
Telefon:+47 33 03 00 00
Telefaks:   +47 33 03 00 10
Direkte telefon:+47 33 03 00 92




RE: Now, am I stupid or what?

2000-11-29 Thread Paulo Gaspar

You are not alone.

Although I did it to get the mod_jserv.dll or the mod_jk.dll
ok to work with mod_ssl.

I was not sucessful. (I did not have cygwin then.)

It would be nice if mod_ssl variations of those DLLs could be
included in the binary distribution. They are realy hard to 
get right for us, poor Win32 guys.
=:o)


Have fun,
Paulo

 -Original Message-
 From: Pier P. Fumagalli [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 29, 2000 02:29
 
 (never heard of anyone trying to compile under Win but me!)




[BUG] setDebug in EmbededTomcat

2000-11-29 Thread Stefán F. Stefánsson

This is probably one of the strangest things I've seen so far!

I'm working with EmbededTomcat and I have integrated it into our server
application.  I wanted to get some more information about what the web
server was doing so I changed the setDebug(0) to setDebug(10).  This
resulted in me not finding any jsp or html pages in the web application
I had in the root context (I only have one web app so I can't say for
sure if this does happen somewhere else).  As soon as I set the setDebug
back to setDebug(0) I found the pages.  This is the case for all debug
levels not equal to 0.  The weird thing is that it found a servlet I
have.  I have a controller servlet that handles all requests coming in
and I have it forward requests to the correct pages.  When I tried to
forward to a JSP with debug set to  0 it couldn't find the page
although the code in the servlet was being executed.

When debug level is set to 10 I got the following error on the console
(when running the servlet and forwarding the request to a JSP):

ContextManager: Error reading request R( /) 400 Ctx(  ): 400 R( /) null
Ctx(  ): Handler null null Ctx(  ): IOException in: R( /) Socket closed
Ctx(  ): Error: exception inside exception servlet 400 null
ContextManager: ProcessRequest: R(
/servlet/com.decode.ips.webclient.controller.IPSControllerServlet)
ContextManager: After processing: R(  +
/servlet/com.decode.ips.webclient.controller.IPSControllerServlet +
null) Ctx(  ): 404 R(  +
/servlet/com.decode.ips.webclient.controller.IPSControllerServlet +
null) null Ctx(  ): Handler tomcat.notFoundHandler(null/null)
tomcat.notFoundHandler Ctx(  ): Error: exception inside exception
servlet 404 null Ctx(  ): Error: exception inside exception servlet 404
class java.lang.NullPointerException 

This is weird but I guess it's not critical.  The problem with this bug
is that the solution (to change setDebug to 0) is not at all obvious.
So people who get this kind of problems may have a very hard time
figuring out what is wrong.

Well... I'll let you guys decide what to do about this... until then
I'll just use setDebug(0) :o)

Kind regards,
Stefan Freyr.

p.s. Is the bug system still down?  I think it is, that's why I'm not
posting it there... let me know if I should do that (when it's up).


Stefan Freyr Stefansson
Software Developer
deCODE Genetics, Inc.
http://www.decode.com

Phone: (+354) 570 2854
GSM:   (+354) 861 1718
Fax:   (+354) 491 3782
 Stefan Stefansson.vcf 


BEGIN:VCARD
VERSION:2.1
N;ENCODING=QUOTED-PRINTABLE:;=01
REV:20001030T115142Z
END:VCARD



Re: Now, am I stupid or what?

2000-11-29 Thread Pier P. Fumagalli

Hehehehe :) Fellow friend... Well, the new module is _WAY_ better for
handling stuff with mod_ssl... Can't believe that back 3 years ago I was
writing that... Stuff (mod_jserv)... Bah...
I'm really happy of what's in the webapplib right now (check out the code),
adding bits and pieces is _way_ to easy :)

And, definitely yes... As soon as I can get my hands on a Win32 compiler
(MSVC6 works fine) I'll start building both versions (of course when it's
ported! :)

Pier (who has still a bunch of commits to do before sleeping :)

Paulo Gaspar [EMAIL PROTECTED] wrote:
 
 You are not alone.
 
 Although I did it to get the mod_jserv.dll or the mod_jk.dll
 ok to work with mod_ssl.
 
 I was not sucessful. (I did not have cygwin then.)
 
 It would be nice if mod_ssl variations of those DLLs could be
 included in the binary distribution. They are realy hard to
 get right for us, poor Win32 guys.
 =:o)
 
 -Original Message-
 From: Pier P. Fumagalli [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 29, 2000 02:29
 
 (never heard of anyone trying to compile under Win but me!)
-- 
Pier P. Fumagalli  Apache Software Foundation  mailto:[EMAIL PROTECTED]

Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur,
adipisci velit... (Cicero: "De Finibus" 1.10.32)





cvs commit: jakarta-tomcat-4.0/connectors/webapplib Makefile wa.h wa_provider.h wa_provider_info.c wa_request.c wa_request.h

2000-11-29 Thread pier

pier00/11/29 04:23:19

  Modified:connectors/apache-1.3 mod_webapp.c
   connectors/webapplib Makefile wa.h wa_provider.h
wa_provider_info.c wa_request.c wa_request.h
  Log:
  Changed names in webapp request structure.
  Major cleanup of the provider API.
  Bugfix (memory leaks!)
  
  Revision  ChangesPath
  1.4   +24 -37jakarta-tomcat-4.0/connectors/apache-1.3/mod_webapp.c
  
  Index: mod_webapp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/apache-1.3/mod_webapp.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_webapp.c  2000/11/27 12:50:00 1.3
  +++ mod_webapp.c  2000/11/29 12:22:43 1.4
  @@ -55,7 +55,7 @@
*   *
* = */
   
  -// CVS $Id: mod_webapp.c,v 1.3 2000/11/27 12:50:00 pier Exp $
  +// CVS $Id: mod_webapp.c,v 1.4 2000/11/29 12:22:43 pier Exp $
   // Author: Pier Fumagalli mailto:[EMAIL PROTECTED]
   
   #include httpd.h
  @@ -155,7 +155,7 @@
   // Create a new request structure
   req=(wa_request *)ap_palloc(r-pool,sizeof(wa_request));
   req-host=host;
  -req-application=appl;
  +req-appl=appl;
   
   // Set the webapp request structure into Apache's request structure
   ap_set_module_config(r-request_config, webapp_module, req);
  @@ -177,10 +177,10 @@
   
   // Set up basic parameters in the request structure
   req-data=r;
  -req-method=(char *)r-method;
  -req-uri=r-uri;
  -req-arguments=r-args;
  -req-protocol=r-protocol;
  +req-meth=(char *)r-method;
  +req-ruri=r-uri;
  +req-args=r-args;
  +req-prot=r-protocol;
   
   // Copy headers into webapp request structure
   if (r-headers_in!=NULL) {
  @@ -190,21 +190,21 @@
   int x=0;
   
   // Allocate memory for pointers
  -req-header_count=count;
  -req-header_names=(char **)ap_palloc(r-pool,count*sizeof(char *));
  -req-header_values=(char **)ap_palloc(r-pool,count*sizeof(char *));
  +req-hnum=count;
  +req-hnam=(char **)ap_palloc(r-pool,count*sizeof(char *));
  +req-hval=(char **)ap_palloc(r-pool,count*sizeof(char *));
   
   // Copy header pointers one by one
   for (x=0; xcount;x++) {
   if (ele[x].key==NULL) continue;
  -req-header_names[x]=ele[x].key;
  -req-header_values[x]=ele[x].val;
  +req-hnam[x]=ele[x].key;
  +req-hval[x]=ele[x].val;
   }
   } else {
   fprintf(stderr,"NO HEADERS\n");
  -req-header_count=0;
  -req-header_names=NULL;
  -req-header_values=NULL;
  +req-hnum=0;
  +req-hnam=NULL;
  +req-hval=NULL;
   }
   
   // Try to handle the request
  @@ -220,28 +220,23 @@
   }
   
   /**
  - * Destroy webapp connections.
  + * Initialize webapp connections.
  + *
  + * @param s The server_rec structure associated with the main server.
  + * @param p The pool for memory allocation (it never gets cleaned).
*/
  -static void webapp_destroy(void *k) {
  +static void webapp_exit(server_rec *s, pool *p) {
  +// Destroy connections
   wa_connection_destroy();
   }
   
   /**
* Initialize webapp connections.
  + *
  + * @param s The server_rec structure associated with the main server.
  + * @param p The pool for memory allocation (it never gets cleaned).
*/
   static void webapp_init(server_rec *s, pool *p) {
  -// Register our cleanup function
  -#ifdef WIN32
  -// Under Win32 we clean up when the process exits, since web server
  -// children are threads (sockets, connections and all the rest resides
  -// in the same memory space.
  -ap_register_cleanup(p, NULL, webapp_destroy, ap_null_cleanup);
  -#else
  -// Under UNIX we clean up when a child exists, since web server children
  -// are processes, and not threads.
  -ap_register_cleanup(p, NULL, ap_null_cleanup, webapp_destroy);
  -#endif
  -
   // Initialize connections
   wa_connection_init();
   }
  @@ -469,11 +464,7 @@
   /* Apache module declaration */
   module webapp_module = {
   STANDARD_MODULE_STUFF,
  -#ifdef WIN32
  -webapp_init,/* module initializer */
  -#else
   NULL,   /* module initializer */
  -#endif
   NULL,   /* per-directory config creator */
   NULL,   /* dir config merger */
   NULL,   /* server config creator */
  @@ -488,11 +479,7 @@
   NULL,   /* [8] fixups */
   NULL,   /* [10] logger */
   NULL,   /* [3] header parser */

Use Tomcat As embedded server

2000-11-29 Thread Bradley Williams

Are there any doc's that describe how make tomcat light enough to be
embedded ?



Re: bugrat does not work (and I have a bug to submit) ... (NOT TRUE)

2000-11-29 Thread Studio Salvemini

Ok sorry for this other mail.

Bugrat didn't work, but my problem can be archiviated as NOT EXISTENT.
The fact is that I used a class variable to store the output stream, 
and this variable is (correctly) used by the different threads ...

Best Regards,
Fabio

---
Fabio Vignoli  (email: [EMAIL PROTECTED],  tel: 0039.10.6012177)
SIMS Studio di Informatica Mauro Salvemini
Via Sestri 59/1 16154 Genova (ITALY)
--





RE: Use Tomcat As embedded server

2000-11-29 Thread Mullis, Michael (AT-Atlanta)

Check out http://jboss.org.
Look at the jboss/Tomcat link.

jboss is an Open Source EJB Server that can run with Tomcat embedded.

Michael.

-Original Message-
From: Stefán F. Stefánsson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 8:47 AM
To: [EMAIL PROTECTED]
Subject: RE: Use Tomcat As embedded server


what do you mean?  It IS light enough to be embeded.

Just use the Jar files that come out of the build dist.

-Original Message-
From: Bradley Williams [mailto:[EMAIL PROTECTED]]
Sent: 29. nóvember 2000 13:42
To: '[EMAIL PROTECTED]'
Subject: Use Tomcat As embedded server


Are there any doc's that describe how make tomcat light enough to be
embedded ?



cvs commit: jakarta-tomcat-4.0/connectors/webapplib wa_provider.c wa_provider.h

2000-11-29 Thread pier

pier00/11/29 04:27:58

  Modified:connectors/webapplib wa_provider.c wa_provider.h
  Log:
  Added pointers to the warp provider.
  
  Revision  ChangesPath
  1.3   +2 -1  jakarta-tomcat-4.0/connectors/webapplib/wa_provider.c
  
  Index: wa_provider.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/webapplib/wa_provider.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- wa_provider.c 2000/11/27 03:49:18 1.2
  +++ wa_provider.c 2000/11/29 12:27:02 1.3
  @@ -55,7 +55,7 @@
*   *
* = */
   
  -// CVS $Id: wa_provider.c,v 1.2 2000/11/27 03:49:18 pier Exp $
  +// CVS $Id: wa_provider.c,v 1.3 2000/11/29 12:27:02 pier Exp $
   // Author: Pier Fumagalli mailto:[EMAIL PROTECTED]
   
   #include wa.h
  @@ -82,6 +82,7 @@
   /* The list of all compiled in providers */
   wa_provider *wa_providers[] = {
   wa_provider_info,
  +wa_provider_warp,
   NULL,
   };
   
  
  
  
  1.4   +2 -1  jakarta-tomcat-4.0/connectors/webapplib/wa_provider.h
  
  Index: wa_provider.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/webapplib/wa_provider.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- wa_provider.h 2000/11/29 12:23:02 1.3
  +++ wa_provider.h 2000/11/29 12:27:35 1.4
  @@ -55,7 +55,7 @@
*   *
* = */
   
  -// CVS $Id: wa_provider.h,v 1.3 2000/11/29 12:23:02 pier Exp $
  +// CVS $Id: wa_provider.h,v 1.4 2000/11/29 12:27:35 pier Exp $
   // Author: Pier Fumagalli mailto:[EMAIL PROTECTED]
   
   #ifndef _WA_PROVIDER_H_
  @@ -84,6 +84,7 @@
   
   /* Pointers to the different providers */
   extern wa_provider wa_provider_info;
  +extern wa_provider wa_provider_warp;
   
   /* Function prototype declaration */
   // Retrieve a provider.
  
  
  



Re: [Fwd: [uknot] java.apache/mod_java + j2ee + jdk1.3onSparc/Solaris - hint anyone?]

2000-11-29 Thread Ben Laurie

"Pier P. Fumagalli" wrote:
 
 Definitely compiling 4.0 from the sources is not an easy task, but, at least
 the old mod_jserv... Oh my god... Nobody touched the build in 2 years, and
 it should be fairly easy...
 
 I'd like to know what problems they had...

Would you like me to put them in touch direct?

Cheers,

Ben.

 
 Pier
 
 Ben Laurie [EMAIL PROTECTED] wrote:
 
  From an ISP mailing list here in the UK.
 
  I've also heard lately that installing Tomcat is horribly difficult.
  Haven't tried it myself lately, but I guess I'm going to have to.
 
  Cheers,
 
  Ben.
 
  --
  http://www.apache-ssl.org/ben.html
 
  "There is no limit to what a man can do or how far he can go if he
  doesn't mind who gets the credit." - Robert Woodruff
 
  From: Peter Gradwell [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  Date: Wed, 29 Nov 2000 00:42:57 +
  To: [EMAIL PROTECTED]
  Subject: Re: [uknot] java.apache/mod_java + j2ee + jdk1.3 on Sparc/Solaris -
  hint anyone?
 
  Hello,
 
  At 19:38 28/11/2000 +, you wrote:
  On to some real work, sorry to spoil the fun :-(
 
  If anyone has managed to get java server/apache, I'd be very interested!
 
  No, we gave up on using the Java Apache project stuff, because
  they seem to have two projects doing the same thing with neither
  killed off nor completed (mod_jserv and tomcat).
 
  We use Resin. It works great, though I admit, I didn't install it.
 
  http://www.caucho.com/
 
  - FWIW I have never managed to compile Apache + mod_jserv,
  and I've tried about 3 different times on intel.
 
  peter
 
 
  --
  peter gradwell; online @ http://www.gradwell.com/peter/
 
 
 Pier
 
 --
 Pier P. Fumagalli  Apache Software Foundation  mailto:[EMAIL PROTECTED]
 
 Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur,
 adipisci velit... (Cicero: "De Finibus" 1.10.32)

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff



Re: [Fwd: [uknot] java.apache/mod_java + j2ee +jdk1.3onSparc/Solaris - hint anyone?]

2000-11-29 Thread Pier P. Fumagalli

Ben Laurie [EMAIL PROTECTED] wrote:

 "Pier P. Fumagalli" wrote:
 
 Definitely compiling 4.0 from the sources is not an easy task, but, at least
 the old mod_jserv... Oh my god... Nobody touched the build in 2 years, and
 it should be fairly easy...
 
 I'd like to know what problems they had...
 
 Would you like me to put them in touch direct?

Already did... :) Thanks :)

Pier

-- 
Pier P. Fumagalli  Apache Software Foundation  mailto:[EMAIL PROTECTED]

Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur,
adipisci velit... (Cicero: "De Finibus" 1.10.32)





Notes concerning creation of Tomcat 3.2 Final source zip

2000-11-29 Thread Larry Isaacs

Hi Craig,

A couple of notes concerning the creation of the source zip
for Tomcat 3.2 Final

1) jakarta-tomcat-3.2-b8-src.zip included a copy of
proposals/catatina/..., etc.  You probably don't want a copy
of this legacy code going out with Tomcat 3.2 Final. :-)

2) It would be benificial for the Windows source zip to contain
files that have CRLF instead of just the Unix LF.  If needed, I
can get a fresh copy of the 3.2 source and make a zip.
Just let me know.

Thanks,
Larry

__
Larry Isaacs
[EMAIL PROTECTED]
SAS Institute Inc.




Re: EJB

2000-11-29 Thread Jatin Shah

Thanks very much.
One more question,
Which one is better  ? any benchmarks.

Thank Very Much
Jatin
- Original Message -
From: "Shawn McMurdo" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 28, 2000 1:17 PM
Subject: Re: EJB


 The Jonas EJB server ( http://www.objectweb.org/ ) is integrated with
 Tomcat 3.2 in Enhydra Enterprise which is available at
 http://www.enhydra.org .
 Shawn

 Helmut Wirth wrote:

   Jatin Shah wrote:
  
   Hi,
   I am very new to tomcat. How should I Implement EJB into Tomcat. Any
site or document is appriciated.
  
   Thanks
   Jatin Shah
   www.kana.com
  
 
  There is a EJB server at http://www.jboss.org The description
  claims it works with tomcat. I haven´t tested it out yet.
 
  --
  Helmut Wirth
 
  [EMAIL PROTECTED]
  -
  bison GmbH phone +49 89 / 50 03 91-14
  Ridlerstr. 11  fax   +49 89 / 50 03 91-17
  D-80339 Muenchen   http://www.bison-soft.de/
  -

 --
 Shawn McMurdo  mailto:[EMAIL PROTECTED]
 Lutris Technologieshttp://www.lutris.com
 Enhydra.Orghttp://www.enhydra.org







RE: EJB

2000-11-29 Thread Dan Murphy

Jatin-

Are you the formerly of PTC, Jatin Shah?

My name is Dan Murphy, also formerly of PTC. I'm now working at Allaire as a
Product Manager on JRun, the most popular J2EE server on the market. You
might want to check out JRun because in addition to having support JSP and
Servlets we also support EJB 1.1. Also, it's free for development use. You
can get it here http://www.allaire.com/jrun

Hope this helps,

Dan Murphy
Allaire Corp. 



-Original Message-
From: Jatin Shah [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 1:33 PM
To: [EMAIL PROTECTED]
Subject: Re: EJB


Thanks very much.
One more question,
Which one is better  ? any benchmarks.

Thank Very Much
Jatin
- Original Message -
From: "Shawn McMurdo" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 28, 2000 1:17 PM
Subject: Re: EJB


 The Jonas EJB server ( http://www.objectweb.org/ ) is integrated with
 Tomcat 3.2 in Enhydra Enterprise which is available at
 http://www.enhydra.org .
 Shawn

 Helmut Wirth wrote:

   Jatin Shah wrote:
  
   Hi,
   I am very new to tomcat. How should I Implement EJB into Tomcat. Any
site or document is appriciated.
  
   Thanks
   Jatin Shah
   www.kana.com
  
 
  There is a EJB server at http://www.jboss.org The description
  claims it works with tomcat. I haven´t tested it out yet.
 
  --
  Helmut Wirth
 
  [EMAIL PROTECTED]
  -
  bison GmbH phone +49 89 / 50 03 91-14
  Ridlerstr. 11  fax   +49 89 / 50 03 91-17
  D-80339 Muenchen   http://www.bison-soft.de/
  -

 --
 Shawn McMurdo  mailto:[EMAIL PROTECTED]
 Lutris Technologieshttp://www.lutris.com
 Enhydra.Orghttp://www.enhydra.org






[CONTRIBUTED PATCH] org.apache.tomcat.util.FileUtil.safePath()

2000-11-29 Thread Rogério Meneguelli Gatto

Hello,

org.apache.tomcat.util.FileUtil.safePath() had a bug (at least from my point of 
view) that was preventing use of "\\machine\share" paths in context docBases, 
yielding a 404 on those contexts.

The patch was obtained with a "diff -u old new", I don't know if that's ok. 
  I've made some testing, and the reasons that lead to safePath implementation 
in TC32 are still held, I believe (no paths fall outside docBase, case 
sensitiveness enforced, Win oddities like "*.jsp." prevented).  I haven't 
tested on *nix or netware, but the scope of the changes doesn't seem that big 
(but feel free to ignore them or apply only on the next bug fix release ;-)

Regards,

-- 
Rogério Meneguelli Gatto |  ICQ# 25775025
Analista de Sistemas Pleno   |  +55 19 3254-6518 ext 223
Software Design Informática  |  http://www.softwaredesign.com.br
God is a comic playing to an audience that's afraid to laugh


--- /usr/tomcat32b8/src/org/apache/tomcat/util/FileUtil.javaTue Nov 21 00:59:54 
2000
+++ FileUtil.java   Tue Nov 28 18:02:53 2000
@@ -67,6 +67,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.Locale;
+import java.util.StringTokenizer;
 
 /*
  * FileUtil contains utils for dealing with Files. Some of these are 
@@ -83,6 +84,7 @@
  */
 
 public class FileUtil {
+public static final String PATH_SEPARATORS = "/" + File.separatorChar;
 
 public static File[] listFiles(File dir) {
 
@@ -134,47 +136,32 @@
// Hack for Jsp ( and other servlets ) that use rel. paths 
// if( ! path.startsWith("/") ) path="/"+ path;
 
-   String normP=path;
-   if( path.indexOf('\\') =0 )
-   normP= path.replace('\\', '/');
-
-   if ( !normP.startsWith("/"))
-   normP = "/" + normP;
-
-   int index = normP.indexOf("/../");
-   if (index = 0) {
-
-   // Clean out "//" and "/./" so they will not be confused
-   // with real parent directories
-   int index2 = 0;
-   while ((index2 = normP.indexOf("//", index2)) = 0) {
-   normP = normP.substring(0, index2) +
-   normP.substring(index2 + 1);
-   if (index2  index)
-   index--;
-   }
-   index2 = 0;
-   while ((index2 = normP.indexOf("/./", index2)) = 0) {
-   normP = normP.substring(0, index2) +
-   normP.substring(index2 + 2);
-   if (index2  index)
-   index -= 2;
-   }
-
-   // Remove cases of "/{directory}/../"
-   while (index = 0) {
-   // If no parent directory to remove, return null
-   if (index == 0)
-   return (null);  // Trying to leave our context
-   index2 = normP.lastIndexOf('/', index-1);
-   normP = normP.substring(0, index2) +
-   normP.substring(index + 3);
-   index = normP.indexOf("/../", index2);
-   }
-
-   }
+// Splits path into its componentes and normalize it
+StringTokenizer tk = new StringTokenizer(path, PATH_SEPARATORS, false);
+String[] comp = new String[tk.countTokens()];
+int length = 0;
+while (tk.hasMoreTokens()) {
+String component = tk.nextToken();
+if (component.length() == 0 || component.equals(".")) {
+// Empty path component, ignore
+continue;
+} else if (component.equals("..")) {
+// Remove last component.
+if (--length  0) {
+// No last component to remove, trying to leave our context
+return null;
+};
+} else {
+// Normal component, append
+comp[length++] = component;
+}
+}
+StringBuffer buf = new StringBuffer(base);
+for (int i = 0; i  length; i++) {
+buf.append(File.separatorChar).append(comp[i]);
+}
 
-   String realPath= base + normP;
+   String realPath = buf.toString();
 
// Probably not needed - it will be used on the local FS
realPath = FileUtil.patch(realPath);



Re: Use Tomcat As embedded server

2000-11-29 Thread Shawn McMurdo

For another approach at embedding Tomcat in an Enterprise server
check out Enhydra, which is Open Source, at http://www.enhydra.org/
particularly look at
modules/ServletContainer/src/org/enhydra/servlet/servletManager/ServletManager.java

which takes on many of the same roles as the EmbededTomcat class included with
Tomcat.
Shawn

"Mullis, Michael (AT-Atlanta)" wrote:

 Check out http://jboss.org.
 Look at the jboss/Tomcat link.

 jboss is an Open Source EJB Server that can run with Tomcat embedded.

 Michael.

 -Original Message-
 From: Stefán F. Stefánsson [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 29, 2000 8:47 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Use Tomcat As embedded server

 what do you mean?  It IS light enough to be embeded.

 Just use the Jar files that come out of the build dist.

 -Original Message-
 From: Bradley Williams [mailto:[EMAIL PROTECTED]]
 Sent: 29. nóvember 2000 13:42
 To: '[EMAIL PROTECTED]'
 Subject: Use Tomcat As embedded server

 Are there any doc's that describe how make tomcat light enough to be
 embedded ?

--
Shawn McMurdo  mailto:[EMAIL PROTECTED]
Lutris Technologieshttp://www.lutris.com
Enhydra.Orghttp://www.enhydra.org





RE: Now, am I stupid or what?

2000-11-29 Thread Paulo Gaspar

Fellow friend Pier,


MAYBE, just maybe, this one could do it for you:
  http://www.borland.com/bcppbuilder/freecompiler/


Have fun,
Paulo

 -Original Message-
 From: Pier P. Fumagalli [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 29, 2000 13:36
 
 And, definitely yes... As soon as I can get my hands on a Win32 compiler
 (MSVC6 works fine) I'll start building both versions (of course when it's
 ported! :)
 




RE: Notes concerning creation of Tomcat 3.2 Final source zip

2000-11-29 Thread GOMEZ Henri

I'll do the RPM for all Linux system supporting RPM (Redhat/Suse/Mandrake).

They will have both tomcat and tomcat modules for apache.

I stay tuned.

"La maîtrise des autres n'est que la force. La maîtrise de vous-même est le
véritable pouvoir" 
-- Lao Tzu 



cvs commit: jakarta-tomcat/src/admin/contextAdmin contextAdmin.jsp

2000-11-29 Thread craigmcc

craigmcc00/11/29 10:52:23

  Modified:src/admin/WEB-INF/classes Tag: tomcat_32 ContextAdmin.java
   src/admin/contextAdmin Tag: tomcat_32 contextAdmin.jsp
  Log:
  Provide an intelligible error message ("You must mark the administration
  application as trusted") instead of an NPE when you execute the admin
  application when it is not marked trusted.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.4.2.1   +9 -0  jakarta-tomcat/src/admin/WEB-INF/classes/ContextAdmin.java
  
  Index: ContextAdmin.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/admin/WEB-INF/classes/ContextAdmin.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- ContextAdmin.java 2000/06/22 23:48:55 1.4
  +++ ContextAdmin.java 2000/11/29 18:52:19 1.4.2.1
  @@ -43,8 +43,17 @@
   
   public void init(HttpServletRequest request) {
FacadeManager facadeM=(FacadeManager)request.getAttribute( 
FacadeManager.FACADE_ATTRIBUTE);
  +if (facadeM == null) {
  +realRequest = null;
  +cm = null;
  +return;
  +}
realRequest = facadeM.getRealRequest(request);
cm = realRequest.getContext().getContextManager();
  +}
  +
  +public boolean initialized() {
  +return (cm != null);
   }
   
   public Enumeration getContextNames() {
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.1.4.1   +5 -0  jakarta-tomcat/src/admin/contextAdmin/contextAdmin.jsp
  
  Index: contextAdmin.jsp
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/admin/contextAdmin/contextAdmin.jsp,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- contextAdmin.jsp  2000/02/18 18:33:03 1.1
  +++ contextAdmin.jsp  2000/11/29 18:52:22 1.1.4.1
  @@ -26,6 +26,11 @@
   if (param != null) {
   
 contextAdmin.init(request);
  +  if (!contextAdmin.initialized()) {
  +  response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
  +"You must mark the administration application as trusted");
  +  return;
  +  }
   
 if (param.equals("View All Contexts")) {
 Enumeration enum = contextAdmin.getContextNames();
  
  
  



Re: Now, am I stupid or what?

2000-11-29 Thread Jason Brittain



Pier P. Fumagalli wrote:

 Ok... So that's a personal preference, let's say... I don't like 'em because
 the look as hacks to me :) :) :)


Sometimes hacks is all we've got.  :)

 As for Windows, ppl can install cygwin and autoconf/automake work just
 fine there as well. I even compiled and installed wget on my Win98 box
 under cygwin with gcc/autoconf/automake/etc without any problems.
 
 
 Ok, but I don't want ppl to download cygwin just to compile the module, when
 MSVC and NMAKE work just fine... 


This is a bad assumption, since just because someone's running Windows does
not mean they're willing to pay Micro$oft for an MSVC license, nor does
everyone want to allocate the hard drive space for all of MSVC just so 
we can
compile a few binaries for Windows.  In my experience, cygwin is smaller,
more UNIX-user friendly, compatible with bash and sh, and gives Windows
a useful/featureful shell (finally!).  I absolutely prefer cygwin/gcc 
over MSVC.

And, of course, it works fine for UNIX build stuff, so it's a way to unify
Windows, UNIX, and MacOS X for native code builds..  :)

 But anyway since for Windows all we want to
 do is building binaries and redistributing DLLs (never heard of anyone
 trying to compile under Win but me!), 


I have, and have used cygwin/gcc.  And, with the Locomotive project, even
though we built binaries for Windows and distributed them, users often
wanted to compile the binaries themselves for whatever reason.  It was still
cost-free to do that as long as we used cygwin.

 The thing I hate about Auto* is that they somehow impose a check on a HUGE
 number of things that we'll never use... And they're hard as hell to
 maintain (once you've done an autoconf/automake you don't want to do it
 twice!)


It isn't easy to maintain.. no.  Even though it isn't as nice as Ant, I 
don't know
of a better tool for building native code binaries.

Do you know of a better one?


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




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

2000-11-29 Thread craigmcc

craigmcc00/11/29 11:34:31

  Modified:src/share/org/apache/tomcat/core Tag: tomcat_32
Constants.java
   src/webpages Tag: tomcat_32 index.html
  Log:
  Oops!  Forgot to update the version markers.  Will update the
  "tomcat_32_final" tag on these in a second.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.22.2.7  +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.6
  retrieving revision 1.22.2.7
  diff -u -r1.22.2.6 -r1.22.2.7
  --- Constants.java2000/11/21 02:43:10 1.22.2.6
  +++ Constants.java2000/11/29 19:34:26 1.22.2.7
  @@ -67,7 +67,7 @@
   
   public class Constants {
   public static final String TOMCAT_NAME = "Tomcat Web Server";
  -public static final String TOMCAT_VERSION = "3.2 beta 8";
  +public static final String TOMCAT_VERSION = "3.2 (final)";
   
   public static final String JSP_NAME = "JSP";
   public static final String JSP_VERSION = "1.1";
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.13.2.7  +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.6
  retrieving revision 1.13.2.7
  diff -u -r1.13.2.6 -r1.13.2.7
  --- index.html2000/11/21 02:43:14 1.13.2.6
  +++ index.html2000/11/29 19:34:29 1.13.2.7
  @@ -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 beta 8/title
  +titleTomcat v3.2 (final)/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 beta 8/font/font/b
  +3.2 (final)/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
  
  
  



RE: [Tomcat 3.2] User's Guide?

2000-11-29 Thread Rob S.

Hi all,

Larry, remember w/Alex a few months back?  Even though it's a while later,
we're back at the same point - imminent release w/old docs =)

I'm not familiar with what happened on the CVS side, i just wanted to make
sure the new docs didn't get lost =(

- r

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: November 29, 2000 11:20 AM
 To: [EMAIL PROTECTED]
 Subject: [Tomcat 3.2] User's Guide?


 I received a private email that the user's guide document that is
 checked in to
 the "tomcat_32" branch is still the old one.  Does anyone know
 where there is an
 authoritative copy of a more up-to-date version?

 Craig







Catalina-4M5 question: parameters?

2000-11-29 Thread Matthew L Daniel

If this is not the proper forum to be discussing Catalina related difficulties,
please advise me and I will take this elsewhere.  As some other kind soul
reported, BugRat is exactly that.  Even the usage page is broken.

I am using the CVS build of Catalina 4.0M5.  It was updated 15 minutes ago,
with no changes.  I am using IBM's 1.3 JDK on Linux 2.2.17 i686.

The parameter handling is HORRIBLY broken.  Asking for any valid name results
in a null value, and asking:

Enumeration params = request.getParameterNames();
while( params.hasMoreElements() ) {
String name = params.nextElement().toString();
log("Param("+name+") := "+request.getParameter(name));
}

results in

Param(/velocity/myservlet?) := 

for any number of parameters passed, regardless of their values.  
Same thing for JSP:

/velocity/test1.jsp?

I wanted to ask if this was a known problem before I tear into the meat of
Catalina (having only Tomcat 3.2b8 development experience prior).

  Thanks,
  -- /v\atthew
-- 
Matthew L Daniel Rich bachelors should be heavily taxed.
Internet DirectorIt is not fair that some men should be
SterlingPlanet, Inc. happier than others.
[EMAIL PROTECTED]-- Oscar Wilde



Re: AccessLogValve performance fixes

2000-11-29 Thread Remy Maucherat

 Yep!  That's a full 10 seconds slower than the new version, making
 the new version about 44% faster.

Great !
I'll commit the patch later today.

 This test is single-threaded, but I think it still shows noticeable
 performance improvement.

 Something else that I could do with this that I haven't yet is
 make the valve able to buffer log file output.  From my tests,
 it looks to me like this make the test run about 4 seconds faster,
 a maximum of 1.6% gain (not real big, but it's something).

If it's really 4s out of 13s, isn't it more than 1.6% ? If the gain is
another 4s, then it's significant, and I think we should go for it.

Remy




Re: AccessLogValve performance fixes

2000-11-29 Thread Jason Brittain


Remy Maucherat wrote:

 Yep!  That's a full 10 seconds slower than the new version, making
 the new version about 44% faster.
 
 
 Great !
 I'll commit the patch later today.
 
 This test is single-threaded, but I think it still shows noticeable
 performance improvement.
 
 Something else that I could do with this that I haven't yet is
 make the valve able to buffer log file output.  From my tests,
 it looks to me like this make the test run about 4 seconds faster,
 a maximum of 1.6% gain (not real big, but it's something).
 
 
 If it's really 4s out of 13s, isn't it more than 1.6% ? If the gain is
 another 4s, then it's significant, and I think we should go for it.
 
 Remy
 
Okay, that's one way to look at it.  I was thinking 4s out of 24s, but 
now that
you mention it, it's now 4s out of 13s.  So, I'll work on that too.

About buffering, I was thinking that not everyone would want the output
buffered..  If you're debugging and you're trying individual requests and
looking at the log information for each request, and the log lines don't 
show
up in the log file after you make the request, that can be annoying/puzzling
to the person trying to debug.  I thought it might be a good idea if you 
could
configure the valve to buffer or not buffer.  Buffering should probably be
turned on as the default.  But, as long as the config says something like
'buffering="true"' then at least people will take note that buffering is
turned on for that log file (it can serve as a sort of a warning).

So, by default, it'll be fast, and the buffering could be turned off.  That
would be nice -- as long as this switchable feature does not really degrade
performance.

Ideas?

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




Re: Catalina-4M5 question: parameters?

2000-11-29 Thread Craig R. McClanahan

Matthew L Daniel wrote:

 If this is not the proper forum to be discussing Catalina related difficulties,
 please advise me and I will take this elsewhere.  As some other kind soul
 reported, BugRat is exactly that.  Even the usage page is broken.

 I am using the CVS build of Catalina 4.0M5.  It was updated 15 minutes ago,
 with no changes.  I am using IBM's 1.3 JDK on Linux 2.2.17 i686.

 The parameter handling is HORRIBLY broken.  Asking for any valid name results
 in a null value, and asking:

 Enumeration params = request.getParameterNames();
 while( params.hasMoreElements() ) {
 String name = params.nextElement().toString();
 log("Param("+name+") := "+request.getParameter(name));
 }

 results in

 Param(/velocity/myservlet?) :=

 for any number of parameters passed, regardless of their values.
 Same thing for JSP:

 /velocity/test1.jsp?

 I wanted to ask if this was a known problem before I tear into the meat of
 Catalina (having only Tomcat 3.2b8 development experience prior).


To my knowledge, this is not a known issue.  In fact, I've got tons of stuff
that
depends on request parameters working just fine in 4.0.  I would be very
interested
in a simple test case that can reproduce what you're seeing.

By the way, there is no "milestone 5" yet, despite the announcement of plans to
have one done.  We really want to have a workable connector that people can
test,
and what's in CVS isn't quite there yet.


   Thanks,
   -- /v\atthew

Craig



Re: Use Tomcat As embedded server

2000-11-29 Thread cmanolache

 For another approach at embedding Tomcat in an Enterprise server
 check out Enhydra, which is Open Source, at http://www.enhydra.org/
 particularly look at
 modules/ServletContainer/src/org/enhydra/servlet/servletManager/ServletManager.java
 
 which takes on many of the same roles as the EmbededTomcat class included with
 Tomcat.
 Shawn

As a note - EmbededTomcat is intended as an example of how to embed
tomcat. It is simple enough ( I hope ), and you can use it as is, extend
it or create a new one. In 3.3 everything will be much simpler, with some
clear rules about how to start/stop/configure tomcat.

Costin




Re: Netscape Enterprise Server 3.51

2000-11-29 Thread cmanolache

 Hi!
 
 Can anyone tell me if it's possible to run Tomcat together with NES 3.51, or
 do I have to upgrade to NES 3.6 to get it work?

It should work - AFAIK mod_jk uses only generic nsapi calls. 
You'll need to compile it yourself, there are only few peoples using
NES+tomcat.

If you succeed, please make the binary available and maybe some notes on
how you did it.

Costin






RE: Use Tomcat As embedded server

2000-11-29 Thread Marc Saegesser

I made some comments on the tomcat-user list a few days ago about my attempt
to use EmbededTomcat in 3.2.  I've hacked together something that works for
me.  When I get it cleaned up I'll post the code.

Bascially I had the following problems

1)  Using EmbededTomcat seems to require using a security manager.  I
haven't tracked down why, yet, I just added a security policy that opens
everything up.
2)  The contexts' context manager wasn't being set.  I had to change the
order in which things got created and add a call to
context.setContextManager() in addContext().
3)  There was no way to mark contexts as not reloadable.

Again, I was able to embed Tomcat inside my app and it is working.  The
EmbededTomcat class is a good starting point for this but you will need to
do some work.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 4:32 PM
To: [EMAIL PROTECTED]
Subject: Re: Use Tomcat As embedded server


 For another approach at embedding Tomcat in an Enterprise server
 check out Enhydra, which is Open Source, at http://www.enhydra.org/
 particularly look at

modules/ServletContainer/src/org/enhydra/servlet/servletManager/ServletManag
er.java

 which takes on many of the same roles as the EmbededTomcat class included
with
 Tomcat.
 Shawn

As a note - EmbededTomcat is intended as an example of how to embed
tomcat. It is simple enough ( I hope ), and you can use it as is, extend
it or create a new one. In 3.3 everything will be much simpler, with some
clear rules about how to start/stop/configure tomcat.

Costin




Re: AccessLogValve performance fixes

2000-11-29 Thread Remy Maucherat

Quoting "Craig R. McClanahan" [EMAIL PROTECTED]:
 Logging messages in some other environments -- and even Tomcat 3.x IIRC
 -- are
 actually written out by a background thread, rather than the main
 request-processing thread (as it currently is with Catalina, or at least
 it was
 last time I looked :-).  Have you thought about implementing such a
 thing?

Actually, I was about to propose that we add asynchronous logging :)

 If we go that way, some thought might be spent on perhaps consolidating
 background writing for all Loggers into some number of threads less than
 the
 total number of loggers -- to improve scalability in large
 installations.

Remy



Another note on creating Tomcat 3.2 Final source zip

2000-11-29 Thread Larry Isaacs

Craig,

I overlooked this earlier. I plan on leaving out the CVS "bin" directory
from the source zip.  From what I can tell, all these binaries are
out of date.

Larry



Re: Another note on creating Tomcat 3.2 Final source zip

2000-11-29 Thread Craig R. McClanahan

Larry Isaacs wrote:

 Craig,

 I overlooked this earlier. I plan on leaving out the CVS "bin" directory
 from the source zip.  From what I can tell, all these binaries are
 out of date.


Definitely.  I totally forgot they were there.

I'm also going to remove them from CVS as well, so we don't confuse ourselves
next time around.


 Larry

Craig





Re: Catalina-4M5 question: parameters?

2000-11-29 Thread Remy Maucherat

Quoting "Craig R. McClanahan" [EMAIL PROTECTED]:

 To my knowledge, this is not a known issue.  In fact, I've got tons of
 stuff
 that
 depends on request parameters working just fine in 4.0.  I would be
 very
 interested
 in a simple test case that can reproduce what you're seeing.

I know that parameters on the URL are working.
Perhaps there is a bug with POST parameters. I'll look into it, but if you could
give more details, that would help.

I did some testing with my HTTP and WebDAV client (which has just started doing
useful stuff), and HTTP pipelining seems to be working well. I found some WebDAV
related performance enhancements I could make in the process. Right now, some
PROPFIND requests can take a long time to process, when there is serveral
hundred resources to list (around 1s / 100 resources). That could be helped by
using streaming, instead of building the whole response in a StreamBuffer as I'm
doing right now.
 
 By the way, there is no "milestone 5" yet, despite the announcement of
 plans to
 have one done.  We really want to have a workable connector that people
 can
 test,
 and what's in CVS isn't quite there yet.

Remy



[Tomcat 3.2] Calling For Native Code

2000-11-29 Thread Craig R. McClanahan

I'm getting ready to build the Java part of the 3.2 final build.  It would be
useful to have the native code pieces built for as many platforms as possible so
that I can post them on the web site along with the distribution.

Could developers who have environments to do this please help me out and compile
the native code chunks, then send them to me?  (Be sure you identify what
platform your code is for).  Before you build, make sure you have checked out
the "tomcat_32_final" branch from the "jakarta-tomcat" CVS repository.

Thanks!

Craig





Re: AccessLogValve performance fixes

2000-11-29 Thread Craig R. McClanahan

Jason Brittain wrote:


 It sounds like a good idea.  While I was working on this valve I was
 thinking
 that it would be great to queue up the log messages for another thread, but
 I first wanted to quickly get these lighter optimization changes into the
 codebase.


Sounds like a reasonable plan.


 Yes, it would be great for Catalina to offer asynchronous logging.  If we're
 going to do that, I'd propose we do it in some pluggable fashion.


Which means we should also look at stuff like Log4J and so on.  There was also a
recent Java Specification Request for a standardized logging API -- I haven't
followed where this is in the process, but it should be findable on the JCP web
site http://java.sun.com/jcp.


 Really, what I'd like to see is for Avalon to offer asynchronous logging and
 for Catalina to plug into that.  But, I'm sure lots of folks who use
 Catalina
 by itself (without Avalon) would like Catalina itself to have asynchronous
 logging code of its own.  We could always do both (especially since Avalon
 and Catalina use the same license).. ideas?


There has also been some work to put (optional) Avalon wrappers around
Catalina.  This is certainly a place we might be able to leverage Avalon more.


 So Craig, you're saying that Tomcat 3.2 does this now?


Well, I remember that Alex Chaffee was working on some logging enhancements over
the summer -- but it appears that they are *not* in the 3.2 code base.  They are
probably in the 3.3-dev branch, though, so we can still go harvest 'em.


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

Craig





RE: [Tomcat 3.2] User's Guide?

2000-11-29 Thread Larry Isaacs

 It doesn't contain any 3.3 features that I know of because I
 don't/didn't
 know anything about what 3.3 will have versus 3.2 =)

This is will help. However, there are some changes in the tomcat_32 "older" version 
that would need to be ported to the MAIN version before using it, in addition to 
moving the "images" directory,
etc.  I'm inclined to save this to for a Tomcat 3.2 maintenance release. Does anyone 
feel strongly otherwise?

Larry



Re: Now, am I stupid or what?

2000-11-29 Thread Pier P. Fumagalli

[EMAIL PROTECTED] wrote:
 
  This is a bad assumption, since just because someone's running Windows does
  not mean they're willing to pay Micro$oft for an MSVC license, nor does
  everyone want to allocate the hard drive space for all of MSVC just so
  we can
  compile a few binaries for Windows.  In my experience, cygwin is smaller,
  more UNIX-user friendly, compatible with bash and sh, and gives Windows
  a useful/featureful shell (finally!).  I absolutely prefer cygwin/gcc
  over MSVC.
 
 Actually, Jason makes an EXCELLENT point Pier that you should listen to.
 
 What you have been proposing with compiling the Windows based C code on
 MSVC is that people would have to go and purchase M$ products in order to
 do that. In fact, that is essentially what you are having to do as well.
 
 I'm STRONGLY -1 on that for obvious reasons.
 
 I would MUCH rather require developers to install cygwin and use auto*
 tools to build the system than to go purchase MSVC and install that.

I have to get MSVC anyhow since Apache doesn't build on cygwin So
what?

Pier
--
Pier Fumagalli [EMAIL PROTECTED] http://www.betaversion.org/~pier



TC3: Nightly builds are back

2000-11-29 Thread cmanolache

Hi,

As promised, no more checkins without nightly builds :-)

I created a simpler script, with fewer features - it seems to work
fine. Instead of one build, there are 3:

- tomcat 3.3 + extensions ( JSSE in CLASSPATH )
- tomcat 3.3 "basic" ( nothing in CLASSPATH except JAXP )
- tomcat 3.3 built with JDK1.1

Right now the JDK1.1 build is broken - I'll start fixing it.


The builds are in the old place 
( jakarta.apache.org:/builds/tomcat/nightly ), but only for tomcat - I no
longer build ant or anything else.

I'll try to automate the watchdog too - and post the test results on the
same page - but later.

Now we can start having fun with 3.3 :-)

Costin




New Valve Tester and NullValve

2000-11-29 Thread Jason Brittain


In the process of optimizing AccessLogValve, I came to the conclusion that
I needed a tester that would allow me to benchmark (and otherwise test) the
valve without needing to run all of Catalina -- I needed to isolate just the
valve so that I could get clean benchmark times.  So, I thought about 
writing
just a class that would let me instantiate the valve, and use it.  But, 
after
some looking at the code, I realized some things:

1) That it may not be easy to make the valve act the same as it would act
in a regular Catalina Container without making something that acts much
like a Container anyway.

2) Even if I could make something that acts like a Container, it
wouldn't really be a Container, so my custom class would only be
"faking it".
3) Maintaining a fake container to continue to be like the Catalina
Containers wouldn't be easy, and it would certainly be pointless.
4) Making a new class that really *was* a Container didn't look
that tough.
5) If I needed one of these, certainly someone else must have also
wanted one.  :)

So, I set out to write a generic Valve tester.

I wrote it, got it running, and used it for optimizing the
AccessLogValve.  Here's what I wrote:

org.apache.catalina.valves.ValveTesterBase.java
  This is the base abstract class that is a Container that uses the
  Valve you wish to test.
org.apache.catalina.valves.NullValve.java
  I needed this valve to be the basic functionality of the
  ValveTesterBase Container subclasses.  It does absolutely nothing
  other than return control to the caller.  This is good because it
  takes up basically no cpu time, and completes the Container's
  request pipeline.

Then, I wrote one subclass of ValveTesterBase:

org.apache.catalina.connector.http.AccessLogValveTester.java
  This class tests the AccessLogValve in one particular way, and
  has control over the environment in which the AccessLogValve
  operates.  I had to place this class in the http connector
  package only because the HttpRequestImpl and HttpResponseImpl
  classes are not declared public!  Should they be?

With the first two classes, anyone should be able to easily make
a valve tester that tests a valve in exactly the way they want to
test it.  The ValveTesterBase class is intentionally simple, and
small.  The AccessLogValveTester is a good example of a subclass
that uses it.

One idea I had about how ValveTesterBase could be improved is
by writing and integrating a request traffic generator of some
kind (maybe also abstract?) so that the request traffic can be
more like the characteristics of real web traffic, and thus be
a more real-world test of the valves.  I have not begun coding
this yet.  It will need to be multithreaded, though.

Also, in which package should this tester code reside, really?
I'm aprehensive about mixing the tester code in with the regular
Catalina code..

All feedback about this code is welcome!

Cheers.

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




/*
 * 
 *
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999 The Apache Software Foundation.  All rights 
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in
 *the documentation and/or other materials provided with the
 *distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *any, must include the following acknowlegement:  
 *   "This product includes software developed by the 
 *Apache Software Foundation (http://www.apache.org/)."
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
 *Foundation" must not be used to endorse or promote products derived
 *from this software without prior written permission. For written 
 *permission, please contact [EMAIL PROTECTED]
 *
 * 5. Products derived from this software may not be called "Apache"
 *nor may "Apache" appear in their names without prior written
 *permission of the Apache Group.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, 

Re: [Tomcat 3.2] User's Guide?

2000-11-29 Thread Craig R. McClanahan

Larry Isaacs wrote:

  It doesn't contain any 3.3 features that I know of because I
  don't/didn't
  know anything about what 3.3 will have versus 3.2 =)

 This is will help. However, there are some changes in the tomcat_32 "older" version 
that would need to be ported to the MAIN version before using it, in addition to 
moving the "images" directory,
 etc.  I'm inclined to save this to for a Tomcat 3.2 maintenance release. Does anyone 
feel strongly otherwise?


This was the conclusion I came to as well ... the final release still has the old 
User's Guide document.  We can take the time to fix that in a 3.2.1 maintenance cycle, 
once we've assurred ourselves
that the new version of the User's Guide doesn't contain any 3.3-isms, and has 
benefited from any 3.2 stuff added to the old guide already.


 Larry

Craig





cvs commit: jakarta-tomcat/bin/iis/nt4/i386 isapi_redirect.dll

2000-11-29 Thread craigmcc

craigmcc00/11/29 15:53:11

  Removed: bin/iis/nt4/i386 Tag: tomcat_32 isapi_redirect.dll
  Log:
  Remove obsolete binary.



RE: Use Tomcat As embedded server

2000-11-29 Thread cmanolache

 1)  Using EmbededTomcat seems to require using a security manager.  I
 haven't tracked down why, yet, I just added a security policy that opens
 everything up.
 2)  The contexts' context manager wasn't being set.  I had to change the
 order in which things got created and add a call to
 context.setContextManager() in addContext().
 3)  There was no way to mark contexts as not reloadable.

EmbededTomcat was created to embed tomcat in J2EE RI. I checked it in as
an example, for other people who want to embed tomcat in similar products,
and as a start for a more generic tool. 

It would be great if people who are actually using it could do a bit of
work on it to make it more reusable - I know it is a bit specific to the
requirements of j2ee, but I think that can be simplified.

Costin




Re: New Valve Tester and NullValve

2000-11-29 Thread Remy Maucherat

 Remy Maucherat wrote:

   Also, in which package should this tester code reside, really?
 
  org.apache.catalina.valves.tester ?

 Well, if the hi-tech stocks continue to dive, I guess we can all go get
jobs as
 plumbers, testing valves :-)

Oh, ok, it all makes sense now. You were planning your reconversion when you
designed Catalina ;)

  Doing that will make it end up in the Catalina JAR, which is not a big
  problem IMO, but perhaps it could be packaged separately. We could add a
  src/test directory and put it in there.
 
   I'm aprehensive about mixing the tester code in with the regular
   Catalina code..
 
  Well, as long as it builds and has no strange dependencies ...

 How about if we do this?  One thing that didn't get ported over to
Catalina yet
 is the test webapp that is in the 3.x workspace.  I'd like to bring that
over
 (although we might want to leverage the updated GTest task for Ant that is
in
 "jakarta-watchdog-4.0").  Would it make sense to add some stand-alone
testing
 infrastructure like Jason's test harness here as well?

Yes.

Actually, I'm planning on having a test suite for WebDAV (with an emphasis
on the DAV extensions - DAV ACL, Delata V, DASL) as part of Slide, based on
JUnit. Of course, there will be a server side part to this test suite
(packaged as a web app).
This test suite will be based of the new HTTP and WebDAV client library
which is part of Slide.

Is all that something similar to what you want ?

Remy




cvs commit: jakarta-tomcat/bin/nt_service jk_nt_service.exe

2000-11-29 Thread craigmcc

craigmcc00/11/29 15:55:29

  Removed: bin/jni_connect/nt4/i386 Tag: tomcat_32 jni_connect.dll
   bin/netscape/linux/i386 Tag: tomcat_32 nsapi_redirect.so
   bin/netscape/nt4/i386 Tag: tomcat_32 nsapi_redirect.dll
   bin/nt_service Tag: tomcat_32 jk_nt_service.exe
  Log:
  Remove additional obsolete binaries from CVS.



cvs commit: jakarta-tomcat/etc in-process-howto.html todo.txt tomcat-iis-howto.html tomcat-netscape-howto.html

2000-11-29 Thread craigmcc

craigmcc00/11/29 17:09:59

  Removed: etc  Tag: tomcat_32 in-process-howto.html todo.txt
tomcat-iis-howto.html tomcat-netscape-howto.html
  Log:
  Remove some additional obsolete files, which also makes the "etc"
  directory obsolete for the 3.2 release.



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves AccessLogValve.java

2000-11-29 Thread remm

remm00/11/29 17:55:32

  Modified:catalina/src/share/org/apache/catalina/valves
AccessLogValve.java
  Log:
  - Optimized AccessLogValve.
Contributed by Jason Brittain ([EMAIL PROTECTED]).
  
  Revision  ChangesPath
  1.2   +218 -45   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java
  
  Index: AccessLogValve.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AccessLogValve.java   2000/08/11 17:03:15 1.1
  +++ AccessLogValve.java   2000/11/30 01:55:31 1.2
  @@ -65,7 +65,9 @@
   import java.io.FileWriter;
   import java.io.IOException;
   import java.io.PrintWriter;
  -import java.sql.Timestamp;
  +import java.text.SimpleDateFormat;
  +import java.util.Date;
  +import java.util.TimeZone;
   import javax.servlet.ServletException;
   import javax.servlet.ServletRequest;
   import javax.servlet.ServletResponse;
  @@ -122,7 +124,8 @@
* can be implemented.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/08/11 17:03:15 $
  + * @author Jason Brittain
  + * @version $Revision: 1.2 $ $Date: 2000/11/30 01:55:31 $
*/
   
   public final class AccessLogValve
  @@ -140,6 +143,7 @@
   
super();
setPattern("common");
  +
   
   }
   
  @@ -151,7 +155,7 @@
* The as-of date for the currently open log file, or a zero-length
* string if there is no open log file.
*/
  -private String date = "";
  +private String dateStamp = "";
   
   
   /**
  @@ -182,6 +186,14 @@
   
   
   /**
  + * If the current log pattern is the same as the common access log
  + * format pattern, then we'll set this variable to true and log in
  + * a more optimal and hard-coded way.
  + */
  +private boolean common = false;
  +
  +
  +/**
* The pattern used to format our access log lines.
*/
   private String pattern = null;
  @@ -218,6 +230,60 @@
   private PrintWriter writer = null;
   
   
  +/**
  + * A date formatter to format a Date into a date in the format
  + * "-MM-dd".
  + */
  +private SimpleDateFormat dateFormatter = null;
  +
  +
  +/**
  + * A date formatter to format Dates into a day string in the format
  + * "dd".
  + */
  +private SimpleDateFormat dayFormatter = null;
  +
  +
  +/**
  + * A date formatter to format a Date into a month string in the format
  + * "MM".
  + */
  +private SimpleDateFormat monthFormatter = null;
  +
  +
  +/**
  + * A date formatter to format a Date into a year string in the format
  + * "".
  + */
  +private SimpleDateFormat yearFormatter = null;
  +
  +
  +/**
  + * A date formatter to format a Date into a time in the format
  + * "kk:mm:ss" (kk is a 24-hour representation of the hour).
  + */
  +private SimpleDateFormat timeFormatter = null;
  +
  +
  +/**
  + * The time zone relative to GMT.
  + */
  +private String timeZone = null;
  +
  +
  +/**
  + * The system time when we last updated the Date that this valve
  + * uses for log lines.
  + */
  +private Date currentDate = null;
  +
  +
  +/**
  + * When formatting log lines, we often use strings like this one (" ").
  + */
  +private String space = " ";
  +
  +
   // - Properties
   
   
  @@ -276,6 +342,11 @@
pattern = Constants.AccessLog.COMMON_PATTERN;
this.pattern = pattern;
   
  +if (this.pattern.equals(Constants.AccessLog.COMMON_PATTERN))
  +common = true;
  +else
  +common = false;
  +
   }
   
   
  @@ -342,21 +413,77 @@
// Pass this request on to the next valve in our pipeline
invokeNext(request, response);
   
  - // Generate a message based on the defined pattern
  - StringBuffer result = new StringBuffer();
  - boolean replace = false;
  - for (int i = 0; i  pattern.length(); i++) {
  - char ch = pattern.charAt(i);
  - if (replace) {
  - result.append(replace(ch, request, response));
  - replace = false;
  - } else if (ch == '%')
  - replace = true;
  - else
  - result.append(ch);
  - }
  - log(result.toString());
  +Date date = getDate();
  +StringBuffer result = new StringBuffer();
   
  +// Check to see if we should log using the "common" access log pattern
  +if (common) {
  +String value = null;
  +
  +ServletRequest req = request.getRequest();
  +HttpServletRequest hreq = null;
  +

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

2000-11-29 Thread costin

costin  00/11/29 22:17:13

  Modified:.build.xml
   src/share/org/apache/tomcat/core ContextManager.java
   src/share/org/apache/tomcat/modules/session
SimpleSessionStore.java
   src/share/org/apache/tomcat/startup Main.java
  Log:
  Fix the build for JDK1.1
  
  Since it's expected that the optimizations will use more JDK1.2 features
  ( in optional modules, of course :-) we want to make sure that tomcat's
  core remains usable on JDK1.1 and the optimized code is indeed optional.
  
  The rule is simple - no JDK1.2 specific code in core, in the basic modules
  or in utils used by basic modules ( if you do, the nightly build should
  catch it ).
  
  Use
  exclude name="org/apache../MyJdk12Class.java" unless="jdk12.present" /
  for all the 1.2 modules ( and make sure they are not enabled by default
  in server.xml )
  
  XXX need an exclude/unless for server.xml
  
  Revision  ChangesPath
  1.96  +8 -5  jakarta-tomcat/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/build.xml,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- build.xml 2000/11/12 17:30:04 1.95
  +++ build.xml 2000/11/30 06:17:11 1.96
  @@ -206,7 +206,7 @@
 /target
   
 !--  Webdav == --
  -  target name="dav" depends="init"
  +  target depends="init" if="jdk12.present" name="dav"
   javac destdir="${tomcat.build}/classes" debug="${debug}" 
optimize="${optimize}" deprecation="off" srcdir="src/webdav"
 classpath
pathelement location="${servlet22.jar}"/
  @@ -238,6 +238,7 @@
 include name="org/apache/tomcat/modules/**"/
 exclude name="org/apache/tomcat/request/Jdk12Interceptor.java" 
unless="jdk12.present"/
 exclude name="org/apache/tomcat/context/LoaderInterceptor1.java" 
unless="jdk12.present"/
  +  exclude name="org/apache/tomcat/context/LoaderInterceptor12.java" 
unless="jdk12.present"/
 exclude name="org/apache/tomcat/context/PolicyInterceptor.java" 
unless="jdk12.present"/
   /javac
   jar jarfile="${tomcat.build}/lib/tomcat_modules.jar" 
basedir="${tomcat.build}/classes" 
  @@ -256,6 +257,8 @@
pathelement location="${servlet22.jar}"/
 /classpath
 include name="org/apache/jasper/**"/
  +  exclude name="org/apache/jasper/servlet/JasperLoader12.java" 
  + unless="jdk12.present"/
   /javac
   copy todir="${tomcat.build}/classes/org/apache/jasper"
   fileset dir="src/share/org/apache/jasper"
  @@ -352,15 +355,15 @@
   copy todir="${tomcat.dist}"
   fileset dir="${tomcat.build}"/
   /copy
  -copy todir="${tomcat.dist}/src/org"
  +!-- copy todir="${tomcat.dist}/src/org"
   fileset dir="src/share/org"/
  -/copy
  +   /copy --
   copy tofile="${tomcat.dist}/lib/jaxp.jar" file="${jaxp}/jaxp.jar"/
   copy tofile="${tomcat.dist}/lib/parser.jar" file="${jaxp}/parser.jar"/
   copy tofile="${tomcat.dist}/lib/servlet.jar" file="${servlet.jar}"/
  -copy todir="${tomcat.dist}/src/org"
  +!-- copy todir="${tomcat.dist}/src/org"
   fileset dir="src/facade22/org"/
  -/copy
  +/copy --
   
   !-- Add Tomcat internal javadoc --
   mkdir dir="${tomcat.dist}/webapps/ROOT/javadoc"/
  
  
  
  1.151 +1 -1  
jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java
  
  Index: ContextManager.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java,v
  retrieving revision 1.150
  retrieving revision 1.151
  diff -u -r1.150 -r1.151
  --- ContextManager.java   2000/11/30 04:58:40 1.150
  +++ ContextManager.java   2000/11/30 06:17:12 1.151
  @@ -940,7 +940,7 @@
   // public final String getRandomClass() {
   // XXX XXX @deprecated - use  interceptor properties
   public final void setRandomClass(String randomClass) {
  -System.setProperty(RANDOM_CLASS_PROPERTY, randomClass);
  +System.getProperties().put(RANDOM_CLASS_PROPERTY, randomClass);
   }
   
   
  
  
  
  1.4   +2 -1  
jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SimpleSessionStore.java
  
  Index: SimpleSessionStore.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SimpleSessionStore.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SimpleSessionStore.java   2000/11/22 00:21:24 1.3
  +++ SimpleSessionStore.java   2000/11/30 06:17:12 1.4
  @@ -115,7 +115,8 @@
   
   public final void setRandomClass(String randomClass) {
this.randomClass=randomClass;
  - 

cvs commit: jakarta-tomcat/etc todo.txt

2000-11-29 Thread costin

costin  00/11/29 23:30:10

  Removed: bin/iis/nt4/i386 isapi_redirect.dll
   bin/jni_connect/nt4/i386 jni_connect.dll
   bin/netscape/linux/i386 nsapi_redirect.so
   bin/netscape/nt4/i386 nsapi_redirect.dll
   bin/nt_service jk_nt_service.exe
   etc  todo.txt
  Log:
  Removed obsolte files - sync with 3.2 fixes.



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

2000-11-29 Thread costin

costin  00/11/29 23:32:46

  Modified:src/doc  index.html
  Added:   src/doc  tomcat-ssl-howto.html
  Log:
  Merged doc changes from 3.2
  
  Revision  ChangesPath
  1.7   +4 -1  jakarta-tomcat/src/doc/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/doc/index.html,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- index.html2000/10/07 20:29:51 1.6
  +++ index.html2000/11/30 07:32:45 1.7
  @@ -1,7 +1,7 @@
   
   html
 head
  -!-- $Id: index.html,v 1.6 2000/10/07 20:29:51 larryi Exp $ --
  +!-- $Id: index.html,v 1.7 2000/11/30 07:32:45 costin Exp $ --
   !-- Copyright 1999, Apache Software Foundation --
   meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
   link rel="stylesheet" href="style.css"
  @@ -44,6 +44,9 @@
 from Trojan servlets, JSPs, JSP beans, and tag libraries./li
   lia href="Tomcat-Workers-HowTo.html"Tomcat Workers/a - How to work
 with quot;Tomcat workers,quot; and the worker.properties file.br
  +  nbsp;nbsp;/li
  +lia href="tomcat-ssl-howto.html"Tomcat and SSL/a - Using SSL with
  +  Tomcat 3.2, including configuring web connectors.br
 nbsp;nbsp;/li
 /ul
   /li
  
  
  
  1.2   +259 -0jakarta-tomcat/src/doc/tomcat-ssl-howto.html
  
  
  
  



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

2000-11-29 Thread costin

costin  00/11/29 23:36:03

  Modified:src/share/org/apache/tomcat/modules/server
Ajp13Interceptor.java
  Log:
  Merged ajp13 fix, merge from 3.2.
  
  Orginal log:
Correct protocol handling for AJP13 so that a JK_AJP13_END_RESPONSE message
gets generated only once, even when RequestDispatcher.forward() was called.
  
From the analysis submitted with the patch by Doug Clinton:
  
RequestDispatcher.forward() calls realResponse.finish() as its
final action.  However, ContextManager.service() also calls
finish() on the response which results in two packets of type
JK_AJP13_END_RESPONSE being written back to the mod_jk stream.
This means that the next time mod_jk makes a request the first
thing it will get back from tomcat is the second END_RESPONSE
packet.  The real response to the request gets left, buffered
in the socket stream.
  
  Submitted by: Doug Clinton [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.4   +13 -5 
jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java
  
  Index: Ajp13Interceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Ajp13Interceptor.java 2000/09/29 07:01:16 1.3
  +++ Ajp13Interceptor.java 2000/11/30 07:36:03 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java,v
 1.3 2000/09/29 07:01:16 costin Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/09/29 07:01:16 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java,v
 1.4 2000/11/30 07:36:03 costin Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/11/30 07:36:03 $
*
* 
*
  @@ -233,12 +233,18 @@
   class Ajp13Response extends Response 
   {
   Ajp13 ajp13;
  +boolean finished=false;
   
   public Ajp13Response() 
   {
super();
   }
   
  +public void recycle() {
  + super.recycle();
  + finished=false;
  +}
  +
   public void setSocket( Socket s ) {
ajp13=((Ajp13Request)request).ajp13;
   }
  @@ -257,8 +263,10 @@

   public void finish() throws IOException 
   {
  -super.finish();
  - ajp13.finish();
  + if(!finished) {
  + super.finish();
  + ajp13.finish();
  + }
   }
   
   public void doWrite(  byte b[], int off, int len) throws IOException 
  
  
  



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

2000-11-29 Thread costin

costin  00/11/29 23:51:44

  Modified:src/native/mod_jk/apache1.3 Makefile.linux
   src/share/org/apache/tomcat/resources
LocalStrings.properties
   src/share/org/apache/tomcat/startup Tomcat.java
  Log:
  Merge few more changes from 3.2.
  
  - change in Makefile.linux ( support external APXS definition )
  - better comments on startup
  
  ( read the original commit log for more details )
  Regarding startup - 3.3 will have a new ( and better !) startup mechanism,
  that will remove the need for shell scripts, classpath, etc. Tomcat.java
  can still be used and we keep it as a backup, in case we can't finish the
  refactoring in time.
  
  Submitted by: Paul Frieden [EMAIL PROTECTED]
  PR: BugRat Bug Report #429
  Submitted by: Ralf Suckow [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.3   +2 -0  jakarta-tomcat/src/native/mod_jk/apache1.3/Makefile.linux
  
  Index: Makefile.linux
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/apache1.3/Makefile.linux,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.linux2000/11/10 18:48:50 1.2
  +++ Makefile.linux2000/11/30 07:51:43 1.3
  @@ -6,7 +6,9 @@
   
   JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS}
   JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} -L ${JAVA_HOME}/lib/${ARCH}/native_threads
  +#ifndef APXS
   APXS=/usr/sbin/apxs
  +#endif
   
   JK=../common/
   SRCS=${JK}/jk_ajp12_worker.c ${JK}/jk_connect.c ${JK}/jk_msg_buff.c ${JK}/jk_util.c 
${JK}/jk_ajp13.c \
  
  
  
  1.11  +3 -3  
jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings.properties,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LocalStrings.properties   2000/11/06 15:11:07 1.10
  +++ LocalStrings.properties   2000/11/30 07:51:43 1.11
  @@ -1,4 +1,4 @@
  -# $Id: LocalStrings.properties,v 1.10 2000/11/06 15:11:07 nacho Exp $
  +# $Id: LocalStrings.properties,v 1.11 2000/11/30 07:51:43 costin Exp $
   #
   
   # Localized strings for package org.apache.tomcat.core
  @@ -21,14 +21,14 @@
   defaulterrorpage.internalservleterror=Internal Servlet Error:
   
   #Tomcat.java
  -tomcat.usage=usage: 
  +tomcat.usage=Usage: java org.apache.tomcat.startup.Tomcat options
   tomcat.start=Tomcat started. Check {0} for error and log messages.
   tomcat.loading=Loading config file
   tomcat.loaded=Loaded config file
   tomcat.bindexception=Another service is using the requested port (possibly another 
instance of Tomcat). Please stop the other service and try again.
   tomcat.fatalconfigerror=FATAL: configuration error
   tomcat.nohome=No tomcat.home property, you need to set TOMCAT_HOME or add 
-Dtomcat.home
  -tomcat.wrongargs=Wrong arguments
  +tomcat.wrongargs=Wrong arguments: type tomcat -help for valid options
   tomcat.stop=Stopping Tomcat.
   tomcat.fatal=FATAL:
   tomcat.connectexception=Could not connect to Tomcat. It's probably already stopped.
  
  
  
  1.44  +11 -1 jakarta-tomcat/src/share/org/apache/tomcat/startup/Tomcat.java
  
  Index: Tomcat.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/Tomcat.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Tomcat.java   2000/09/29 07:01:39 1.43
  +++ Tomcat.java   2000/11/30 07:51:44 1.44
  @@ -86,7 +86,13 @@
   boolean doGenerate=false;
   
   public static void printUsage() {
  - System.out.println(sm.getString("tomcat.usage"));
  + //System.out.println(sm.getString("tomcat.usage"));
  + System.out.println("Usage: java org.apache.tomcat.startup.Tomcat {options}");
  + System.out.println("  Options are:");
  + System.out.println("-config file (or -f file)  Use this fileinstead of 
server.xml");
  + System.out.println("-help (or help)Show this usage report");
  + System.out.println("-home dir (or -h dir)  Use this directory as 
tomcat.home");
  + System.out.println("-stop  Shut down currently running 
Tomcat");
   }
   
   /** Process arguments - set object properties from the list of args.
  @@ -107,10 +113,14 @@
i++;
if( i  args.length )
configFile = args[i];
  + else
  + return false;
} else if (arg.equals("-h") || arg.equals("-home")) {
i++;
if (i  args.length)
System.getProperties().put("tomcat.home", args[i]);
  + else
  + return 

Re: WML Generation from JSP broken!!!!

2000-11-29 Thread Davanum Srinivas

Thanks Craig. I was mixing two things.I got it to work by removing the ?xml 
version="1.0"?
directive for now.

-- dims

--- "Craig R. McClanahan" [EMAIL PROTECTED] wrote:
 
 
 Davanum Srinivas wrote:
 
  Hi all,
  Attached is a JSP Sample file which generates WML. It works with no problems on 
Tomcat3.1, but
  fails miserably with the latest dev nightly snapshot and m4. Can someone shed 
light?
 
 
 Well, your page certainly doesn't work under Tomcat 4.0 (which implements JSP 1.2). 
 Furthermore, it
 *should* not.
 
 Because you are starting this page with an ?xml version="1.0"? directive, the JSP 
compiler
 assumes that
 you have created this page in the XML syntax for JSP pages, as described in the 1.2 
spec
 http://java.sun.com/products/jsp/download.html.  However, this page violates 
several of the
 rules:
 * It does not start with a jsp:root element (this is
   what the parse error is complaining about).
 * It uses % % for a scriptlet, instead of the
   required jsp:scriptlet element.
 
 You will need to rewrite your page conforming to the new syntax rules in order for 
it to work
 correctly
 under 4.0.
 
 
  Thanks in advance,
  dims
 
  PS: Am not currently subscribed to the list. So please CC me at "[EMAIL PROTECTED]"
 
 
 Craig McClanahan
 
 PS:  Why did it work under 3.1?  Because 3.1 didn't support the XML syntax, so it 
just passed
 the ?xml?
 directive through as template text.
 
 
 


=
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/



[ANNOUNCEMENT] Tomcat 3.2 Final Release

2000-11-29 Thread Craig R. McClanahan

The most anticipated release from the Jakarta project yet!  We hereby announce
the availability of the final release of version 3.2 of the Tomcat servlet
container and JSP engine.  Tomcat implements the Servlet 2.2 and JSP 1.1
specifications, and represents the most current release quality build of this
project.

Compared to version 3.1, there have been substantial improvements in
performance, many new features (including support for SSL connections), and well
over one hundred bug fixes.

Pick up the binary distribution of Tomcat 3.2 at:

http://jakarta.apache.org/builds/tomcat/release/v3.2/bin

Craig McClanahan
and the rest of the
Tomcat development team





WML Generation from JSP broken!!!!

2000-11-29 Thread Davanum Srinivas

Hi all,
Attached is a JSP Sample file which generates WML. It works with no problems on 
Tomcat3.1, but
fails miserably with the latest dev nightly snapshot and m4. Can someone shed light? 

Thanks in advance,
dims

PS: Am not currently subscribed to the list. So please CC me at "[EMAIL PROTECTED]"

= Begin Stack Trace =
org.apache.jasper.compiler.ParseException:
D:\jakarta-tomcat-4.0\bin\..\webapps\examples\jsp\datewml.jsp(4,-1) Document root 
element is
missing.
at org.apache.jasper.compiler.ParserXJspSax.parse(ParserXJspSax.java:194)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:213)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:166)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:193)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:464)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:435)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:156)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:168)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:393)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:251)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:177)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:443)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2014)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:807)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:886)
at java.lang.Thread.run(Thread.java:484)
= End Stack Trace =


=
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

?xml version="1.0"?
!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"

%
response.setContentType("text/vnd.wap.wml");
out.println("wml");
out.println("card title=\"MobileDate\"");
out.println(" p align=\"center\"");
out.println("Date and Time Servicebr/");
out.println("Date is: "+ new java.util.Date());
out.println("/p");
out.println("/card");
out.println("/wml");
%



Re: WML Generation from JSP broken!!!!

2000-11-29 Thread Alex Tang

Is there a way to get the compiler to ignore the "?xml version="1.0"?" syntax?

Otherwise this means that serving any page that is XML compliant (WML, XHTML, etc) now 
requires a complete
rewrite of all JSP files to run in 4.0.

Thanks.

...alex...


"Craig R. McClanahan" wrote:

 Davanum Srinivas wrote:

  Hi all,
  Attached is a JSP Sample file which generates WML. It works with no problems on 
Tomcat3.1, but
  fails miserably with the latest dev nightly snapshot and m4. Can someone shed 
light?
 

 Well, your page certainly doesn't work under Tomcat 4.0 (which implements JSP 1.2).  
Furthermore, it
 *should* not.

 Because you are starting this page with an ?xml version="1.0"? directive, the JSP 
compiler assumes that
 you have created this page in the XML syntax for JSP pages, as described in the 1.2 
spec
 http://java.sun.com/products/jsp/download.html.  However, this page violates 
several of the rules:
 * It does not start with a jsp:root element (this is
   what the parse error is complaining about).
 * It uses % % for a scriptlet, instead of the
   required jsp:scriptlet element.

 You will need to rewrite your page conforming to the new syntax rules in order for 
it to work correctly
 under 4.0.

 
  Thanks in advance,
  dims
 
  PS: Am not currently subscribed to the list. So please CC me at "[EMAIL PROTECTED]"
 

 Craig McClanahan

 PS:  Why did it work under 3.1?  Because 3.1 didn't support the XML syntax, so it 
just passed the ?xml?
 directive through as template text.