DO NOT REPLY [Bug 4668] - File download over http corrupt

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

File download over http corrupt





--- Additional Comments From [EMAIL PROTECTED]  2002-04-05 07:36 ---
I can provide bug screenshots if anyone interested...

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4668] - File download over http corrupt

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

File download over http corrupt





--- Additional Comments From [EMAIL PROTECTED]  2002-04-05 07:15 ---
No proxy installed. Default browser settings. Tried IE 6.0 and Netscape 6.2.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4668] - File download over http corrupt

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

File download over http corrupt





--- Additional Comments From [EMAIL PROTECTED]  2002-04-05 07:10 ---
Have you some proxy (like squid) somewhere on your networks ?
What's your browser internet settings ?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4668] - File download over http corrupt

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

File download over http corrupt

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |



--- Additional Comments From [EMAIL PROTECTED]  2002-04-05 07:06 ---
We have the very same problem...
Tomcat corrupts all types of files - big/small, images, html files, archives. 
There is no difference. We used default configuaration. We tried the versions 
of Tomcat:
1) JDK1.3 + Tomcat3;
2) JDK1.3 + Tomcat4;
3) JDK1.4 + Tomcat4.
Both standalone server and Apache+Tomcat. Server is Windows 2K.
The strange thing is that it corrupts downloads only on local network. 
Downloads from localhost and from remote network work fine.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads Expirer.java

2002-04-04 Thread billbarker

billbarker02/04/04 21:53:19

  Modified:util/java/org/apache/tomcat/util/threads Expirer.java
  Log:
  Typo fix (I've got to learn to compile before doing ci).
  
  Revision  ChangesPath
  1.4   +1 -1  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/Expirer.java
  
  Index: Expirer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/Expirer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Expirer.java  5 Apr 2002 05:50:24 -   1.3
  +++ Expirer.java  5 Apr 2002 05:53:18 -   1.4
  @@ -175,7 +175,7 @@
continue;

long maxInactiveInterval = ts.getMaxInactiveInterval();
  -1if( dL > 3 ) debug( "TS: " + maxInactiveInterval + " " +
  + if( dL > 3 ) debug( "TS: " + maxInactiveInterval + " " +
ts.getLastAccessedTime());
if (maxInactiveInterval < 0)
continue;
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads Expirer.java

2002-04-04 Thread billbarker

billbarker02/04/04 21:50:24

  Modified:util/java/org/apache/tomcat/util/threads Expirer.java
  Log:
  Need to make certain that expired Objects are eligable for GC.
  
  Revision  ChangesPath
  1.3   +2 -1  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/Expirer.java
  
  Index: Expirer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/Expirer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Expirer.java  5 Apr 2002 05:39:08 -   1.2
  +++ Expirer.java  5 Apr 2002 05:50:24 -   1.3
  @@ -169,12 +169,13 @@
}
for( int i=0; i< checkedCount; i++ ) {
TimeStamp ts=checkedObjs[i];
  + checkedObjs[i] = null;

if (ts==null || !ts.isValid())
continue;

long maxInactiveInterval = ts.getMaxInactiveInterval();
  - if( dL > 3 ) debug( "TS: " + maxInactiveInterval + " " +
  +1if( dL > 3 ) debug( "TS: " + maxInactiveInterval + " " +
ts.getLastAccessedTime());
if (maxInactiveInterval < 0)
continue;
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads Expirer.java

2002-04-04 Thread billbarker

billbarker02/04/04 21:39:08

  Modified:util/java/org/apache/tomcat/util/threads Expirer.java
  Log:
  Improve the Thread-safety on the 3.3 Session exipiration.
  
  I was seeing every so often that a brand-new session was getting expired.  With this 
we take a snap-shot of the sessions so that we don't have to worry about the data 
changing under our feet while we're doing the checking.  By keeping the array as part 
of the Object, we should avoid excess GC as well.
  
  Revision  ChangesPath
  1.2   +10 -2 
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/Expirer.java
  
  Index: Expirer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/Expirer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Expirer.java  6 Jan 2002 08:34:56 -   1.1
  +++ Expirer.java  5 Apr 2002 05:39:08 -   1.2
  @@ -99,6 +99,7 @@
   //  Managed objects 
   static final int INITIAL_SIZE=8;
   TimeStamp managedObjs[]=new TimeStamp[INITIAL_SIZE];
  +TimeStamp checkedObjs[]=new TimeStamp[INITIAL_SIZE];
   int managedLen=managedObjs.length;
   int managedCount=0;
   
  @@ -159,8 +160,15 @@
   public void runIt( Object td[] ) {
long timeNow = System.currentTimeMillis();
if( dL > 2 ) debug( "Checking " + timeNow );
  - for( int i=0; i< managedCount; i++ ) {
  - TimeStamp ts=managedObjs[i];
  + int checkedCount;
  + synchronized( managedObjs ) {
  + checkedCount=managedCount;
  + if(checkedObjs.length < checkedCount)
  + checkedObjs = new TimeStamp[managedLen];
  + System.arraycopy( managedObjs, 0, checkedObjs, 0, checkedCount);
  + }
  + for( int i=0; i< checkedCount; i++ ) {
  + TimeStamp ts=checkedObjs[i];

if (ts==null || !ts.isValid())
continue;
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java

2002-04-04 Thread costin

costin  02/04/04 21:36:32

  Modified:coyote/src/java/org/apache/coyote ActionCode.java
  Log:
  Added an action code for 'getAttribute'
  
  We need to be able to get various expensive attributes from the lower
  layer - like SSL info.
  
  Unfortunately the current Action can't return values - if we move to
  the new TcHandler it'll be much easier.
  
  Remy, am I missing something ?
  
  Revision  ChangesPath
  1.4   +4 -0  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java
  
  Index: ActionCode.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ActionCode.java   15 Mar 2002 05:31:50 -  1.3
  +++ ActionCode.java   5 Apr 2002 05:36:32 -   1.4
  @@ -90,6 +90,10 @@
   
   public static final ActionCode ACTION_STOP = new ActionCode();
   
  +/** Compute request attribute
  + */
  +public static final ActionCode ACTION_REQ_ATTRIBUTE = new ActionCode();
  +
   
   // --- Constructors
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ProtocolHandler.java

2002-04-04 Thread costin

costin  02/04/04 21:34:19

  Added:   coyote/src/java/org/apache/coyote ProtocolHandler.java
  Log:
  Initial draft for the ProtocolHandler. Again, it'll be 'singelton' ( per protocol ),
  all thread and net handling is internal.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ProtocolHandler.java
  
  Index: ProtocolHandler.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:  
   *   "This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * .
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  package org.apache.coyote;
  
  import java.io.InputStream;
  import java.io.IOException;
  import java.io.OutputStream;
  
  
  /**
   * Abstract the protocol implementation, including threading, etc.
   * Processor is single threaded and specific to stream-based protocols,
   * will not fit Jk protocols like JNI.
   *
   * @author Remy Maucherat
   * @author Costin Manolache
   */
  public interface ProtocolHandler {
  
  /** Pass config info
   */
  public void setAttribute( String name, Object value );
  
  public Object getAttribute( String name );
  
  /** The adapter, used to call the connector 
   */
  public void setAdapter(Adapter adapter);
  
  public Adapter getAdapter();
  
  /** Start the protocol
   */
  public void init() throws Exception;
  
  public void destroy() throws Exception;
  
  
  }
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Coyote: replacing Processor with ProtocolHandler

2002-04-04 Thread costinm

On Thu, 4 Apr 2002, Bill Barker wrote:

> It's fine with me.  I also have a slight preference for the 33 ThreadPool,
> but it's not a big deal either way.
> 
> If we're going to move the socket handling into o.a.c.http11, what about
> importing o.a.t.util.net?  It should mean that Tomcat 4.x should be able to
> get PureTLS support fairly cheaply.

Yes, I'm already working on that. 

Remy - your call. PureTLS is 'bundled' with ThreadPool :-)

I'll get it working with ThreadPool, I'm more familiar with it and I think 
it's pretty well tested and optimized. I can add the threading code 
from 4.0, it's not hard - but then we'll have to plug PureTLS and 
many other things that are only implemented in 3.3.


Costin


> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, April 04, 2002 3:25 PM
> Subject: Coyote: replacing Processor with ProtocolHandler
> 
> 
> > Hi,
> >
> > In order to merge the connector-related code in Coyote and jk, I need
> >  a different abstraction. Processor takes InputStream/OutputStream params,
> > and assumes the connector will listen on the port, etc.
> >
> > The problem is that it doesn't map to things like JNI and is hard to
> > abstract things like UnixSocket.
> >
> > I would like to replace it with a similar interface, ProtocolHandler,
> > which is stateless ( Servlet-like ) and will just have a init()/destroy()
> > method, letting the protocol deal with the threads.
> >
> > It's easy to implement it in http11 - this is duplicated in the 33/40
> > versions. I would prefer to use the 33 thread pool from util, but
> > I'm ok with the code used in 40 ( or I can implement both, with an
> > option ).
> >
> > Also, I would like to reduce/eliminate the use of Socket and the other
> > dependencies between Coyote and the protocol impl ( it is supposed
> > to abstract it, but there are few details.. )
> >
> > Remy, Bill - is it ok ?
> >
> > Costin
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Coyote: replacing Processor with ProtocolHandler

2002-04-04 Thread Bill Barker

It's fine with me.  I also have a slight preference for the 33 ThreadPool,
but it's not a big deal either way.

If we're going to move the socket handling into o.a.c.http11, what about
importing o.a.t.util.net?  It should mean that Tomcat 4.x should be able to
get PureTLS support fairly cheaply.
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 04, 2002 3:25 PM
Subject: Coyote: replacing Processor with ProtocolHandler


> Hi,
>
> In order to merge the connector-related code in Coyote and jk, I need
>  a different abstraction. Processor takes InputStream/OutputStream params,
> and assumes the connector will listen on the port, etc.
>
> The problem is that it doesn't map to things like JNI and is hard to
> abstract things like UnixSocket.
>
> I would like to replace it with a similar interface, ProtocolHandler,
> which is stateless ( Servlet-like ) and will just have a init()/destroy()
> method, letting the protocol deal with the threads.
>
> It's easy to implement it in http11 - this is duplicated in the 33/40
> versions. I would prefer to use the 33 thread pool from util, but
> I'm ok with the code used in 40 ( or I can implement both, with an
> option ).
>
> Also, I would like to reduce/eliminate the use of Socket and the other
> dependencies between Coyote and the protocol impl ( it is supposed
> to abstract it, but there are few details.. )
>
> Remy, Bill - is it ok ?
>
> Costin
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6983] - SSL + Mac + IE5 = no session cookies

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

SSL + Mac + IE5 = no session cookies





--- Additional Comments From [EMAIL PROTECTED]  2002-04-05 01:39 ---
Here is how we fixed this problem.  I've never done a patch before, so I'm sorry
if I've done it wrong.  The file to patch is
src/catalina/src/share/org/apache/catalina/util/CookieTools.java

Jay
[EMAIL PROTECTED]

--- CookieTools.javaThu Apr  4 20:35:47 2002
+++ CookieTools.fix Thu Apr  4 20:37:07 2002
@@ -166,7 +166,7 @@

 // Secure
 if (cookie.getSecure()) {
-  buf.append (";Secure");
+  buf.append ("; Secure");
 }
 }

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkCoyoteHandler.java

2002-04-04 Thread costin

costin  02/04/04 16:13:17

  Added:   jk/java/org/apache/jk/server JkCoyoteHandler.java
  Log:
  Initial impl. for the Coyote handler.
  
  This will replace the connector stuff from jk with coyote.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java
  
  Index: JkCoyoteHandler.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * .
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  
  package org.apache.jk.server;
  
  import java.io.*;
  import java.net.*;
  import java.util.*;
  
  import org.apache.jk.*;
  import org.apache.jk.core.*;
  import org.apache.jk.common.*;
  import org.apache.jk.util.*;
  import org.apache.tomcat.modules.server.PoolTcpConnector;
  
  import org.apache.tomcat.core.*;
  
  import org.apache.tomcat.util.net.*;
  import org.apache.tomcat.util.buf.*;
  import org.apache.tomcat.util.log.*;
  import org.apache.tomcat.util.http.*;
  
  import org.apache.coyote.*;
  
  /** Plugs Jk2 into Coyote
   */
  public class JkCoyoteHandler implements ProtocolHandler
  {
  static class ResponseActionHook implements ActionHook {
  public void action(ActionCode actionCode, Object param) {
  if( actionCode==ActionCode.ACTION_COMMIT ) {
  
  }
  if( actionCode==ActionCode.ACTION_RESET ) {
  
  }
  if( actionCode==ActionCode.ACTION_CLOSE ) {
  }
  if( actionCode==ActionCode.ACTION_ACK ) {
  
  }
  }
  }
  
  Adapter adapter;
  
  /** Pass config info
   */
  public void setAttribute( String name, Object value ) {
  
  }
  
  /** The adapter, used to call the connector 
   */
  public void setAdapter(Adapter adapter) {
  this.adapter=adapter;
  }
  
  public Adapter getAdapter() {
  return adapter;
  }
  
  /** Start the protocol
   */
  public void init() {
  
  }
  
  public void destroy() {
  
  }
  
  
  
  }
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java

2002-04-04 Thread amyroh

amyroh  02/04/04 16:03:04

  Modified:catalina/src/share/org/apache/catalina/mbeans
MBeanFactory.java
  Log:
  Modify removeConnector() to handle Ajp13Connector and CoyoteConnector.
  
  Revision  ChangesPath
  1.23  +25 -31
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java
  
  Index: MBeanFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- MBeanFactory.java 4 Apr 2002 20:17:47 -   1.22
  +++ MBeanFactory.java 5 Apr 2002 00:03:03 -   1.23
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
 1.22 2002/04/04 20:17:47 amyroh Exp $
  - * $Revision: 1.22 $
  - * $Date: 2002/04/04 20:17:47 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
 1.23 2002/04/05 00:03:03 amyroh Exp $
  + * $Revision: 1.23 $
  + * $Date: 2002/04/05 00:03:03 $
*
* 
*
  @@ -63,7 +63,8 @@
   
   package org.apache.catalina.mbeans;
   
  -import java.lang.reflect.*;
  +import java.lang.reflect.Constructor;
  +import java.lang.reflect.Method;
   import javax.management.MBeanException;
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
  @@ -116,7 +117,7 @@
* org.apache.catalina.core.StandardServer component.
*
* @author Amy Roh
  - * @version $Revision: 1.22 $ $Date: 2002/04/04 20:17:47 $
  + * @version $Revision: 1.23 $ $Date: 2002/04/05 00:03:03 $
*/
   
   public class MBeanFactory extends BaseModelMBean {
  @@ -1013,7 +1014,7 @@
   MBeanUtils.createObjectName(managed.getDomain(), logger);
   return (oname.toString());
   }
  -
  +
   
   /**
* Create a new  UserDatabaseRealm.
  @@ -1109,34 +1110,27 @@
   if (address==null) {
   address = "";
   }
  +
   Connector conns[] = (Connector[]) service.findConnectors();
   
   for (int i = 0; i < conns.length; i++) {
  -if (conns[i] instanceof
  -org.apache.catalina.connector.http10.HttpConnector) {
  -String connAddress =
  -
((org.apache.catalina.connector.http10.HttpConnector)conns[i]).getAddress();
  -if (connAddress == null) {
  -connAddress = "";
  -}
  -int p = 
((org.apache.catalina.connector.http10.HttpConnector)conns[i]).getPort();
  -String connPort = "" + p;
  -if (address.equals(connAddress) && port.equals(connPort)) {
  -// Remove this component from its parent component
  -service.removeConnector(conns[i]);
  -break;
  -}
  -} else if (conns[i] instanceof
  -org.apache.catalina.connector.http.HttpConnector) {
  -String connAddress =
  -
((org.apache.catalina.connector.http.HttpConnector)conns[i]).getAddress();
  -int p = 
((org.apache.catalina.connector.http.HttpConnector)conns[i]).getPort();
  -String connPort = "" + p;
  -if (address.equals(connAddress) && port.equals(connPort)) {
  -// Remove this component from its parent component
  -service.removeConnector(conns[i]);
  -break;
  -}
  +Class cls = conns[i].getClass();
  +Method getAddrMeth = cls.getMethod("getAddress", null);
  +Object addrObj = getAddrMeth.invoke(conns[i], null);
  +String connAddress = new String();
  +if (addrObj != null) {
  +connAddress = addrObj.toString();
  +}
  +Method getPortMeth = cls.getMethod("getPort", null);
  +Object portObj = getPortMeth.invoke(conns[i], null);
  +String connPort = new String();
  +if (portObj != null) {
  +connPort = portObj.toString();
  +}
  +if (address.equals(connAddress) && port.equals(connPort)) {
  +// Remove this component from its parent component
  +service.removeConnector(conns[i]);
  +break;
   }
   }
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/webapps/admin/service service.jsp

2002-04-04 Thread manveen

manveen 02/04/04 16:02:19

  Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector
ConnectorForm.java SaveConnectorAction.java
   webapps/admin/connector connector.jsp
   webapps/admin/server server.jsp
   webapps/admin/service service.jsp
  Log:
  Fix for add connector.
  Enabled add delete operations from service, and enabled "delete this connector" from 
the connector screen.
  
  Revision  ChangesPath
  1.6   +7 -5  
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java
  
  Index: ConnectorForm.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ConnectorForm.java3 Apr 2002 23:35:35 -   1.5
  +++ ConnectorForm.java5 Apr 2002 00:02:18 -   1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java,v
 1.5 2002/04/03 23:35:35 manveen Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/04/03 23:35:35 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java,v
 1.6 2002/04/05 00:02:18 manveen Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/04/05 00:02:18 $
*
* 
*
  @@ -74,7 +74,7 @@
* Form bean for the connector page.
*
* @author Manveen Kaur
  - * @version $Revision: 1.5 $ $Date: 2002/04/03 23:35:35 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/05 00:02:18 $
*/
   
   public final class ConnectorForm extends ActionForm {
  @@ -664,7 +664,7 @@
   numberCheck("acceptCountText", acceptCountText, true, 0, 128);
   numberCheck("connTimeOutText", connTimeOutText, true, -1, 6);
   numberCheck("bufferSizeText", bufferSizeText, true, 1, 8192);
  -
  +  
   /* The IP address can also be null -- which means open the
server socket on *all* IP addresses for this host */
   if (address.length() > 0) {
  @@ -673,6 +673,8 @@
   } catch (Exception e) {
   errors.add("address", new ActionError("error.address.invalid"));
   }
  +} else {
  +address = " ";
   }
   
   /* ports */
  
  
  
  1.2   +9 -8  
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java
  
  Index: SaveConnectorAction.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SaveConnectorAction.java  3 Apr 2002 22:25:43 -   1.1
  +++ SaveConnectorAction.java  5 Apr 2002 00:02:18 -   1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java,v
 1.1 2002/04/03 22:25:43 manveen Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/04/03 22:25:43 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java,v
 1.2 2002/04/05 00:02:18 manveen Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/04/05 00:02:18 $
*
* 
*
  @@ -61,7 +61,6 @@
   
   package org.apache.webapp.admin.connector;
   
  -
   import java.net.URLEncoder;
   import java.util.Iterator;
   import java.util.Locale;
  @@ -96,7 +95,7 @@
* Edit Connector transactions.
*
* @author Manveen Kaur
  - * @version $Revision: 1.1 $ $Date: 2002/04/03 22:25:43 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/05 00:02:18 $
*/
   
   public final class SaveConnectorAction extends Action {
  @@ -201,10 +200,10 @@
   // Create a new Connector object
   values = new Object[3];
   values[0] = // parent 
  -TomcatTreeBuilder.ENGINE_TYPE + ",service=" + serviceName;
  +TomcatTreeBuilder.SERVICE_TYPE + ",name=" + serviceName;
   values[1] = cform.getAddress();
   values[2] = new Integer(cform.getPortText());
  - 
  +
   operation = "create" + connectorType;
   cObjectName = (String)
   mBServer.invoke(fname, operation,
  @@ -218,7 +217,7 @@
   TreeControlNode parentNode = con

Coyote: replacing Processor with ProtocolHandler

2002-04-04 Thread costinm

Hi,

In order to merge the connector-related code in Coyote and jk, I need
 a different abstraction. Processor takes InputStream/OutputStream params,
and assumes the connector will listen on the port, etc.

The problem is that it doesn't map to things like JNI and is hard to 
abstract things like UnixSocket. 

I would like to replace it with a similar interface, ProtocolHandler, 
which is stateless ( Servlet-like ) and will just have a init()/destroy()
method, letting the protocol deal with the threads.

It's easy to implement it in http11 - this is duplicated in the 33/40 
versions. I would prefer to use the 33 thread pool from util, but
I'm ok with the code used in 40 ( or I can implement both, with an
option ).

Also, I would like to reduce/eliminate the use of Socket and the other 
dependencies between Coyote and the protocol impl ( it is supposed 
to abstract it, but there are few details.. )

Remy, Bill - is it ok ?

Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [TEST] Please ignore...

2002-04-04 Thread Pier Fumagalli

"Pier Fumagalli" <[EMAIL PROTECTED]> wrote:

> Pinging response time for mailing lists... Sorry for the spam...

Another ping (I use tomcat-dev because it's a _HUGE_ list, and gives me nice
figures)...

Pier


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java

2002-04-04 Thread costin

costin  02/04/04 14:34:46

  Modified:http11/src/java/org/apache/coyote/http11
Http11Processor.java
  Log:
  Moved the parseHost method from coyote.
  
  That's another step in merging the connector code and sharing a single
  codebase.
  
  The Host: header is specific to http, other protocols may not need
  this operation.
  
  Revision  ChangesPath
  1.12  +56 -0 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
  
  Index: Http11Processor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Http11Processor.java  20 Mar 2002 05:33:27 -  1.11
  +++ Http11Processor.java  4 Apr 2002 22:34:46 -   1.12
  @@ -69,6 +69,7 @@
   import org.apache.tomcat.util.buf.MessageBytes;
   import org.apache.tomcat.util.http.FastHttpDateFormat;
   import org.apache.tomcat.util.http.MimeHeaders;
  +import org.apache.tomcat.util.buf.HexUtils;
   
   import org.apache.coyote.ActionHook;
   import org.apache.coyote.ActionCode;
  @@ -322,6 +323,8 @@
   // Setting up filters, and parse some request headers
   prepareRequest();
   
  +parseHost(request);
  +
   if(maxKeepAliveRequests > 0 && --keepAliveLeft == 0)
   keepAlive=false;
   
  @@ -648,7 +651,60 @@
   
   }
   
  +/**
  + * Parse host.
  + */
  +public static void parseHost(Request req)
  +throws IOException
  +{
  +MessageBytes valueMB = req.getMimeHeaders().getValue("host");
  +// 3.3 version. In 4.0 it is extracted from the host header.
  +// XXX I would rather trust the socket...
  +//serverPort = socket.getLocalPort();
  +ByteChunk valueBC = null;
  +if (valueMB == null) {
  +// That was in the 3.3 connector. 4.0 let it unset.
  + InetAddress localAddress = socket.getLocalAddress();
  +localHost = localAddress.getHostName();
  +// serverNameMB.setString( getLocalHost() );
  +return;
  +}
  +valueBC = valueMB.getByteChunk();
  +byte[] valueB = valueBC.getBytes();
  +int valueL = valueBC.getLength();
  +int valueS = valueBC.getStart();
  +int colonPos = -1;
  +
  +for (int i = 0; i < valueL; i++) {
  +char b = (char) valueB[i + valueS];
  +if (b == ':') {
  +colonPos = i;
  +break;
  +}
  +}
  +
  +if (colonPos < 0) {
  +req.setServerPort(80);
  +req.serverName().setBytes( valueB, valueS, valueL);
  +} else {
  +req.serverName().setBytes( valueB, valueS, colonPos);
   
  +int port = 0;
  +int mult = 1;
  +for (int i = valueL - 1; i > colonPos; i--) {
  +int charValue = HexUtils.DEC[(int) valueB[i + valueS]];
  +if (charValue == -1) {
  +// Use the default
  +port=80;
  +break;
  +}
  +port = port + (charValue * mult);
  +mult = 10 * mult;
  +}
  +req.setServerPort(port);
  +}
  +}
  +
   /**
* When committing the response, we have to validate the set of headers, as
* well as setup the response filters.
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteProcessor.java

2002-04-04 Thread costin

costin  02/04/04 14:32:37

  Modified:coyote/src/java/org/apache/coyote/tomcat3 CoyoteRequest.java
   coyote/src/java/org/apache/coyote/tomcat4
CoyoteProcessor.java
  Log:
  Remove the duplicated ( and protocol dependent ) Host: parsing code.
  
  I moved it to http11 ( and merged it a bit ).
  
  Please review !
  
  Revision  ChangesPath
  1.9   +10 -59
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteRequest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CoyoteRequest.java1 Apr 2002 04:48:42 -   1.8
  +++ CoyoteRequest.java4 Apr 2002 22:32:37 -   1.9
  @@ -80,9 +80,10 @@
*  line and Mime headers between Coyote and Tomcat.
*  @Author Bill Barker
*/
  -class CoyoteRequest extends Request {
  +public class CoyoteRequest extends org.apache.tomcat.core.Request {
   
   org.apache.coyote.Request coyoteRequest=null;
  +
   SSLSupport sslSupport=null;
   ByteChunk  readChunk = new ByteChunk();
   int  pos=-1;
  @@ -197,57 +198,6 @@
   
   }
   
  -/** Determine the local virual host and port from the host
  - *  header.
  - */
  -protected void parseHostHeader() {
  - MessageBytes hH=getMimeHeaders().getValue("host");
  -serverPort = socket.getLocalPort();
  - if (hH != null) {
  - ByteChunk valueBC = hH.getByteChunk();
  - byte [] valueB = valueBC.getBytes();
  - int valueL = valueBC.getLength();
  - int valueS = valueBC.getStart();
  - int colonPos = -1;
  - for( int i = 0; i < valueL; i++) {
  - byte b = valueB[i+valueS];
  - if(b == ':') {
  - colonPos = i;
  - break;
  - }
  - }
  - if (colonPos > -1) {
  - serverNameMB.setBytes( valueB, valueS, colonPos);
  - int port = 0;
  - int mult = 1;
  - try {
  - for(int i = colonPos+1; i < valueL; i++) {
  - int charValue = HexUtils.DEC[(int)valueB[i+valueS]];
  - if(charValue == -1) {
  - throw new NumberFormatException(
  -   "Invalid port number: " + 
  -   valueB[i+valueS]);
  - }
  - port *= 10;
  - port += charValue;
  - }
  - serverPort = port;
  -}catch(NumberFormatException  nfe){
  - contextM.log("Port Parsing error", nfe);
  -}
  - }else {
  - serverNameMB.setBytes(valueB, valueS, valueL);
  - }
  - return;
  - }
  - if( localHost != null ) {
  - serverNameMB.setString( localHost );
  - }
  - // default to localhost - and warn
  - //  log("No server name, defaulting to localhost");
  -serverNameMB.setString( getLocalHost() );
  -}
  -
   //  override special methods
   
   public MessageBytes remoteAddr() {
  @@ -268,19 +218,20 @@
InetAddress localAddress = socket.getLocalAddress();
localHost = localAddress.getHostName();
return localHost;
  -
   }
   
   public MessageBytes serverName(){
  -if(! serverNameMB.isNull()) return serverNameMB;
  -parseHostHeader();
  -return serverNameMB;
  +// if(! serverNameMB.isNull()) return serverNameMB;
  +// parseHostHeader();
  +return coyoteRequest.serverName();
   }
   
   public int getServerPort(){
  -if(serverPort!=-1) return serverPort;
  -parseHostHeader();
  -return serverPort;
  +// if(serverPort!=-1) return serverPort;
  +//No need to delay execution - the host is certainly needed for
  +// mapping.
  +// parseHostHeader();
  +return coyoteRequest.getServerPort();
   }
   
   /** Define the SSL Support support instance for this socket.
  
  
  
  1.20  +27 -94
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java
  
  Index: CoyoteProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- CoyoteProcessor.java  3 Apr 2002 15:57:11 -   1.19
  +++ CoyoteProcessor.java  4 Apr 2002 22:32:37 -   1.20
  @@ -1,6 +1,6 @@
  -/* * $Header: 
/home/cvs/jakarta-tomcat-connect

cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Request.java

2002-04-04 Thread costin

costin  02/04/04 14:29:53

  Modified:coyote/src/java/org/apache/coyote Request.java
  Log:
  Remove workerId, use the existing instanceId
  
  Revision  ChangesPath
  1.9   +4 -7  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java
  
  Index: Request.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Request.java  3 Apr 2002 23:55:05 -   1.8
  +++ Request.java  4 Apr 2002 22:29:53 -   1.9
  @@ -179,7 +179,6 @@
   protected Parameters parameters = new Parameters();
   
   protected MessageBytes remoteUser=new MessageBytes();
  -protected MessageBytes workerId=new MessageBytes();
   protected MessageBytes authType=new MessageBytes();
   protected Hashtable attributes=new Hashtable();
   
  @@ -187,7 +186,9 @@
   
   
   /**
  - * Get the instance id (or JVM route).
  + * Get the instance id (or JVM route). Curently Ajp is sending it with each
  + * request. In future this should be fixed, and sent only once ( or
  + * 'negociated' at config time so both tomcat and apache share the same name.
* 
* @return the instance id
*/
  @@ -384,10 +385,6 @@
   return authType;
   }
   
  -public MessageBytes getWorkerId() {
  -return workerId;
  -}
  -
   //  Input Buffer 
   
   
  @@ -467,9 +464,9 @@
   remoteAddrMB.setString("127.0.0.1");
   remoteHostMB.setString("localhost");
   
  +instanceId.recycle();
   remoteUser.recycle();
   authType.recycle();
  -workerId.recycle();
   attributes.clear();
   }
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Closing connections on error causes problems

2002-04-04 Thread Andrew Gerweck

I'm not sure why the code works this way, but I believe it's wrong.  On
line 279 of org.apache.catalina.connector.http.HttpResponseImpl.java,
the following code is found:

if (getStatus() < HttpServletResponse.SC_BAD_REQUEST) {
if ((!isStreamInitialized()) && (getContentLength() == -1)
&& (getStatus() >= 200)
&& (getStatus() != SC_NOT_MODIFIED)
&& (getStatus() != SC_NO_CONTENT))
setContentLength(0);
} else {
setHeader("Connection", "close");
}

This means that any time there's a 4xx or 5xx, the connection is closed.
This seems to be strange behavior, since the HTTP/1.1 spec states:

"Persistent HTTP connections have a number of advantages: ... errors can
be reported without the penalty of closing the TCP connection."

Tomcat's behavior isn't technically illegal, but it's a violation of the
intent of the specification.

My small company has an application that occasionally needs to act as a
communications proxy.  We've found that the code above makes it
impossible to complete an NT authentication because Tomcat closes the
connection for a 401.  I'm sure some will be happy enough to mumble
about Microsoft. :(

Anyway, we've had enough luck changing SC_BAD_REQUEST to
SC_INTERNAL_SERVER_ERROR.  I suspect that the best behavior would be to
remove the else clause altogether.  I'll let someone who's more
experienced with Tomcat's code make the call.

Thanks,
Andy Gerweck


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 7700] - [PATCH] Anchors don't work when session tracking is handled by URL rewrite

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

[PATCH] Anchors don't work when session tracking is handled by URL rewrite

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |



--- Additional Comments From [EMAIL PROTECTED]  2002-04-04 22:07 ---
Maybe my summary is a bit misleading, but I think there is something wrong
with the implementation of HttpServletResponse.encodeURL(String) method.

Copy/Paste from o.a.c.connector.HttpResponseBase.toEncoded(String,String)
sb.append(anchor);
sb.append(query);
return (sb.toString());
It appends the anchor before query string, which is against the RFC. This is
what the referenced patch fixes (among other things). It also affects
encodeRedirectURL method HttpServletResponse as both methods in both
implementations use the toEncoded method.

Same problems are introduced in the Coyote implementation of
HttpServletResponse 
Cheers,
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/webapps/admin server.jsp

2002-04-04 Thread manveen

manveen 02/04/04 13:59:46

  Removed: webapps/admin server.jsp
  Log:
  File moved to server pkg.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/handler TcHandler.java TcHandlerCtx.java

2002-04-04 Thread costin

costin  02/04/04 13:59:13

  Added:   util/java/org/apache/tomcat/util/handler TcHandler.java
TcHandlerCtx.java
  Log:
  The handler is a generic mechanism to be used to implement both
  recursive and iterative chains ( i.e. Interceptor-like or Valve-like ).
  
  It will be used for Jk and hopefully Coyote to keep things
  modular.
  
  Please review and make the apropriate changes - but try to keep it minimal
  and independent of any protocol/special use.
  
  The model I had in mind was the Hook used in Apache2/APR, as well as
  Axis Handler ( besides Interceptor/Valve/JkHandler )
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/handler/TcHandler.java
  
  Index: TcHandler.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * .
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  package org.apache.tomcat.util.handler;
  
  import java.io.*;
  import java.util.*;
  import java.security.*;
  
  
  /**
   * The lowest level component of Jk ( and hopefully Coyote ). 
   *
   * Try to keep it minimal and flexible - add only if you _have_ to add.
   *
   * It is similar in concept and can implement/wrap tomcat3.3 Interceptor, tomcat4.0 
Valve,
   * axis Handler, tomcat3.3 Handler, apache2 Hooks etc.
   *
   * Both iterative (Interceptor, Hook ) and recursive ( Valve ) behavior are 
supported.
   * Named TcHandler because Handler is way overloaded.
   *
   * @author Costin Manolache
   */
  public abstract class TcHandler {
  public static final int OK=0;
  public static final int LAST=1;
  public static final int ERROR=2;
  
  protected Hashtable attributes=new Hashtable();
  protected TcHandler next;
  protected String name;
  protected int id;
  
  //  Configuration 
  
  /** Set the name of the handler. Will allways be called by
   *  worker env after creating the worker.
   */
  public void setName(String s ) {
  name=s;
  }
  
  public String getName() {
  return name;
  }
  
  /** Set the id of the worker. It can be used for faster disp

cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin ServerAction.java ServerForm.java SetUpServerAction.java

2002-04-04 Thread manveen

manveen 02/04/04 13:59:04

  Removed: webapps/admin/WEB-INF/classes/org/apache/webapp/admin
ServerAction.java ServerForm.java
SetUpServerAction.java
  Log:
  Files no longer needed after server refactoring.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/handler - New directory

2002-04-04 Thread costin

costin  02/04/04 13:56:21

  jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/handler - New directory

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/webapps/admin/service service.jsp

2002-04-04 Thread manveen

manveen 02/04/04 13:52:25

  Modified:webapps/admin/WEB-INF struts-config.xml
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin
TomcatTreeBuilder.java
   webapps/admin/service service.jsp
  Added:   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/server
EditServerAction.java SaveServerAction.java
ServerForm.java
   webapps/admin/server server.jsp
  Log:
  Refactored server to match service,host, connector...
  
  Revision  ChangesPath
  1.42  +27 -25jakarta-tomcat-4.0/webapps/admin/WEB-INF/struts-config.xml
  
  Index: struts-config.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/struts-config.xml,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- struts-config.xml 3 Apr 2002 00:27:30 -   1.41
  +++ struts-config.xml 4 Apr 2002 21:52:25 -   1.42
  @@ -15,14 +15,15 @@
   
 
   
  -
  -
  -
   
   
   
  +
  +
  +
  +
   
   
   
   
   
  +type="org.apache.webapp.admin.connector.ConnectorsForm"/>
   
   
   
  @@ -128,11 +129,7 @@
   
  -
  -
  -   
  +  
   
  @@ -145,6 +142,12 @@
   path="/user.jsp"
   redirect="false"/>
   
  +
  +
  +
  +
   
   
   
   
   
  -
  -
  -
  -
   
   
  @@ -318,14 +314,6 @@
 redirect="true"/>
   
   
  -
  -
  -
  -
   
   
   
  +
  +   
  +
  +
  +
  +
  +
  +
  +
   
   
   
  
  
  
  1.25  +5 -5  
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java
  
  Index: TomcatTreeBuilder.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- TomcatTreeBuilder.java3 Apr 2002 00:27:30 -   1.24
  +++ TomcatTreeBuilder.java4 Apr 2002 21:52:25 -   1.25
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java,v
 1.24 2002/04/03 00:27:30 manveen Exp $
  - * $Revision: 1.24 $
  - * $Date: 2002/04/03 00:27:30 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java,v
 1.25 2002/04/04 21:52:25 manveen Exp $
  + * $Revision: 1.25 $
  + * $Date: 2002/04/04 21:52:25 $
*
* 
*
  @@ -93,7 +93,7 @@
*
* @author Jazmin Jonson
* @author Manveen Kaur
  - * @version $Revision: 1.24 $ $Date: 2002/04/03 00:27:30 $
  + * @version $Revision: 1.25 $ $Date: 2002/04/04 21:52:25 $
*/
   
   
  @@ -164,7 +164,7 @@
   new TreeControlNode(serverName,
   "folder_16_pad.gif",
   nodeLabel,
  -"setUpServer.do?select=" +
  +"EditServer.do?select=" +
   URLEncoder.encode(serverName) +
   "&nodeLabel=" +
   URLEncoder.encode(nodeLabel),
  
  
  
  1.1  
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/server/EditServerAction.java
  
  Index: EditServerAction.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/server/EditServerAction.java,v
 1.1 2002/04/04 21:52:25 manveen Exp $
   * $Revision: 1.1 $
   * $Date: 2002/04/04 21:52:25 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistri

cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/server - New directory

2002-04-04 Thread manveen

manveen 02/04/04 13:49:58

  jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/server - 
New directory

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/webapps/admin/server - New directory

2002-04-04 Thread manveen

manveen 02/04/04 13:49:23

  jakarta-tomcat-4.0/webapps/admin/server - New directory

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6999] - javax.sql.DataSource.getConnection() causes java.sql.SQLException: Can't call commit when autocommit=true

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

javax.sql.DataSource.getConnection() causes java.sql.SQLException: Can't call commit 
when autocommit=true 

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2002-04-04 21:46 ---
*** Bug 7693 has been marked as a duplicate of this bug. ***

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 7693] - New tyrex classes in naming-factory.jar causes exceptions

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

New tyrex classes in naming-factory.jar causes exceptions

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2002-04-04 21:46 ---
The changes to the Tyrex resource factory introduced in the 4.0.4 release will
be reverted.

*** This bug has been marked as a duplicate of 6999 ***

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 7602] - After RequestDispatcher.forward() the character encoding for parameters is set to ISO-8859-1

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

After RequestDispatcher.forward() the character encoding for parameters is set to 
ISO-8859-1

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Normal  |Enhancement
   Priority|Other   |Low



--- Additional Comments From [EMAIL PROTECTED]  2002-04-04 21:33 ---
This is unspecified i18n behavior (there is no recognized standard for this, or
any requirement in the spec). Tomcat will tend to default to UTF8 for req
parameters encoding in the future (probably in the next major release), which
could help a bit.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 7638] - Service Name in Windows has space

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Service Name in Windows has space

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Normal  |Enhancement
  Component|Unknown |Installable Packages
 OS/Version|Windows XP  |Windows NT/2K
   Priority|Other   |Low



--- Additional Comments From [EMAIL PROTECTED]  2002-04-04 21:29 ---
AFAIK, this is not illegal. There's a space because of a limitation in
JavaService (where you can't set the service description).

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit:jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Node.java

2002-04-04 Thread Kin-Man Chung


> Date: Thu, 04 Apr 2002 11:20:21 -0800
> From: Remy Maucherat <[EMAIL PROTECTED]>
> Subject: Re: cvs commit: 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Node.java
> To: Tomcat Developers List <[EMAIL PROTECTED]>
> MIME-version: 1.0
> X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.
> Content-transfer-encoding: 7bit
> X-Priority: 3
> X-MSMail-priority: Normal
> Delivered-to: mailing list [EMAIL PROTECTED]
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> X-Spam-Rating: localhost.apache.org 1.6.2 0/1000/N
> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
> List-Post: 
> List-Subscribe: 
> List-Unsubscribe: 
> List-Help: 
> List-Id: "Tomcat Developers List" 
> 
> > Remy,
> >
> > I afraid that this patch won't work, because you are initializing
> > CustomTag.JspAttrs in the constructor, which is too early.
> > CustomTag.JspAttrs is currently set in Validator, after tld is consulted
> > to see if the tag attribute can take a request time expression;
> > and if so, extracts the string between '<%=' and '%>' etc.
> 
> The patch is super easy to revert. My problem is that I don't understand
> anything to the new generator design, so the patch is bad.
> 

That's OK.  It always takes a while to get into a new piece of code.

The new jasper design is really very simple.  There are currently only
3 pieces that matters: Parser, Validator, and Generator, representing
the 3 phases of the compiler.  Parser is reponsible for parsing the page,
making sure that the grammar is followed, and generating a list of Nodes.
Validator is for checking the validity of the attributes and putting the
valid attributes into digested formats, of which CustomTag.JspAttrs is
one of them.  Generator is for generating the servlet program from the
Nodes.  We'll probably add a Optimizer phase to jasper later.

> > Do you have a test case that causes a NPE?
> 
> Just try to run the admin webapp (and click on some tree node; there are
> also some other small issues with the user admin pages).
> 

I'll do that and try to fix it.  Thanks for trying out jasper2.

> Remy
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6519] - Problem with HTMLManagerServlet when running JDK1.4

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Problem with HTMLManagerServlet when running JDK1.4

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2002-04-04 21:27 ---
*** Bug 7725 has been marked as a duplicate of this bug. ***

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 7725] - IllegalStateException during forwards to a page that redirects

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

IllegalStateException during forwards to a page that redirects

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2002-04-04 21:27 ---
Yes, it is a known issue. Either use JDK 1.3 or the Coyote HTTP/1.1 connector to
solve the problem.

*** This bug has been marked as a duplicate of 6519 ***

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[TEST] Please ignore...

2002-04-04 Thread Pier Fumagalli

Pinging response time for mailing lists... Sorry for the spam...

Pier


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/webapps/manager/WEB-INF web.xml

2002-04-04 Thread craigmcc

craigmcc02/04/04 12:30:34

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
   catalina/src/share/org/apache/catalina/startup
ContextConfig.java LocalStrings.properties
   webapps/admin/WEB-INF web.xml
   webapps/examples/WEB-INF web.xml
   webapps/manager/WEB-INF web.xml
  Log:
  When parsing web.xml files, log warnings if a security role name is used
  in a , , or  element without
  also being defined in a  element.  For backwards compatibility
  these are not considered fatal, although it is likely that they will be fatal
  in Servlet 2.4.
  
  Modify the web.xml files for packaged applications (admin, examples, and
  manager) so that they properly define the security roles that they use.
  
  Revision  ChangesPath
  1.103 +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- StandardContext.java  14 Mar 2002 21:41:35 -  1.102
  +++ StandardContext.java  4 Apr 2002 20:30:34 -   1.103
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.102 2002/03/14 21:41:35 remm Exp $
  - * $Revision: 1.102 $
  - * $Date: 2002/03/14 21:41:35 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.103 2002/04/04 20:30:34 craigmcc Exp $
  + * $Revision: 1.103 $
  + * $Date: 2002/04/04 20:30:34 $
*
* 
*
  @@ -147,7 +147,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.102 $ $Date: 2002/03/14 21:41:35 $
  + * @version $Revision: 1.103 $ $Date: 2002/04/04 20:30:34 $
*/
   
   public class StandardContext
  @@ -1606,7 +1606,7 @@
   String results[] =new String[securityRoles.length + 1];
   for (int i = 0; i < securityRoles.length; i++)
   results[i] = securityRoles[i];
  -results[securityRoles.length] = name;
  +results[securityRoles.length] = role;
   securityRoles = results;
   }
   fireContainerEvent("addSecurityRole", role);
  
  
  
  1.61  +51 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- ContextConfig.java14 Mar 2002 23:58:35 -  1.60
  +++ ContextConfig.java4 Apr 2002 20:30:34 -   1.61
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.60 2002/03/14 23:58:35 craigmcc Exp $
  - * $Revision: 1.60 $
  - * $Date: 2002/03/14 23:58:35 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.61 2002/04/04 20:30:34 craigmcc Exp $
  + * $Revision: 1.61 $
  + * $Date: 2002/04/04 20:30:34 $
*
* 
*
  @@ -131,7 +131,7 @@
* of that Context, and the associated defined servlets.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.60 $ $Date: 2002/03/14 23:58:35 $
  + * @version $Revision: 1.61 $ $Date: 2002/04/04 20:30:34 $
*/
   
   public final class ContextConfig
  @@ -593,6 +593,9 @@
   // Process the default and application web.xml files
   defaultConfig();
   applicationConfig();
  +if (ok) {
  +validateSecurityRoles();
  +}
   
   // Scan tag library descriptor files for additional listener classes
   if (ok) {
  @@ -1049,6 +1052,50 @@
   
   // Return the completed set
   return (resourcePaths);
  +
  +}
  +
  +
  +/**
  + * Validate the usage of security role names in the web application
  + * deployment descriptor.  If any problems are found, issue warning
  + * messages (for backwards compatibility) and add the missing roles.
  + * (To make these problems fatal instead, simply set the ok
  + * instance variable to false as well).
  + */
  +private void validateSecurityRoles() {
  +
  +// Check role names used in  elements
  +SecurityConstraint constraints[] = context.findConstraints();
  +for (in

cvs commit: jakarta-tomcat-connectors build.xml

2002-04-04 Thread costin

costin  02/04/04 12:25:04

  Added:   .build.xml
  Log:
  One (experimental) build file to get all the coyote things built
  and in a single jar. It just calls the ant files in various directories
  in the right order and creates a jar file with all the stuff.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/build.xml
  
  Index: build.xml
  ===
  
  
  
  
  

   
  

  
  
  
  
  
  
  
  
  
  
  
  
  
  

  
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java mbeans-descriptors.xml

2002-04-04 Thread amyroh

amyroh  02/04/04 12:17:47

  Modified:catalina/src/share/org/apache/catalina/mbeans
MBeanFactory.java mbeans-descriptors.xml
  Log:
  Add createAjp13Connector() and createCoyoteConnector() using relfection
  to avoid j-t-c compile-time circular dependencies.
  
  Revision  ChangesPath
  1.22  +116 -4
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java
  
  Index: MBeanFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- MBeanFactory.java 26 Mar 2002 01:23:25 -  1.21
  +++ MBeanFactory.java 4 Apr 2002 20:17:47 -   1.22
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
 1.21 2002/03/26 01:23:25 manveen Exp $
  - * $Revision: 1.21 $
  - * $Date: 2002/03/26 01:23:25 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
 1.22 2002/04/04 20:17:47 amyroh Exp $
  + * $Revision: 1.22 $
  + * $Date: 2002/04/04 20:17:47 $
*
* 
*
  @@ -63,6 +63,7 @@
   
   package org.apache.catalina.mbeans;
   
  +import java.lang.reflect.*;
   import javax.management.MBeanException;
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
  @@ -115,7 +116,7 @@
* org.apache.catalina.core.StandardServer component.
*
* @author Amy Roh
  - * @version $Revision: 1.21 $ $Date: 2002/03/26 01:23:25 $
  + * @version $Revision: 1.22 $ $Date: 2002/04/04 20:17:47 $
*/
   
   public class MBeanFactory extends BaseModelMBean {
  @@ -214,6 +215,117 @@
   ManagedBean managed = registry.findManagedBean("AccessLogValve");
   ObjectName oname =
   MBeanUtils.createObjectName(managed.getDomain(), accessLogger);
  +return (oname.toString());
  +
  +}
  +
  +/**
  + * Create a new Ajp13Connector
  + *
  + * @param parent MBean Name of the associated parent component
  + * @param address The IP address on which to bind
  + * @param port TCP port number to listen on
  + *
  + * @exception Exception if an MBean cannot be created or registered
  + */
  +public String createAjp13Connector(String parent, String address, int port)
  +throws Exception {
  +
  +Object retobj = null;
  +
  +try {
  +
  +// Create a new AjpConnector instance
  +// use reflection to avoid j-t-c compile-time circular dependencies
  +Class cls = Class.forName("org.apache.ajp.tomcat4.Ajp13Connector");
  +Constructor ct = cls.getConstructor(null);
  +retobj = ct.newInstance(null);
  +Class partypes1 [] = new Class[1];
  +// Set address
  +String str = new String();
  +partypes1[0] = str.getClass();
  +Method meth1 = cls.getMethod("setAddress", partypes1);
  +Object arglist1[] = new Object[1];
  +arglist1[0] = address;
  +meth1.invoke(retobj, arglist1);
  +// Set port number
  +Class partypes2 [] = new Class[1];
  +partypes2[0] = Integer.TYPE;
  +Method meth2 = cls.getMethod("setPort", partypes2);
  +Object arglist2[] = new Object[1];
  +arglist2[0] = new Integer(port);
  +meth2.invoke(retobj, arglist2);
  +
  +} catch (Exception e) {
  +throw new MBeanException(e);
  +}
  +
  +// Add the new instance to its parent component
  +ObjectName pname = new ObjectName(parent);
  +Server server = ServerFactory.getServer();
  +Service service = server.findService(pname.getKeyProperty("name"));
  +service.addConnector((Connector)retobj);
  +
  +// Return the corresponding MBean name
  +ManagedBean managed = registry.findManagedBean("Ajp13Connector");
  +ObjectName oname =
  +MBeanUtils.createObjectName(managed.getDomain(), (Connector)retobj);
  +return (oname.toString());
  +
  +}
  +
  +
  +/**
  + * Create a new CoyoteConnector
  + *
  + * @param parent MBean Name of the associated parent component
  + * @param address The IP address on which to bind
  + * @param port TCP port number to listen on
  + *
  + * @exception Exception if an MBean cannot be created or registered
  + */
  +public String createCoyoteConnector(String parent, String address, int port)
  +throws Exception {
  +
  +Object retobj = null;
  +
  +try {
  +
  +// Create a new CoyoteConnector instance
  +// use reflection to av

cvs commit: jakarta-tomcat-4.0/webapps/admin connector.jsp

2002-04-04 Thread manveen

manveen 02/04/04 12:06:48

  Removed: webapps/admin connector.jsp
  Log:
  File no longer needed after refactoring.
  (moved to connector directory)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector ConnectorAction.java SetUpConnectorAction.java

2002-04-04 Thread manveen

manveen 02/04/04 12:05:47

  Removed: webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector
ConnectorAction.java SetUpConnectorAction.java
  Log:
  files no longer needed after refactoring connectors.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 167] - Change to input:checkbox taglib for usage on multi-page forms BugRat Report#220

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Change to input:checkbox taglib for usage on multi-page forms BugRat Report#220

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED
  Component|Unknown Taglib  |Input Taglib

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config coyote.xml http11.xml project.xml

2002-04-04 Thread remm

remm02/04/04 10:16:07

  Modified:webapps/tomcat-docs/config http11.xml project.xml
  Added:   webapps/tomcat-docs/config coyote.xml
  Log:
  - Add some documenation on Coyote, based on the one for the HTTP/1.1
connector (since there are few user-visible differences at this point).
  
  Revision  ChangesPath
  1.4   +3 -0  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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- http11.xml4 Feb 2002 13:36:07 -   1.3
  +++ http11.xml4 Apr 2002 18:16:07 -   1.4
  @@ -16,6 +16,9 @@
   
   
   
  +  IMPORTANT NOTE: The HTTP/1.1 connector is now deprecated. Use
  +  the Coyote HTTP/1.1 connector instead.
  +
 The HTTP/1.1 Connector element represents a
 Connector component that supports the HTTP/1.1 protocol.
 It enables Catalina to function as a stand-alone web server, in addition
  
  
  
  1.9   +1 -0  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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- project.xml   30 Jan 2002 00:55:27 -  1.8
  +++ project.xml   4 Apr 2002 18:16:07 -   1.9
  @@ -22,6 +22,7 @@
   
   
   
  +
   
   
   
  
  
  
  1.1  jakarta-tomcat-4.0/webapps/tomcat-docs/config/coyote.xml
  
  Index: coyote.xml
  ===
  
  
  ]>
  
  
&project;
  

  Craig R. McClanahan
  The Coyote HTTP/1.1 Connector

  
  
  
  
  
  
The Coyote HTTP/1.1 Connector element represents a
Connector component that supports the HTTP/1.1 protocol.
It enables Catalina to function as a stand-alone web server, in addition
to its ability to execute servlets and JSP pages.  A particular instance
of this component listens for connections on a specific TCP port number
on the server.  One or more such Connectors can be
configured as part of a single Service, each
forwarding to the associated Engine to perform
request processing and create the response.
  
If you wish to configure the Connector that is used
for connections to web servers using the WARP protocol (such as the
mod_webapp connector for Apache 1.3), see
here instead.
  
At server startup time, this Connector will create a
number of request processing threads (based on the value configured for
the minProcessors attribute).  Each incoming request requires
a thread for the duration of that request.  If more simultaneous requests
are received than can be handled by the currently available request
processing threads, additional threads will be created up to the
configured maximum (the value of the maxProcessors attribute).
If still more simultaneous requests are received, they are stacked up
inside the server socket created by the Connector, up to
the configured maximum (the value of the acceptCount
attribute.  Any further simultaneous requests will receive "connection
refused" errors, until resources are available to process them.
  
  
  
  
  
  

  
All implementations of Connector
support the following attributes:
  

  
  
Java class name of the implementation to use.  This class must
implement the org.apache.catalina.Connector interface.
You must specify the standard value defined below.
  
  
  
Set to true if you want calls to
request.getRemoteHost() to perform DNS lookups in
order to return the actual host name of the remote client.  Set
to false to skip the DNS lookup and return the IP
address in String form instead (thereby improving performance).
By default, DNS lookups are enabled.
  
  
  
If this Connector is supporting non-SSL
requests, and a request is received for which a matching
 requires SSL transport,
Catalina will automatically redirect the request to the port
number specified here.
  
  
  
Set this attribute to the name of the protocol you wish to have
returned by calls to request.getScheme().  For
example, you would set this attribute to "https"
for an SSL Connector.  The default value is "http".
See SSL Support for more information.
  
  
  
Set this attribute to true if you wish to have
calls to request.isSecure() to return true
for requests received by this Connector (you would want this o

Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Node.java

2002-04-04 Thread Remy Maucherat

> Remy,
>
> I afraid that this patch won't work, because you are initializing
> CustomTag.JspAttrs in the constructor, which is too early.
> CustomTag.JspAttrs is currently set in Validator, after tld is consulted
> to see if the tag attribute can take a request time expression;
> and if so, extracts the string between '<%=' and '%>' etc.

The patch is super easy to revert. My problem is that I don't understand
anything to the new generator design, so the patch is bad.

> Do you have a test case that causes a NPE?

Just try to run the admin webapp (and click on some tree node; there are
also some other small issues with the user admin pages).

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat33 JkRequest33.java

2002-04-04 Thread costin

costin  02/04/04 11:00:10

  Modified:jk/java/org/apache/jk/common HandlerRequest.java
   jk/java/org/apache/jk/core JkHandler.java
   jk/java/org/apache/jk/server/tomcat33 JkRequest33.java
  Log:
  Change to instanceId
  
  Revision  ChangesPath
  1.9   +1 -1  
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java
  
  Index: HandlerRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HandlerRequest.java   3 Apr 2002 23:56:08 -   1.8
  +++ HandlerRequest.java   4 Apr 2002 19:00:09 -   1.9
  @@ -512,7 +512,7 @@
   break;

case SC_A_JVM_ROUTE:
  -msg.getBytes(req.getWorkerId());
  +msg.getBytes(req.instanceId());
   break;

case SC_A_SSL_CERT :
  
  
  
  1.3   +1 -2  
jakarta-tomcat-connectors/jk/java/org/apache/jk/core/JkHandler.java
  
  Index: JkHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/JkHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JkHandler.java20 Feb 2002 23:39:02 -  1.2
  +++ JkHandler.java4 Apr 2002 19:00:09 -   1.3
  @@ -74,6 +74,7 @@
   private Properties properties=new Properties();
   protected WorkerEnv wEnv;
   protected JkHandler next;
  +protected String nextName=null;
   protected String name;
   protected int id;
   
  @@ -104,8 +105,6 @@
   this.id=id;
   }
   
  -String nextName=null;
  -
   /** Catalina-style "recursive" invocation.
*  A chain is used for Apache/3.3 style iterative invocation.
*/
  
  
  
  1.5   +3 -3  
jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat33/JkRequest33.java
  
  Index: JkRequest33.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/tomcat33/JkRequest33.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JkRequest33.java  3 Apr 2002 23:56:08 -   1.4
  +++ JkRequest33.java  4 Apr 2002 19:00:09 -   1.5
  @@ -79,8 +79,8 @@
   class JkRequest33 extends org.apache.tomcat.core.Request 
   {
   org.apache.coyote.Request ajpReq;
  -MsgContext ep;
   
  +MsgContext ep;
   JkInputStream jkIS;
   
   public JkRequest33(org.apache.coyote.Request ajpReq) 
  @@ -146,11 +146,11 @@
   }
   
   public String getJvmRoute() {
  - return ajpReq.getWorkerId().toString();
  + return ajpReq.instanceId().toString();
   }
   
   public void setJvmRoute(String s ) {
  - ajpReq.getWorkerId().setString(s);
  + ajpReq.instanceId().setString(s);
   }
   
   // XXX scheme
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10 HttpProcessor.java

2002-04-04 Thread remm

remm02/04/04 09:50:34

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpProcessor.java
   catalina/src/share/org/apache/catalina/connector/http10
HttpProcessor.java
  Log:
  - Port language variant support to the old HTTP connectors.
  - Patch submitted by Ryan Lubke.
  
  Revision  ChangesPath
  1.46  +15 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- HttpProcessor.java18 Mar 2002 07:15:40 -  1.45
  +++ HttpProcessor.java4 Apr 2002 17:50:34 -   1.46
  @@ -1,6 +1,6 @@
  -/* * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.45 2002/03/18 07:15:40 remm Exp $
  - * $Revision: 1.45 $
  - * $Date: 2002/03/18 07:15:40 $
  +/* * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.46 2002/04/04 17:50:34 remm Exp $
  + * $Revision: 1.46 $
  + * $Date: 2002/04/04 17:50:34 $
*
* 
*
  @@ -108,7 +108,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.45 $ $Date: 2002/03/18 07:15:40 $
  + * @version $Revision: 1.46 $ $Date: 2002/04/04 17:50:34 $
* @deprecated
*/
   
  @@ -499,17 +499,27 @@
   // Extract the language and country for this entry
   String language = null;
   String country = null;
  +String variant = null;
   int dash = entry.indexOf('-');
   if (dash < 0) {
   language = entry;
   country = "";
  +variant = "";
   } else {
   language = entry.substring(0, dash);
   country = entry.substring(dash + 1);
  +int vDash = country.indexOf('-');
  +if (vDash > 0) {
  +String cTemp = country.substring(0, vDash);
  +variant = country.substring(vDash + 1);
  +country = cTemp;
  +} else {
  +variant = "";
  +}
   }
   
   // Add a new Locale to the list of Locales for this quality level
  -Locale locale = new Locale(language, country);
  +Locale locale = new Locale(language, country, variant);
   Double key = new Double(-quality);  // Reverse the order
   ArrayList values = (ArrayList) locales.get(key);
   if (values == null) {
  
  
  
  1.9   +12 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HttpProcessor.java18 Mar 2002 07:15:40 -  1.8
  +++ HttpProcessor.java4 Apr 2002 17:50:34 -   1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
 1.8 2002/03/18 07:15:40 remm Exp $
  - * $Revision: 1.8 $
  - * $Date: 2002/03/18 07:15:40 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
 1.9 2002/04/04 17:50:34 remm Exp $
  + * $Revision: 1.9 $
  + * $Date: 2002/04/04 17:50:34 $
*
* 
*
  @@ -105,7 +105,7 @@
* the request.  When the processor is completed, it will recycle itself.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.8 $ $Date: 2002/03/18 07:15:40 $
  + * @version $Revision: 1.9 $ $Date: 2002/04/04 17:50:34 $
* @deprecated
*/
   
  @@ -463,12 +463,19 @@
 while (le.hasMoreElements()) {
   String language = (String)le.nextElement();
   String country = "";
  +String variant = "";
   int countryIndex = language.indexOf('-');
   if (countryIndex > -1) {
   country = language.substring(countryIndex + 1).trim();
   language = language.substring(0, countryIndex).trim();
  +int vDash = country.indexOf("-");
  +if (vDash > 0) {
  +String 

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10 HttpProcessor.java

2002-04-04 Thread remm

remm02/04/04 09:46:09

  Modified:catalina/src/share/org/apache/catalina/connector/http Tag:
tomcat_40_branch HttpProcessor.java
   catalina/src/share/org/apache/catalina/connector/http10 Tag:
tomcat_40_branch HttpProcessor.java
  Log:
  - Port language variant support to the old HTTP connectors.
  - Patch submitted by Ryan Lubke.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.36.2.5  +15 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
  retrieving revision 1.36.2.4
  retrieving revision 1.36.2.5
  diff -u -r1.36.2.4 -r1.36.2.5
  --- HttpProcessor.java28 Feb 2002 04:24:21 -  1.36.2.4
  +++ HttpProcessor.java4 Apr 2002 17:46:08 -   1.36.2.5
  @@ -1,6 +1,6 @@
  -/* * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.36.2.4 2002/02/28 04:24:21 remm Exp $
  - * $Revision: 1.36.2.4 $
  - * $Date: 2002/02/28 04:24:21 $
  +/* * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.36.2.5 2002/04/04 17:46:08 remm Exp $
  + * $Revision: 1.36.2.5 $
  + * $Date: 2002/04/04 17:46:08 $
*
* 
*
  @@ -106,7 +106,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.36.2.4 $ $Date: 2002/02/28 04:24:21 $
  + * @version $Revision: 1.36.2.5 $ $Date: 2002/04/04 17:46:08 $
*/
   
   final class HttpProcessor
  @@ -486,17 +486,27 @@
   // Extract the language and country for this entry
   String language = null;
   String country = null;
  +String variant = null;
   int dash = entry.indexOf('-');
   if (dash < 0) {
   language = entry;
   country = "";
  +variant = "";
   } else {
   language = entry.substring(0, dash);
   country = entry.substring(dash + 1);
  +int vDash = country.indexOf('-');
  +if (vDash > 0) {
  +String cTemp = country.substring(0, vDash);
  +variant = country.substring(vDash + 1);
  +country = cTemp;
  +} else {
  +variant = "";
  +}
   }
   
   // Add a new Locale to the list of Locales for this quality level
  -Locale locale = new Locale(language, country);
  +Locale locale = new Locale(language, country, variant);
   Double key = new Double(-quality);  // Reverse the order
   ArrayList values = (ArrayList) locales.get(key);
   if (values == null) {
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.4.2.2   +12 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- HttpProcessor.java9 Dec 2001 22:01:34 -   1.4.2.1
  +++ HttpProcessor.java4 Apr 2002 17:46:09 -   1.4.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
 1.4.2.1 2001/12/09 22:01:34 remm Exp $
  - * $Revision: 1.4.2.1 $
  - * $Date: 2001/12/09 22:01:34 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
 1.4.2.2 2002/04/04 17:46:09 remm Exp $
  + * $Revision: 1.4.2.2 $
  + * $Date: 2002/04/04 17:46:09 $
*
* 
*
  @@ -104,7 +104,7 @@
* the request.  When the processor is completed, it will recycle itself.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4.2.1 $ $Date: 2001/12/09 22:01:34 $
  + * @version $Revision: 1.4.2.2 $ $Date: 2002/04/04 17:46:09 $
*/
   
   final class HttpProcessor
  @@ -451,12 +451,19 @@
 while (le.hasMoreElements()) {
   String language = (String)le.nextElement();
   String country = "";
  +String variant = "";
   int countryIndex = language.indexOf('-');
 

cvs commit: jakarta-tomcat-4.0 RELEASE-NOTES-4.0.4.txt

2002-04-04 Thread remm

remm02/04/04 09:47:59

  Modified:.Tag: tomcat_40_branch RELEASE-NOTES-4.0.4.txt
  Log:
  - Document latest changes and bugfixes.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.4   +11 -1 jakarta-tomcat-4.0/Attic/RELEASE-NOTES-4.0.4.txt
  
  Index: RELEASE-NOTES-4.0.4.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/Attic/RELEASE-NOTES-4.0.4.txt,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- RELEASE-NOTES-4.0.4.txt   1 Apr 2002 18:19:56 -   1.1.2.3
  +++ RELEASE-NOTES-4.0.4.txt   4 Apr 2002 17:47:59 -   1.1.2.4
  @@ -3,7 +3,7 @@
   Release Notes
   =
   
  -$Id: RELEASE-NOTES-4.0.4.txt,v 1.1.2.3 2002/04/01 18:19:56 remm Exp $
  +$Id: RELEASE-NOTES-4.0.4.txt,v 1.1.2.4 2002/04/04 17:47:59 remm Exp $
   
   
   
  @@ -82,6 +82,8 @@
   Generic Bug Fixes:
   --
   
  +[B3] Coyote:
  + Update to Coyote 1.0 Beta 5.
   
   
   --
  @@ -133,6 +135,12 @@
   [B3] WebdavServlet:
Avoid unnecessary operations when doing a PROPFIND.
   
  +[B3] Coyote:
  + Fix handling of null strings in response headers.
  +
  +[B3] Coyote:
  + Implement getRemoteHost and getRemoteAddr.
  +
   
   
   Jasper Bug Fixes:
  @@ -164,6 +172,7 @@
   [B1] 4295  Cookies not following RFC2109
   [B1] 4518  Jsp-file and load-on-startup and init-param does not work
   [B1] 5422  HTTP Headers not being cleared after form authentication
  +[B3] 5471  jspc -webapp option is broken due to namespace collisions
   [B1] 5647  AJP13 connector will not pass authentication requests
   [B1] 6090  Listener not instantiated in tld file
   [B1] 6201  ISO-8859-8-i  problem. (hebrew)
  @@ -201,6 +210,7 @@
   [B2] 7171  FileStore directory must exists
   [B2] 7344  Tomcat appears to be case-sensitive with regard to the token "Basic"
  in Authorization request parameter
  +[B3] 7488  JspC generates wrong package with -webapp on PC/DOS/NT/Win2k
   [B3] 7534  StackOverflowError in ChunkedOutputFilter.doWrite()
   
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Is Tyrex included in Tomcat 4.0.3

2002-04-04 Thread Lev Assinovsky

Tyrex is used to work (not providing the real pooling though).
Could you please show your server.xml, /WEB-INF>/web.xml
and piece of Java code where you lookup the context?
   
Yanfeng Liu wrote:
> 
> Hi,
> 
> I am trying to use the JDBC pool feature of Tomcat 4.0.3.
> 
> I am using the tomcat4-4.0.3 rpm packages on a RH 7.2 box.
> 
> Firstly I can not find the tyrex-0.9.7.jar in the tomcat release.
> 
> Secondly, when I copied a tyrex-0.9.7.jar in $CATALINA_HOME/common/lib,
> the JDBC pool I specified in  still is not there.
> 
> Would you please tell me what should I do to make the Jdbc pooling work?
> 
> Thanks,
> Yanfeng
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

-- 
Lev AssinovskyPeterlink Web
ProgrammerSt. Petersburg, Russia
Tel/Fax: +7 812 3275343   197022 ul.Chapigina 7Á
E-mail: [EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-04-04 Thread Remy Maucherat

> > I think the stage has to be maintained in the Request object.
> >
>
>  No, definitely not. Here's how MinTC (MinimalTomcat) does
> it (this is alpha code, and I've deleted some of the methods
> to keep the size down):

I think I would have implemented it that way also.
The thing is that the current class is the result of a refactoring done at
the last minute before the 4.0 release.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardPipeline.java

2002-04-04 Thread remm

remm02/04/04 07:02:13

  Modified:catalina/src/share/org/apache/catalina/core
StandardPipeline.java
  Log:
  - Refactor the pipeline valve context using comments from Christopher St John.
  
  Revision  ChangesPath
  1.6   +67 -62
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java
  
  Index: StandardPipeline.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StandardPipeline.java 1 Apr 2002 04:19:54 -   1.5
  +++ StandardPipeline.java 4 Apr 2002 15:02:13 -   1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v
 1.5 2002/04/01 04:19:54 remm Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/04/01 04:19:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v
 1.6 2002/04/04 15:02:13 remm Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/04/04 15:02:13 $
*
* 
*
  @@ -97,13 +97,7 @@
*/
   
   public class StandardPipeline
  -implements Pipeline, Contained, Lifecycle, ValveContext {
  -
  -
  -// -- Constants
  -
  -
  -protected static final String STATE = "pipelineState";
  +implements Pipeline, Contained, Lifecycle {
   
   
   // --- Constructors
  @@ -472,11 +466,8 @@
   public void invoke(Request request, Response response)
   throws IOException, ServletException {
   
  -// Initialize the per-thread state for this thread
  -request.setNote(STATE, new PipelineState());
  -
   // Invoke the first Valve in this pipeline for this request
  -invokeNext(request, response);
  +(new StandardPipelineValveContext()).invokeNext(request, response);
   
   }
   
  @@ -534,51 +525,6 @@
   }
   
   
  -// --- ValveContext Methods
  -
  -
  -/**
  - * Cause the invoke() method of the next Valve that is part of
  - * the Pipeline currently being processed (if any) to be executed, passing
  - * on the specified request and response objects plus this
  - * ValveContext instance.  Exceptions thrown by a subsequently
  - * executed Valve (or a Filter or Servlet at the application level) will be
  - * passed on to our caller.
  - *
  - * If there are no more Valves to be executed, an appropriate
  - * ServletException will be thrown by this ValveContext.
  - *
  - * @param request The request currently being processed
  - * @param response The response currently being created
  - *
  - * @exception IOException if thrown by a subsequent Valve, Filter, or
  - *  Servlet
  - * @exception ServletException if thrown by a subsequent Valve, Filter,
  - *  or Servlet
  - * @exception ServletException if there are no further Valves configured
  - *  in the Pipeline currently being processed
  - */
  -public void invokeNext(Request request, Response response)
  -throws IOException, ServletException {
  -
  -// Identify the current subscript for the current request thread
  -PipelineState pipelineState = (PipelineState) request.getNote(STATE);
  -int subscript = pipelineState.stage;
  -pipelineState.stage = pipelineState.stage + 1;
  -
  -// Invoke the requested Valve for the current request thread
  -if (subscript < valves.length) {
  -valves[subscript].invoke(request, response, this);
  -} else if ((subscript == valves.length) && (basic != null)) {
  -basic.invoke(request, response, this);
  -} else {
  -throw new ServletException
  -(sm.getString("standardPipeline.noValve"));
  -}
  -
  -}
  -
  -
   // -- Protected Methods
   
   
  @@ -625,13 +571,72 @@
   }
   
   
  -// -- PipelineState Inner Class
  +// --- StandardPipelineValveContext Inner Class
  +
  +
  +protected class StandardPipelineValveContext
  +implements ValveContext {
  +
  +
  +// - Instance Variables
   
   
  -protected class PipelineState {
  +protected int stage = 0;
   
   
  -int stage = 0;
  +// - Properties
  +
  +
  +/**
  +  * Return descriptive inform

DO NOT REPLY [Bug 7747] New: - File Upload Causes Tomcat-Apache to Block

2002-04-04 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

File Upload Causes Tomcat-Apache to Block

   Summary: File Upload Causes Tomcat-Apache to Block
   Product: Tomcat 4
   Version: Nightly Build
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Major
  Priority: Other
 Component: Connector:JK/AJP
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hi folks,

I've got the nightly build of apache-tomcat, running as a standalone server and 
with the Apache Server (via AJP13).

File uploads are OK with the standalone server, but with AJP13, the first call
to read() on the HttpServletRequest's associated Reader object 
(i.e. in order to get the file upload info) will cause the servlet to block.

Note 1: this problem can be replicated on Tomcat 4.0.4 beta 2
Note 2: I couldn't replicate this problem with Tomcat 3.2.1.

Sample code is attached.

Any help would be appreciated!

Cheers,

Andy

BEGIN HTML FILE---

  
   Upload File
  
  
Select the file you wish to upload using the "browse" button below, and 
click Go!

http://my_server.com/servlet/ExampleFileUpload";>
  


  


END HTML FILE

BEGIN SERVLET SOURCE---
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class ExampleFileUpload extends HttpServlet
{
   public void doPost (HttpServletRequest  request,
   HttpServletResponse response) throws IOException,
 ServletException
   {
  if (!request.getContentType().startsWith("multipart/form-data")) 
 throw new ServletException ("Expecting multipart/form-data");

  //
  // Now let's read the file upload
  //
  BufferedReader in = new BufferedReader(request.getReader());

  //-
  //- START HERE!
  //-
  System.err.println ("About to make the first call to readLine()...");
  String boundary = in.readLine();
  System.err.println ("Got the MIME boundary line: |" + boundary + "|");
  //-
  //- END HERE!
  //-

  //
  // Any remaining code won't execute due to the blocking call...
  //
   }
 }
END SERVLET SOURCE

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit:jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Node.java

2002-04-04 Thread Kin-Man Chung

Remy,

I afraid that this patch won't work, because you are initializing
CustomTag.JspAttrs in the constructor, which is too early.
CustomTag.JspAttrs is currently set in Validator, after tld is consulted
to see if the tag attribute can take a request time expression;
and if so, extracts the string between '<%=' and '%>' etc.

Do you have a test case that causes a NPE?

> Date: Thu, 04 Apr 2002 07:03:55 +
> From: [EMAIL PROTECTED]
> Subject: cvs commit: 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Node.java
> To: [EMAIL PROTECTED]
> Delivered-to: mailing list [EMAIL PROTECTED]
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
> List-Post: 
> List-Subscribe: 
> List-Unsubscribe: 
> List-Help: 
> List-Id: "Tomcat Developers List" 
> 
> remm02/04/03 23:03:54
> 
>   Modified:jasper2/src/share/org/apache/jasper/compiler Node.java
>   Log:
>   - Fix NPE caused by JSP attributes field not being populated.
>   
>   Revision  ChangesPath
>   1.2   +8 -3  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java
>   
>   Index: Node.java
>   ===
>   RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Nod
e.java,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- Node.java   28 Mar 2002 18:46:16 -  1.1
>   +++ Node.java   4 Apr 2002 07:03:54 -   1.2
>   @@ -1,7 +1,7 @@
>/*
>   - * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Nod
e.java,v 1.1 2002/03/28 18:46:16 kinman Exp $
>   - * $Revision: 1.1 $
>   - * $Date: 2002/03/28 18:46:16 $
>   + * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Nod
e.java,v 1.2 2002/04/04 07:03:54 remm Exp $
>   + * $Revision: 1.2 $
>   + * $Date: 2002/04/04 07:03:54 $
> *
> * 
> * 
>   @@ -663,6 +663,11 @@
>   this.name = name;
>   this.prefix = prefix;
>   this.shortName = shortName;
>   +jspAttrs = new JspAttribute[attrs.getLength()];
>   +for (int i = 0; i < attrs.getLength(); i++) {
>   +jspAttrs[i] = new JspAttribute
>   +(attrs.getLocalName(i), attrs.getValue(i), false);
>   +}
>   }
>
>   public void accept(Visitor v) throws JasperException {
>   
>   
>   
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Node.java

2002-04-04 Thread remm

remm02/04/04 03:32:05

  Modified:jasper2/src/share/org/apache/jasper/compiler Node.java
  Log:
  - Also populate the TagData object.
  
  Revision  ChangesPath
  1.3   +6 -3  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java
  
  Index: Node.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Node.java 4 Apr 2002 07:03:54 -   1.2
  +++ Node.java 4 Apr 2002 11:32:05 -   1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java,v
 1.2 2002/04/04 07:03:54 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/04/04 07:03:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java,v
 1.3 2002/04/04 11:32:05 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/04/04 11:32:05 $
*
* 
* 
  @@ -664,10 +664,13 @@
this.prefix = prefix;
this.shortName = shortName;
   jspAttrs = new JspAttribute[attrs.getLength()];
  +Hashtable attrsHashtable = new Hashtable();
   for (int i = 0; i < attrs.getLength(); i++) {
   jspAttrs[i] = new JspAttribute
   (attrs.getLocalName(i), attrs.getValue(i), false);
  +attrsHashtable.put(attrs.getLocalName(i), attrs.getValue(i));
   }
  +tagData = new TagData(attrsHashtable);
}
   
public void accept(Visitor v) throws JasperException {
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[ANN] MinimalTomcat Alpha 0.4 "Small Container, Big Attitude"

2002-04-04 Thread Christopher K. St. John


MinTC used to be MinimalTomcat, but MinTC is shorter.

  http://www.distributopia.com/servlet_stuff/catalina_mtc.html

New DefaultServlet implementation allows serving files
from within the jar. Now runs under IBM's J2ME/CDC
environment (see website for details). Many more Watchdog
tests passed: "333 TEST(S) PASSED! 15 TEST(S) FAILED!"

MinTC is a special-purpose servlet container designed to
be embedded within distributed applications. It's meant to
have a very small footprint, both in the size of its
classfiles, and in its resource usage. It can be deployed
along with all your webapp classes and content as a single
executable jar.

MinTC is built with framework code from Catalina (Tomcat
4), but uses alternate implementations of the core
Catalina interfaces.

This is an alpha release for developers, MinimalTomcat
is not ready for production use.


-- 
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Node.java

2002-04-04 Thread remm

remm02/04/03 23:03:54

  Modified:jasper2/src/share/org/apache/jasper/compiler Node.java
  Log:
  - Fix NPE caused by JSP attributes field not being populated.
  
  Revision  ChangesPath
  1.2   +8 -3  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java
  
  Index: Node.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Node.java 28 Mar 2002 18:46:16 -  1.1
  +++ Node.java 4 Apr 2002 07:03:54 -   1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java,v
 1.1 2002/03/28 18:46:16 kinman Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/03/28 18:46:16 $
  + * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java,v
 1.2 2002/04/04 07:03:54 remm Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/04/04 07:03:54 $
*
* 
* 
  @@ -663,6 +663,11 @@
this.name = name;
this.prefix = prefix;
this.shortName = shortName;
  +jspAttrs = new JspAttribute[attrs.getLength()];
  +for (int i = 0; i < attrs.getLength(); i++) {
  +jspAttrs[i] = new JspAttribute
  +(attrs.getLocalName(i), attrs.getValue(i), false);
  +}
}
   
public void accept(Visitor v) throws JasperException {
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: