cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/buf DateTool.java

2001-08-24 Thread hgomez

hgomez  01/08/24 01:02:35

  Modified:src/share/org/apache/tomcat/modules/server
Http10Interceptor.java
   src/share/org/apache/tomcat/util/buf DateTool.java
  Log:
  Fix Bug #345 concerning missing DataHeaders in http connector
  
  Revision  ChangesPath
  1.20  +8 -0  
jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Http10Interceptor.java
  
  Index: Http10Interceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Http10Interceptor.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Http10Interceptor.java2001/07/28 03:09:55 1.19
  +++ Http10Interceptor.java2001/08/24 08:02:35 1.20
  @@ -343,6 +343,14 @@
return;
   
http.sendStatus( status, HttpMessages.getMessage( status ));
  +
  +// Check if a Date is to be added
  +MessageBytes dateH=getMimeHeaders().getValue(Date);
  +if( dateH == null ) {
  +// no date header set by user
  +getMimeHeaders().setValue(  Date ).setTime( System.currentTimeMillis());
  +}
  +
http.sendHeaders( getMimeHeaders() );
   }
   
  
  
  
  1.6   +9 -1  
jakarta-tomcat/src/share/org/apache/tomcat/util/buf/DateTool.java
  
  Index: DateTool.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/buf/DateTool.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DateTool.java 2001/07/19 05:49:02 1.5
  +++ DateTool.java 2001/08/24 08:02:35 1.6
  @@ -127,6 +127,9 @@
asctimeFormat.setTimeZone(GMT_ZONE);
   }

  +private static String rfc1123DS;
  +private static long   rfc1123Sec;
  +
   private static StringManager sm =
   StringManager.getManager(org.apache.tomcat.util.buf.res);
   
  @@ -139,7 +142,12 @@
   /** 
*/
   public static String format1123( Date d ) {
  - return rfc1123Format.format( d );
  +long dt = d.getTime() % 1000;
  +if ((rfc1123DS != null)  (dt == rfc1123Sec))
  +return rfc1123DS;
  +rfc1123DS  = rfc1123Format.format( d );
  +rfc1123Sec = dt;
  +return rfc1123DS;
   } 
   
   
  
  
  



Thread pool support

2001-08-24 Thread Bojan Smojver

I've been trying to find in the source if something like this is
supported:

Ajp13Connector max_threads=50
max_spare_threads=10
min_spare_thread=5
port=8009
address=127.0.0.1/

in Tomcat 3.3, rather then Parameter name=... syntax mentioned in the
user's guide, but couldn't find where it is. Following syntax from
server.xml and applying analogously the user's guide example, this
should be OK, but I couldn't verify in the source.

Can someone point me to the right file?

Bojan

PS. grep -rl 'max.*threads' * in Tomcat source doesn't produce anything
useful.



RE: Thread pool support

2001-08-24 Thread Larry Isaacs

Hi Bojan,

The user's guide still has a lot of content that is out of date.
You cite one of the sections that I haven't updated yet.

The reading of server.xml is controlled by ServerXmlReader.java
found in tomcat/modules/config.  See the setBackward() method
at the end of the file for how the old syntax is supported.
The syntax you request is now the standard.

If a module (a.k.a interceptor) has a setter, you can specify
the corresponding property in server.xml.  Since PoolTcpConnector
(which Ajp13Interceptor extends) contains setMaxThreads(),
setMaxSpareThreads(), setMinSpareThreads(), etc. the syntax
would be:

Ajp13Connector maxThreads=50
maxSpareThreads=10
minSpareThreads=5
port=8009
address=127.0.0.1/

I believe it is the following lines in ServerXmlReader.addTagRule()
that makes this possible:

xh.addRule( tag ,
xh.setProperties());

Hope this helps,

Larry

 -Original Message-
 From: Bojan Smojver [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 24, 2001 5:31 AM
 To: Tomcat Dev List
 Subject: Thread pool support
 
 
 I've been trying to find in the source if something like this is
 supported:
 
 Ajp13Connector max_threads=50
 max_spare_threads=10
 min_spare_thread=5
 port=8009
 address=127.0.0.1/
 
 in Tomcat 3.3, rather then Parameter name=... syntax mentioned in the
 user's guide, but couldn't find where it is. Following syntax from
 server.xml and applying analogously the user's guide example, this
 should be OK, but I couldn't verify in the source.
 
 Can someone point me to the right file?
 
 Bojan
 
 PS. grep -rl 'max.*threads' * in Tomcat source doesn't 
 produce anything
 useful.
 



Re: Thread pool support

2001-08-24 Thread Bojan Smojver

Larry Isaacs wrote:
 
 Hi Bojan,
 
 The user's guide still has a lot of content that is out of date.
 You cite one of the sections that I haven't updated yet.
 
 The reading of server.xml is controlled by ServerXmlReader.java
 found in tomcat/modules/config.  See the setBackward() method
 at the end of the file for how the old syntax is supported.
 The syntax you request is now the standard.
 
 If a module (a.k.a interceptor) has a setter, you can specify
 the corresponding property in server.xml.  Since PoolTcpConnector
 (which Ajp13Interceptor extends) contains setMaxThreads(),
 setMaxSpareThreads(), setMinSpareThreads(), etc. the syntax
 would be:
 
 Ajp13Connector maxThreads=50
 maxSpareThreads=10
 minSpareThreads=5
 port=8009
 address=127.0.0.1/
 
 I believe it is the following lines in ServerXmlReader.addTagRule()
 that makes this possible:
 
 xh.addRule( tag ,
 xh.setProperties());
 
 Hope this helps,

Yep, it does. Thanks.

Patch for the UG is attached.

Bojan

--- /home/groups/devel/jakarta/jakarta-tomcat/src/doc/tomcat-ug.htmlSat Aug 18 
11:25:01 2001
+++ tomcat-ug.html  Fri Aug 24 23:13:26 2001
@@ -1313,24 +1313,14 @@
 td bgcolor=#c0c0c0
 pre
 lt;!-- (1) HTTP Connector for stand-alone operation --gt;
-lt;Connector 
className=quot;org.apache.tomcat.service.SimpleTcpConnectorquot;gt;
-lt;Parameter
-name=quot;handlerquot;
-
value=quot;org.apache.tomcat.service.http.HttpConnectionHandlerquot;/gt;
-lt;Parameter
-name=quot;portquot;
-value=quot;8080quot;/gt;
-lt;/Connectorgt;
+lt;Http10Connector port=quot;8080quot;
+ address=quot;127.0.0.1quot;
+/gt;
 
 lt;!-- (2) AJPV12 Connector for out-of-process operation --gt;
-lt;Connector 
className=quot;org.apache.tomcat.service.SimpleTcpConnectorquot;gt;
-lt;Parameter
-name=quot;handlerquot;
-
value=quot;org.apache.tomcat.service.connector.Ajp12ConnectionHandlerquot;/gt;
-lt;Parameter
-name=quot;portquot;
-value=quot;8007quot;/gt;
-lt;/Connectorgt;
+lt;Ajp12Connector port=quot;8007quot;
+address=quot;127.0.0.1quot;
+/gt;
 /pre
 /td
   /tr
@@ -1417,14 +1407,9 @@
 td bgcolor=#c0c0c0
 
 prelt;!-- A pooled AJPV12 Connector for out-of-process operation --gt;
-lt;Connector 
className=quot;org.apache.tomcat.service.PoolTcpConnectorquot;gt;
-lt;Parameter
-name=quot;handlerquot;
-
value=quot;org.apache.tomcat.service.connector.Ajp12ConnectionHandlerquot;/gt;
-lt;Parameter
-name=quot;portquot;
-value=quot;8007quot;/gt;
-lt;/Connectorgt;
+lt;Ajp12Connector port=quot;8007quot;
+address=quot;127.0.0.1quot;
+/gt;
 /pre
 /td
   /tr
@@ -1454,23 +1439,13 @@
 td bgcolor=#c0c0c0
 pre
 lt;!-- A pooled AJPV12 Connector for out-of-process operation --gt;
-lt;Connector 
className=quot;org.apache.tomcat.service.PoolTcpConnectorquot;gt;
-lt;Parameter
-name=quot;handlerquot;
-
value=quot;org.apache.tomcat.service.connector.Ajp12ConnectionHandlerquot;/gt;
-lt;Parameter
-name=quot;portquot;
-value=quot;8007quot;/gt;
-lt;Parameter
-name=quot;max_threadsquot;
-value=quot;30quot;/gt;
-lt;Parameter
-name=quot;max_spare_threadsquot;
-value=quot;20quot;/gt;
-lt;Parameter
-name=quot;min_spare_threadsquot;
-value=quot;5quot; /gt;
-lt;/Connectorgt;
+lt;Ajp12Connector tomcatAuthentication=quot;falsequot;
+port=quot;8007quot;
+address=quot;127.0.0.1quot;
+maxThreads=quot;30quot;
+maxSpareThreads=quot;20quot;
+minSpareThreads=quot;5quot;
+/gt;
 /pre
 /td
   /tr



Re: Thread pool support

2001-08-24 Thread Bojan Smojver

Larry Isaacs wrote:

 Hope this helps,
 
 Larry

OOPS. Trigger happy! Take 2 :-)

Bojan

--- /home/groups/devel/jakarta/jakarta-tomcat/src/doc/tomcat-ug.htmlSat Aug 18 
11:25:01 2001
+++ tomcat-ug.html  Fri Aug 24 23:19:05 2001
@@ -1313,24 +1313,14 @@
 td bgcolor=#c0c0c0
 pre
 lt;!-- (1) HTTP Connector for stand-alone operation --gt;
-lt;Connector 
className=quot;org.apache.tomcat.service.SimpleTcpConnectorquot;gt;
-lt;Parameter
-name=quot;handlerquot;
-
value=quot;org.apache.tomcat.service.http.HttpConnectionHandlerquot;/gt;
-lt;Parameter
-name=quot;portquot;
-value=quot;8080quot;/gt;
-lt;/Connectorgt;
+lt;Http10Connector port=quot;8080quot;
+ address=quot;127.0.0.1quot;
+/gt;
 
 lt;!-- (2) AJPV12 Connector for out-of-process operation --gt;
-lt;Connector 
className=quot;org.apache.tomcat.service.SimpleTcpConnectorquot;gt;
-lt;Parameter
-name=quot;handlerquot;
-
value=quot;org.apache.tomcat.service.connector.Ajp12ConnectionHandlerquot;/gt;
-lt;Parameter
-name=quot;portquot;
-value=quot;8007quot;/gt;
-lt;/Connectorgt;
+lt;Ajp12Connector port=quot;8007quot;
+address=quot;127.0.0.1quot;
+/gt;
 /pre
 /td
   /tr
@@ -1416,15 +1406,11 @@
   tr
 td bgcolor=#c0c0c0
 
-prelt;!-- A pooled AJPV12 Connector for out-of-process operation --gt;
-lt;Connector 
className=quot;org.apache.tomcat.service.PoolTcpConnectorquot;gt;
-lt;Parameter
-name=quot;handlerquot;
-
value=quot;org.apache.tomcat.service.connector.Ajp12ConnectionHandlerquot;/gt;
-lt;Parameter
-name=quot;portquot;
-value=quot;8007quot;/gt;
-lt;/Connectorgt;
+pre
+lt;!-- A pooled AJPV12 Connector for out-of-process operation --gt;
+lt;Ajp12Connector port=quot;8007quot;
+address=quot;127.0.0.1quot;
+/gt;
 /pre
 /td
   /tr
@@ -1454,23 +1440,13 @@
 td bgcolor=#c0c0c0
 pre
 lt;!-- A pooled AJPV12 Connector for out-of-process operation --gt;
-lt;Connector 
className=quot;org.apache.tomcat.service.PoolTcpConnectorquot;gt;
-lt;Parameter
-name=quot;handlerquot;
-
value=quot;org.apache.tomcat.service.connector.Ajp12ConnectionHandlerquot;/gt;
-lt;Parameter
-name=quot;portquot;
-value=quot;8007quot;/gt;
-lt;Parameter
-name=quot;max_threadsquot;
-value=quot;30quot;/gt;
-lt;Parameter
-name=quot;max_spare_threadsquot;
-value=quot;20quot;/gt;
-lt;Parameter
-name=quot;min_spare_threadsquot;
-value=quot;5quot; /gt;
-lt;/Connectorgt;
+lt;Ajp12Connector tomcatAuthentication=quot;falsequot;
+port=quot;8007quot;
+address=quot;127.0.0.1quot;
+maxThreads=quot;30quot;
+maxSpareThreads=quot;20quot;
+minSpareThreads=quot;5quot;
+/gt;
 /pre
 /td
   /tr
@@ -1479,14 +1455,14 @@
 pAs can be seen the pool has 3 configuration parameters:/p
 
 ul
-li max_threads - defines the upper bound to the for the 
+li maxThreads - defines the upper bound to the for the 
 concurrency, the pool will not create more then this 
number 
 of threads. /li
-li max_spare_threads - defines the maximum number of threads
+li maxSpareThreads - defines the maximum number of threads
  that the pool will keep idle. If the number of idle threads
  passes the value of max_spare_threads the pool will kill
  these threads. /li
-li min_spare_threads - the pool will try to make sure that at
+li minSpareThreads - the pool will try to make sure that at
  any time there is at least this number of idle threads
  waiting for new requests to arrive. min_spare_threads must
  be bigger then 0./li



RE: Tomcat 3.2.3 and getPathInfo

2001-08-24 Thread Marc Saegesser

Comments in line.


Marc Saegesser

 -Original Message-
 From: Jason Hunter [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 23, 2001 11:32 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: Tomcat 3.2.3 and getPathInfo


 Marc Saegesser wrote:
 
  I just tried this using the SnoopServlet that ships with Tomcat
 using a URL
  like
 
  http://localhost:8080/servlet/SnoopServlet/http://fubar
 
  and got
 
  /http:/fubar
 
  as the path info.  Your description makes it look like your
 losing http: in
  addition to the one of the /s.  Is this what your seeing?

 Using SnoopServlet I see /http:/fubar just like you.  My seeing the
 http: being eaten was due to how the GoTo servlet responded to the
 illegal URL being used.  So that's good, it's only the double-slash to
 single-slash issue.  It's a hard issue, but a straightforward issue.

I'm glad we're seeing the same thing.  The issue can certainly be solved,
after all, its only code.  :-)

  This problem is almost certainly caused the URL normalization
 code that got
  put into 3.2.3 to fix a serious security hole.  This is going to be
  difficult to resolve.  We have to normalize the URL before the servlet
  container uses it (I think this is even going to be added to the latest
  servlet specification) or some really bad things can happen with prefix
  mapping.  However, until we've done the prefix mapping we can't
 know what
  part of the URL refers to a servlet and what part is path info.  Getting
  back the original non-normalized path info is going to be tricky.

 I don't recall any EG discussion about normalizing the URL before the
 container sees it.  Generally the spec makes contracts on the
 container as it interfaces with the servlet and doesn't make any
 statements about a web server might support a plug-in.

This happened recently, Craig would probably have more details.  The
specification does discuss the mapping of URLs into servlets and this is
where the problem lies.  For example a URL like

http://localhost:8080/examples/sercurity/../security/protected/index.jsp

obviously refers to a resource inside an area protected by a
security-constraint but it doesn't match the prefix url-pattern of
/jsp/security/protected unless the URL is first normalized.  The solution
proposed was to normalize the URL as it entered the container.  The value
returned by getRequestURI() and any other method that returns the URI would
*always* return the normalized URI.  This solves the security constraint
problems, but it seems it causes problems with path info.

There two choices here.  We either don't normalize the path info or we
don't.  I think you can make a case for both sides but I'd lean towards
keeping it normalized.

  This is even worse because we also won't allow the URL to be
 encoded like
 
  http://localhost:8080/servlet/SnoopServlet/http:%2F%2Ffubar
 
  because we make some rather draconian precautions to ensure that nastily
  encoded URLs can't obtain access to protected resources (or
 even resources
  outside the webapp).

 Hmm... I wonder if Tomcat has the right to make illegal what HTTP would
 allow?

As I recall, our constraints were basically lifted from the Apache HTTP
server.  Our rationale was that it was far better to preclude some odd URLs
than to leave open the possibility that files outside the web application
could be accessed via the container.  This was a *really* bad security hole.


  I'll have to give this one some thought.  If URL normalization is being
  added to the specification then there should also some guidance
 on how it
  relates to path info.

 As I understand it, extra path info has to be returned in its simple
 decoded form.

 -jh-




RE: Thread pool support

2001-08-24 Thread Larry Isaacs

Thanks. I'll include it in my next round of updates to
tomcat-ug.html.

Larry

 -Original Message-
 From: Bojan Smojver [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 24, 2001 9:21 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Thread pool support
 
 
 Larry Isaacs wrote:
 
  Hope this helps,
  
  Larry
 
 OOPS. Trigger happy! Take 2 :-)
 
 Bojan
 



TC4 base dir

2001-08-24 Thread Rob S.

In TC3, you can change the base dir in server.xml, so that a new set of /logs, 
/webapps, and /work would be created and used somewhere else.  In TC4, all I see is 
the appBase attribute for each Host.  As well, there aren't any command-line params 
that I noticed in the startup class aside from -config.

Can I assume that no apparent way to set it and no command-line param means that it's 
not configurable?

I'm cool with that, I'm just writing some docs for us right now and want to be 
thorough!

- r




Re: Tomcat 3.2.3 and getPathInfo

2001-08-24 Thread cmanolache

On Thu, 23 Aug 2001, Jason Hunter wrote:

 Hmm... I wonder if Tomcat has the right to make illegal what HTTP would
 allow?

My understanding is that a URL _can_ be transformed - and all servers are
normalizing it before matching.

The problem is that the servlet spec defines the mappings in a very
strict way - exact matching, etc - and the other big problem is that the
spec requires original URLs to be returned.

That leaves us very little else to do than reject all 'suspect' URLs
( otherwise anyone can pass the security constraings with a simple
/./ in the URL )

Costin




Re: New SSL HOWTOs

2001-08-24 Thread Wolfgang Hoschek

At 17:28 23/8/01 -0600, Christopher Cain wrote:

Wolfgang Hoschek wrote:
 
  Sorry, I am posting to tomcat-dev although not subscribed...
 
  Two suggestions:
 
  - Perhaps it is a good idea to also describe in the SSL HOWTO ways to
  configure SSL without stuffing libs into jre/lib/ext. Some sites run
  multiple versions/vendors of jdks, TC, JSSE, et al from (secure) read-only
  shared file systems. In such an environment products and versions are
  delibarately kept separate from each other in order to avoid having to
  maintain countless permutations. Startup scripts link everything together
  via env vars. This is also convenient to test different permutations. The
  jre/lib/ext mechanism is not an option, due too the read-only nature.

Hmmm ... that's interesting. It's true that the JSSE libs don't
necessarily have to be an installed extension, and it's easy enough to
include a quick phrase about the classpath instead. I'm reluctant to
encourage users to put them into the internal Tomcat classloader
directories, since that is a rather sketchy configuration (someone will
eventually add JSSE to the classpath as well, which will cause Tomcat to
fail on startup unless the internal versions are removed).

So in your environment, it sounds like you would be simply specifying
the JSSE jars in classpath passed to TC, yes?

Exactly.




Re: more on hard coded mime types

2001-08-24 Thread may huang

Can anybody see if they can duplicate this problem?
I am struggling with the same problem. I added the same block on every web.xml. The 
.jnlp file gets served up as though it's xml for sure by tomcat. 

May




Re: TC4 base dir

2001-08-24 Thread Craig R. McClanahan



On Fri, 24 Aug 2001, Rob S. wrote:

 Date: Fri, 24 Aug 2001 8:14:32 PDT
 From: Rob S. [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED], Rob S. [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: TC4 base dir

 In TC3, you can change the base dir in server.xml, so that a new set
 of /logs, /webapps, and /work would be created and used somewhere
 else.  In TC4, all I see is the appBase attribute for each Host.
 As well, there aren't any command-line params that I noticed in the
 startup class aside from -config.

 Can I assume that no apparent way to set it and no command-line param
 means that it's not configurable?

 I'm cool with that, I'm just writing some docs for us right now and
 want to be thorough!

 - r



There is no current means to point at a server.xml file that is not
under $CATALINA_HOME/conf, but that has nothing to do with where log
files go (except by default) -- in your Logger elements, just add a
directory attribute.  The default value is logs (relative paths are
resolved against $CATALINA_HOME), but you can use an relative or absolute
path to a directory that you would like.

Craig





Re: TC4 base dir

2001-08-24 Thread Rob S.

 There is no current means to point at a server.xml file that is not
 under $CATALINA_HOME/conf, but that has nothing to do with where log
 files go (except by default) -- in your Logger elements, just add a
 directory attribute.The default value is logs (relative paths are
 resolved against $CATALINA_HOME), but you can use an relative or absolute
 path to a directory that you would like.

That's cool about the server.xml file, and you can do the individual elements, as you 
said (logger, default valve's logger for access, etc.) but what I'm wondering about is 
if there's anything analogous to changing the entire base dir (not just apps, but 
entire thing a la 3.x) ?

- r




Tomcat 3.2.3 W2K IIS 5

2001-08-24 Thread Joslyn

I´m trying to configure Tomcat with IIS 5.0, i have followed the How to
instructions but the redirector doesn´t show the green arrow. i´ve already
install the same configuration on Windows NT4 and IIS 4.0 y did it work.

can anyone Help me?





RE: Addition of 'dirty' field to Session interface

2001-08-24 Thread Reilly, John


 
 For permanent business objects, that is probably true ... but the use
 cases we'd like to be able to deal with include:
 
 * Load-balanced distributed container that can move sessions around
   as various servers get overloaded.
 
 * Fail-safe distributed container that automatically recovers from
   server failures and reconnects you to a different one with your
   session intact.
 
 without the application developer having to worry about this 
 for his/her
 session beans.  The first case isn't so hard -- the only time 
 you have to
 persist is when you are going to migrate, so you would just do it
 unconditinally.  The second case is harder, unless you can afford the
 performance hit of persisting after *every* request.
 
 I don't think there's a single policy that will cover all 
 reasonable use
 cases, so configurable selection of different policies is likely to be
 useful.
 

I've been interested in getting my teeth into this problem for a while but I
didn't have the time  I may get a chance the near future though.

Cheers,
jr



FW: [PATCH] TDK running with JPDA

2001-08-24 Thread Jon Stevens

This is more a catalina specific patch...Craig, mind applying it?

thanks,

-jon

-- Forwarded Message
From: Henning P. Schmiedehausen [EMAIL PROTECTED]
Organization: INTERMETA - Gesellschaft fuer Mehrwertdienste mbH
Reply-To: [EMAIL PROTECTED]
Newsgroups: hometree.jakarta.turbine.dev
Date: Fri, 24 Aug 2001 11:12:17 + (UTC)
To: [EMAIL PROTECTED]
Subject: [PATCH] TDK running with JPDA

Hi, 

with this patch, you can start the catalina in the TDK 2.1
with 

./bin/catalina.sh jpda start

and find a JPDA attachable port on 8000 for debugging the application
(I use netbeans 3.2.1 and the emacs jde for this).

Very useful IMHO.

Regards
Henning

diff -u tdk-2.1/bin/catalina.sh.orig tdk-2.1/bin/catalina.sh
--- tdk-2.1/bin/catalina.sh.origFri Aug 24 11:09:25 2001
+++ tdk-2.1/bin/catalina.sh Fri Aug 24 11:20:28 2001
@@ -70,8 +70,13 @@
 
 # - Execute The Requested Command
-
 
-if [ $1 = debug ] ; then
 
+if [ $1 = jpda ] ; then
+  CATALINA_OPTS=${CATALINA_OPTS} -classic -Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
+  shift
+fi
+
+if [ $1 = debug ] ; then
   shift
   pushd $CATALINA_HOME
   if [ $1 = -security ] ; then

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen   -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH [EMAIL PROTECTED]

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   [EMAIL PROTECTED]
D-91054 Buckenhof Fax.: 09131 / 50654-20

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

-- End of Forwarded Message




RE: Addition of 'dirty' field to Session interface

2001-08-24 Thread Bip Thelin

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
 
 [...]

 * Load-balanced distributed container that can move sessions around
   as various servers get overloaded.
 
 * Fail-safe distributed container that automatically recovers from
   server failures and reconnects you to a different one with your
   session intact.
 
 without the application developer having to worry about this 
 for his/her
 session beans.  The first case isn't so hard -- the only time 
 you have to
 persist is when you are going to migrate, so you would just do it
 unconditinally.  The second case is harder, unless you can afford the
 performance hit of persisting after *every* request.

This is just an idea from the top of my head, would it be possible
having a second vector that contains a footprint(not a full clone) of
the
object for a session and have a reaper thread checking the footprints
against
the real objects and determine if they changed or not and based on
that
replicate of whatever we want to do.

Similar to how PersistentManager check sessions to determine if they
should
be swapped to disk or backed up. Or is this just plain dumb?

-bip thelin



RE: Addition of 'dirty' field to Session interface

2001-08-24 Thread Osama bin Login


--- Bip Thelin [EMAIL PROTECTED] wrote:
 This is just an idea from the top of my head, would
 it be possible
 having a second vector that contains a footprint(not
 a full clone) of
 the
 object for a session and have a reaper thread
 checking the footprints
 against
 the real objects and determine if they changed or
 not and based on
 that
 replicate of whatever we want to do.

My thoughts exactly.  If you want to be able to
support transparent fail-over for sessions within a
cluster, you are going to have to take the performance
hit of persisting the session data on at least 1 other
machine in the cluster after every request.  If you're
already taking that step, you might as well maintain
an in-memory image of the serialized session object. 
You could compare an MD5 on the bytes comprising the
session before the request was handled with the MD5
for after the request completed.

Could this work?

  - osama.



__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



RE: Addition of 'dirty' field to Session interface

2001-08-24 Thread Reilly, John



  This is just an idea from the top of my head, would
  it be possible
  having a second vector that contains a footprint(not
  a full clone) of
  the
  object for a session and have a reaper thread
  checking the footprints
  against
  the real objects and determine if they changed or
  not and based on
  that
  replicate of whatever we want to do.
 
 My thoughts exactly.  If you want to be able to
 support transparent fail-over for sessions within a
 cluster, you are going to have to take the performance
 hit of persisting the session data on at least 1 other
 machine in the cluster after every request.  If you're
 already taking that step, you might as well maintain
 an in-memory image of the serialized session object. 
 You could compare an MD5 on the bytes comprising the
 session before the request was handled with the MD5
 for after the request completed.
 
 Could this work?

The overhead could be fairly signifigant.

 
   - osama.



Re: cvs commit:jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/coreStandardServer.java

2001-08-24 Thread Carlos Gaston Alvarez

Just a security issue.
Confirm that you are not listening only the necessary characters to know
that it doesnt match, that you are listening more. Because if you stop it
just when you know it will not match a hacker can easyly guest with is the
password. You should have a (big) min to listen before stopping it.
Sorry is this mail is useless (most probably), just a thought.

Chau,

Gaston


- Original Message -
From: Pier P. Fumagalli [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 21, 2001 9:10 PM
Subject: Re: cvs
commit:jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/coreStandar
dServer.java


 Justin Erenkrantz at [EMAIL PROTECTED] wrote:

  On Tue, Aug 21, 2001 at 06:51:52PM -, [EMAIL PROTECTED] wrote:
  craigmcc01/08/21 11:51:52
 
Modified:catalina/src/share/org/apache/catalina/core
  StandardServer.java
Log:
Fix for a DoS attack against the shutdown port, that could cause an
out
of memory exception by sending a continuous stream of characters.
Now,
Tomcat will only listen for enough characters to match or not-match
the
required password, then it shuts the port.
 
  Now I'll know exactly how long the shutdown password is.  =-)  -- justin

 Good point... :(

 Pier





cvs commit: jakarta-tomcat-4.0/catalina/src/bin catalina.sh

2001-08-24 Thread craigmcc

craigmcc01/08/24 12:08:15

  Modified:catalina/src/bin catalina.sh
  Log:
  Make it possible to start Catalina under a JPDA debugging environment.  If
  you execute
  
$CATALINA_HOME/bin/catalina.sh jpda start
  
  the options in the JPDA_OPTS environment variable are added to those
  specified by CATALINA_OPTS to enable debugging.  A convenient default
  value for JPDA_OPTS is made available if you do not specify it.
  
  Submitted by:  Henning P. Schmiedehausen [EMAIL PROTECTED],
   Jon Stevens [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.16  +15 -1 jakarta-tomcat-4.0/catalina/src/bin/catalina.sh
  
  Index: catalina.sh
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.sh,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- catalina.sh   2001/07/01 22:58:04 1.15
  +++ catalina.sh   2001/08/24 19:08:15 1.16
  @@ -12,7 +12,11 @@
   #
   #   JAVA_HOME Must point at your Java Development Kit installation.
   #
  -# $Id: catalina.sh,v 1.15 2001/07/01 22:58:04 jon Exp $
  +#   JPDA_OPTS (Optional) Java runtime options used when the jpda start
  +# command is executed.  Defaults to
  +# -classic -Xdebug -Xnoagent 
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
  +#
  +# $Id: catalina.sh,v 1.16 2001/08/24 19:08:15 craigmcc Exp $
   # -
   
   
  @@ -45,6 +49,10 @@
 CATALINA_OPTS=
   fi
   
  +if [ -z $JPDA_OPTS ] ; then
  +  JPDA_OPTS=-classic -Xdebug -Xnoagent 
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
  +fi
  +
   if [ -z $JAVA_HOME ] ; then
 echo You must set JAVA_HOME to point at your Java Development Kit installation
 exit 1
  @@ -70,6 +78,11 @@
   
   # - Execute The Requested Command -
   
  +if [ $1 = jpda ] ; then
  +  CATALINA_OPTS=${CATALINA_OPTS} ${JPDA_OPTS}
  +  shift
  +fi
  +
   if [ $1 = debug ] ; then
   
 shift
  @@ -160,6 +173,7 @@
 echo   debug Start Catalina in a debugger
 echo   debug -security   Debug Catalina with a security manager
 echo   env   Set up environment variables that would be used
  +  echo   jpda startStart Catalina under JPDA debugger
 echo   run   Start Catalina in the current window
 echo   run -security Start in the current window with security manager
 echo   start Start Catalina in a separate window
  
  
  



Re: FW: [PATCH] TDK running with JPDA

2001-08-24 Thread Craig R. McClanahan

Sounds good.

I generalized it slightly so that you can set different debug options with
JPDA_OPTS but it defaults to the value included in this patch.

Craig


On Fri, 24 Aug 2001, Jon Stevens wrote:

 Date: Fri, 24 Aug 2001 11:31:06 -0700
 From: Jon Stevens [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: tomcat-dev [EMAIL PROTECTED]
 Subject: FW: [PATCH] TDK running with JPDA

 This is more a catalina specific patch...Craig, mind applying it?

 thanks,

 -jon

 -- Forwarded Message
 From: Henning P. Schmiedehausen [EMAIL PROTECTED]
 Organization: INTERMETA - Gesellschaft fuer Mehrwertdienste mbH
 Reply-To: [EMAIL PROTECTED]
 Newsgroups: hometree.jakarta.turbine.dev
 Date: Fri, 24 Aug 2001 11:12:17 + (UTC)
 To: [EMAIL PROTECTED]
 Subject: [PATCH] TDK running with JPDA

 Hi,

 with this patch, you can start the catalina in the TDK 2.1
 with

 ./bin/catalina.sh jpda start

 and find a JPDA attachable port on 8000 for debugging the application
 (I use netbeans 3.2.1 and the emacs jde for this).

 Very useful IMHO.

 Regards
 Henning

 diff -u tdk-2.1/bin/catalina.sh.orig tdk-2.1/bin/catalina.sh
 --- tdk-2.1/bin/catalina.sh.origFri Aug 24 11:09:25 2001
 +++ tdk-2.1/bin/catalina.sh Fri Aug 24 11:20:28 2001
 @@ -70,8 +70,13 @@

  # - Execute The Requested Command
 -

 -if [ $1 = debug ] ; then

 +if [ $1 = jpda ] ; then
 +  CATALINA_OPTS=${CATALINA_OPTS} -classic -Xdebug -Xnoagent
 -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
 +  shift
 +fi
 +
 +if [ $1 = debug ] ; then
shift
pushd $CATALINA_HOME
if [ $1 = -security ] ; then

 --
 Dipl.-Inf. (Univ.) Henning P. Schmiedehausen   -- Geschaeftsfuehrer
 INTERMETA - Gesellschaft fuer Mehrwertdienste mbH [EMAIL PROTECTED]

 Am Schwabachgrund 22  Fon.: 09131 / 50654-0   [EMAIL PROTECTED]
 D-91054 Buckenhof Fax.: 09131 / 50654-20

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

 -- End of Forwarded Message






Re: cvs commit:jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/coreStandardServer.java

2001-08-24 Thread Carlos Gaston Alvarez

forget it, I saw the other answers. Sorry.

- Original Message -
From: Carlos Gaston Alvarez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 24, 2001 9:10 PM
Subject: Re: cvs
commit:jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/coreStandar
dServer.java


 Just a security issue.
 Confirm that you are not listening only the necessary characters to know
 that it doesnt match, that you are listening more. Because if you stop it
 just when you know it will not match a hacker can easyly guest with is the
 password. You should have a (big) min to listen before stopping it.
 Sorry is this mail is useless (most probably), just a thought.

 Chau,

 Gaston







Re: [PATCH] TDK running with JPDA

2001-08-24 Thread Jon Stevens

on 8/24/01 12:08 PM, Craig R. McClanahan [EMAIL PROTECTED] wrote:

 Sounds good.
 
 I generalized it slightly so that you can set different debug options with
 JPDA_OPTS but it defaults to the value included in this patch.
 
 Craig

Thanks Craig. I knew you probably had a better patch...

-jon




Re: TC4 base dir

2001-08-24 Thread Rob S.

  That's cool about the server.xml file, and you can do the individual
  elements, as you said (logger, default valve's logger for access,
  etc.) but what I'm wondering about is if there's anything analogous to
  changing the entire base dir (not just apps, but entire thing a la
  3.x) ?
 
 The entire base directory is wherever the CATALINA_HOME environment
 variable says it is, if you have that defined already.I have my
 CATALINA_HOME always set, so that I can have little scripts like
 catstart to start it on demand from whatever directory I'm in:
 
   $CATALINA_HOME/bin/catalina.sh start $@

Ok my last try since I think I'm not being clear enough =)

TC 3.x has this:

!--
You can add a home attribute to represent the base for
all relative paths. If none is set, the TOMCAT_HOME property
will be used, and if not set . will be used.
webapps/, work/ and logs/ will be relative to this ( unless
set explicitely to absolute paths ).
--
ContextManager debug=0 home=/home/rslifka/slifka-tomcat showDebugInfo=
true

...allowing me to use a single $TOMCAT_HOME/conf, /bin, etc. dir, but many instances 
of /webapps, /work and /logs spread out wherever I like.  If Catalina has this 
something similar, then I'd like to make sure I document it in my Running Multiple 
Instances doc =)

- r




Re: Correction to JDC Tech Tip for August 21, 2001

2001-08-24 Thread Christopher Cain

I _KNEW_ you weren't going to let us down on this one ... any rather
embarrasing blunder with JSP just really cries out for a Jon reply.

I was originally going to ask the (smart-ass) question as to why they
didn't go with Velocity for that particular tip, but we made Pier kinda
made last time. I figured I would just wait for your inevitable comments
;-)

- Christopher ... who promises not to say another word about it :-)

Jon Stevens wrote:
 
  JSP pages are only meant to deliver textual
  output.
 
 Velocity templates can be used to deliver binary output.
 
 http://jakarta.apache.org/velocity/
 
 Needless to say, I was surprised to see yet another example (coming from Sun
 no less) of someone embedding Java code in a JSP page.
 
 Paging all K-Mart shoppers: Please pull your head out of your ass.
 
 :-)
 
 -jon



Re: [VOTE] New Tomcat Committer

2001-08-24 Thread Andy Armstrong

+1

[EMAIL PROTECTED] wrote:
 
 On Fri, 24 Aug 2001, Craig R. McClanahan wrote:
 
  As Jon informally did last week or so, I'd like to formally propose
  Christopher Cain [EMAIL PROTECTED] as a committer on Tomcat.  He's
  contributed lots of useful discussion, patches, and documentation
  (particularly in the area of SSL-based things) and wants to do more.
 
 +1
 
 Costin

-- 
Andy Armstrong, Tagish



Re: TC4 base dir

2001-08-24 Thread Craig R. McClanahan



On Fri, 24 Aug 2001, Rob S. wrote:

 Date: Fri, 24 Aug 2001 12:41:00 PDT
 From: Rob S. [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED], Rob S. [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: TC4 base dir

   That's cool about the server.xml file, and you can do the individual
   elements, as you said (logger, default valve's logger for access,
   etc.) but what I'm wondering about is if there's anything analogous to
   changing the entire base dir (not just apps, but entire thing a la
   3.x) ?
 
  The entire base directory is wherever the CATALINA_HOME environment
  variable says it is, if you have that defined already.  I have my
  CATALINA_HOME always set, so that I can have little scripts like
  catstart to start it on demand from whatever directory I'm in:
 
$CATALINA_HOME/bin/catalina.sh start $@

 Ok my last try since I think I'm not being clear enough =)

 TC 3.x has this:

 !--
 You can add a home attribute to represent the base for
 all relative paths. If none is set, the TOMCAT_HOME property
 will be used, and if not set . will be used.
 webapps/, work/ and logs/ will be relative to this ( unless
 set explicitely to absolute paths ).
 --
 ContextManager debug=0 home=/home/rslifka/slifka-tomcat showDebugInfo=
 true

 ...allowing me to use a single $TOMCAT_HOME/conf, /bin, etc. dir, but
 many instances of /webapps, /work and /logs spread out wherever I
 like.  If Catalina has this something similar, then I'd like to make
 sure I document it in my Running Multiple Instances doc =)

 - r



No, Tomcat 4 doesn't currently have a thing like home -- patches are
welcome!  But, my point is you don't *need* home to accomplish the
goals you have articulated:

* For spreading webapp directories around, you have two options:

  - Use an absolute path for the Context docBase=.../ attribute

  - Use an absolute path for the Host appBase=.../ attribute
to set the base directory for all apps on that particular
virtual host, and let the contexts inside stay relative to that.
You'll note that in the default configuration, appBase is set
to webapps which (since it is relative) is resolved against
$CATALINA_HOME.

NOTE:  automatic context loading works in the appBase directory
of every Host that you define.

* For spearding logs around, use the directory attribute on your
  Logger elements.  Default value is $CATALINA_HOME/logs.

* For spreading work directories around, use the workDir attribute
  on your Context elements.  Default is calculated based on
  $CATALINA_HOME/work and then adding directory levels for the
  virtual host and the context path (minus the slash).

The only things that are fixed is that the following directories are
always assumed to be relative to $CATALINA_HOME:
* bin
* classes
* common/classes
* common/lib
* conf
* jasper
* lib
* server/classes
* server/lib

Everything else is just convenient defaults, whose values were initially
selected to be familiar to Tomcat 3.x users.

Craig





cvs commit: jakarta-tomcat-connectors/jk/native/common jk_jni_worker.c jk_sockbuf.c

2001-08-24 Thread costin

costin  01/08/24 18:05:00

  Modified:jk/native/common jk_jni_worker.c jk_sockbuf.c
  Log:
  Merge changes from 3.3.
  
  Revision  ChangesPath
  1.4   +16 -6 jakarta-tomcat-connectors/jk/native/common/jk_jni_worker.c
  
  Index: jk_jni_worker.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_jni_worker.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_jni_worker.c   2001/06/18 14:15:41 1.3
  +++ jk_jni_worker.c   2001/08/25 01:05:00 1.4
  @@ -59,7 +59,7 @@
* Description: In process JNI worker  *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Based on:   *
  - * Version: $Revision: 1.3 $   *
  + * Version: $Revision: 1.4 $   *
***/
   
   #if !defined(WIN32)  !defined(NETWARE)
  @@ -91,9 +91,12 @@
   
   jint (JNICALL *jni_get_default_java_vm_init_args)(void *) = NULL;
   jint (JNICALL *jni_create_java_vm)(JavaVM **, JNIEnv **, void *) = NULL;
  +jint (JNICALL *jni_get_created_java_vms)(JavaVM **, int, int *) = NULL;
   
  -#define JAVA_BRIDGE_CLASS_NAME (org/apache/tomcat/service/JNIEndpoint)
  - 
  +#define JAVA_BRIDGE_CLASS_NAME (org/apache/tomcat/modules/server/JNIEndpoint)
  +/* #define JAVA_BRIDGE_CLASS_NAME (org/apache/tomcat/service/JNIEndpoint)
  + */
  +
   static jk_worker_t *the_singleton_jni_worker = NULL;
   
   struct jni_worker {
  @@ -692,10 +695,16 @@
   (FARPROC)jni_create_java_vm = 
   GetProcAddress(hInst, JNI_CreateJavaVM);
   
  +(FARPROC)jni_get_created_java_vms = 
  +GetProcAddress(hInst, JNI_GetCreatedJavaVMs);
  +
   (FARPROC)jni_get_default_java_vm_init_args = 
   GetProcAddress(hInst, JNI_GetDefaultJavaVMInitArgs);
  +
  +jk_log(l, JK_LOG_DEBUG, 
  +   Loaded all JNI procs\n);
   
  -if(jni_create_java_vm  jni_get_default_java_vm_init_args) {
  +if(jni_create_java_vm  jni_get_default_java_vm_init_args  
jni_get_created_java_vms) {
   return JK_TRUE;
   }
   
  @@ -715,9 +724,10 @@
   }
   if (0 != javaNlmHandle) {
   jni_create_java_vm = ImportSymbol(GetNLMHandle(), JNI_CreateJavaVM);
  +jni_get_created_java_vms = ImportSymbol(GetNLMHandle(), 
JNI_GetCreatedJavaVMs);
   jni_get_default_java_vm_init_args = ImportSymbol(GetNLMHandle(), 
JNI_GetDefaultJavaVMInitArgs);
   }
  -if(jni_create_java_vm  jni_get_default_java_vm_init_args) {
  +if(jni_create_java_vm  jni_get_default_java_vm_init_args  
jni_get_created_java_vms) {
   return JK_TRUE;
   }
   #else 
  @@ -729,7 +739,7 @@
   
   if(!handle) {
   jk_log(l, JK_LOG_EMERG, 
  -   Can't log native library %s : %s\n, p-jvm_dll_path,
  +   Can't load native library %s : %s\n, p-jvm_dll_path,
  dlerror());
   } else {
   jni_create_java_vm = dlsym(handle, JNI_CreateJavaVM);
  
  
  
  1.4   +2 -2  jakarta-tomcat-connectors/jk/native/common/jk_sockbuf.c
  
  Index: jk_sockbuf.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_sockbuf.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_sockbuf.c  2001/06/18 14:16:06 1.3
  +++ jk_sockbuf.c  2001/08/25 01:05:00 1.4
  @@ -58,7 +58,7 @@
   /***
* Description: Simple buffer object to handle buffered socket IO  *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.3 $   *
  + * Version: $Revision: 1.4 $   *
***/
   
   #include jk_global.h
  @@ -69,7 +69,7 @@
   int jk_sb_open(jk_sockbuf_t *sb,
  int sd)
   {
  -if(sb  sd  0) {
  +if(sb  sd = 0) {
   sb-end   = 0;
   sb-start = 0;
   sb-sd= sd;
  
  
  



cvs commit: jakarta-tomcat-connectors/jk/native/jni jk_jnicb.exp jk_jnicb.h jni_connect.dsp

2001-08-24 Thread costin

costin  01/08/24 17:55:40

  Modified:jk/native/jni jk_jnicb.exp jk_jnicb.h jni_connect.dsp
  Log:
  Merge changes from 3.3 ( Mike's fixes )
  
  Revision  ChangesPath
  1.2   +6 -6  jakarta-tomcat-connectors/jk/native/jni/jk_jnicb.exp
  
  Index: jk_jnicb.exp
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/jni/jk_jnicb.exp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_jnicb.exp  2001/05/14 09:50:02 1.1
  +++ jk_jnicb.exp  2001/08/25 00:55:40 1.2
  @@ -1,7 +1,7 @@
  -Java_org_apache_tomcat_service_connector_JNIConnectionHandler_getNumberOfHeaders,
  -Java_org_apache_tomcat_service_connector_JNIConnectionHandler_read,
  -Java_org_apache_tomcat_service_connector_JNIConnectionHandler_readEnvironment,
  -Java_org_apache_tomcat_service_connector_JNIConnectionHandler_readHeaders,
  -Java_org_apache_tomcat_service_connector_JNIConnectionHandler_startReasponse,
  -Java_org_apache_tomcat_service_connector_JNIConnectionHandler_write
  +Java_org_apache_tomcat_modules_server_JNIConnectionHandler_getNumberOfHeaders,
  +Java_org_apache_tomcat_modules_server_JNIConnectionHandler_read,
  +Java_org_apache_tomcat_modules_server_JNIConnectionHandler_readEnvironment,
  +Java_org_apache_tomcat_modules_server_JNIConnectionHandler_readHeaders,
  +Java_org_apache_tomcat_modules_server_JNIConnectionHandler_startReasponse,
  +Java_org_apache_tomcat_modules_server_JNIConnectionHandler_write
   
  
  
  
  1.2   +15 -15jakarta-tomcat-connectors/jk/native/jni/jk_jnicb.h
  
  Index: jk_jnicb.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/jni/jk_jnicb.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_jnicb.h2001/05/14 09:50:02 1.1
  +++ jk_jnicb.h2001/08/25 00:55:40 1.2
  @@ -1,58 +1,58 @@
   /* DO NOT EDIT THIS FILE - it is machine generated */
   #include jni.h
  -/* Header for class org_apache_tomcat_service_connector_JNIConnectionHandler */
  +/* Header for class org_apache_tomcat_modules_server_JNIConnectionHandler */
   
  -#ifndef _Included_org_apache_tomcat_service_connector_JNIConnectionHandler
  -#define _Included_org_apache_tomcat_service_connector_JNIConnectionHandler
  +#ifndef _Included_org_apache_tomcat_modules_server_JNIConnectionHandler
  +#define _Included_org_apache_tomcat_modules_server_JNIConnectionHandler
   #ifdef __cplusplus
   extern C {
   #endif
   /*
  - * Class: org_apache_tomcat_service_connector_JNIConnectionHandler
  + * Class: org_apache_tomcat_modules_server_JNIConnectionHandler
* Method:getNumberOfHeaders
* Signature: (JJ)I
*/
  -JNIEXPORT jint JNICALL 
Java_org_apache_tomcat_service_connector_JNIConnectionHandler_getNumberOfHeaders
  +JNIEXPORT jint JNICALL 
Java_org_apache_tomcat_modules_server_JNIConnectionHandler_getNumberOfHeaders
 (JNIEnv *, jobject, jlong, jlong);
   
   /*
  - * Class: org_apache_tomcat_service_connector_JNIConnectionHandler
  + * Class: org_apache_tomcat_modules_server_JNIConnectionHandler
* Method:read
* Signature: (JJ[BII)I
*/
  -JNIEXPORT jint JNICALL 
Java_org_apache_tomcat_service_connector_JNIConnectionHandler_read
  +JNIEXPORT jint JNICALL 
Java_org_apache_tomcat_modules_server_JNIConnectionHandler_read
 (JNIEnv *, jobject, jlong, jlong, jbyteArray, jint, jint);
   
   /*
  - * Class: org_apache_tomcat_service_connector_JNIConnectionHandler
  + * Class: org_apache_tomcat_modules_server_JNIConnectionHandler
* Method:readEnvironment
* Signature: (JJ[Ljava/lang/String;)I
*/
  -JNIEXPORT jint JNICALL 
Java_org_apache_tomcat_service_connector_JNIConnectionHandler_readEnvironment
  +JNIEXPORT jint JNICALL 
Java_org_apache_tomcat_modules_server_JNIConnectionHandler_readEnvironment
 (JNIEnv *, jobject, jlong, jlong, jobjectArray);
   
   /*
  - * Class: org_apache_tomcat_service_connector_JNIConnectionHandler
  + * Class: org_apache_tomcat_modules_server_JNIConnectionHandler
* Method:readHeaders
* Signature: (JJ[Ljava/lang/String;[Ljava/lang/String;)I
*/
  -JNIEXPORT jint JNICALL 
Java_org_apache_tomcat_service_connector_JNIConnectionHandler_readHeaders
  +JNIEXPORT jint JNICALL 
Java_org_apache_tomcat_modules_server_JNIConnectionHandler_readHeaders
 (JNIEnv *, jobject, jlong, jlong, jobjectArray, jobjectArray);
   
   /*
  - * Class: org_apache_tomcat_service_connector_JNIConnectionHandler
  + * Class: org_apache_tomcat_modules_server_JNIConnectionHandler
* Method:startReasponse
* Signature: (JJILjava/lang/String;[Ljava/lang/String;[Ljava/lang/String;I)I
*/
  -JNIEXPORT jint JNICALL 
Java_org_apache_tomcat_service_connector_JNIConnectionHandler_startReasponse
  +JNIEXPORT jint JNICALL 

RE: [VOTE] New Tomcat Committer

2001-08-24 Thread Ignacio J. Ortega

+1

Saludos ,
Ignacio J. Ortega


 -Mensaje original-
 De: craigmcc@localhost [mailto:craigmcc@localhost]En nombre 
 de Craig R.
 McClanahan
 Enviado el: viernes 24 de agosto de 2001 22:21
 Para: [EMAIL PROTECTED]
 Asunto: [VOTE] New Tomcat Committer
 
 
 As Jon informally did last week or so, I'd like to formally propose
 Christopher Cain [EMAIL PROTECTED] as a committer on 
 Tomcat.  He's
 contributed lots of useful discussion, patches, and documentation
 (particularly in the area of SSL-based things) and wants to do more.
 
 Votes, please?
 
 Craig
 
 



[FAQ] jGuru FAQ Update

2001-08-24 Thread Alex Chaffee

jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to [EMAIL PROTECTED] .

 - Alex


SPONSORED BY developerWorks

need it? get it. tools, code and tutorials for open-standards based development.

Stay informed with dW's weekly email newsletter
http://www.jguru.com/misc/register_devworks.jsp?src=notify
-

Hi.  You asked to be notified weekly when certain jGuru.com items get new entries.

You can shut email notification off at the FAQ home
page(s) or:

  http://www.jguru.com/guru/notifyprefs.jsp


++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP

How can I model a JSP page in UML? What stereotype should I use for JSP within a class 
diagram?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=481436

I have a .jsp page with an included file (myPage.jsp, with lt;%@ include file = 
'includedFile.jsp'gt;). When I delete or modify the included file on the server, the 
old one still shows in my browser, even if I manually refresh/reload the whole page 
(i.e. refresh 'myPage.jsp'). The only solution I have found is to delete the whole 
page ('myPage.jsp'), and upload it again - then it includes the more recent included 
file.br
The server is running Apache/Tomcat under Linux.br
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=481051

++ Servlets FAQ: http://www.jguru.com/faq/Servlets

Why do I get the error java.lang.IllegalStateException: Header already sent ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=480147

Is there a simple example of how to use web application security in WebLogic?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=479768





Re: [VOTE] New Tomcat Committer

2001-08-24 Thread Rob S.

Yah!  Chris! =)

- r

On Fri, 24 Aug 2001 13:20:54 -0700 (PDT) [EMAIL PROTECTED] wrote:
 As Jon informally did last week or so, I'd like to formally propose
 Christopher Cain [EMAIL PROTECTED] as a committer on Tomcat.  He's
 contributed lots of useful discussion, patches, and documentation
 (particularly in the area of SSL-based things) and wants to do more.
 
 Votes, please?
 
 Craig






cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/config WorkDirSetup.java

2001-08-24 Thread larryi

larryi  01/08/24 15:07:05

  Modified:src/share/org/apache/tomcat/modules/config WorkDirSetup.java
  Log:
  For root context, use ROOT as the subdirectory name instead of  which
  uses the parent directory.
  
  Revision  ChangesPath
  1.7   +1 -0  
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/WorkDirSetup.java
  
  Index: WorkDirSetup.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/WorkDirSetup.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WorkDirSetup.java 2001/06/16 20:19:23 1.6
  +++ WorkDirSetup.java 2001/08/24 22:07:05 1.7
  @@ -219,6 +219,7 @@
   
String path=ctx.getPath();
if( path.startsWith(/)) path=path.substring(1);
  +if( .equals(path) ) path=ROOT;
workDirF=new File( hostD, URLEncoder.encode( path ));
}
ctx.setWorkDir( workDirF );
  
  
  



RE: [VOTE] New Tomcat Committer

2001-08-24 Thread Larry Isaacs

+1

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 24, 2001 4:21 PM
 To: [EMAIL PROTECTED]
 Subject: [VOTE] New Tomcat Committer
 
 
 As Jon informally did last week or so, I'd like to formally propose
 Christopher Cain [EMAIL PROTECTED] as a committer on 
 Tomcat.  He's
 contributed lots of useful discussion, patches, and documentation
 (particularly in the area of SSL-based things) and wants to do more.
 
 Votes, please?
 
 Craig
 
 
 
 



Re: [VOTE] New Tomcat Committer

2001-08-24 Thread Mike Anderson

+1

 [EMAIL PROTECTED] 08/24/01 02:20PM 
As Jon informally did last week or so, I'd like to formally propose
Christopher Cain [EMAIL PROTECTED] as a committer on Tomcat.  He's
contributed lots of useful discussion, patches, and documentation
(particularly in the area of SSL-based things) and wants to do more.

Votes, please?

Craig








Re: TC4 base dir

2001-08-24 Thread Rob S.

 No, Tomcat 4 doesn't currently have a thing like home -- patches are
 welcome!  But, my point is you don't *need* home to accomplish the
 goals you have articulated:

Awesome!  Thanks for the detailed reply =)

- r




Unsubscribe please! Thanks

2001-08-24 Thread Cheng, I-Ying


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 24, 2001 4:17 PM
To: [EMAIL PROTECTED]; Rob S.
Subject: Re: TC4 base dir




On Fri, 24 Aug 2001, Rob S. wrote:

 Date: Fri, 24 Aug 2001 12:41:00 PDT
 From: Rob S. [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED], Rob S. [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: TC4 base dir

   That's cool about the server.xml file, and you can do the individual
   elements, as you said (logger, default valve's logger for access,
   etc.) but what I'm wondering about is if there's anything analogous to
   changing the entire base dir (not just apps, but entire thing a la
   3.x) ?
 
  The entire base directory is wherever the CATALINA_HOME environment
  variable says it is, if you have that defined already.  I have my
  CATALINA_HOME always set, so that I can have little scripts like
  catstart to start it on demand from whatever directory I'm in:
 
$CATALINA_HOME/bin/catalina.sh start $@

 Ok my last try since I think I'm not being clear enough =)

 TC 3.x has this:

 !--
 You can add a home attribute to represent the base for
 all relative paths. If none is set, the TOMCAT_HOME property
 will be used, and if not set . will be used.
 webapps/, work/ and logs/ will be relative to this ( unless
 set explicitely to absolute paths ).
 --
 ContextManager debug=0 home=/home/rslifka/slifka-tomcat
showDebugInfo=
 true

 ...allowing me to use a single $TOMCAT_HOME/conf, /bin, etc. dir, but
 many instances of /webapps, /work and /logs spread out wherever I
 like.  If Catalina has this something similar, then I'd like to make
 sure I document it in my Running Multiple Instances doc =)

 - r



No, Tomcat 4 doesn't currently have a thing like home -- patches are
welcome!  But, my point is you don't *need* home to accomplish the
goals you have articulated:

* For spreading webapp directories around, you have two options:

  - Use an absolute path for the Context docBase=.../ attribute

  - Use an absolute path for the Host appBase=.../ attribute
to set the base directory for all apps on that particular
virtual host, and let the contexts inside stay relative to that.
You'll note that in the default configuration, appBase is set
to webapps which (since it is relative) is resolved against
$CATALINA_HOME.

NOTE:  automatic context loading works in the appBase directory
of every Host that you define.

* For spearding logs around, use the directory attribute on your
  Logger elements.  Default value is $CATALINA_HOME/logs.

* For spreading work directories around, use the workDir attribute
  on your Context elements.  Default is calculated based on
  $CATALINA_HOME/work and then adding directory levels for the
  virtual host and the context path (minus the slash).

The only things that are fixed is that the following directories are
always assumed to be relative to $CATALINA_HOME:
* bin
* classes
* common/classes
* common/lib
* conf
* jasper
* lib
* server/classes
* server/lib

Everything else is just convenient defaults, whose values were initially
selected to be familiar to Tomcat 3.x users.

Craig



This message is for the named person's use only.  It may contain 
confidential, proprietary or legally privileged information.  No 
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender.  You must not, directly or indirectly, use, disclose, distribute, 
print, or copy any part of this message if you are not the intended 
recipient. CREDIT SUISSE GROUP and each of its subsidiaries each reserve
the right to monitor all e-mail communications through its networks.  Any
views expressed in this message are those of the individual sender, except
where the message states otherwise and the sender is authorised to state 
them to be the views of any such entity.
Unless otherwise stated, any pricing information given in this message is 
indicative only, is subject to change and does not constitute an offer to 
deal at any price quoted.
Any reference to the terms of executed transactions should be treated as 
preliminary only and subject to our formal written confirmation.







Re: [VOTE] New Tomcat Committer

2001-08-24 Thread Amy Roh

+1

welcome :-)

Amy

Craig R. McClanahan wrote:

 As Jon informally did last week or so, I'd like to formally propose
 Christopher Cain [EMAIL PROTECTED] as a committer on Tomcat.  He's
 contributed lots of useful discussion, patches, and documentation
 (particularly in the area of SSL-based things) and wants to do more.

 Votes, please?

 Craig




RE: [VOTE] New Tomcat Committer

2001-08-24 Thread GOMEZ Henri

+1

Welcome on board Christopher :)

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 24, 2001 10:21 PM
To: [EMAIL PROTECTED]
Subject: [VOTE] New Tomcat Committer


As Jon informally did last week or so, I'd like to formally propose
Christopher Cain [EMAIL PROTECTED] as a committer on Tomcat.  He's
contributed lots of useful discussion, patches, and documentation
(particularly in the area of SSL-based things) and wants to do more.

Votes, please?

Craig







cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/threads ThreadPool.java

2001-08-24 Thread nacho

nacho   01/08/24 17:59:03

  Modified:src/share/org/apache/tomcat/util/threads ThreadPool.java
  Log:
  Fix for Bugzilla#1745
  
  Possible problem with thread initialization in ThreadPool.java
  
  Reported by clay.olbon at raremedium.com
  
  Revision  ChangesPath
  1.5   +27 -26
jakarta-tomcat/src/share/org/apache/tomcat/util/threads/ThreadPool.java
  
  Index: ThreadPool.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/threads/ThreadPool.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ThreadPool.java   2001/04/21 18:42:51 1.4
  +++ ThreadPool.java   2001/08/25 00:59:03 1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/threads/ThreadPool.java,v 
1.4 2001/04/21 18:42:51 costin Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/04/21 18:42:51 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/threads/ThreadPool.java,v 
1.5 2001/08/25 00:59:03 nacho Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/08/25 00:59:03 $
*
* 
*
  @@ -253,8 +253,8 @@
   try {
   ((ControlRunnable)(pool.elementAt(i))).terminate();
   } catch(Throwable t) {
  -/* 
  -  * Do nothing... The show must go on, we are shutting 
  +/*
  +  * Do nothing... The show must go on, we are shutting
 * down the pool and nothing should stop that.
 */
loghelper.log(Ignored exception while shutting down thread pool, 
t, Log.ERROR);
  @@ -267,7 +267,7 @@
   }
   
   /**
  - * Called by the monitor thread to harvest idel threads.
  + * Called by the monitor thread to harvest idle threads.
*/
   protected synchronized void checkSpareControllers() {
   
  @@ -307,7 +307,7 @@
   /**
* Inform the pool that the specific thread finish.
*
  - * Called by the ControlRunnable.run() when the runnable 
  + * Called by the ControlRunnable.run() when the runnable
* throws an exception.
*/
   protected synchronized void notifyThreadEnd(ControlRunnable c) {
  @@ -315,7 +315,7 @@
   currentThreadCount --;
   notify();
   }
  -
  +
   
   /*
* Checks for problematic configuration and fix it.
  @@ -331,7 +331,7 @@
   maxSpareThreads = maxThreads;
   }
   
  - if(maxSpareThreads = 0) {
  +if(maxSpareThreads = 0) {
   if(1 == maxThreads) {
   maxSpareThreads = 1;
   } else {
  @@ -341,9 +341,9 @@
   
   if(minSpareThreads   maxSpareThreads) {
   minSpareThreads =  maxSpareThreads;
  - }
  +}
   
  - if(minSpareThreads = 0) {
  +if(minSpareThreads = 0) {
   if(1 == maxSpareThreads) {
   minSpareThreads = 1;
   } else {
  @@ -475,31 +475,31 @@
   }
   
   public void run() {
  -
  +
   while(true) {
  -try { 
  +try {
/* Wait for work. */
   synchronized(this) {
   if(!shouldRun  !shouldTerminate) {
   this.wait();
   }
  +}
  +if(toRun == null ) {
  +if( p.debug0) p.log( No toRun ???);
   }
  - if(toRun == null ) {
  - if( p.debug0) p.log( No toRun ???);
  - }
  -
  - if( shouldTerminate ) {
  - if( p.debug0) p.log( Terminate);
  - break;
  - }
   
  +if( shouldTerminate ) {
  +if( p.debug0) p.log( Terminate);
  +break;
  +}
  +
   /* Check if should execute a runnable.  */
   try {
  - if(noThData) {
  - if(p.debug0) p.log( Getting new thread 
data);
  - thData=toRun.getInitData();
  - noThData = false;
  - }
  +if(noThData) {
  +if(p.debug0) p.log( Getting new thread data);
  +thData=toRun.getInitData();
  +noThData = false;
  +}
   
   if(shouldRun) {

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util ThreadPool.java

2001-08-24 Thread nacho

nacho   01/08/24 18:01:41

  Modified:src/share/org/apache/tomcat/util Tag: tomcat_32
ThreadPool.java
  Log:
  Fix for Bugzilla#1745
  
  Possible problem with thread initialization in ThreadPool.java
  
  Reported by clay.olbon at raremedium.com
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.9.2.3   +4 -3  
jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/ThreadPool.java
  
  Index: ThreadPool.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/ThreadPool.java,v
  retrieving revision 1.9.2.2
  retrieving revision 1.9.2.3
  diff -u -r1.9.2.2 -r1.9.2.3
  --- ThreadPool.java   2001/04/23 02:16:03 1.9.2.2
  +++ ThreadPool.java   2001/08/25 01:01:41 1.9.2.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/ThreadPool.java,v 
1.9.2.2 2001/04/23 02:16:03 marcsaeg Exp $
  - * $Revision: 1.9.2.2 $
  - * $Date: 2001/04/23 02:16:03 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/Attic/ThreadPool.java,v 
1.9.2.3 2001/08/25 01:01:41 nacho Exp $
  + * $Revision: 1.9.2.3 $
  + * $Date: 2001/08/25 01:01:41 $
*
* 
*
  @@ -542,6 +542,7 @@
}
   this.toRun = toRun;
   shouldRun = true;
  +noThData = true;
   this.notify();
   }
   
  
  
  



[VOTE] New Tomcat Committer

2001-08-24 Thread Craig R. McClanahan

As Jon informally did last week or so, I'd like to formally propose
Christopher Cain [EMAIL PROTECTED] as a committer on Tomcat.  He's
contributed lots of useful discussion, patches, and documentation
(particularly in the area of SSL-based things) and wants to do more.

Votes, please?

Craig







RE: [VOTE] New Tomcat Committer

2001-08-24 Thread Bip Thelin

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
 
 As Jon informally did last week or so, I'd like to formally 
 propose Christopher Cain [EMAIL PROTECTED] as a 
 committer on Tomcat.  He's contributed lots of useful 
 discussion, patches, and documentation (particularly in the 
 area of SSL-based things) and wants to do more.

+1

-bip



cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa AccessInterceptor.java

2001-08-24 Thread nacho

nacho   01/08/24 16:57:45

  Modified:src/share/org/apache/tomcat/modules/aaa
AccessInterceptor.java
  Log:
  Fix for Bugzilla#2118
  
  Incosistent behaviuor updating OriginalLocation in FormAuthHandler Class
  
  Reported by Juan Jose Muñoz ( jmartine at alhsys.es ), mark.shotton at 
micromass.co.uk
  
  Revision  ChangesPath
  1.14  +15 -12
jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/AccessInterceptor.java
  
  Index: AccessInterceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/AccessInterceptor.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- AccessInterceptor.java2001/08/23 14:59:14 1.13
  +++ AccessInterceptor.java2001/08/24 23:57:45 1.14
  @@ -505,24 +505,13 @@
String username=(String)session.getAttribute( j_username );
   
if( debug0) log( Username =  + username);
  - if( username != null ) {
  - // 401 with existing j_username - that means wrong credentials.
  - // Next time we'll have a fresh start
  - session.removeAttribute( j_username);
  - session.removeAttribute( j_password);
  - req.setAttribute(javax.servlet.error.message,
  -  errorPage );
  - if( debug0) log( Redirecting to  + errorPage );
  - contextM.handleStatus( req, res, 302 ); // redirect
  - return;
  - }
   
String originalLocation = req.requestURI().toString();
if (req.queryString().toString() != null
!req.queryString().toString().equals())
originalLocation += ? + req.queryString().toString();
   //XXX is needed to put the JVM route too?
  -if (noSession 
  +if (noSession
|| Request.SESSIONID_FROM_URL.equals(req.getSessionIdSource()))  {
// If new session we have no way to know if cookies are supported
String id=;jsessionid=+req.getSessionId() ;
  @@ -531,6 +520,20 @@
}
session.setAttribute( tomcat.auth.originalLocation,
  originalLocation);
  +
  +
  + if( username != null ) {
  + // 401 with existing j_username - that means wrong credentials.
  + // Next time we'll have a fresh start
  + session.removeAttribute( j_username);
  + session.removeAttribute( j_password);
  + req.setAttribute(javax.servlet.error.message,
  +  errorPage );
  + if( debug0) log( Redirecting to  + errorPage );
  + contextM.handleStatus( req, res, 302 ); // redirect
  + return;
  + }
  +
if( debug  0 )
log(Redirect1:  + page  +  originalUri= +
originalLocation );
  
  
  



Re: [VOTE] New Tomcat Committer

2001-08-24 Thread Jon Stevens

on 8/24/01 1:20 PM, Craig R. McClanahan [EMAIL PROTECTED] wrote:

 As Jon informally did last week or so, I'd like to formally propose
 Christopher Cain [EMAIL PROTECTED] as a committer on Tomcat.  He's
 contributed lots of useful discussion, patches, and documentation
 (particularly in the area of SSL-based things) and wants to do more.
 
 Votes, please?
 
 Craig

+1

-jon




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/request AccessInterceptor.java

2001-08-24 Thread nacho

nacho   01/08/24 16:58:51

  Modified:src/share/org/apache/tomcat/request Tag: tomcat_32
AccessInterceptor.java
  Log:
  Fix for Bugzilla#2118
  
  Incosistent behaviuor updating OriginalLocation in FormAuthHandler Class
  
  Reported by Juan Jose Muñoz ( jmartine at alhsys.es ), mark.shotton at 
micromass.co.uk
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.12.2.10 +8 -7  
jakarta-tomcat/src/share/org/apache/tomcat/request/Attic/AccessInterceptor.java
  
  Index: AccessInterceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/Attic/AccessInterceptor.java,v
  retrieving revision 1.12.2.9
  retrieving revision 1.12.2.10
  diff -u -r1.12.2.9 -r1.12.2.10
  --- AccessInterceptor.java2001/07/17 04:25:55 1.12.2.9
  +++ AccessInterceptor.java2001/08/24 23:58:51 1.12.2.10
  @@ -465,6 +465,14 @@
session=req.getSession( true );
String username=(String)session.getAttribute( j_username );
   
  +String originalLocation = req.getRequestURI();
  +
  + if (req.getQueryString() != null)
  + originalLocation += ? + req.getQueryString();
  +
  + session.setAttribute( tomcat.auth.originalLocation,
  +   originalLocation);
  +
if( debug0) log( Username =  + username);
if( username != null ) {
// 401 with existing j_username - that means wrong credentials.
  @@ -477,13 +485,6 @@
return;
}
   
  -String originalLocation = req.getRequestURI();
  -
  - if (req.getQueryString() != null)
  - originalLocation += ? + req.getQueryString();
  -
  - session.setAttribute( tomcat.auth.originalLocation,
  -   originalLocation);
if( debug  0 )
log(Redirect1:  + page  +  originalUri= + req.getRequestURI());
   
  
  
  



cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config context.xml host.xml

2001-08-24 Thread craigmcc

craigmcc01/08/24 20:37:39

  Added:   webapps/tomcat-docs/config context.xml host.xml
  Log:
  Add new-style docs for the Host and Context elements:
  
  TODO:  Nested Components (DefaultContext, Loader, Logger, Manager, Realm,
  Resources, Valve) and update the table of contents on the index page.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-4.0/webapps/tomcat-docs/config/context.xml
  
  Index: context.xml
  ===
  ?xml version=1.0?
  !DOCTYPE document [
!ENTITY project SYSTEM project.xml
  ]
  document
  
project;
  
properties
  author email=[EMAIL PROTECTED]Craig R. McClanahan/author
  titleThe Context Container/title
/properties
  
  body
  
  
  section name=Introduction
  
pThe strongContext/strong element represents a emweb
application/em, which is run within a particular virtual host.
Each web application is based on a emWeb Application Archive/em
(WAR) file, or a corresponding directory containing the corresponding
unpacked contents, as described in the Servlet Specification (version
2.2 or later).  For more information about web application archives,
you can download the
a href=http://java.sun.com/products/servlet/download.html;Servlet
Specification/a, and review the Tomcat
a href=../appdev/index.htmlApplication Developer's Guide/a./p
  
pThe web application used to process each HTTP request is selected
by Catalina based on matching the longest possible prefix of the
Request URI against the emcontext path/em of each defined Context.
Once selected, that Context will select an appropriate servlet to
process the incoming request, according to the servlet mappings defined
in the emweb application deployment descriptor/em file (which MUST
be located at code/WEB-INF/web.xml/code within the web app's
directory hierarchy)./p
  
pYou may define as many strongContext/strong elements as you
wish, nested within a a href=host.htmlHost/a element in
codeconf/server.xml/code.  Each such Context MUST have a unique
context path, which is defined by the codepath/code attribute.
In addition, you MUST define a Context with a context path equal to
a zero-length string.  This Context becomes the emdefault/em
web application for this virtual host, and is used to process all
requests that do not match any other Context's context path./p
  
pIn addition to explicitly specified Context elements, there are
several techniques by which Context elements can be created automatically
for you.  See a href=host.html#Automatic Application Deployment
Automatic Application Deployment/a and
a href=host.html#User Web ApplicationsUser Web Applications/a
for more information./p
  
  /section
  
  
  section name=Attributes
  
subsection name=Common Attributes
  
  pAll implementations of strongHost/strong
  support the following attributes:/p
  
  attributes
  
attribute name=className required=false
  pJava class name of the implementation to use.  This class must
  implement the codeorg.apache.catalina.Context/code interface.
  If not specified, the standard value (defined below) will be used./p
/attribute
  
attribute name=cookies required=false
  pSet to codetrue/code if you want cookies to be used for
  session identifier communication if supported by the client (this
  is the default).  Set to codefalse/code if you want to disable
  the use of cookies for session identifier communication, and rely
  only on URL rewriting by the application./p
/attribute
  
attribute name=crossContext required=false
  pSet to codetrue/code if you want calls within this application
  to codeServletContext.getContext()/code to successfully return a
  request dispatcher for other web applications running on this virtual
  host.  Set to codefalse/code (the default) in security
  conscious environments, to make codegetContext()/code always
  return codenull/code./p
/attribute
  
attribute name=docBase required=true
  pThe emDocument Base/em (also known as the emContext
  Root/em) directory for this web application, or the pathname
  to the web application archive file (if this web application is
  being executed directly from the WAR file).You may specify
  an absolute pathname for this directory or WAR file, or a pathname
  that is relative to the codeappBase/code directory of the
  owning a href=host.htmlHost/a./p
/attribute
  
attribute name=override required=false
  pSet to codetrue/code to have explicit settings in this
  Context element override any corresponding settings in the
  a href=defaultcontext.htmlDefaultContext/a 

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

2001-08-24 Thread craigmcc

craigmcc01/08/24 17:01:57

  Modified:jasper/src/share/org/apache/jasper/servlet JspServlet.java
  Log:
  Change the way that Jasper looks for the ?jsp_precompile precompilation
  request parameter.  Previously, it was using request.getParameter(), which
  caused all of the request parameters to be parsed before the JSP page
  would have the opportunity to call request.setCharacterEncoding().
  
  Revision  ChangesPath
  1.21  +42 -27
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java
  
  Index: JspServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- JspServlet.java   2001/08/07 20:53:06 1.20
  +++ JspServlet.java   2001/08/25 00:01:56 1.21
  @@ -382,36 +382,51 @@
   }
   
   
  +/**
  + * pLook for a emprecompilation request/em as described in
  + * Section 8.4.2 of the JSP 1.2 Specification.  strongWARNING/strong -
  + * we cannot use coderequest.getParameter()/code for this, because
  + * that will trigger parsing all of the request parameters, and not give
  + * a servlet the opportunity to call
  + * coderequest.setCharacterEncoding()/code first./p
  + *
  + * @param request The servlet requset we are processing
  + *
  + * @exception ServletException if an invalid parameter value for the
  + *  codejsp_precompile/code parameter name is specified
  + */
   boolean preCompile(HttpServletRequest request) 
   throws ServletException 
   {
  -boolean precompile = false;
  -String precom = request.getParameter(Constants.PRECOMPILE);
  -String qString = request.getQueryString();
  -
  -if (precom != null) {
  - // An equal sign was specified 
  - // (?jsp_precompile=... or jsp_precompile=...)
  -if (precom.equals(true) || precom.trim().length()==0) {
  -precompile = true;
  -} else if (precom.equals(false)) {
  -precompile = false;
  -} else {
  - // This is illegal.
  - throw new ServletException(Can't have request parameter  +
  -Constants.PRECOMPILE +  set to  + precom);
  - }
  -} else {
  - // Check if precompile is specified (but it does not have
  - // the '=' following it.)
  - if (qString != null  
  -  (qString.startsWith(Constants.PRECOMPILE) ||
  -  qString.indexOf( + Constants.PRECOMPILE)
  -  != -1)) {
  - precompile = true;
  - }
  - }
  -return precompile;
  +
  +String queryString = request.getQueryString();
  +if (queryString == null)
  +return (false);
  +int start = queryString.indexOf(Constants.PRECOMPILE);
  +if (start  0)
  +return (false);
  +queryString =
  +queryString.substring(start + Constants.PRECOMPILE.length());
  +if (queryString.length() == 0)
  +return (true); // ?jsp_precompile
  +if (queryString.startsWith())
  +return (true); // ?jsp_precompilefoo=bar...
  +if (!queryString.startsWith(=))
  +return (false);// part of some other name or value
  +int limit = queryString.length();
  +int ampersand = queryString.indexOf();
  +if (ampersand  0)
  +limit = ampersand;
  +String value = queryString.substring(1, limit);
  +if (value.equals(true))
  +return (true); // ?jsp_precompile=true
  +else if (value.equals(false))
  +return (false);// ?jsp_precompile=false
  +else
  +throw new ServletException(Cannott have request parameter  +
  +   Constants.PRECOMPILE +  set to  +
  +   value);
  +
   }
   
   
  
  
  



cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config engine.xml http11.xml project.xml server.xml service.xml warp.xml

2001-08-24 Thread craigmcc

craigmcc01/08/24 18:14:13

  Modified:webapps/tomcat-docs/config http11.xml project.xml server.xml
service.xml warp.xml
  Added:   webapps/tomcat-docs/config engine.xml
  Log:
  Add docs for Engine element, and tweak the existing ones slightly.
  
  Revision  ChangesPath
  1.2   +1 -1  jakarta-tomcat-4.0/webapps/tomcat-docs/config/http11.xml
  
  Index: http11.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/http11.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- http11.xml2001/08/21 02:28:21 1.1
  +++ http11.xml2001/08/25 01:14:13 1.2
  @@ -195,7 +195,7 @@
   /section
   
   
  -section name=Nested Elements
  +section name=Nested Components
   
 pThe only element that may be embedded inside a strongConnector/strong
 element is a strongFactory/strong element, which is used to configure
  
  
  
  1.3   +1 -1  jakarta-tomcat-4.0/webapps/tomcat-docs/config/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/project.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- project.xml   2001/08/05 03:42:28 1.2
  +++ project.xml   2001/08/25 01:14:13 1.3
  @@ -32,7 +32,7 @@
   item name=Host  href=host.html/
   /menu
   
  -menu name=Nested Elements
  +menu name=Nested Components
   item name=Default Context   href=defaultcontext.html/
   item name=Loaderhref=loader.html/
   item name=Loggerhref=logger.html/
  
  
  
  1.2   +2 -2  jakarta-tomcat-4.0/webapps/tomcat-docs/config/server.xml
  
  Index: server.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/server.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- server.xml2001/08/21 02:28:21 1.1
  +++ server.xml2001/08/25 01:14:13 1.2
  @@ -65,9 +65,9 @@
   /section
   
   
  -section name=Nested Elements
  +section name=Nested Components
   
  -  pNo nested elements may be embedded inside a strongServer/strong,
  +  pNo nested components may be embedded inside a strongServer/strong,
 element, except for one or more a href=service.htmlService/a elements.
 /p
   
  
  
  
  1.2   +2 -2  jakarta-tomcat-4.0/webapps/tomcat-docs/config/service.xml
  
  Index: service.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/service.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- service.xml   2001/08/21 02:28:21 1.1
  +++ service.xml   2001/08/25 01:14:13 1.2
  @@ -64,9 +64,9 @@
   /section
   
   
  -section name=Nested Elements
  +section name=Nested Components
   
  -  pNo nested elements may be embedded inside a strongServer/strong,
  +  pNo nested components may be embedded inside a strongServer/strong,
 element, except for one or more strongConnector/strong elements
 followed by a single a href=engine.htmlEngine/a element.
 /p
  
  
  
  1.2   +1 -1  jakarta-tomcat-4.0/webapps/tomcat-docs/config/warp.xml
  
  Index: warp.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/warp.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- warp.xml  2001/08/21 02:28:21 1.1
  +++ warp.xml  2001/08/25 01:14:13 1.2
  @@ -106,7 +106,7 @@
   /section
   
   
  -section name=Nested Elements
  +section name=Nested Components
   
 pstrongFIXME/strong - Document any use of a nested codeFactory/code
 element for communicating with codemod_webapp/code over SSL./p
  
  
  
  1.1  jakarta-tomcat-4.0/webapps/tomcat-docs/config/engine.xml
  
  Index: engine.xml
  ===
  ?xml version=1.0?
  !DOCTYPE document [
!ENTITY project SYSTEM project.xml
  ]
  document
  
project;
  
properties
  author email=[EMAIL PROTECTED]Craig R. McClanahan/author
  titleThe Engine Container/title
/properties
  
  body
  
  
  section name=Introduction
  
pThe strongEngine/strong element represents the entire request
processing machinery associated with a particular Catalina
a href=service.htmlService/a.  It receives and processes
emall/em requests from one or more strongConnectors/strong,
and returns the completed response to the Connector for ultimate
transmission back to the client./p
  
pExactly one strongEngine/strong element MUST be 

cvs commit: jakarta-tomcat-4.0 README.txt

2001-08-24 Thread craigmcc

craigmcc01/08/24 20:51:27

  Modified:.README.txt
  Log:
  Update pointers in the README.
  
  Revision  ChangesPath
  1.17  +4 -4  jakarta-tomcat-4.0/README.txt
  
  Index: README.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/README.txt,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- README.txt2001/07/27 22:26:03 1.16
  +++ README.txt2001/08/25 03:51:27 1.17
  @@ -1,4 +1,4 @@
  -$Id: README.txt,v 1.16 2001/07/27 22:26:03 craigmcc Exp $
  +$Id: README.txt,v 1.17 2001/08/25 03:51:27 craigmcc Exp $
   
  The Tomcat 4.0 Servlet/JSP Container
  
  @@ -57,8 +57,8 @@
   
   Release Builds of Tomcat 4.0 are created and released periodically, and
   announced to the interested mailing lists.  Each release build resides in its
  -own directories.  For example, the Tomcat 4.0-beta-6 release is available at:
  +own directories.  For example, the Tomcat 4.0-beta-7 release is available at:
   
  -Binary:  http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b6/
  -Source:  http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b6/src/
  +Binary:  http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b7/
  +Source:  http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b7/src/
   
  
  
  



Re: [VOTE] New Tomcat Committer

2001-08-24 Thread cmanolache

On Fri, 24 Aug 2001, Craig R. McClanahan wrote:

 As Jon informally did last week or so, I'd like to formally propose
 Christopher Cain [EMAIL PROTECTED] as a committer on Tomcat.  He's
 contributed lots of useful discussion, patches, and documentation
 (particularly in the area of SSL-based things) and wants to do more.

+1

Costin




welcome file in web.xml with pre-compiled jsp's?

2001-08-24 Thread dhay



Hi.  I posted this to the tomcat user group, with no joy.

I am beginning to suspect this is a bug - is it intended behaviour that if
jsp's are pre-compiled you cannot use them as a welcome page?  Seems very
strange to me if it is!

Thanks,

Dave


-- Forwarded by David Hay/Lex/Lexmark on 08/24/2001 04:13 PM
---


David Hay
08/21/2001 03:00 PM

To:   [EMAIL PROTECTED]
cc:
Subject:  welcome file in web.xml with pre-compiled jsp's?

Hi everyone,

I am pre-compiling my jsp's in my struts web app, and everything works fine,
except specifying the welcome file in the web.xml.

If I do not pre-compile everything, having index.jsp as the first page works
great.  However, when I pre-compile index.jsp it doesn't work.  Putting an
uncompiled index.jsp back in the root directory makes it work again.  I guess it
is because jsp is not in root directory, but figure I should still be able to do
this...

Does anyone know if there is something special I have to do, or if there is
anywhere else I can specify the first page as a servlet?

btw, please copy me into any reply!

Thanks,

Dave

Web.xml:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
  http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

!-- web.xml for use with PRE-COMPILED JSP's --
web-app


   !-- The Welcome File List --
   welcome-file-list
!-- call index.jsp as first page --
welcome-fileindex.jsp/welcome-file
   /welcome-file-list

   !-- Action Servlet Configuration --
   servlet
servlet-nameaction/servlet-name
!-- central Action Servlet Controller to use --
servlet-classbeans.AppController/servlet-class
!-- Java class name of the application resources bundle base class --
init-param
  param-nameapplication/param-name
  param-valueApplicationResources/param-value
/init-param
!-- Context-relative path to the XML resource containing our configuration
information --
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
!-- The debugging detail level for this servlet, which controls how much
information is logged. [0] --
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
!-- The debugging detail level for the Digester we utilize in
initMapping(), which logs to System.out instead of the servlet log. [0] --
init-param
  param-namedetail/param-name
  param-value2/param-value
/init-param
load-on-startup2/load-on-startup
   /servlet

   !-- Catch any exceptions, and redirect to error page --
   error-page
  exception-typejava.lang.Exception/exception-type
  location/error.jsp/location
   /error-page


   servlet
servlet-name
changeLogFileName
/servlet-name
servlet-class
JspServ.changeLogFileName
/servlet-class
   /servlet

   servlet
servlet-name
chooseDevice
/servlet-name
servlet-class
JspServ.chooseDevice
/servlet-class
   /servlet

   servlet
servlet-name
dataDir
/servlet-name
servlet-class
JspServ.dataDir
/servlet-class
   /servlet

   servlet
servlet-name
dataDirFrame
/servlet-name
servlet-class
JspServ.dataDirFrame
/servlet-class
   /servlet

   servlet
servlet-name
error
/servlet-name
servlet-class
JspServ.error
/servlet-class
   /servlet

   servlet
servlet-name
index
/servlet-name
servlet-class
JspServ.index
/servlet-class
   /servlet

   servlet
servlet-name
indexBar
/servlet-name
servlet-class
JspServ.indexBar
/servlet-class
   /servlet

   servlet
servlet-name
log
/servlet-name
servlet-class
JspServ.log
/servlet-class
   /servlet

   servlet
servlet-name
logFilter
/servlet-name
servlet-class
JspServ.logFilter
/servlet-class
   /servlet

   servlet
servlet-name
logFrame
/servlet-name
servlet-class
JspServ.logFrame
/servlet-class
   /servlet

   servlet
servlet-name
logging
/servlet-name
servlet-class
JspServ.logging
/servlet-class
   /servlet

   servlet
servlet-name
loggingFrame
/servlet-name
servlet-class
JspServ.loggingFrame
/servlet-class
   /servlet

   servlet
servlet-name
loggingSaveCancel
/servlet-name
servlet-class
JspServ.loggingSaveCancel
/servlet-class
   /servlet

   servlet
servlet-name
login
/servlet-name
servlet-class
JspServ.login
/servlet-class
   /servlet

   servlet
servlet-name
messages
/servlet-name
servlet-class
JspServ.messages
/servlet-class
   /servlet

   servlet
servlet-name
parameters
/servlet-name
servlet-class