RE: cvs commit: jakarta-tomcat-4.0/service/java SimpleService.java

2001-06-26 Thread GOMEZ Henri

 Log:
 Force shutdown of SimpleService after 5 seconds (Linux 
doesn't throw an
 IOException when the ServerSocket is closed, but rather 
waits until the
 first connection gets thru - DARN!)

And they call it OS... The dynamic linker/loader is screwed 
badly, sockets
do not generate events when they're closed, threading support is
_ridiculous_... Bah...

I've been told there is some fools which use this 'OS' ;)

Even IBM have Linux port on their mainframe OS390 and now
under AS/400.

But did you try with the IBM SDK for Linux ?






Re: [jtc - jk] jk_version.h

2001-06-26 Thread jean-frederic clere

GOMEZ Henri wrote:
 
 so, forgive me if this is a stupid question, but... how is jk_version.h
 generated on windows?  do i need to install cygwin stuff and run
 buildconf.sh/configure?
 
 Good point Kevin :)
 
 May be just by editing it ;)

Should move the logic of version out from configure and to jk_version.h (Any 
way I was not very happy to have to commit configure.in when the j-t-c version
changes).



Re: cvs commit: jakarta-tomcat-4.0/service/java SimpleService.java

2001-06-26 Thread jean-frederic clere

Pier P. Fumagalli wrote:
 
 [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote:
 
  Log:
  Force shutdown of SimpleService after 5 seconds (Linux doesn't throw an
  IOException when the ServerSocket is closed, but rather waits until the
  first connection gets thru - DARN!)
 
 And they call it OS... The dynamic linker/loader is screwed badly, sockets
 do not generate events when they're closed, threading support is
 _ridiculous_... Bah...

That is not OS problems but JVM problems...

dynamic linker/loader problems? The only things I am not happy with the thread
library behaviour, but a lot of 
system have more ugly dynamic linker/loader.

Threading support uses a strange implementation, it always disturbs me when
using it...

Another point is that the system is OpenSource and WE could try to change the
things we are not happy with. (Or at least propose changes).

I am, of course, a very proud LINUX user!

 
 Pier (now _really_ going to get some sleep)



Configuring Tomcat 3.3 for Cactus use

2001-06-26 Thread Alex Fernández

Hi folks!

I'm trying to make Cactus (the testing project in Commons,
http://jakarta.apache.org/commons/cactus/index.html) play with Tomcat
3.3. I've been looking at the way it works with Tomcat 3.2: it seems to
use
tomcat -config server.xml
passing a new server.xml file. Can I do something similar in Tomcat 3.3?
I cannot find a similar option in the docs; I believe it's ignoring it.

If this is not possible, perhaps I should add a new .xml file to the
/conf directory and make it run with it? Can Tomcat 3.3 use webapps that
are not inside /webapp?

TIA,

y un saludo,

Alex.



JniRequestAdapter

2001-06-26 Thread Thomas Colin de Verdiere

Does the class JNIRequestAdapter is an inner class in
JNIConnectionHandler as in the source of Tomcat 3.2.1
although it is not in lib\webserver.jar

Thank you
Tom




cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c

2001-06-26 Thread jfclere

jfclere 01/06/26 08:01:24

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Arrange the server_name and server_port logic.
  Note the apr_sockaddr_port_get().
  
  Revision  ChangesPath
  1.10  +8 -3  jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- mod_jk.c  2001/06/22 15:19:13 1.9
  +++ mod_jk.c  2001/06/26 15:01:21 1.10
  @@ -59,7 +59,7 @@
* Description: Apache 2 plugin for Jakarta/Tomcat *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
*   Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.9 $   *
  + * Version: $Revision: 1.10 $   *
***/
   
   /*
  @@ -365,6 +365,9 @@
   jk_server_conf_t *conf)
   {
   request_rec *r  = private_data-r;
  +
  +apr_port_t port;
  +
char *ssl_temp  = NULL;
   s-jvm_route= NULL;  /* Used for sticky session routing */
   
  @@ -391,13 +394,15 @@
r-server-port
);
   
  -#ifdef NOTNEEDEDFORNOW
  +#if 1
   /* Wrong:s-server_name  = (char *)ap_get_server_name( r ); */
   s-server_name= (char *)(r-hostname ? r-hostname :
r-server-server_hostname);
   
  +
  +apr_sockaddr_port_get(port,r-connection-local_addr);
  +s-server_port = port;
   
  -s-server_port= htons( r-connection-local_addr.sin_port );
   /* Wrong: s-server_port  = r-server-port; */
   
  
  
  
  



Re: Configuring Tomcat 3.3 for Cactus use

2001-06-26 Thread cmanolache

On Tue, 26 Jun 2001, Alex Fernández wrote:

   tomcat -config server.xml
 passing a new server.xml file. Can I do something similar in Tomcat 3.3?
 I cannot find a similar option in the docs; I believe it's ignoring it.

Of course. Everything that works in 3.2 should also work ( better ) in 3.3
:-) ( or we have a bug to fix )

I'll check that. ( the syntax of server.xml should also be compatible - in
the sense that 3.3 still accepts the 3.2 syntax, even if it defaults to a
simpler one - the one used by ant )
 
 If this is not possible, perhaps I should add a new .xml file to the
 /conf directory and make it run with it? Can Tomcat 3.3 use webapps that
 are not inside /webapp?

Sure. Just create a new conf/apps-myApp.xml ( using the apps-example.xml
as template ), pointing to the dir.

It can also autoload all the apps from a different directory - in
server.xml you can add a new AutoWebApp dir=/mywebapp host=DEFAULT /
You can specify a different virtual host, of course, or set it to 
use the first level of subdirs as virtual host that will be added
automatically and the second for cotnext names in that host.

You'll also need to add an AutoDeploy if you want .war files expanded 
( the current config defaults to the previous behavior, .war files
expanded in the same dir - but you can keep them separated ).

Speaking of that, you can also try the auto-reload feature when changing
the .war file ( which should be re-deployed and the app reloaded ).

Costin




RE: Problem with URLPatternMatcher

2001-06-26 Thread Marc Saegesser

Tomcat 3.2 uses org.apache.tomcat.util.PrefixMapper for mapping URLs into
mapping URL patterns into servlets.  The
org.apache.tomcat.request.AccessInterceptor class handles the security
constraint mappings internally.


 -Original Message-
 From: Creighton Kirkendall [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 25, 2001 4:55 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Problem with URLPatternMatcher


 Well, I was but noticed it had this problem.  I did fix the code,
 however I
 am not sure whether or not I am going to use it.  I do need a URLMatcher.
 If you have any suggestions as to a fast one that would be great.  What is
 tomcat using to do its security path constraint matching now.

 Creighton


 -Original Message-
 From: Marc Saegesser [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 25, 2001 5:47 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Problem with URLPatternMatcher


 Yep, it looks like this code is broken, but it isn't actually
 used anywhere
 within Tomcat.  In fact it has been removed in 3.3.  Are you trying ot use
 this class directly in your code?

  -Original Message-
  From: Creighton Kirkendall [mailto:[EMAIL PROTECTED]]
  Sent: Monday, June 25, 2001 8:57 AM
  To: '[EMAIL PROTECTED]'
  Subject: Problem with URLPatternMatcher
 
 
  I have noticed that there is a problem in URLPatternMatcher.  It
  seems that
  in the match function we do not update the length. This is a
  problem because
  it causes the pattern matcher not to return the longest pattern.
  I noticed
  this some time ago but thought it was fixed in latter releases
  but it turns
  out it is still a problem in 3.2.2.  I have included the source
  with the fix
  in this email.
 
 
   * http://www.apache.org/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
 
  package org.apache.tomcat.util.pattern;
 
  import java.util.Enumeration;
 
  /**
   * A form of pattern matching for URLs in which the object corresponding
   * to the longest matching pattern is returned.
   *
   * @author Harish Prabandham
   */
  public class URLPatternMatcher implements PatternMatcher {
  private ImplicationTable itable = new ImplicationTable();
 
  public URLPatternMatcher() {
  }
 
  public void set(String pattern, Object value) {
  itable.put(new WildcardPattern(pattern), value);
  }
 
  public void remove(String pattern) {
  itable.remove(pattern);
  }
 
  public Object match(String key) {
  // Since we want the longest pattern match, we cannot use the
  // itable.get(key)...
  int len =0;
  Object val = null;
 
  for(Enumeration e = itable.keys(key); e.hasMoreElements(); ){
  Object thiskey = e.nextElement();
  String pattern = thiskey.toString();
  if(pattern.length()  len){
  val = itable.getValue(thiskey);
 
  /*
   *Update 6-25-001
   */
  len=pattern.length();
  }
  }
 
  return val;
  }
 
  public static void main(String[] args) {
  PatternMatcher p = new URLPatternMatcher();
  try {
  p.set(*, default);
  p.set(args[0], works);
  System.out.println(Match:  + p.match(args[1]));
  }catch(Exception e) {
  e.printStackTrace();
  }
  }
  }
 
 
 
  Creighton Kirkendall
  Senior Software Engineer
  Hobsons
  [EMAIL PROTECTED]
 
 
 
  -Original Message-
  From: kevin seguin [mailto:[EMAIL PROTECTED]]
  Sent: Monday, June 25, 2001 9:36 AM
  To: [EMAIL PROTECTED]
  Subject: Re: cvs commit:
  jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33Ajp14Intercepto
  r.java
 
 
  [EMAIL PROTECTED] wrote:
  
   On Sun, 24 Jun 2001, kevin seguin wrote:
  
i've been thinking about this, and, well, isn't this
  BaseRequest you're
talking about kind of what org.apache.coyote.Request is?
 does it make
sense to have two of these kinds of objects hanging around?  is
o.a.c.Request roughly equivalent to core.Request in tomcat 3??
  
   Certainly not for the second part - the core.Request in tomcat3
  has a lot
   of tomcat3-specific code ( Container, ContextManager, calls
 to hooks to
   get special info like encoding, etc ).
  
   The BaseRequest ( or o.a.c.Request ) is focused on the
   basic information associated with a request, as received by
  the protocol
   adapter.
  
   For the first part - that's true, AjpRequest is very similar in
  goal with
   o.a.c.Request ( thanks to the refactoring you did :-).
  
   As I said, I like o.a.coyote, but right now my goal is to see Ajp14
   working, and using the existing (working) AjpRequest is easier. Also,
   coyote has more than the base request - I would let this settle down.
  
 
  i hear that :)  my immediate goal is ajp13 for tomcat 4 :)  i've checked
  in an 

tomcat 3.3 proposals cleanup - next step ?

2001-06-26 Thread GOMEZ Henri

Larry does a cleanup on Tomcat 3.3 project 
and remove many dirs in proposal but 

I removed all the proposal subdir from my
local CVS and got all the proposal subdir 
trees at the next checkout.

All it used not less than 1.5Mb. What about
removing (rm) also the directories in CVS dir to
avoid grabbing 1.5Mb of subdirs :

20  proposals/CVS
20  proposals/build2/CVS
20  proposals/build2/WEB-INF/CVS
20  proposals/build2/WEB-INF/scripts/CVS
56  proposals/build2/WEB-INF/scripts
20  proposals/build2/WEB-INF/src/CVS
44  proposals/build2/WEB-INF/src
136 proposals/build2/WEB-INF
20  proposals/build2/ant/CVS
28  proposals/build2/ant
200 proposals/build2
20  proposals/catalina/CVS
24  proposals/catalina
20  proposals/facade23/CVS
24  proposals/facade23
20  proposals/jasper34/CVS
20  proposals/jasper34/generator/CVS
20  proposals/jasper34/generator/org/CVS
20  proposals/jasper34/generator/org/apache/CVS
20  proposals/jasper34/generator/org/apache/jasper34/CVS
20  proposals/jasper34/generator/org/apache/jasper34/core/CVS
24  proposals/jasper34/generator/org/apache/jasper34/core
20  proposals/jasper34/generator/org/apache/jasper34/generator11/CVS
20
proposals/jasper34/generator/org/apache/jasper34/generator11/generators/CVS
24
proposals/jasper34/generator/org/apache/jasper34/generator11/generators
20
proposals/jasper34/generator/org/apache/jasper34/generator11/phase/CVS
24  proposals/jasper34/generator/org/apache/jasper34/generator11/phase
20
proposals/jasper34/generator/org/apache/jasper34/generator11/util/CVS
24  proposals/jasper34/generator/org/apache/jasper34/generator11/util
96  proposals/jasper34/generator/org/apache/jasper34/generator11
20  proposals/jasper34/generator/org/apache/jasper34/parser11/CVS
24  proposals/jasper34/generator/org/apache/jasper34/parser11
168 proposals/jasper34/generator/org/apache/jasper34
192 proposals/jasper34/generator/org/apache
216 proposals/jasper34/generator/org
240 proposals/jasper34/generator
20  proposals/jasper34/model/CVS
20  proposals/jasper34/model/model-tree/CVS
24  proposals/jasper34/model/model-tree
20  proposals/jasper34/model/org/CVS
20  proposals/jasper34/model/org/apache/CVS
20  proposals/jasper34/model/org/apache/jasper34/CVS
20  proposals/jasper34/model/org/apache/jasper34/doc-files/CVS
24  proposals/jasper34/model/org/apache/jasper34/doc-files
20  proposals/jasper34/model/org/apache/jasper34/resources/CVS
20  proposals/jasper34/model/org/apache/jasper34/resources/doc-files/CVS
24  proposals/jasper34/model/org/apache/jasper34/resources/doc-files
48  proposals/jasper34/model/org/apache/jasper34/resources
20  proposals/jasper34/model/org/apache/jasper34/servlet/CVS
20  proposals/jasper34/model/org/apache/jasper34/servlet/class-use/CVS
24  proposals/jasper34/model/org/apache/jasper34/servlet/class-use
20  proposals/jasper34/model/org/apache/jasper34/servlet/doc-files/CVS
24  proposals/jasper34/model/org/apache/jasper34/servlet/doc-files
72  proposals/jasper34/model/org/apache/jasper34/servlet
20  proposals/jasper34/model/org/apache/jasper34/toolkit/CVS
20  proposals/jasper34/model/org/apache/jasper34/toolkit/class-use/CVS
24  proposals/jasper34/model/org/apache/jasper34/toolkit/class-use
20  proposals/jasper34/model/org/apache/jasper34/toolkit/doc-files/CVS
24  proposals/jasper34/model/org/apache/jasper34/toolkit/doc-files
72  proposals/jasper34/model/org/apache/jasper34/toolkit
20  proposals/jasper34/model/org/apache/jasper34/utils/CVS
20  proposals/jasper34/model/org/apache/jasper34/utils/class-use/CVS
24  proposals/jasper34/model/org/apache/jasper34/utils/class-use
20  proposals/jasper34/model/org/apache/jasper34/utils/doc-files/CVS
24  proposals/jasper34/model/org/apache/jasper34/utils/doc-files
72  proposals/jasper34/model/org/apache/jasper34/utils
312 proposals/jasper34/model/org/apache/jasper34
336 proposals/jasper34/model/org/apache
360 proposals/jasper34/model/org
408 proposals/jasper34/model
20  proposals/jasper34/runtime11/CVS
20  proposals/jasper34/runtime11/org/CVS
20  proposals/jasper34/runtime11/org/apache/CVS
20  proposals/jasper34/runtime11/org/apache/jasper34/CVS
20  proposals/jasper34/runtime11/org/apache/jasper34/runtime11/CVS
20  proposals/jasper34/runtime11/org/apache/jasper34/runtime11/res/CVS
24  proposals/jasper34/runtime11/org/apache/jasper34/runtime11/res
48  proposals/jasper34/runtime11/org/apache/jasper34/runtime11
72  proposals/jasper34/runtime11/org/apache/jasper34
96  proposals/jasper34/runtime11/org/apache
120 proposals/jasper34/runtime11/org
144 proposals/jasper34/runtime11
20  proposals/jasper34/runtime12/CVS
20  proposals/jasper34/runtime12/org/CVS
20  proposals/jasper34/runtime12/org/apache/CVS
20  

RE: Plz help! Tomcat blocks when calling itself - i am desperate!

2001-06-26 Thread Marc Saegesser

Do really need to use SingleThreadedModel for your servlets?  In general its
best avoid this if at all possible.

Section 3.2 of the specification only requires that a servlet container must
guarantee that only one thread is executing through a specific servlet
instance an any time.  Containers *can* create multiple instances to handle
multiple simultaneous requests, but they aren't *required* to do this.  Thus
this can cause portabilty problems across various containers.  I'll take a
look at the SingleThreadedModel code in Tomcat 3.2.2 and see fi anything
jumps out at me.  Your example code will help a lot.  Thanks.


 -Original Message-
 From: Bari, Naeem [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 25, 2001 4:51 PM
 To: 'Marc Saegesser'; [EMAIL PROTECTED]
 Subject: RE: Plz help! Tomcat blocks when calling itself - i am
 desperate!



 Marc,

 Thanks for your response.

 I will put together a little servlet that demonstrates this.
 I did find out the *cause* of the problem. I think this is a
 bug in tomcat...

 The situation is this:
  If you have a servlet that implements the SingleThreadedModel
  AND
  this servlet opens a URL back to a servlet in the same container
  THEN
  tomcat will block/deadlock

 This did not happen with JServ or any other servlet container.

 I commented out the impements sigleThreadedModel line and
 it worked like a charm.

 Hope this helps in determining the problem. I will send the
 servlet to you by tomorrow.

 Thanks,
 naeem

  -Original Message-
  From: Marc Saegesser [mailto:[EMAIL PROTECTED]]
  Sent: Monday, June 25, 2001 4:24 PM
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: RE: Plz help! Tomcat blocks when calling itself - i am
  desperate!
 
 
  Any chance you could send a small sample application that
  demonstrates the
  problem?
 
   -Original Message-
   From: Bari, Naeem [mailto:[EMAIL PROTECTED]]
   Sent: Monday, June 25, 2001 2:23 PM
   To: '[EMAIL PROTECTED]'
   Subject: Plz help! Tomcat blocks when calling itself - i am
  desperate!
  
  
  
   I apologize for posting in the dev group, but postings to the
   user group have not shed any light on my problem, and I getting
   desperate!
  
   Here is my problem:
   --
  
   My environment:
 Solaris 8 (fully patched)
 jdk 1.3.1, with hotspot enabled
 tomcat 3.2.2
 apache 1.3.19
  
   The problem:
 I have a servlet that opens a URL connection to the
 servlet container. So if I call http://blah/blinky,
 where blinky is my servlet, it is possible under some
 situations for this servlet to open a URL such as
 http://blah/lumpy, where lumpy is some other servlet.
  
 This is part of a largish site publishing framework
 I built on top of JServ. Now, things worked great with
 JServ, but I am having a devil of a time getting this
 to work in Tomcat.
  
   Observations:
 When the blinky servlet opens a URL to the same tomcat
 instance, the log entries for mod_jk go as far as making
 the call to marshal stuff before calling tomcat - as seen
 by the mod_jk.log entry:
   [jk_ajp13.c (480)]: ajp13_marshal_into_msgb - Done
 At this point, nothing happens. I *should* be seeing entries
 for the jk_open_socket function, but they never appear.
  
   What I have tried:
 - I have disabled the default 8080 listener, thinking it
   may be interfering.
   No luck
 - I changed the cachesize of the ajp12 and ajp13 workers
   to 8 from the default of 1.
   No luck
 - I added the min_spare_threads parameter to the entries
   for the ajp12 and ajp13 connectors in server.xml
   No luck
 - switched between tomcat 3.2.1 and 3.2.2 *and* 4.0b5
   No luck
 - upgraded apache to 1.3.19
   No luck
 - switched between jdk1.2.2 and jdk1.3.1
   No Luck
 - switched between solaris and win2k
   No luck
 - Torn my hair out from the roots
   No luck
  
   I am at my wits end. Any help will be gratefully accepted.
  
   TIA,
   naeem
 




Re: [jtc - jk] jk_version.h

2001-06-26 Thread Mike Anderson

+1

Since I would have to do something similar in the Makefile.nw for NetWare,
I'd lots rather see the login in jk_version.h.

Mike Anderson

 [EMAIL PROTECTED] 06/26/01 12:59AM 
GOMEZ Henri wrote:
 
 so, forgive me if this is a stupid question, but... how is jk_version.h
 generated on windows?  do i need to install cygwin stuff and run
 buildconf.sh/configure?
 
 Good point Kevin :)
 
 May be just by editing it ;)

Should move the logic of version out from configure and to jk_version.h (Any 
way I was not very happy to have to commit configure.in when the j-t-c version
changes).




Re: [jtc - jk] jk_version.h

2001-06-26 Thread Mike Anderson

That should have been logic instead of login :-)

 [EMAIL PROTECTED] 06/26/01 09:21AM 
+1

Since I would have to do something similar in the Makefile.nw for NetWare,
I'd lots rather see the login in jk_version.h.

Mike Anderson

 [EMAIL PROTECTED] 06/26/01 12:59AM 
GOMEZ Henri wrote:
 
 so, forgive me if this is a stupid question, but... how is jk_version.h
 generated on windows?  do i need to install cygwin stuff and run
 buildconf.sh/configure?
 
 Good point Kevin :)
 
 May be just by editing it ;)

Should move the logic of version out from configure and to jk_version.h (Any 
way I was not very happy to have to commit configure.in when the j-t-c version
changes).





Re: cvs commit: jakarta-tomcat-4.0/service/java SimpleService.java

2001-06-26 Thread Pier P. Fumagalli

GOMEZ Henri at [EMAIL PROTECTED] wrote:

 Log:
 Force shutdown of SimpleService after 5 seconds (Linux
 doesn't throw an
 IOException when the ServerSocket is closed, but rather
 waits until the
 first connection gets thru - DARN!)
 
 And they call it OS... The dynamic linker/loader is screwed
 badly, sockets
 do not generate events when they're closed, threading support is
 _ridiculous_... Bah...
 
 I've been told there is some fools which use this 'OS' ;)

Fools indeed..

 Even IBM have Linux port on their mainframe OS390 and now
 under AS/400.

Yeah, too bad that basically they replaced 50% of the kernel... They use
their own threads, their own memory allocation/optimizations... Their I/O.
Their port is an operating system as close to Linux almost as MacOS/X is
close to FreeBSD... (or that's what I was told by some IBM officials here in
the UK)

 But did you try with the IBM SDK for Linux ?

It's not the SDK, it the ld.so, glibc, and libpthread (or better their
kernel implementations)... The VM (incredibly enough) is the only thing
running correctly...

Pier




Re: Connectors in Nightly builds?

2001-06-26 Thread Jonathan Reichhold

Jakarta-tomcat-connectors appears to be available only through CVS.  The src can't be 
obtained from http://jakarta.apache.org/  I
was wondering about the connectors myself until I went to the CVS repository directly.

Would it not make sense to bundle the j-t-c code into a tar ball for those who can't 
access CVS directly (I know about anoncvs)?  It
seems that without a link there will continue to be questions on where the 
source/binaries are.

Jonathan

- Original Message -
From: kevin seguin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 25, 2001 7:19 PM
Subject: Re: Connectors in Nightly builds?


 
  my Apologies,
 
  I'm referring to the Tomcat 4 nightly builds.
 
  Recent downloads of the source archives for tomcat 4 lacks the connector
  sub-directory and corresponding
  source files.
 
  I'm particularly interested in the mod_webapp stuff but, of course, wouldn't
  mind a version of mod_jk
  that worked with tomcat 4 ;-)
 

 mod_webapp stuff has been moved to jakarta-tomcat-connectors.  there is
 also a working version of ajp13 for tomcat 4 there as well.

  -Thom
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Monday, June 25, 2001 3:17 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Connectors in Nightly builds?
 
  On Mon, 25 Jun 2001, Thom Park wrote:
 
   Hi
  
   Does anyone have an E.T.A. on when the connectors will return to the
  nightly
   builds
   and/or when they will return to being included in the nighty source drops?
 
  Which connectors :-) ?
 
  If you are talking about the native mod_jk/mod_webapp - I didn't know they
  were ever built nightly.
 
  If you are talking about tomcat3.3 - the nightly build is (almost) back,
  probably tonight I'll fix the last problem.
 
  The old connectors are still there, the new connector ( ajp14 and the
  improved mod_jk ) is in j-t-c.
 
  Costin





RE: cvs commit: jakarta-tomcat-4.0/service/java SimpleService.jav a

2001-06-26 Thread GOMEZ Henri

 I've been told there is some fools which use this 'OS' ;)

Fools indeed..

I think many peoples should thanks Linux success. 

Linux, (like Apache) show to many IT directors that 
OpenSource was a VIABLE SOLUTION.

And with distributions like Redhat, Mandrake, Suse
installing Linux Boxes is no more reserved to high end 
Unix gurus. OpenSource meet now a larger audience. 

 Even IBM have Linux port on their mainframe OS390 and now
 under AS/400.

Yeah, too bad that basically they replaced 50% of the 
kernel... They use
their own threads, their own memory 
allocation/optimizations... Their I/O.

I'll take a look soon at Suse 7.1 on my AS/400 and I'll 
could tell  you what is IBM and what is community. 

Their port is an operating system as close to Linux almost 
as MacOS/X is close to FreeBSD... (or that's what I was told by some IBM 
officials here in the UK)

Officials or Technicals ?) That's could be a big difference ...

 But did you try with the IBM SDK for Linux ?

It's not the SDK, it the ld.so, glibc, and libpthread (or better their
kernel implementations)... The VM (incredibly enough) is the only thing
running correctly...

May be you could drop a note to GNU team next time you'll meet them.
As Jon said, it's OpenSource and you could contribute having a better
product or just live with it.

So better stop this thread there before it turns in a flams wars...




Re: Service...

2001-06-26 Thread Pier P. Fumagalli

GOMEZ Henri at [EMAIL PROTECTED] wrote:

 A really usefull feature, for ALL Tomcat release.
 
 I'll take a look at it and see how it could be
 suite in TC 3.2/3.3 :!
 
 What about ?

As always... Do whatever you want... (I stopped caring about what others are
doing with my code long time ago)

Pier




[PATCH] for BUG #2333

2001-06-26 Thread Roloff, Dirk

Hi Developers,

tomcat 3.2.2 - mod_jk - using AJP12 with apache 1.3.20

I found this problem while a servlet use sendRedirect( very long URL ).
The result was a not well formated HTTP-Header sending to the client.
What is the maximum length of URL`s ???

I found something in the jk_ajp12_worker.c:

reason saves the position in line but line is a buffer, that will be
reused by 
jk_sb_gets() - so the reason-pointer that is passed to start_response()
points 
somewhere - nobody knows where. 
My fix just define a static pointer to a buffer in which i copy the
response 
value. This buffer will be rezized as needed - i hope this is a way you
agree.

I added a BUG-Report in the database and here the fix - was it the right
way ?

Thanks and have a nice day 

Dirk


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

--- jk_ajp12_worker.c   Thu Feb  1 23:50:09 2001
+++ jk_ajp12_worker.c.fixed Tue Jun 26 18:15:09 2001
@@ -482,6 +482,8 @@
   jk_ws_service_t *s,
   jk_logger_t *l) 
 {
+static char *reason_buf = NULL;
+static int  reason_buf_len = 0;
 int status  = 200;
 char *reason= NULL;
 char **names= NULL;
@@ -541,7 +543,30 @@
 jk_log(l, JK_LOG_ERROR, ajpv12_handle_response,
invalid status code\n);
 return JK_FALSE;
 }
+/* 26.06.2001 Dirk Roloff [EMAIL PROTECTED]
+   Save reason in a realloced buffer, because jk_sb_gets()
will reuse ist line buffer. 
+   Then the value will be lost - this will produce very
strange output to the client.
+   I found this while a servlet try's to redirect to a very
long URL.
+   The buffer will be rezised as needed but never call a
free() on it - is it ok ?
+*/
+numeric = strtok(NULL,  \t);
+reason = NULL;
+if( numeric ) {
+int resonlen = strlen( numeric ) +1;
+if(( NULL == reason_buf ) || (resonlen 
reason_buf_len)) {
+reason_buf = (char *)realloc( reason_buf, resonlen
);
+reason_buf_len = resonlen;
+}
+if( reason_buf ) {
+memcpy( reason_buf, numeric, resonlen );
+reason = reason_buf;
+}
+else
+jk_log(l, JK_LOG_ERROR, In
jk_worker_t::ajpv12_handle_response, realloc(reason_buf,%d) failed\n,
resonlen);
+}
+/* old stuff  
 reason = strtok(NULL,  \t);
+removed by Dirk Roloff */
 } else {
 if(headers_capacity == headers_len) {
 jk_log(l, JK_LOG_DEBUG, ajpv12_handle_response,
allocating header arrays\n);



Re: Connectors in Nightly builds?

2001-06-26 Thread cmanolache

On Tue, 26 Jun 2001, Jonathan Reichhold wrote:

 Jakarta-tomcat-connectors appears to be available only through CVS.  The src can't 
be obtained from http://jakarta.apache.org/  I
 was wondering about the connectors myself until I went to the CVS repository 
directly.
 
 Would it not make sense to bundle the j-t-c code into a tar ball for those who can't 
access CVS directly (I know about anoncvs)?  It
 seems that without a link there will continue to be questions on where the 
source/binaries are.

http://nagoya.apache.org/~costin/zip

It's updated every 4 hours, with the latest jakarta-tomcat,
jakarta-tomcat-connectors, jakarta-tomcat-jasper sources - tar/zip and 
with binary versions of tomcat33 ( from cvs head ).

Costin




cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http BaseRequest.java

2001-06-26 Thread costin

costin  01/06/26 12:38:13

  Modified:util/java/org/apache/tomcat/util/http BaseRequest.java
  Log:
  Added the jvmRoute ( renamed to tomcatInstanceId ) to the BaseRequest.
  We expect all implementations to be able to participate in load balancing,
  and the instanceId ( that identifies one of the workers in the pool ) is
  common enough ( even if a different scheme is used ).
  
  Revision  ChangesPath
  1.3   +20 -1 
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/BaseRequest.java
  
  Index: BaseRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/BaseRequest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BaseRequest.java  2001/06/25 15:53:27 1.2
  +++ BaseRequest.java  2001/06/26 19:38:12 1.3
  @@ -58,7 +58,7 @@
   /***
* Description: Base http request object.  *
* Author:  Keving Seguin [[EMAIL PROTECTED]]  *
  - * Version: $Revision: 1.2 $   *
  + * Version: $Revision: 1.3 $   *
***/
   
   package org.apache.tomcat.util.http;
  @@ -99,6 +99,8 @@
   MimeHeaders headers = new MimeHeaders();
   Cookies cookies = new Cookies();
   HashMap attributes = new HashMap();
  +
  +MessageBytes tomcatInstanceId = new MessageBytes();
   
   /**
* Recycles this object and readies it further use.
  @@ -121,6 +123,7 @@
   headers.recycle();
   cookies.recycle();
   attributes.clear();
  +tomcatInstanceId.recycle();
   }
   
   /**
  @@ -317,6 +320,21 @@
   }
   
   /**
  + * Get the host id ( or jvmRoute )
  + * @return the jvm route
  + */
  +public MessageBytes instanceId() {
  +return tomcatInstanceId;
  +}
  +
  +// backward compat - jvmRoute is the id of this tomcat instance,
  +// used by a load balancer on the server side to implement sticky
  +// sessions, and on the tomcat side to format the session ids.
  +public MessageBytes jvmRoute() {
  +return tomcatInstanceId;
  +}
  +
  +/**
* ** SLOW ** for debugging only!
*/
   public String toString() {
  @@ -341,6 +359,7 @@
   pw.println(attributes  =  + attributes.toString());
   pw.println(headers =  + headers.toString());
   pw.println(cookies =  + cookies.toString());
  +pw.println(jvmRoute=  + tomcatInstanceId.toString());
   return sw.toString();
   }
   
  
  
  



Class not Found JDBCRealm

2001-06-26 Thread Agustina Buccella

I have Tomcat 3.2.2, Suse 7.1 and JDK1.1.8. I configure my 
/usr/local/tomcat/conf/server.xml with this:

  RequestInterceptor
  className=org.apache.tomcat.request.JDBCRealm
  debug=99
  driverName=org.postgresql.Driver
  connectionURL=jdbc:postgresql://localhost:5432/ingenieria
  connectionName=postgres
  connectionPassword=x
  /

but when I run tomcat I get this error messages:

Using classpath: /usr/local/tomcat/lib/tomcat.jar
Using JAVA_HOME: /usr/lib/jdk1.1.8
Using TOMCAT_HOME: /usr/local/tomcat
cinaweb:/usr/local/tomcat/bin # Tomcat: setAttribute home=/usr/local/tomcat
ERROR reading /usr/local/tomcat//conf/server.xml
At Line 129 /Server/ContextManager/RequestInterceptor/ 
className=org.apache.tomcat.request.JDBCRealm debug=99 
driverName=org.postgresql.Driver 
connectionURL=jdbc:postgresql://localhost:5432/ingenieria 
connectionName=postgres connectionPassword=4490337

Guessed home=/usr/local/tomcat
java.lang.reflect.InvocationTargetException
 at 
org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.java:87)
 at org.apache.tomcat.startup.Main.execute(Main.java:326)
 at org.apache.tomcat.startup.Main.main(Main.java:189)
2001-06-26 01:33:51 - SessionIdGenerator: Opening /dev/urandom
2001-06-26 01:33:53 - ContextManager: FATAL: error de configuración - 
java.lang.ClassNotFoundException: org.apache.tomcat.request.JDBCRealm
 at 
org.apache.tomcat.util.compat.SimpleClassLoader.loadClass(SimpleClassLoader.java:274)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java)
 at org.apache.tomcat.util.xml.ObjectCreate.start(XmlMapper.java:687)

I don´t know where the JDBCRealm is, but in the tomcat.jar not is.


Please help me!!!
Agustina




cvs commit: jakarta-tomcat build.xml

2001-06-26 Thread costin

costin  01/06/26 12:40:11

  Modified:.build.xml
  Log:
  Fixed ( once again - I hope for the last time ) the jaxp file copying.
  Since people have different preferences we'll detect the version instead of
  asking the user - this should work for most common cases ( including
  xerces - but I haven't tested ). ( ant started to fail if a file to be
  copied is not found - which is a good behavior )
  
  Revision  ChangesPath
  1.138 +38 -10jakarta-tomcat/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/build.xml,v
  retrieving revision 1.137
  retrieving revision 1.138
  diff -u -r1.137 -r1.138
  --- build.xml 2001/06/24 21:53:17 1.137
  +++ build.xml 2001/06/26 19:40:08 1.138
  @@ -81,6 +81,12 @@
  file=${jakarta-tomcat-connectors}/
   available property=jakarta-tomcat-jasper-present
  file=${jakarta-tomcat-jasper} /
  +available property=jaxp10-present
  +   file=${jaxp.home}/parser.jar /
  +available property=jaxp11-present
  +   file=${jaxp.home}/crimson.jar /
  +available property=xerces-present
  +   file=${jaxp.home}/xerces.jar /
 /target
   
 target name=msg.jdk12 if=jdk12.present 
  @@ -106,10 +112,40 @@
 target name=init 
depends=detect,msg.jdk12,msg.jsse,msg.jtc,msg.jtj,msg.commons-dbcp 
 /target
   
  +  target name=prepare.jaxp101  depends=detect if=jaxp10-present 
  +echo message=Installing JAXP-1.0/
  +copy tofile=${tomcat.build}/lib/container/jaxp.jar
  +  file=${jaxp.home}/jaxp.jar/
  +copy tofile=${tomcat.build}/lib/container/parser.jar
  +  file=${jaxp.home}/parser.jar/
  +  /target
  +
  +  target name=prepare.jaxp11 depends=detect if=jaxp11-present 
  +echo message=Installing JAXP-1.1/
  +copy tofile=${tomcat.build}/lib/container/jaxp.jar
  +  file=${jaxp.home}/jaxp.jar/
  +copy tofile=${tomcat.build}/lib/container/xalan.jar
  +  file=${jaxp.home}/xalan.jar/
  +copy tofile=${tomcat.build}/lib/container/crimson.jar
  +  file=${jaxp.home}/crimson.jar/
  +  /target
  +
  +  target name=prepare.xerces depends=detect if=xerces-present 
  +echo message=Installing XERCES/
  +copy tofile=${tomcat.build}/lib/container/xerces.jar
  +  file=${jaxp.home}/xerces.jar/
  +copy tofile=${tomcat.build}/lib/container/jaxp.jar
  +  file=${jaxp.home}/jaxp.jar/
  +  /target
  +  
  +  target name=prepare.jaxp 
depends=prepare.jaxp101,prepare.jaxp11,prepare.xerces /
  +
 !--  Copy static files  --
  -  !-- IF YOU CHANGE, sync dist.prepare !!! --
   
  -  target name=prepare depends=init
  +  target name=prepare depends=init,prepare.dirs,prepare.jaxp 
  +   description=Create the directory structure for build and copy binaries /
  +
  +  target name=prepare.dirs depends=init
   mkdir dir=src/doc/ !-- Temp change until dir is not empty --
   mkdir dir=${tomcat.build}/
   mkdir dir=${tomcat.build}/conf/
  @@ -147,14 +183,6 @@
   /copy
   --
   
  -copy tofile=${tomcat.build}/lib/container/jaxp.jar
  -  file=${jaxp.home}/jaxp.jar/
  -copy tofile=${tomcat.build}/lib/container/parser.jar
  -  file=${jaxp.home}/parser.jar/
  -copy tofile=${tomcat.build}/lib/container/jaxp.jar
  -  file=${jaxp.home}/jaxp.jar/
  -copy tofile=${tomcat.build}/lib/container/crimson.jar
  -  file=${jaxp.home}/crimson.jar/
   copy file =src/build/readme/readme.container
 tofile=${tomcat.build}/lib/container/README /
   
  
  
  



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

2001-06-26 Thread costin

costin  01/06/26 12:52:26

  Modified:jk/java/org/apache/ajp Ajp14.java Ajp14Packet.java
   jk/java/org/apache/ajp/tomcat33 Ajp14Interceptor.java
  Log:
  Merged ( copied ) the code from Ajp13 into Ajp14, removed extend Ajp13.
  
  The main reason is that we need to keep Ajp13 stable while we want to
  do some refactoring in Ajp14 - separate the marshaling, add an extension
  mechanism to be used to implement and add new callbacks, drop Ajp14Packet
  and start using the ByteChunk.
  
  In other words the architecture will change from Ajp14 extends Ajp13 into
  a AjpMarshaling ( which will work for both ), and AjpCallback ( with
  original 13 callbacks plus new ajp14 callbacks ), i.e. composition instead of
  inheritance.
  
  Revision  ChangesPath
  1.2   +641 -24   jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp14.java
  
  Index: Ajp14.java
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp14.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Ajp14.java2001/06/24 20:44:49 1.1
  +++ Ajp14.java2001/06/26 19:52:17 1.2
  @@ -67,10 +67,8 @@
   import java.util.Enumeration;
   import java.security.*;
   
  -import org.apache.tomcat.util.http.MimeHeaders;
  -import org.apache.tomcat.util.buf.MessageBytes;
  -import org.apache.tomcat.util.http.HttpMessages;
  -import org.apache.tomcat.util.buf.HexUtils;
  +import org.apache.tomcat.util.http.*;
  +import org.apache.tomcat.util.buf.*;
   
   
   /**
  @@ -92,7 +90,7 @@
* @author Dan Milstein [[EMAIL PROTECTED]]
* @author Keith Wannamaker [[EMAIL PROTECTED]]
*/
  -public class Ajp14 extends Ajp13
  +public class Ajp14
   {
   // Original AJP13 commands
   // Prefix codes for message types from server to container
  @@ -207,12 +205,118 @@
   public static final byte AJP14_CONTEXT_DOWN   = 0x01;
   public static final byte AJP14_CONTEXT_UP = 0x02;
   public static final byte AJP14_CONTEXT_OK = 0x03;
  +
   
  +public static final int MAX_PACKET_SIZE=8192;
  +public static final int H_SIZE=4;  // Size of basic packet header
  +
  +public static final int  MAX_READ_SIZE = MAX_PACKET_SIZE - H_SIZE - 2;
  +public static final int  MAX_SEND_SIZE = MAX_PACKET_SIZE - H_SIZE - 4;
  +
  +// Integer codes for common response header strings
  +public static final int SC_RESP_CONTENT_TYPE= 0xA001;
  +public static final int SC_RESP_CONTENT_LANGUAGE= 0xA002;
  +public static final int SC_RESP_CONTENT_LENGTH  = 0xA003;
  +public static final int SC_RESP_DATE= 0xA004;
  +public static final int SC_RESP_LAST_MODIFIED   = 0xA005;
  +public static final int SC_RESP_LOCATION= 0xA006;
  +public static final int SC_RESP_SET_COOKIE  = 0xA007;
  +public static final int SC_RESP_SET_COOKIE2 = 0xA008;
  +public static final int SC_RESP_SERVLET_ENGINE  = 0xA009;
  +public static final int SC_RESP_STATUS  = 0xA00A;
  +public static final int SC_RESP_WWW_AUTHENTICATE= 0xA00B;
  + 
  +// Integer codes for common (optional) request attribute names
  +public static final byte SC_A_CONTEXT   = 1;  // XXX Unused
  +public static final byte SC_A_SERVLET_PATH  = 2;  // XXX Unused
  +public static final byte SC_A_REMOTE_USER   = 3;
  +public static final byte SC_A_AUTH_TYPE = 4;
  +public static final byte SC_A_QUERY_STRING  = 5;
  +public static final byte SC_A_JVM_ROUTE = 6;
  +public static final byte SC_A_SSL_CERT  = 7;
  +public static final byte SC_A_SSL_CIPHER= 8;
  +public static final byte SC_A_SSL_SESSION   = 9;
  +
  +// Used for attributes which are not in the list above
  +public static final byte SC_A_REQ_ATTRIBUTE = 10; 
  +
  +// Terminates list of attributes
  +public static final byte SC_A_ARE_DONE  = (byte)0xFF;
  +
  +// Translates integer codes to names of HTTP methods
  +public static final String []methodTransArray = {
  +OPTIONS,
  +GET,
  +HEAD,
  +POST,
  +PUT,
  +DELETE,
  +TRACE,
  +PROPFIND,
  +PROPPATCH,
  +MKCOL,
  +COPY,
  +MOVE,
  +LOCK,
  +UNLOCK,
  +ACL
  +};
  +
  +// id's for common request headers
  +public static final int SC_REQ_ACCEPT  = 1;
  +public static final int SC_REQ_ACCEPT_CHARSET  = 2;
  +public static final int SC_REQ_ACCEPT_ENCODING = 3;
  +public static final int SC_REQ_ACCEPT_LANGUAGE = 4;
  +public static final int SC_REQ_AUTHORIZATION   = 5;
  +public static final int SC_REQ_CONNECTION  = 6;
  +public static final int SC_REQ_CONTENT_TYPE= 7;
  

cvs commit: jakarta-tomcat-connectors/jk/native/iis isapi_redirect.reg

2001-06-26 Thread andya

andya   01/06/26 13:04:58

  Added:   jk/native/iis isapi_redirect.reg
  Log:
  Initial release of pre-packaged registry settings.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/jk/native/iis/isapi_redirect.reg
  
  Index: isapi_redirect.reg
  ===
  REGEDIT4
  
  [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi 
Redirector\1.0]
  log_file=C:\\tomcat\\logs\\isapi.log
  log_level=debug
  worker_file=C:\\tomcat\\conf\\workers.properties
  worker_mount_file=C:\\tomcat\\conf\\uriworkermap.properties
  tomcat_start=C:\\tomcat\\bin\\tomcat.bat start
  tomcat_stop=C:\\tomcat\\bin\\tomcat.bat stop
  
  
  



[GUMP] Build Failure - Tomcat 3.x

2001-06-26 Thread Craig McClanahan


This email is autogenerated from the output from:
http://jakarta.apache.org/builds/gump/2001-06-26/jakarta-tomcat.html


Buildfile: build.xml

detect:

msg.jdk12:
 [echo] Detected JDK1.2

msg.jsse:
 [echo] Detected JSSE

msg.jtc:

msg.jtj:

msg.commons-dbcp:

init:

prepare:
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/conf
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/src
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/apps
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/common
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/logs
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/bin
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/doc
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/webapps
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/native
 [copy] Copying 10 files to /home/rubys/jakarta/jakarta-tomcat/build/tomcat/bin
 [copy] Copying 21 files to /home/rubys/jakarta/jakarta-tomcat/build/tomcat/conf
 [copy] Copying 43 files to /home/rubys/jakarta/jakarta-tomcat/build/tomcat/doc
 [copy] Copying 89 files to /home/rubys/jakarta/jakarta-tomcat/build/tomcat/native
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat/build/tomcat
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat/build/tomcat
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container
 [copy] Could not find file /opt/jaxp-1.1/parser.jar to copy.

BUILD FAILED

/home/rubys/jakarta/jakarta-tomcat/build.xml:153: Could not find file 
/opt/jaxp-1.1/parser.jar to copy.

Total time: 6 seconds



cvs commit: jakarta-tomcat-4.0/catalina/docs tomcat-security.html

2001-06-26 Thread glenn

glenn   01/06/26 14:00:31

  Modified:catalina/docs tomcat-security.html
  Log:
  Updated documentation for JndiPermission, merged in docs from separate 
tomcat-security-unix.html
  
  Revision  ChangesPath
  1.2   +245 -7jakarta-tomcat-4.0/catalina/docs/tomcat-security.html
  
  Index: tomcat-security.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/tomcat-security.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tomcat-security.html  2001/02/03 16:41:09 1.1
  +++ tomcat-security.html  2001/06/26 21:00:30 1.2
  @@ -1,9 +1,9 @@
   !doctype html public -//w3c//dtd html 4.0 transitional//en
   html
   head
  -   titleUsing the Java SecurityManager with Tomcat/title
  meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
  meta name=GENERATOR content=Mozilla/4.7 [en] (X11; I; SunOS 5.7 i86pc) 
[Netscape]
  +   titleUsing the Java SecurityManager with Tomcat/title
   /head
   body text=#00 bgcolor=#FF link=#FF vlink=#FF 
alink=#88
   
  @@ -23,8 +23,18 @@
   li
   a href=#permissionsTypes of Permissions/a/li
   
  +li
  +a href=#customTomcat Custom Permissions/a/li
  +
  +li
  +a href=#configConfiguring Tomcat for use with a SecurityManager/a/li
  +
  +li
  +a href=#startStarting Tomcat with a SecurityManager/a/li
  +
   li
  -a href=tomcat-security-unix.htmlTomcat SecurityManager setup with Unix/a/li
  +a href=#troubleTrouble shooting catalina.policy configuration and Security
  +Violations/a/li
   
   li
   a href=#violationWhat happens when the SecurityManager detects a Security
  @@ -57,9 +67,9 @@
   h3
   a NAME=precautions/aPrecautions/h3
   Implementation of a SecurityManager in Tomcat has not been fully tested
  -or had a security audit.  Make sure that you are satisfied with
  -your SecurityManager configuration before allowing untrusted users to publish
  -web applications, JSP's, servlets, beans, or tag libraries.
  +or had a security audit. Make sure that you are satisfied with your SecurityManager
  +configuration before allowing untrusted users to publish web applications,
  +JSP's, servlets, beans, or tag libraries.
   pStill, running with a SecurityManager is definitely better than running
   without one.
   brnbsp;
  @@ -70,8 +80,8 @@
   of the JDK and you can even create your own Permission class for use in
   your own web applications.
   pThis is just a short summary of the System SecurityManager Permission
  -classes applicable to Tomcat.nbsp; Please refer to the JDK documentation
  -for more information on using the below Permissions.
  +classes applicable to Tomcat.nbsp; Please refer to a 
href=http://java.sun.com/security/;http://java.sun.com/security//a
  +for more information on using the Java SecurityManager and the below Permissions.
   pbjava.util.PropertyPermission/b
   brnbsp;nbsp;nbsp; Controls read/write access to JVM properties such
   as java.home.
  @@ -93,6 +103,234 @@
   brnbsp;nbsp;nbsp; Allows access to all permissions, just as if you
   were running Tomcat without a SecurityManager.
   brnbsp;
  +h2
  +a NAME=custom/aTomcat Custom Permissions/h2
  +Tomcat provides a custom permission class called 
borg.apache.naming.JndiPermission/b,
  +this permission controls read access to JNDI named file based resources.nbsp;
  +The permission name is the JNDI name and there are no actions.nbsp; A
  +trailing '*' can be used to do wild card pattern matching for a JNDI named
  +file resource when granting permission.
  +pExample:
  +pnbsp; ttpermission org.apache.naming.JndiPermission 
jndi://localhost/examples/*;/tt
  +brtt/ttnbsp;
  +h3
  +a NAME=config/aConfiguring Tomcat for use with a SecurityManager/h3
  +bcatalina.policy/b
  +pThe security policies implemented by the Java SecurityManager are configured
  +in the ttcatalina.policy/tt file located in the tomcat ttconf/tt
  +directory.nbsp; The ttcatalina.policy/tt file replaces any system
  +ttjava.policy/tt
  +file.nbsp; The
  +ttcatalina.policy/tt file can be edited by hand or
  +you can use the a 
href=http://java.sun.com/products/jdk/1.2/docs/tooldocs/solaris/policytool.html;policytool/aapplication
  +that comes with Java 1.2.
  +pEntries in the ttcatalina.policy/tt file use the standard 
ttjava.policy/tt
  +file format as follows:
  +table BORDER=0 CELLPADDING=8 WIDTH=95% BGCOLOR=#EE 
  +tr
  +td
  +pre// Example policy file entry
  +
  +grant [signedBy lt;signer [,codeBase lt;code source] {
  +nbsp;nbsp;nbsp; permission lt;class [lt;name [, lt;action list]];
  +};/pre
  +/td
  +/tr
  +/table
  +The bsignedBy/b and bcodeBase /bentries are optional when granting
  +permissions. Comment lines begin with tt///tt and end at a new line.
  +pThe codeBase is in the form of a URL and for a file URL can use the
  +${java.home} and ${catalina.home} properties which are expanded out to
  +the directory paths defined for them.
  

cvs commit: jakarta-tomcat-4.0/catalina/docs tomcat-security-unix.html

2001-06-26 Thread glenn

glenn   01/06/26 14:01:10

  Removed: catalina/docs tomcat-security-unix.html
  Log:
  Merged into tomcat-security.html



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

2001-06-26 Thread glenn

glenn   01/06/26 14:02:20

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Fixed SecurityException when a JSP page is the first request
  
  Revision  ChangesPath
  1.7   +28 -28
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WebappClassLoader.java2001/06/24 01:16:06 1.6
  +++ WebappClassLoader.java2001/06/26 21:02:18 1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.6 2001/06/24 01:16:06 remm Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/06/24 01:16:06 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.7 2001/06/26 21:02:18 glenn Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/06/26 21:02:18 $
*
* 
*
  @@ -77,13 +77,12 @@
   import java.net.URLStreamHandlerFactory;
   import java.net.URLStreamHandler;
   import java.security.AccessControlException;
  -import java.security.PrivilegedAction;
   import java.security.AccessController;
  -import java.security.AccessControlContext;
   import java.security.CodeSource;
   import java.security.Permission;
   import java.security.PermissionCollection;
   import java.security.Policy;
  +import java.security.PrivilegedAction;
   import java.security.cert.Certificate;
   import java.util.ArrayList;
   import java.util.Enumeration;
  @@ -124,12 +123,29 @@
*
* @author Remy Maucherat
* @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2001/06/24 01:16:06 $
  + * @version $Revision: 1.7 $ $Date: 2001/06/26 21:02:18 $
*/
   public class WebappClassLoader
   extends URLClassLoader
   implements Reloader, Lifecycle {
   
  +protected class PrivilegedFindResource
  +implements PrivilegedAction {
  +
  +private String name;
  +private String path;
  +
  +PrivilegedFindResource(String name, String path) {
  +this.name = name;
  +this.path = path;
  +}   
  +
  +public Object run() {
  +return findResourceInternal(name, path);
  +}   
  +
  +}
  +
   
   // --- Constructors
   
  @@ -145,7 +161,6 @@
this.parent = getParent();
system = getSystemClassLoader();
securityManager = System.getSecurityManager();
  -accessController = AccessController.getContext();
   
   }
   
  @@ -161,7 +176,6 @@
this.parent = getParent();
system = getSystemClassLoader();
securityManager = System.getSecurityManager();
  -accessController = AccessController.getContext();
   
   }
   
  @@ -319,12 +333,6 @@
   
   
   /**
  - * Access controller.
  - */
  -private AccessControlContext accessController;
  -
  -
  -/**
* Has this component been started?
*/
   protected boolean started = false;
  @@ -850,12 +858,9 @@
   ResourceEntry entry = (ResourceEntry) resourceEntries.get(name);
   if (entry == null) {
   if (securityManager != null) {
  -entry = (ResourceEntry) AccessController.doPrivileged
  -(new PrivilegedAction() {
  -public Object run() {
  -return findResourceInternal(name, name);
  -}
  -}, accessController);
  +PrivilegedAction dp =
  +new PrivilegedFindResource(name, name);
  +entry = (ResourceEntry)AccessController.doPrivileged(dp);
   } else {
   entry = findResourceInternal(name, name);
   }
  @@ -1369,14 +1374,9 @@
   ResourceEntry entry = null;
   
   if (securityManager != null) {
  -final String fName = name;
  -final String fClassPath = classPath;
  -entry = (ResourceEntry) AccessController.doPrivileged
  -(new PrivilegedAction() {
  -public Object run() {
  -return findResourceInternal(fName, fClassPath);
  -}
  -}, accessController);
  +PrivilegedAction dp =
  +new PrivilegedFindResource(name, classPath);
  +entry = (ResourceEntry)AccessController.doPrivileged(dp);
   } 

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Bootstrap.java

2001-06-26 Thread glenn

glenn   01/06/26 14:02:32

  Modified:catalina/src/share/org/apache/catalina/startup
Bootstrap.java
  Log:
  Fixed SecurityException when a JSP page is the first request
  
  Revision  ChangesPath
  1.19  +7 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java
  
  Index: Bootstrap.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Bootstrap.java2001/05/12 03:04:10 1.18
  +++ Bootstrap.java2001/06/26 21:02:31 1.19
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
 1.18 2001/05/12 03:04:10 craigmcc Exp $
  - * $Revision: 1.18 $
  - * $Date: 2001/05/12 03:04:10 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
 1.19 2001/06/26 21:02:31 glenn Exp $
  + * $Revision: 1.19 $
  + * $Date: 2001/06/26 21:02:31 $
*
* 
*
  @@ -85,7 +85,7 @@
* class path and therefore not visible to application level classes.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.18 $ $Date: 2001/05/12 03:04:10 $
  + * @version $Revision: 1.19 $ $Date: 2001/06/26 21:02:31 $
*/
   
   public final class Bootstrap {
  @@ -155,6 +155,9 @@
   catalinaLoader.loadClass
   (basePackage +
core.ApplicationDispatcher$PrivilegedInclude);
  +catalinaLoader.loadClass
  +(basePackage +
  + loader.WebappClassLoader$PrivilegedFindResource);
   catalinaLoader.loadClass
   (basePackage + session.StandardSession);
   catalinaLoader.loadClass
  
  
  



another problem with postgresql

2001-06-26 Thread Agustina Buccella

I have tomcat3.3-m3, jdk1.1.8 and postgres 7.1.1

When I run  tomcat I get this error message:


#./startup.sh

Using classpath: /usr/local/tomcat/lib/tomcat.jar:/usr/lib/jdk1.1.8/bin
Using JAVA_HOME: /usr/lib/jdk1.1.8
Using TOMCAT_HOME: /usr/local/tomcat
cinaweb:/usr/local/tomcat/bin # Tomcat: setAttribute home=/usr/local/tomcat
Guessed home=/usr/local/tomcat
java.lang.reflect.InvocationTargetException
 at 
org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.java:87)
 at org.apache.tomcat.startup.Main.execute(Main.java:326)
 at org.apache.tomcat.startup.Main.main(Main.java:189)
2001-06-26 04:05:03 - SessionIdGenerator: Opening /dev/urandom


Can somebody help me?

Agustina




Please HELP (Tomcat + IIS Null Pointer exception)

2001-06-26 Thread riaz mohamed

hi
i configured IIS exactly the way as said in the Howto
doc that comes with the jakarta docs. This was on IIS
5.0 on Win2000 . I am able to access the jsp pages ..
Now i have got an application which uses tomcat. When
the application is installed and the tomcat run (ie
before i run the tomcat i set the classpath to all the
jars in my appliaction ) i get the following error

2001-06-26 07:49:56 - PoolTcpConnector: Starting
HttpConnectionHandler on 8080
2001-06-26 07:49:56 - PoolTcpConnector: Starting
Ajp12ConnectionHandler on 8007
2001-06-26 07:49:56 - ThreadPool: Caught exception
executing org.apache.tomcat.s
ervice.TcpWorkerThread@3b188c41, terminating thread -
java.lang.NullPointerExcep
tion
at
java.lang.String.lastIndexOf(String.java(Compiled
Code))
at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:373)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:257)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.init(Ajp12
ConnectionHandler.java:92)
at
org.apache.tomcat.service.TcpWorkerThread.getInitData(PoolTcpEndpoint
.java:369)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
:493)
at java.lang.Thread.run(Thread.java:498)


When i try shutting down tomcat on clicking on
shutdown.bat in the bin dir the tomcat doesn't seem to
shutdown
could any1 plz tell me y this occurs and how i could
get over it

Thanx a load

regards
riaz



__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: Connectors in Nightly builds?

2001-06-26 Thread Thom Park

Hello Pier,

thanks for the reponse - I'm impressed by the large set of platforms that
you can build on.
The best I can do is Win 2000, Linux 6 and Solaris ;-)

I'd just be happy to see the sources back in the tomcat nightly downloads.

I find that pulling the individual files out of CVS not the best way to go
for me (I use a snapshot approach).

I'm fascinated by the mod_webapp provider model - it's extremely flexible,
and, yes, I'm experimenting with an
alternative provider to warp. (Not there's anything wrong with warp - I just
have some additional needs that
warp (and mod_jk) don't cater for).

If you need any help with the native-code side of things that then please
let me know!

-Thom


-Original Message-
From: Pier P. Fumagalli [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 7:19 PM
To: [EMAIL PROTECTED]
Subject: Re: Connectors in Nightly builds?


Thom Park at [EMAIL PROTECTED] wrote:

 my Apologies,

 I'm referring to the Tomcat 4 nightly builds.

 Recent downloads of the source archives for tomcat 4 lacks the connector
 sub-directory and corresponding source files.

 I'm particularly interested in the mod_webapp stuff but, of course,
wouldn't
 mind a version of mod_jk that worked with tomcat 4 ;-)

Regarding mod_webapp, now that the service invocation stuff is more or less
in good state (and I have to switch my mind away from it), I'm going to fix
a reasonable amount of bugs I received in the last few weeks.

The plan is to have watchdog and tomcat tests running all just fine before
Craig gets back from vacation (at least that's what I promised him :)

Regarding nightly builds, it's hard, as it's all native code. I have a few
boxes over here that one day will become a tinderbox-like environment
(that's all betaversion.org is) but I don't envision a full build of
WebApp on all platforms done automatically before the end of the summer (if
_ever_).

One thing I can produce right now are binaries for Linux RH71 on i386,
MacOS/X on PPC, HPUX 10.20 on PA-RISC and Solaris 8 on both i386 and Sparc,
but apart from that, I can't do that much...

Pier





DirContextURLStreamHandlerFactory

2001-06-26 Thread PETERSEN,PETER (HP-NewJersey,ex2)

Hey Folks,

this is a follow-up question to a post made by Kavi on 6/25 regarding
running Tomcat on HP's Core Services Framework.

We encountered a problem with a dual URLStreamHandlerFactory - Catalina
installs its own, in order to provide the jndi: URL for e.g. reading
WEB-INF/web.xml - alas Core Services Framework has also installed its own
factory, in order provide similar capabilities.  We have tried eliminating
our own, in which case everything works as expected; if we extend the
DirContextURLStreamHandler and place it in a package we understand, we can
actually instantiate the DirContextURLStreamHandler (extension) and startup
etc. seems to be fine, except that the installation of the context- and
session listeners fail...  my guess is that because Catalina fails to
install its factory (because we've already installed our own) it doesn't
complete the initialization of the DirContext stuff.  Is there a way to
provide this service for Catalina or is it a requirement that it gets to
install its own factory ?  We realize that only one factory can be installed
and since - in this scenario - we are the host or services provider it
would be natural for us to provide this; we also realize that Catalina
probably wasn't written with this in mind, but we'd be interested in finding
out whether or not this is doable.

(We're currently working with Tomcat 4.0 beta 5).

Thanks a bundle,

/Peter  Kavi



Re: Connectors in Nightly builds?

2001-06-26 Thread Pier P. Fumagalli

Thom Park at [EMAIL PROTECTED] wrote:

 Hello Pier,
 
 thanks for the reponse - I'm impressed by the large set of platforms that
 you can build on. The best I can do is Win 2000, Linux 6 and Solaris ;-)

Doesn't come for free... It took me months to set the infrastructure, and as
I said several times, it was built for Apache. Currently it's used by the
APR guys, but anyone is welcome to use it...

 I'd just be happy to see the sources back in the tomcat nightly downloads.
 
 I find that pulling the individual files out of CVS not the best way to go
 for me (I use a snapshot approach).

That can be done easily, if all you need are sources, I can have a script to
pull them out of CVS and put them on line...

 I'm fascinated by the mod_webapp provider model - it's extremely flexible,
 and, yes, I'm experimenting with an alternative provider to warp. (Not
 there's anything wrong with warp - I just have some additional needs that
 warp (and mod_jk) don't cater for).

Whoha. Some non-Italian who actually _looked_ at it. I'm flattened. Now a
question comes right back... What are the needs that WARP doesn't address?

 If you need any help with the native-code side of things that then please
 let me know!

F**K YEAH! :) First of all I'd need someone to check why when mod_webapp is
loaded, mod_cgi stops working on Solaris 8... (Right now I'm doing some
updates to the protocol - and that's why I want to know what your additional
needs are)

Pier




Re: DirContextURLStreamHandlerFactory

2001-06-26 Thread Remy Maucherat

 Hey Folks,

 this is a follow-up question to a post made by Kavi on 6/25 regarding
 running Tomcat on HP's Core Services Framework.

 We encountered a problem with a dual URLStreamHandlerFactory - Catalina
 installs its own, in order to provide the jndi: URL for e.g. reading
 WEB-INF/web.xml - alas Core Services Framework has also installed its own
 factory, in order provide similar capabilities.  We have tried eliminating
 our own, in which case everything works as expected; if we extend the
 DirContextURLStreamHandler and place it in a package we understand, we can
 actually instantiate the DirContextURLStreamHandler (extension) and
startup
 etc. seems to be fine, except that the installation of the context- and
 session listeners fail...  my guess is that because Catalina fails to
 install its factory (because we've already installed our own) it doesn't
 complete the initialization of the DirContext stuff.

No, the failure is silently caught and ignored. The CL is then failing
because it is using URLs based on that protocol.

 Is there a way to
 provide this service for Catalina or is it a requirement that it gets to
 install its own factory ?

In the newest builds, it's not a requirement anymore, but some URL
manipultation oprations will fail if it's not properly set. Something like :

new URL(jar: + servletContext.getResource(/foo.jar).toString() + !/)

If the factory you set returns a handler for protocol jndi, it should
work, like the stream handler factory does :

/**
 * Creates a new URLStreamHandler instance with the specified protocol.
 * Will return null if the protocol is not codejndi/code.
 *
 * @param protocol the protocol (must be jndi here)
 * @return a URLStreamHandler for the jndi protocol, or null if the
 * protocol is not JNDI
 */
public URLStreamHandler createURLStreamHandler(String protocol) {
if (protocol.equals(jndi)) {
return new DirContextURLStreamHandler();
} else {
return null;
}
}

 We realize that only one factory can be installed
 and since - in this scenario - we are the host or services provider it
 would be natural for us to provide this; we also realize that Catalina
 probably wasn't written with this in mind, but we'd be interested in
finding
 out whether or not this is doable.

 (We're currently working with Tomcat 4.0 beta 5).

You should upgrade to one of the latest builds, and work from there. The CL
was improved a lot, and should now be much more robust (and it doesn't rely
on URLs anymore).

I added a protocol Hanlder for the custom protocol Catalina is using. You
can now also try to set it using the java.protocol.handler.pkgs system
property, and add the org.apache.naming.resources package to it. I didn't
try using that yet, so I can't gurantee it would work.

Remy