[PATCH] Bug fix for #1678

2001-05-24 Thread Hiro Takahashi

This is the fix for ServletInputStream.read() bug.
#1678: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1678
The change is in Ajp13ConnectorRequest.java. This one is obviously
the one which has not been tested with a binary data.
I made this patch for 3.2.1.

Index: Ajp13ConnectorRequest.java
===
RCS file: 
jakarta-tomcat/src/share/org/apache/tomcat/service/connector/Ajp13ConnectorRequest.java,v
retrieving revision 1.1
diff -u -r1.1 Ajp13ConnectorRequest.java
--- Ajp13ConnectorRequest.java  2001/05/23 22:41:09 1.1
+++ Ajp13ConnectorRequest.java  2001/05/24 06:20:53
@@ -251,8 +251,12 @@
 {
 if(pos = blen) {
 refeelReadBuffer();
+   if (pos= blen) {
+   // seems no data
+   return -1;
+   }
 }
-return bodyBuff[pos++];
+return bodyBuff[pos++]  0xff;
 }
 
 public int doRead(byte[] b, int off, int len) throws IOException 
@@ -261,7 +265,6 @@
 for(int i = off ; i  (len + off) ; i++) {
 int a = doRead();
 if(-1 == a) {
-System.out.println(Y);
 return i-off;
 }
 b[i] = (byte)a;




Re: [PATCH] Bug fix for #1678

2001-05-24 Thread DAK

Now, this is what I was talking about with the upload data corruption! 
Finally, corroboration!

   David

Hiro Takahashi wrote:

 This is the fix for ServletInputStream.read() bug.
 #1678: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1678
 The change is in Ajp13ConnectorRequest.java. This one is obviously
 the one which has not been tested with a binary data.
 I made this patch for 3.2.1.
 
 Index: Ajp13ConnectorRequest.java
 ===
 RCS file: 
jakarta-tomcat/src/share/org/apache/tomcat/service/connector/Ajp13ConnectorRequest.java,v
 retrieving revision 1.1
 diff -u -r1.1 Ajp13ConnectorRequest.java
 --- Ajp13ConnectorRequest.java2001/05/23 22:41:09 1.1
 +++ Ajp13ConnectorRequest.java2001/05/24 06:20:53
 @@ -251,8 +251,12 @@
  {
  if(pos = blen) {
  refeelReadBuffer();
 + if (pos= blen) {
 + // seems no data
 + return -1;
 + }
  }
 -return bodyBuff[pos++];
 +return bodyBuff[pos++]  0xff;
  }
  
  public int doRead(byte[] b, int off, int len) throws IOException 
 @@ -261,7 +265,6 @@
  for(int i = off ; i  (len + off) ; i++) {
  int a = doRead();
  if(-1 == a) {
 -System.out.println(Y);
  return i-off;
  }
  b[i] = (byte)a;
 




RE: question

2001-05-24 Thread Reilly, John

Hi Pier,
Apparently there is a virus in the index.htm  - I got the following attached
to your mail.

John


   Network Associates GroupShield Exchange  **
  Alert generated at: Thursday, May 24, 2001 11:23:27 GMT Daylight
Time
**


The file index.htm has been replaced as it contains the SunOS/BoxPoison.worm
virus.
 Please consult your administrator for further help.



 -Original Message-
 From: Pier P. Fumagalli [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 24, 2001 11:18 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: FW: question
 
 
 Here's what it seems they did with the exploit... Rerolling 
 the binaries
 *balls of Tomcat putting a new index.htm...
 
 I'm downloading the supposedly wrong binary as we speak, but 
 it's kinda slow
 from my 56kbps connection...
 
 Fuck shit...
 
 Pier
 



[PATCH] for mod_jk/ajp13 memory leaks.

2001-05-24 Thread Mike Anderson

I found some more memory leaks in mod_jk.  The biggest one is in mod_jk.c when there 
is a virtual host section in httpd.conf.  Multiple conf structures are allocated, but 
only one was being cleaned up.  Another leak was in jk_ajp13_worker.c.  We were 
calling jk_open_pool on the endpoint object and never calling jk_close_pool when the 
endpoint was shut down.  The attached diff files are against the latest tomcat_33 
branch.  If anyone is interested, I'd be happy to provide the same diffs for tomcat_32 
and the tomcat-jakarta-connectors project.  I'd also be happy to enter a bug if 
necessary.

Thanks,

Mike Anderson
Senior Software Engineer
Platform Services Group
[EMAIL PROTECTED]
Novell, Inc., the leading provider of Net services software
www.novell.com


 mod_jk.diff
 jk_ajp13_worker.diff


Re: question

2001-05-24 Thread Pier P. Fumagalli

DO NOT (I repeat) DO NOT OPEN the index.htm file I sent in my previous
post... It's infected with a copy of SunOS/BoxPoison.worm AND it seems it's
coming from one of our distributions of Tomcat 3.2.x...
I'm still digging thru it...

Pier

Pier P. Fumagalli at [EMAIL PROTECTED] wrote:

 Here's what it seems they did with the exploit... Rerolling the binaries
 *balls of Tomcat putting a new index.htm...
 
 I'm downloading the supposedly wrong binary as we speak, but it's kinda slow
 from my 56kbps connection...
 
 Fuck shit...
 
   Pier




Re: question

2001-05-24 Thread Pier P. Fumagalli

Noticed, and that seems to have affected one of our Tomcat distributions...
Still checking...

Pier

Reilly, John at [EMAIL PROTECTED] wrote:

 Hi Pier,
 Apparently there is a virus in the index.htm  - I got the following attached
 to your mail.
 
 John
 
 
    Network Associates GroupShield Exchange  **
   Alert generated at: Thursday, May 24, 2001 11:23:27 GMT Daylight
 Time
 **
 
 
 The file index.htm has been replaced as it contains the SunOS/BoxPoison.worm
 virus.
 Please consult your administrator for further help.
 
 
 
 -Original Message-
 From: Pier P. Fumagalli [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 24, 2001 11:18 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: FW: question
 
 
 Here's what it seems they did with the exploit... Rerolling
 the binaries
 *balls of Tomcat putting a new index.htm...
 
 I'm downloading the supposedly wrong binary as we speak, but
 it's kinda slow
 from my 56kbps connection...
 
 Fuck shit...
 
 Pier
 




Problem:jsp:include page=%=servletPath% flush=true|false/

2001-05-24 Thread cher



Hi Oskar,

Refering to your problem on http://w4.metronet.com/~wjm/tomcat/2001/May/msg00767.html,
we are encoutner the same headache 
too:
Error:["Cannot forward after response has been 
committed."]
Do you have any hint to solve it ?

Thanks.

Regards,
Cher
eTact Solutions, Singapore
http://www.etact.com.sg



Re: question

2001-05-24 Thread Pier P. Fumagalli

Correct... I went out and looked at the file, then did some research on the
virus itself, and, it doesn't (luckily) comes from our Tomcat 3.2.1
distribution (I'm paranoia mode right now!). The file is totally harmless
and it seems that Casper has a SunOS box which has been infected...

2 hours wasted... What-EVER! :)

Pier

Casper Gjerris at [EMAIL PROTECTED] wrote:

 Hi Pier,
 
 I just picked up
 tomcat-3.2.1.zip
 tomcat-3.2.1.tar.gz
 tomcat.zip (from the nigthly 3.3)
 
 And none of them seems to have any problems with index.html.
 
 It seems to me that you have already fixed the problem or that casper in
 taiwan has been hacked himself.
 
 Regards
 Casper Gjerris
 
 
 
 
 - Original Message -
 From: Pier P. Fumagalli 
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Thursday, May 24, 2001 12:18 PM
 Subject: FW: question
 
 
 Here's what it seems they did with the exploit... Rerolling the binaries
 *balls of Tomcat putting a new index.htm...
 
 I'm downloading the supposedly wrong binary as we speak, but it's kinda slow
 from my 56kbps connection...
 
 Fuck shit...
 
   Pier
 
 -- Forwarded Message
 From: casper[EMAIL PROTECTED]
 Reply-To: casper[EMAIL PROTECTED]
 Date: Thu, 24 May 2001 14:07:14 +0800
 To: webmaster @ jakarta . apache . org [EMAIL PROTECTED]
 Subject: question
 
 Hi
 
 I download tomcat3.2.1 version software but when i to set my file in the
 \webapps .I find one file and file name is index.htm and this file is from
 china.
 i send this file to you,pls to check your server is okay and i have check my
 server is no any hacker.
 I download file date is 2001/05/23.
 If it's right pls send mail to me.
 
 thanks
 Casper
 
 
 
 ??·?  http://mail.kimo.com.tw
  ? ? ? ?·? ? ? ?   http://www.kimo.com.tw
 
 
 
 -- End of Forwarded Message
 
 




RE: [PATCH] Bug fix for #1678

2001-05-24 Thread Marc Saegesser

This was fixed in Tomcat 3.2.2 quite some time ago.  Check out the tip of
the tomcat_32 branch and look at the connector code again.

 -Original Message-
 From: Hiro Takahashi [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 24, 2001 1:33 AM
 To: [EMAIL PROTECTED]
 Subject: [PATCH] Bug fix for #1678


 This is the fix for ServletInputStream.read() bug.
 #1678: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1678
 The change is in Ajp13ConnectorRequest.java. This one is obviously
 the one which has not been tested with a binary data.
 I made this patch for 3.2.1.

 Index: Ajp13ConnectorRequest.java
 ===
 RCS file:
 jakarta-tomcat/src/share/org/apache/tomcat/service/connector/Ajp13
ConnectorRequest.java,v
 retrieving revision 1.1
 diff -u -r1.1 Ajp13ConnectorRequest.java
 --- Ajp13ConnectorRequest.java2001/05/23 22:41:09 1.1
 +++ Ajp13ConnectorRequest.java2001/05/24 06:20:53
 @@ -251,8 +251,12 @@
  {
  if(pos = blen) {
  refeelReadBuffer();
 + if (pos= blen) {
 + // seems no data
 + return -1;
 + }
  }
 -return bodyBuff[pos++];
 +return bodyBuff[pos++]  0xff;
  }

  public int doRead(byte[] b, int off, int len) throws IOException
 @@ -261,7 +265,6 @@
  for(int i = off ; i  (len + off) ; i++) {
  int a = doRead();
  if(-1 == a) {
 -System.out.println(Y);
  return i-off;
  }
  b[i] = (byte)a;




Context admin

2001-05-24 Thread Chandra . Usulumarthy

Does Context admin  in tomcat 3.2 1 have a default userid and password?
chandra




Re: FW: question

2001-05-24 Thread Brian Behlendorf


Hmm; I looked at the following:

http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.1/bin/jakarta-tomcat-3.2.1.tar.gz
http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.1/bin/jakarta-tomcat-3.2.1.zip

and in both of these, the webapps folder contained four files,

 [taz3] 6:54am webapps  ls
 total 1247
 1024 ROOT.war 7 admin.war   128 examples.war88 test.war

I didn't look inside the .sea archives, nor did I see a webapps dir in the
servletapi tarballs.  Are there any other tarballs to look at?

This *looks* like a false alarm.  Ask him for an md5 of the tarball he
downloaded, as well as where he downloaded it from.  You guys might want
to consider signing your releases at some point, too.

Brian

On Thu, 24 May 2001, Pier P. Fumagalli wrote:
 Here's what it seems they did with the exploit... Rerolling the binaries
 *balls of Tomcat putting a new index.htm...

 I'm downloading the supposedly wrong binary as we speak, but it's kinda slow
 from my 56kbps connection...

 Fuck shit...

 Pier

 -- Forwarded Message
 From: casper[EMAIL PROTECTED]
 Reply-To: casper[EMAIL PROTECTED]
 Date: Thu, 24 May 2001 14:07:14 +0800
 To: webmaster @ jakarta . apache . org [EMAIL PROTECTED]
 Subject: question

 Hi

   I download tomcat3.2.1 version software but when i to set my file in the
 \webapps .I find one file and file name is index.htm and this file is from
 china.
 i send this file to you,pls to check your server is okay and i have check my
 server is no any hacker.
 I download file date is 2001/05/23.
 If it's right pls send mail to me.

 thanks
  Casper


 
 ??·?  http://mail.kimo.com.tw
  ? ? ? ?·? ? ? ?   http://www.kimo.com.tw



 -- End of Forwarded Message



-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CollabNet |open source|do what's right| now hiring





ThreadPool safety checks

2001-05-24 Thread Hector Gonzalez

Hi all,

After performing stress testing on Tomcat 3.2.1 running on Linux, I found
that performance would always decrease over time until the server stopped
responding completely. I was accessing tomcat as an stand alone server on
port 8080 and requesting a servlet that returned a null body (null servlet),
tomcat was running on IBM 1.3 JVM, using native threads. The clients where
three machines each running 20 threads requesting the null servlet.
Initially tomcat would handle about 400 requests/sec, but after about 20
minutes requests per second would be down to about 20, and thereafter tomcat
would completely stop.

After looking at the code, I found out that all the threads in the thread
pool of tcp connections were busy and none would become idle. The attached
TcpWorkerThreads would not return from processing the request, I don't
really know why. I modified ThreadPool.java to perform two sanity checks on
the pool:

1. If a thread has been processing a request for too long (as specified in a
parameter) the thread is stoped.
2. After a thread has already processed X requests or more (X
TcpWorkerThreads have been attached), it is terminated and a new thread is
created.

The checks are performed by the Monitor thread, when it calls
checkSpareControllers.

After implementing these changes I ran the stress tests again with very good
results: performance remains at around 400 requests/sec indefinetly.

The safety checks can be completely disabled through configuration
parameters if desired.

As I am new to this list, I am not sure what the procedure to review and
possibly incorporate my changes into the code are. I modified three files:
org.apache.tomcat.util.ThreadPool, org.apache.tomcat.util.ThreadPoolRunnable
and org.apache.tomcat.service.PoolTcpEndPoint.java. I am attaching the
modified files. There is a lot of debugging info in those, I could clean
them up if you decide that it is worth including the changes in the main
branch of Tomcat.

Regards

Hector Gonzalez
QuestionExchange - http://www.questionexchange.com
[EMAIL PROTECTED]
Voice: (617)451-1527 Fax: (617)451-1487

 ThreadPool.java
 ThreadPoolRunnable.java
 PoolTcpEndpoint.java


tomcat and macromedia ultra dev 4.0

2001-05-24 Thread Mehmet Ugur Kuzu (LinkPlus)
Title:  tomcat  and macromedia ultra dev 4.0





Hi everbody,


I want to run macromedia ultra dev 4.0 generated jsp code under tomcat , but i got a lot of error messages( i paste an example above ) when i tried to run my pages 

, is there any body can say me what version of tomcat , jdk and apache i must use together for running macromedia generated jsp pages,

and in addition i can't find a document how can i configure tomcat 4.0 on windows 2000 with apache.


sincerely,
Mehmet Ugur Kuzu


This login.jsp page generates error after submit the  form, 


%@page contentType=text/html; charset=iso-8859-1 language=java import=java.sql.*% 
%@ include file=Connections/DENEME.jsp %
%
Driver DriverRecordset1 = (Driver)Class.forName(MM_DENEME_DRIVER).newInstance();
Connection ConnRecordset1 = DriverManager.getConnection(MM_DENEME_STRING,MM_DENEME_USERNAME,MM_DENEME_PASSWORD);
PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement(SELECT * FROM USERS);
ResultSet Recordset1 = StatementRecordset1.executeQuery();
boolean Recordset1_isEmpty = !Recordset1.next();
boolean Recordset1_hasData = !Recordset1_isEmpty;
Object Recordset1_data;
int Recordset1_numRows = 0;
%
%
// *** Validate request to log in to this site.
String MM_LoginAction = request.getRequestURI();
if (request.getQueryString() != null  request.getQueryString().length()  0) MM_LoginAction += ? + request.getQueryString();

String MM_valUsername=request.getParameter(textfield2);
if (MM_valUsername != null) {
 String MM_fldUserAuthorization=;
 String MM_redirectLoginSuccess=Next.gif;
 String MM_redirectLoginFailed=Last.gif;
 String MM_redirectLogin=MM_redirectLoginFailed;
 Driver MM_driverUser = (Driver)Class.forName(MM_DENEME_DRIVER).newInstance();
 Connection MM_connUser = DriverManager.getConnection(MM_DENEME_STRING,MM_DENEME_USERNAME,MM_DENEME_PASSWORD);
 String MM_pSQL = SELECT USERNAME, USERPASSWORD;
 if (!MM_fldUserAuthorization.equals()) MM_pSQL += , + MM_fldUserAuthorization;
 MM_pSQL +=  FROM USERS WHERE USERNAME=' + MM_valUsername + ' AND USERPASSWORD=' + request.getParameter(textfield) + ';

 PreparedStatement MM_statementUser = MM_connUser.prepareStatement(MM_pSQL);
 ResultSet MM_rsUser = MM_statementUser.executeQuery();
 boolean MM_rsUser_isNotEmpty = MM_rsUser.next();
 if (MM_rsUser_isNotEmpty) {
 // username and password match - this is a valid user
 session.putValue(MM_Username, MM_valUsername);
 if (!MM_fldUserAuthorization.equals()) {
 session.putValue(MM_UserAuthorization, MM_rsUser.getString(MM_fldUserAuthorization).trim());
 } else {
 session.putValue(MM_UserAuthorization, );
 }
 if ((request.getParameter(accessdenied) != null)  false) {
 MM_redirectLoginSuccess = request.getParameter(accessdenied);
 }
 MM_redirectLogin=MM_redirectLoginSuccess;
 }
 MM_rsUser.close();
 MM_connUser.close();
 response.sendRedirect(response.encodeRedirectURL(MM_redirectLogin));
}
%
html
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
body bgcolor=#FF text=#00
form name=form1 method=post action=%=MM_LoginAction%
 input type=text name=textfield2
 input type=text name=textfield
 input type=submit name=Submit value=Submit
/form
pnbsp;/p
/body
/html




after submit, this error generated,


Internal Servlet Error:
javax.servlet.ServletException: General error
 at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
 at ULTRADEVWORKS._0002fULTRADEVWORKS_0002flogin_0002ejsplogin_jsp_9._jspService(_0002fULTRADEVWORKS_0002flogin_0002ejsplogin_jsp_9.java:143)

 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)

 at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)
Root cause: 
java.sql.SQLException: General error
 at sun.jdbc.odbc.JdbcOdbc.throwGenericSQLException(JdbcOdbc.java:6160)
 at sun.jdbc.odbc.JdbcOdbc.SQLFreeEnv(JdbcOdbc.java:2742)
 at sun.jdbc.odbc.JdbcOdbcDriver.closeConnection(JdbcOdbcDriver.java:842)
 at 

RE: tomcat and macromedia ultra dev 4.0

2001-05-24 Thread Mehmet Ugur Kuzu (LinkPlus)
Title: tomcat and macromedia ultra dev 4.0



Hi 
David and other members,

sorry 
for my message to this list,

i 
apologize from all of you ,

however i want to say that i achieve some pages and 
some not,

i will 
send my message to user list,

sorry 
again...



  -Original Message-From: David M Johnson 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 24, 2001 6:28 
  PMTo: [EMAIL PROTECTED]Subject: RE: tomcat 
  and macromedia ultra dev 4.0
  This 
  mailing list is really for developers working on the Tomcat servlet 
  container.
  
  You 
  will have a better chance of getting a useful response on the Tomcat user 
  mailing list.
  
  It 
  looks like your problem involves some sort of database connection 
  failure.
  You 
  might want to trycreating a very simple 'Hello World' type JSP page with 
  
  MacroMedia and then see if that works on Tomcat 
  before you try to run a more
  complex page like your 'login.jsp' 
  page.
  
  - 
  Dave
  
  
  
-Original Message-From: Mehmet Ugur Kuzu 
(LinkPlus) [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 
24, 2001 10:38 AMTo: 
[EMAIL PROTECTED]Subject: tomcat and macromedia ultra 
dev 4.0
Hi everbody, 
I want to run macromedia ultra dev 4.0 
generated jsp code under tomcat , but i got a lot of error messages( i 
paste an example above ) when i tried to run my pages 
, is there any body can say me what 
version of tomcat , jdk and apache i must use together for running 
macromedia generated jsp pages,
and in addition i can't find a document how 
can i configure tomcat 4.0 on windows 2000 with apache. 
sincerely, Mehmet Ugur Kuzu 
This login.jsp page generates error after 
submit the  form, 
%@page contentType="text/html; 
charset=iso-8859-1" language="java" import="java.sql.*"% 
%@ include 
file="Connections/DENEME.jsp" % % Driver 
DriverRecordset1 = 
(Driver)Class.forName(MM_DENEME_DRIVER).newInstance(); Connection ConnRecordset1 = 
DriverManager.getConnection(MM_DENEME_STRING,MM_DENEME_USERNAME,MM_DENEME_PASSWORD); 
PreparedStatement 
StatementRecordset1 = ConnRecordset1.prepareStatement("SELECT * FROM 
USERS"); ResultSet Recordset1 
= StatementRecordset1.executeQuery(); boolean Recordset1_isEmpty = 
!Recordset1.next(); boolean 
Recordset1_hasData = !Recordset1_isEmpty; Object Recordset1_data; int Recordset1_numRows = 0; % % // *** Validate 
request to log in to this site. String MM_LoginAction = request.getRequestURI(); if (request.getQueryString() != null 
 request.getQueryString().length()  0) MM_LoginAction += "?" + 
request.getQueryString();
String 
MM_valUsername=request.getParameter("textfield2"); if (MM_valUsername != null) {  String 
MM_fldUserAuthorization="";  String MM_redirectLoginSuccess="Next.gif";  String 
MM_redirectLoginFailed="Last.gif";  String MM_redirectLogin=MM_redirectLoginFailed; 
 Driver MM_driverUser = 
(Driver)Class.forName(MM_DENEME_DRIVER).newInstance();  Connection MM_connUser = 
DriverManager.getConnection(MM_DENEME_STRING,MM_DENEME_USERNAME,MM_DENEME_PASSWORD); 
 String MM_pSQL = "SELECT 
USERNAME, USERPASSWORD";  if (!MM_fldUserAuthorization.equals("")) MM_pSQL += "," + 
MM_fldUserAuthorization;  MM_pSQL += " FROM USERS WHERE USERNAME='" + MM_valUsername + 
"' AND USERPASSWORD='" + request.getParameter("textfield") + "'";
 PreparedStatement 
MM_statementUser = MM_connUser.prepareStatement(MM_pSQL);  ResultSet MM_rsUser = 
MM_statementUser.executeQuery();  boolean MM_rsUser_isNotEmpty = MM_rsUser.next(); 
 if (MM_rsUser_isNotEmpty) 
{  // 
username and password match - this is a valid user  
session.putValue("MM_Username", MM_valUsername);  if 
(!MM_fldUserAuthorization.equals("")) {  
session.putValue("MM_UserAuthorization", 
MM_rsUser.getString(MM_fldUserAuthorization).trim());  } else {  
session.putValue("MM_UserAuthorization", "");  }  if 
((request.getParameter("accessdenied") != null)  false) { 
 
MM_redirectLoginSuccess = request.getParameter("accessdenied"); 
 } 
 
MM_redirectLogin=MM_redirectLoginSuccess;  }  MM_rsUser.close();  MM_connUser.close();  
response.sendRedirect(response.encodeRedirectURL(MM_redirectLogin)); 
} % html head titleUntitled Document/title meta http-equiv="Content-Type" 
content="text/html; charset=iso-8859-1" /head body bgcolor="#FF" 
text="#00" form 
name="form1" method="post" action="%=MM_LoginAction%" 
 input type="text" 
name="textfield2"  
input type="text" name="textfield"  input type="submit" name="Submit" 
value="Submit" /form pnbsp;/p /body /html 
after submit, this error generated, 

Internal Servlet Error: 
javax.servlet.ServletException: General 
error  at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) 
 at 
  

Re: question

2001-05-24 Thread Brian Behlendorf

On Thu, 24 May 2001, Jon Stevens wrote:
 WHAT?? I don't think that there should be .sea files there!

 .sea is a MacOS Stuffit Archive.

To be clear, I'm talking about the .sea and .sea.hqx files found at

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

They were created (ostensibly) on Jan 9th by Pier.  Pier, do you recall
putting them there?  These are separate files, *not* within the .tar.gz or
.zip distributions.  I seem to recall people talking about running tomcat
on MacOS9, so I'm not tempted to automatically state they're a problem,
but please tell me if they are.

 Also, the .war files are == .jar files which are equal to .zip files. They
 are auto uncompressed by the servlet engine when it starts up. So, the
 file will probably be located in the ROOT.war.

OK, I unzipped the ROOT.war file, and the index.html file in that dir
looks normal (i.e., not that index.htm file that person claimed was
there), as do the rest of the files that get unzipped.  I also looked at
all the other .war files, and none of them have that file.

So it seems OK.

Brian






Re: question

2001-05-24 Thread Pier P. Fumagalli

Jon Stevens at [EMAIL PROTECTED] wrote:
 
 WHAT?? I don't think that there should be .sea files there!
 
 .sea is a MacOS Stuffit Archive.
 
 Also, the .war files are == .jar files which are equal to .zip files. They
 are auto uncompressed by the servlet engine when it starts up. So, the
 file will probably be located in the ROOT.war.
 
 We really should take all of our distributions offline ASAP.

Hold it hold it hold it... I made the SEA of Tomcat 3.2.1 to work with
Apple's MRJ on MacOS 8.6-9.1... (And it works!)

 This *looks* like a false alarm.  Ask him for an md5 of the tarball he
 downloaded, as well as where he downloaded it from.  You guys might want
 to consider signing your releases at some point, too.
 
 This is a project by project thing to do. Most of the projects do it
 correctly.

Might want to enforce it from a PMC standpoint?? :)

Pier




Re: JDBC session store, release date projections, etc

2001-05-24 Thread Bip Thelin

 Dunlop, Aaron wrote:
 
 [...]
 First: We will need to cluster application servers in front of a central database.
 We want the ability to add and remove servers from that farm in real-time,
  without disturbing ongoing sessions. That either means storing sessions remotely
 in the central DB, or migrating sessions from one machine to another.
 We'd like to avoid being forced into using session-affinity for load balancing,
  since in our environment, that would likely result in significantly unbalanced 
loads.

There is some effort going on to provide Clustering ability for TC4, currently you can
use it for in memory replication of sessions, however this feature is considered 
highly experimental.

 So that probably means we need JDBC session store. Correct? And if so, what (in your 
opinions)
 is the current state of JDBC Session Store? (Also - am I correct that it's only 
available under
 Tomcat 4.0? Will it eventually also be available under the 3.x series?)

When it comes to storing sessions you can use either FileStore or JDBCStore, I would 
say that
both are considered medium rare.

..bip



Re: JDBC session store, release date projections, etc

2001-05-24 Thread cmanolache

On Thu, 24 May 2001, Dunlop, Aaron wrote:

 First: We will need to cluster application servers in front of a central
 database. We want the ability to add and remove servers from that farm in
 real-time, without disturbing ongoing sessions. That either means storing
 ...
 So that probably means we need JDBC session store. Correct? And if so, what
 (in your opinions) is the current state of JDBC Session Store? (Also - am I
 correct that it's only available under Tomcat 4.0? Will it eventually also
 be available under the 3.x series?)

It shouldn't be difficult to port it to 3.x, but I don't think this is a
priority. I also don't think such a thing should be included in 3.x - if
anyone does the port, it should be released as a separate module. We are
trying hard to keep 3.x to the essential level and move any
non-essential features outside of the standard release.


My personal opinion is that such code shouldn't even be part of the
servlet container - but implmented as a user-space util. I know most
people have a different opinion.

If you want your data stored in a JDBC database - it's far better to do it
yourself, and treat the tomcat session as a simple cache. You'll have far
more flexibility, the code will run on any servlet container, you'll have
access to a more powerfull API ( like transactions ).

There is no way to insure consistency ( or acid) using only the session
API - saving an object in the session and hoping the container will save
it is far worse than using an API that will also tell you if the operation
was successfully executed ( and no container can guarantee the save was
successfull - there is no way to pass this information in the servlet
api).


Of course, I am probably wrong - since most people seem to believe the
container can hide such a complex problem behind the simple session API.


Costin




Re: Problem:jsp:include page=%=servletPath% flush=true|false/

2001-05-24 Thread Oskar Zinger

Nope. I have not found any solution to that yet.  I have decided to go
with JSP for now (until I develop everything)... then I will think of
deployment of the converted servlets.  And for now I am setting
flush=false, and with JSPs it works fine, even though it should be the
same in theory since whether I compile my JSPs through CMD by jspc.sh
script and run them pre compiled or I let them compile on the fly
dynamically.

---
Oskar Zinger

cher wrote:

 Hi Oskar, Refering to your problem on
 http://w4.metronet.com/~wjm/tomcat/2001/May/msg00767.html,we are
 encoutner the same headache too:Error:[Cannot forward after response
 has been committed.]Do you have any hint to solve it
 ? Thanks. Regards,ChereTact Solutions,
 Singaporehttp://www.etact.com.sg




Re: ThreadPool safety checks

2001-05-24 Thread Dan Milstein

Hector,

First off, it looks like you've done some very, very helpful work.  A few
suggestions:

1) For info about how to contribute code, processes, etc, look at:

http://jakarta.apache.org/site/getinvolved.html

And, specifically, about the format for proposed code changes (i.e. patches
instead of full files):

http://jakarta.apache.org/site/source.html

2) You might take a look at 3.2.2 -- it has a lot of bugfixes, and should be
released live very soon.  I don't know if any work was done on this
particular issue, but it would be worth a quick check.  Info about how to
obtain 3.2.2 can be found on the site.

Thanks again,
-Dan

Hector Gonzalez wrote:
 
 Hi all,
 
 After performing stress testing on Tomcat 3.2.1 running on Linux, I found
 that performance would always decrease over time until the server stopped
 responding completely. I was accessing tomcat as an stand alone server on
 port 8080 and requesting a servlet that returned a null body (null servlet),
 tomcat was running on IBM 1.3 JVM, using native threads. The clients where
 three machines each running 20 threads requesting the null servlet.
 Initially tomcat would handle about 400 requests/sec, but after about 20
 minutes requests per second would be down to about 20, and thereafter tomcat
 would completely stop.
 
 After looking at the code, I found out that all the threads in the thread
 pool of tcp connections were busy and none would become idle. The attached
 TcpWorkerThreads would not return from processing the request, I don't
 really know why. I modified ThreadPool.java to perform two sanity checks on
 the pool:
 
 1. If a thread has been processing a request for too long (as specified in a
 parameter) the thread is stoped.
 2. After a thread has already processed X requests or more (X
 TcpWorkerThreads have been attached), it is terminated and a new thread is
 created.
 
 The checks are performed by the Monitor thread, when it calls
 checkSpareControllers.
 
 After implementing these changes I ran the stress tests again with very good
 results: performance remains at around 400 requests/sec indefinetly.
 
 The safety checks can be completely disabled through configuration
 parameters if desired.
 
 As I am new to this list, I am not sure what the procedure to review and
 possibly incorporate my changes into the code are. I modified three files:
 org.apache.tomcat.util.ThreadPool, org.apache.tomcat.util.ThreadPoolRunnable
 and org.apache.tomcat.service.PoolTcpEndPoint.java. I am attaching the
 modified files. There is a lot of debugging info in those, I could clean
 them up if you decide that it is worth including the changes in the main
 branch of Tomcat.
 
 Regards
 
 Hector Gonzalez
 QuestionExchange - http://www.questionexchange.com
 [EMAIL PROTECTED]
 Voice: (617)451-1527 Fax: (617)451-1487
 
   
   Name: ThreadPool.java
ThreadPool.javaType: unspecified type (application/octet-stream)
   Encoding: quoted-printable
 
   Name: ThreadPoolRunnable.java
ThreadPoolRunnable.javaType: unspecified type (application/octet-stream)
   Encoding: quoted-printable
 
Name: PoolTcpEndpoint.java
PoolTcpEndpoint.javaType: unspecified type (application/octet-stream)
Encoding: quoted-printable

-- 

Dan Milstein // [EMAIL PROTECTED]



tomcat.sh for cygwin

2001-05-24 Thread DAK

For those who use cygwin on windows, here is a version of the tomcat.sh 
script that I've been using.
Perhaps this could go in the repository under tomcat.cygwin

   David


#!/bin/sh
#
# $Id: tomcat.sh,v 1.17.2.1 2000/11/17 22:05:50 glenn Exp $

# Shell script to start and stop the server

# There are other, simpler commands to startup the runner. The two
# commented commands good replacements. The first works well with
# Java Platform 1.1 based runtimes. The second works well with
# Java2 Platform based runtimes.

#jre -cp runner.jar:servlet.jar:classes org.apache.tomcat.shell.Startup $*
#java -cp runner.jar:servlet.jar:classes org.apache.tomcat.shell.Startup $*

if [ -f $HOME/.tomcatrc ] ; then 
  . $HOME/.tomcatrc
fi

if [ $TOMCAT_HOME =  ] ; then
  ## resolve links - $0 may be a link to  home
  PRG=$0
  progname=`basename $0`
  
  while [ -h $PRG ] ; do
ls=`ls -ld $PRG`
link=`expr $ls : '.*- \(.*\)$'`
if expr $link : '.*/.*'  /dev/null; then
PRG=$link
else
PRG=`dirname $PRG`/$link
fi
  done
  
  TOMCAT_HOME_1=`dirname $PRG`/..
  echo Guessing TOMCAT_HOME from tomcat.sh to ${TOMCAT_HOME_1} 
if [ -d ${TOMCAT_HOME_1}/conf ] ; then 
TOMCAT_HOME=${TOMCAT_HOME_1}
echo Setting TOMCAT_HOME to $TOMCAT_HOME
fi
fi


if [ $TOMCAT_HOME =  ] ; then
  # try to find tomcat
  if [ -d ${HOME}/opt/tomcat/conf ] ; then 
TOMCAT_HOME=${HOME}/opt/tomcat
echo Defaulting TOMCAT_HOME to $TOMCAT_HOME
  fi

  if [ -d /opt/tomcat/conf ] ; then 
TOMCAT_HOME=/opt/tomcat
echo Defaulting TOMCAT_HOME to $TOMCAT_HOME
  fi
 
  # Add other standard locations for tomcat
fi

if [ $TOMCAT_HOME =  ] ; then
echo TOMCAT_HOME not set, you need to set it or install in a standard location
exit 1
fi

if [ $TOMCAT_OPTS =  ] ; then
  TOMCAT_OPTS=
fi

if [ $ANT_OPTS =  ] ; then
  ANT_OPTS=
fi

if [ $JSPC_OPTS =  ] ; then
  JSPC_OPTS=
fi

if [ -z $JAVA_HOME ] ;  then
  JAVA=`which java`
  if [ -z $JAVA ] ; then
echo Cannot find JAVA. Please set your PATH.
exit 1
  fi
  JAVA_BINDIR=`dirname $JAVA`
  JAVA_HOME=$JAVA_BINDIR/..
fi

if [ $JAVACMD =  ] ; then 
   # it may be defined in env - including flags!!
   JAVACMD=$JAVA_HOME/bin/java
fi

oldCP=$CLASSPATH
 
unset CLASSPATH
for i in ${TOMCAT_HOME}/lib/* ; do
  if [ $CLASSPATH !=  ]; then
CLASSPATH=${CLASSPATH};$i
  else
CLASSPATH=$i
  fi
done

if [ -f ${JAVA_HOME}/lib/tools.jar ] ; then
   # We are probably in a JDK1.2 environment
   CLASSPATH=${CLASSPATH};${JAVA_HOME}/lib/tools.jar
fi

# Backdoor classpath setting for development purposes when all classes
# are compiled into a /classes dir and are not yet jarred.
if [ -d ${TOMCAT_HOME}/classes ]; then
CLASSPATH=${TOMCAT_HOME}/classes;${CLASSPATH}
fi

if [ $oldCP !=  ]; then
CLASSPATH=${CLASSPATH};${oldCP}
fi

export CLASSPATH

# We start the server up in the background for a couple of reasons:
#   1) It frees up your command window
#   2) You should use `stop` option instead of ^C to bring down the server
if [ $1 = start ] ; then 
  shift 
  echo Using classpath: ${CLASSPATH}
echo options: ${TOMCAT_OPTS}
  if [ $1 = -security ] ; then
echo Starting with a SecurityManager
$JAVACMD $TOMCAT_OPTS -Djava.security.manager 
-Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy -Dtomcat.home=${TOMCAT_HOME} 
 org.apache.tomcat.startup.Tomcat $@ 
  else
  $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME}  org.apache.tomcat.startup.Tomcat 
$@ 
  fi
#   $JAVACMD org.apache.tomcat.shell.Startup $@ 

elif [ $1 = stop ] ; then 
  shift 
  echo Using classpath: ${CLASSPATH}
  $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat 
-stop $@
#   $JAVACMD org.apache.tomcat.shell.Shutdown $@

elif [ $1 = run ] ; then 
  shift 
  echo Using classpath: ${CLASSPATH}
  if [ $1 = -security ] ; then
echo Starting with a SecurityManager
$JAVACMD $TOMCAT_OPTS -Djava.security.manager 
-Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy -Dtomcat.home=${TOMCAT_HOME} 
org.apache.tomcat.startup.Tomcat $@
  else
  $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat 
$@ 
  fi
#  $JAVACMD org.apache.tomcat.shell.Startup $@ 
  # no 

elif [ $1 = ant ] ; then 
  shift 

  $JAVACMD $ANT_OPTS -Dant.home=${TOMCAT_HOME} -Dtomcat.home=${TOMCAT_HOME} 
org.apache.tools.ant.Main $@

elif [ $1 = jspc ] ; then 
  shift 

  $JAVACMD $JSPC_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.jasper.JspC $@

elif [ $1 = env ] ; then 
  ## Call it with source tomcat.sh to set the env for tomcat
  shift 
  echo Setting classpath to: ${CLASSPATH}
  oldCP=$CLASSPATH

else
  echo Usage:
  echo tomcat (start|env|run|stop|ant)
  echo start - start tomcat in the background
  echo run   - start tomcat in the foreground
  echo   -security - use a SecurityManager when starting
  echo stop  - stop tomcat
  echo env  -  set CLASSPATH and TOMCAT_HOME env. variables
  echo

Re: windows 2K + IIS 5.0 + cgi program + HTTP connection Keep Alive doesn't work

2001-05-24 Thread xuemei

Hi, Scott

Sorry to bother you again.

I've runned more tests, and found that for *.html files connection is kept
alive, while for
cgi program, it always close connection. Even when I just change my cgi
program name
with .html extension, connection becomes alive though the displayed content
is in a mess.

I've tried a simple html file and a cgi program which just produce the same
html file.
The *.html file works fine(I mean connection keeps alive) while not the cgi
program.

Also I found that in the HTTP GET header by Inetnet Explorer there is one:
If-None-Match: some random value here, and in the reply by IIS there is a
ETag: same value as in If-None-Match.  Are such headers defined in HTTP 1.0
or 1.1?
Related to connection problem?

Thanks in advance!

Xuemei








Slow session creating Tomcat 3.2.1

2001-05-24 Thread Strubinski,Waldemar W

 I've noticed that Tomcat  3.2.1  takes a long time to create
 a session for the first time.  
 
 I think it only takes  a long time the very first time it's asked to
 create
 a session (when the first person logs in after restarting Tomcat).
 
Do you have any suggestions how to fix it or where I
 can find any documentation on  that? 
 
 Thanks,
Waldemar 





RE: Slow session creating Tomcat 3.2.1

2001-05-24 Thread Martin van den Bemt

As far as I know it is because tomcat needs to init classes on first use. 

Mvgr,
Martin van den Bemt

 -Original Message-
 From: Strubinski,Waldemar W [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 24, 2001 10:46 PM
 To: '[EMAIL PROTECTED]'
 Subject: Slow session creating Tomcat 3.2.1
 
 
  I've noticed that Tomcat  3.2.1  takes a long time to create
  a session for the first time.  
  
  I think it only takes  a long time the very first time it's asked to
  create
  a session (when the first person logs in after restarting Tomcat).
  
 Do you have any suggestions how to fix it or where I
  can find any documentation on  that? 
  
  Thanks,
 Waldemar 
 
 
 



[PATCH] Tomcat 3.2.2 - missing string resources

2001-05-24 Thread Shawn McMurdo

Regarding the Tomcat 3.2.2 RequestDispatcherImpl string resource problem
I reported on Wednesday afternoon:
Since no one expressed a preference on how this should be fixed,
I chose to fix it by adding the strings to the core/LocalStrings*properties
files, since that didn't require any actual code modifications.
Attached is a patch made with cvs diff -u against the tomcat_32 branch.
Shawn

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



Index: LocalStrings.properties
===
RCS file: 
/home/cvspublic/jakarta-tomcat/src/share/org/apache/tomcat/core/Attic/LocalStrings.properties,v
retrieving revision 1.8.4.1
diff -u -r1.8.4.1 LocalStrings.properties
--- LocalStrings.properties 2001/03/15 20:15:15 1.8.4.1
+++ LocalStrings.properties 2001/05/25 02:26:34
@@ -41,6 +41,9 @@
 
 rdi.forward.ise=Cannot forward as OutputStream or Writer has already been obtained
 
+dispatcher.forwardException=Forwarded servlet threw exception
+dispatcher.includeException=Included servlet threw exception
+
 serverResponse.outputStream.ise=getWriter() has already been called
 serverResponse.ise.writer.ise=getOutputStream() has already been called
 
Index: LocalStrings_es.properties
===
RCS file: 
/home/cvspublic/jakarta-tomcat/src/share/org/apache/tomcat/core/Attic/LocalStrings_es.properties,v
retrieving revision 1.2.4.1
diff -u -r1.2.4.1 LocalStrings_es.properties
--- LocalStrings_es.properties  2001/03/15 20:15:17 1.2.4.1
+++ LocalStrings_es.properties  2001/05/25 02:26:34
@@ -40,6 +40,9 @@
 
 rdi.forward.ise=No puedo reenviar como OutputStream o el  Writer ha sido ya obtenido
 
+dispatcher.forwardException=El servlet de reenvio produjo una excepcion
+dispatcher.includeException=El servlet incluido produjo una excepcion
+
 serverResponse.outputStream.ise=getWriter() ha sido ya llamado
 serverResponse.ise.writer.ise=getOutputStream() ha sido ya llamado
 
Index: LocalStrings_fr.properties
===
RCS file: 
/home/cvspublic/jakarta-tomcat/src/share/org/apache/tomcat/core/Attic/LocalStrings_fr.properties,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 LocalStrings_fr.properties
--- LocalStrings_fr.properties  2001/03/15 20:15:17 1.1.2.2
+++ LocalStrings_fr.properties  2001/05/25 02:26:34
@@ -41,6 +41,9 @@
 
 rdi.forward.ise=Impossible de transférer car Le flux de sortie (OutputStream) ou 
l''écrivain (Writer) est déjà retenu
 
+dispatcher.forwardException=La servlet transféré (Forwarded) a généré une exception
+dispatcher.includeException=La servlet incluse (Included) a généré une exception
+
 serverResponse.outputStream.ise=La fonction getWriter() a déjà été appelé
 serverResponse.ise.writer.ise=La fonction getOutputStream() a déjà été appelé
 
Index: LocalStrings_se.properties
===
RCS file: 
/home/cvspublic/jakarta-tomcat/src/share/org/apache/tomcat/core/Attic/LocalStrings_se.properties,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 LocalStrings_se.properties
--- LocalStrings_se.properties  2001/03/15 20:15:18 1.1.2.1
+++ LocalStrings_se.properties  2001/05/25 02:26:35
@@ -41,6 +41,9 @@
 
 rdi.forward.ise=Kan inte skicka vidare eftersom OutputStream eller Writer redan 
blivit hämtat
 
+dispatcher.forwardException=Forwarded servlet threw exception
+dispatcher.includeException=Included servlet threw exception
+
 serverResponse.outputStream.ise=getWriter() har redan blivit avbrutet
 serverResponse.ise.writer.ise=getOutputStream() har redan blivit avbrutet
 



Re: windows 2K + IIS 5.0 + cgi program + HTTP connection Keep Alive doesn't work

2001-05-24 Thread xuemei

Hi, Scott

Sorry to bother you again.

I've runned more tests, and found that for *.html files connection is kept
alive, while for
cgi program, it always close connection. Even when I just change my cgi
program name
with .html extension, connection becomes alive though the displayed content
is in a mess.

I've tried a simple html file and a cgi program which just produce the same
html file.
The *.html file works fine(I mean connection keeps alive) while not the cgi
program.

Also I found that in the HTTP GET header by Inetnet Explorer there is one:
If-None-Match: some random value here, and in the reply by IIS there is a
ETag: same value as in If-None-Match.  Are such headers defined in HTTP 1.0
or 1.1?
Related to connection problem?

Thanks in advance!

Xuemei


- Original Message -
From: Scott Stahlman [EMAIL PROTECTED]
To: xuemei [EMAIL PROTECTED]
Sent: Saturday, May 19, 2001 1:01 PM
Subject: RE: windows 2K + IIS 5.0 + cgi program + HTTP connection Keep Alive
doesn't work


Sorry for the late reply.  Can you post this question on the newsgroup?
It would be a great help, as you can probably imagine I must account for
how I spend my time and posting this to the newsgroup allows us to do
that.
But see if
http://support.microsoft.com/support/kb/articles/Q195/1/79.asp helps you
at all.


Thanks,
Scott

-Original Message-
From: xuemei [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 16, 2001 4:20 AM
To: Scott Stahlman
Subject: windows 2K + IIS 5.0 + cgi program + HTTP connection Keep Alive
doesn't work

Hi, Scott

I found your email address from the IIS Newsgroup.
Sorry to bother you, but I really need some help soon.

I just begin to use windows 2k Server and IIS 5.0 for my cgi program.
The problem is that the  HTTP connection Keep Alive is ON(by default),
and the POST request to my cgi program also ask for Connection:
Keep-Alive,
but IIS always close the connection after sending reply to each request.
There's
no error at all, and even data is sent back though it's expired to
Sender.

How can I make HTTP 1.1 persistent connection work with IIS 5.0 on
Windows
2000 Server?  In fact, I have same problem with IIS 4.0 on NT 4.0
Server.

Thank you very very much for your kind help!

Xuemei