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

2000-12-08 Thread pier

pier00/12/08 01:39:08

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpTable.java
  Log:
  Changed variable names to be less confusing.
  
  Revision  ChangesPath
  1.2   +48 -47
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpTable.java
  
  Index: WarpTable.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpTable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WarpTable.java2000/12/07 21:12:54 1.1
  +++ WarpTable.java2000/12/08 09:39:07 1.2
  @@ -61,18 +61,18 @@
* @author a href="mailto:[EMAIL PROTECTED]"Pier Fumagalli/a
* @author Copyright copy; 1999, 2000 a href="http://www.apache.org"The
* Apache Software Foundation.
  - * @version CVS $Id: WarpTable.java,v 1.1 2000/12/07 21:12:54 pier Exp $
  + * @version CVS $Id: WarpTable.java,v 1.2 2000/12/08 09:39:07 pier Exp $
*/
   public class WarpTable {
   
  -/** The default size of our tables. */
  -private static int defaultsize=32;
  +/** The default capacity of our tables. */
  +private static int defaultcapacity=32;
   
  -/** The current size of our arrays. */
  -private int size;
  +/** The current capacity of our arrays. */
  +private int capacity;
   
   /** The number of elements present in our arrays. */
  -private int num;
  +protected int size;
   
   /** The array of objects. */
   protected Object objects[];
  @@ -81,31 +81,31 @@
   protected int ids[];
   
   /**
  - * Construct a new WarpTable instance with the default size.
  + * Construct a new WarpTable instance with the default capacity.
*/
   public WarpTable() {
  -this(defaultsize);
  +this(defaultcapacity);
   }
   
   /**
  - * Construct a new WarpTable instance with a specified size.
  + * Construct a new WarpTable instance with a specified capacity.
*
  - * @param size The initial size of the table.
  + * @param capacity The initial capacity of the table.
*/
  -public WarpTable(int size) {
  +public WarpTable(int capacity) {
   super();
  -// Paranoid, it's pointless to build a smaller than minimum size.
  -if (sizedefaultsize) size=defaultsize;
  +// Paranoid, it's pointless to build a smaller than minimum capacity.
  +if (capacitydefaultcapacity) capacity=defaultcapacity;
   
  -// Set the current and default sizes (in Hashtable terms the load
  +// Set the current and default capacitys (in Hashtable terms the load
   // factor is always 1.0)
  -this.defaultsize=size;
  -this.size=size;
  +this.defaultcapacity=capacity;
  +this.capacity=capacity;
   
   // Set the initial values.
  -this.num=0;
  -this.ids=new int[size];
  -this.objects=new Object[size];
  +this.size=0;
  +this.ids=new int[capacity];
  +this.objects=new Object[capacity];
   }
   
   /**
  @@ -117,7 +117,7 @@
*/
   public Object get(int id) {
   // Iterate thru the array of ids
  -for (int x=0; xthis.num; x++) {
  +for (int x=0; xthis.size; x++) {
   
   // We got our id, return the object at the same position
   if (this.ids[x]==id) return(this.objects[x]);
  @@ -138,31 +138,32 @@
   public boolean add(Object object, int id)
   throws NullPointerException {
   // Check if we were given a valid object
  -if (object==null) throw new NullPointerException("Null Handler");
  +if (object==null) throw new IllegalArgumentException("Null Object");
  +if (id0) throw new IllegalArgumentException("ID is less than 0");
   
   // Check if another object was registered for the specified id.
   if (this.get(id)!=null) return(false);
   
   // Check if we reached the capacity limit
  -if(this.size==this.num) {
  +if(this.capacity==this.size) {
   
   // Allocate some space for the new arrays
  -int newsize=this.size+defaultsize;
  -Object newobjects[]=new Object[newsize];
  -int newids[]=new int[newsize];
  +int newcapacity=this.capacity+defaultcapacity;
  +Object newobjects[]=new Object[newcapacity];
  +int newids[]=new int[newcapacity];
   // Copy the original arrays into the new arrays
  -System.arraycopy(this.objects,0,newobjects,0,this.num);
  -System.arraycopy(this.ids,0,newids,0,this.num);
  +System.arraycopy(this.objects,0,newobjects,0,this.size);
  +System.arraycopy(this.ids,0,newids,0,this.size);
   // Update our variables
  -   

RE: More Ajp13 Work Completed

2000-12-08 Thread GOMEZ Henri

Hi,

Could you send the patches to the list since :

* I'd like to test them before applying to the 3.2 tree.
  They could be ready for 3.2.1.

* I'll add them to my tomcat RPM to give production sites
  an up to date (and sus before 3.2.1)


Also what about token / acl in ajp13 for connections between apache
and tomcat ???

Thanks

"Pour la plupart des hommes, se corriger consiste à changer de défauts."
-- Voltaire 

-Original Message-
From: Dan Milstein [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 07, 2000 7:09 AM
To: [EMAIL PROTECTED]
Subject: More Ajp13 Work Completed


All,

First off, I want to thank you for nominating me to be a 
committer.  I'm very much looking forward to working on the project.

What are the next steps?  I just completed another good-sized 
chunk of work: I believe that I've fixed the multipart form 
bug (reports #536 and #542), and I rewrote the patch to fix 
the multiple cookies bug (no longer creating a new Enumeration 
for every request, as per Costin's suggestion).  I'm kind of 
assuming that I should just hold onto these (rather than 
bombarding Costin and/or the list with patches), on the theory 
that I'll be able to commit them myself soon.  Does that make 
sense?  Or I could just post the fixes to the list, if that 
would be better.

In the course of fixing multipart form, I modified 
doRead(byte[], int, int) to use System.arraycopy, which should 
make it much faster (and it's used for every single Post 
request, so that's good).  I want to do a bit more testing but 
it's looking pretty good.  The old code would also have died 
on a Request with a body but without a Content-Length (which 
is allowed for certain Transfer-Encodings by the HTTP/1.1 spec 
-- I just looked it up).  Possibly, I fixed Bug Report #468, 
which has to do with the content-length not being equal to the 
actual number of bytes sent -- I'll look into that one.

One other thing: in the course of getting this all working, I 
fixed what seemed to me to be a very serious bug with regard 
to the persistent connection between the web server and the 
container.  Basically, the read position into the buffer of 
request data wasn't getting properly reset to 0 for each new 
request, so reads would start in the middle of the request 
data in certain cases.  At least, that's what I found while I 
was working on this, but it seems inconceivable to me that 
this would have been out there without people complaining -- 
during my testing it was very confusing -- since it depended 
on what had happened during the previous Request, it seemed 
totally arbitrary.  Does this ring any bells for anyone?  If 
so, then I've fixed it ;-)

-Dan
-- 

Dan Milstein // [EMAIL PROTECTED]




Problem to limit the number of connections

2000-12-08 Thread Sophie Lemonnier

Hello,

I have a machine with little ressouces and with other applications than
tomcat are running.
Consequently, I would like to prevent too many clients to connect to
tomcat...
I haven't managed yet to limit the number of connections
Can anyone help me?
Thank you!

Sophie




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

2000-12-08 Thread pier

pier00/12/08 01:40:28

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpHandler.java
  Log:
  Small fix to debug information output.
  
  Revision  ChangesPath
  1.6   +2 -2  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpHandler.java
  
  Index: WarpHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WarpHandler.java  2000/12/08 02:57:04 1.5
  +++ WarpHandler.java  2000/12/08 09:40:27 1.6
  @@ -69,7 +69,7 @@
* @author a href="mailto:[EMAIL PROTECTED]"Pier Fumagalli/a
* @author Copyright copy; 1999, 2000 a href="http://www.apache.org"The
* Apache Software Foundation.
  - * @version CVS $Id: WarpHandler.java,v 1.5 2000/12/08 02:57:04 pier Exp $
  + * @version CVS $Id: WarpHandler.java,v 1.6 2000/12/08 09:40:27 pier Exp $
*/
   public abstract class WarpHandler implements Lifecycle, Runnable {
   
  @@ -376,7 +376,7 @@
*/
   protected void log(String msg) {
   WarpConnection connection=this.getConnection();
  -if (connection!=null) connection.log("{"+this.name+"} "+msg);
  +if (connection!=null) connection.log(msg);
   else WarpDebug.debug(this,msg);
   }
   
  
  
  



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

2000-12-08 Thread pier

pier00/12/08 01:40:56

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpEngine.java
  Log:
  Added methods for invoking requests within Catalina.
  
  Revision  ChangesPath
  1.5   +67 -9 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpEngine.java
  
  Index: WarpEngine.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpEngine.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WarpEngine.java   2000/12/08 02:57:04 1.4
  +++ WarpEngine.java   2000/12/08 09:40:55 1.5
  @@ -75,7 +75,7 @@
* @author a href="mailto:[EMAIL PROTECTED]"Pier Fumagalli/a
* @author Copyright copy; 1999, 2000 a href="http://www.apache.org"The
* Apache Software Foundation.
  - * @version CVS $Id: WarpEngine.java,v 1.4 2000/12/08 02:57:04 pier Exp $
  + * @version CVS $Id: WarpEngine.java,v 1.5 2000/12/08 09:40:55 pier Exp $
*/
   public class WarpEngine extends StandardEngine {
   
  @@ -90,6 +90,10 @@
   
   /** The Java class name of the default Mapper class for this Container. */
   private String mapper="org.apache.catalina.connector.warp.WarpEngineMapper";
  +/** The root path for web applications. */
  +private String appbase="";
  +/** The Host ID to use for the next dynamically configured host. */
  +private int hostid=0;
   
   //  CONSTRUCTOR
   
  @@ -111,14 +115,68 @@
   }
   
   /**
  - * Add a default Mapper implementation if none have been configured
  - * explicitly.
  - *
  - * @param mapperClass Java class name of the default Mapper
  - */
  -public void addDefaultMapper(String mapper) {
  -if (DEBUG) this.debug("Adding default mapper "+mapper);
  -super.addDefaultMapper(this.mapper);
  + * Create a new WarpHost with the specified host name, setup the appropriate
  + * values and add it to the list of children.
  + */
  +public synchronized WarpHost setupChild(String name) {
  +WarpHost host=(WarpHost)this.findChild(name);
  +if (host==null) {
  +this.debug("Creating new host "+name);
  +host=new WarpHost();
  +host.setName(name);
  +host.setHostID(this.hostid++);
  +host.setAppBase(this.appbase);
  +this.addChild(host);
  +}
  +return(host);
  +}
  +
  +/**
  + * Add a child WarpHost to the current WarpEngine.
  + */
  +public void addChild(Container child) {
  +if (child instanceof WarpHost) {
  +WarpHost byid=this.findChild(((WarpHost)child).getHostID());
  +if (byid!=null) {
  +throw new IllegalArgumentException("Host "+byid.getName()+
  +  " already configured with ID="+byid.getHostID());
  +} else {
  +super.addChild(child);
  +}
  +} else throw new IllegalArgumentException("Child is not a WarpHost");
  +}
  +
  +/**
  + * Find a child WarpHost associated with the specified Host ID.
  + */
  +public WarpHost findChild(int id) {
  +Container children[]=this.findChildren();
  +for (int x=0; xchildren.length; x++) {
  +WarpHost curr=(WarpHost)children[x];
  +if (curr.getHostID()==id) return(curr);
  +}
  +return(null);
  +}
  +
  +// --- BEAN METHODS
  +
  +/**
  + * Return the application root for this Connector. This can be an absolute
  + * pathname, a relative pathname, or a URL.
  + */
  +public String getAppBase() {
  +return (this.appbase);
  +}
  +
  +/**
  + * Set the application root for this Connector. This can be an absolute
  + * pathname, a relative pathname, or a URL.
  + */
  +public void setAppBase(String appbase) {
  +if (appbase==null) return;
  +if (DEBUG) this.debug("Setting application root to "+appbase);
  +String old=this.appbase;
  +this.appbase=appbase;
   }
   
   // -- DEBUGGING METHODS
  
  
  



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

2000-12-08 Thread pier

pier00/12/08 01:41:34

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpDebug.java
  Log:
  Compile out debugging information from M5.
  
  Revision  ChangesPath
  1.5   +2 -2  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpDebug.java
  
  Index: WarpDebug.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpDebug.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WarpDebug.java2000/12/07 21:12:58 1.4
  +++ WarpDebug.java2000/12/08 09:41:34 1.5
  @@ -61,14 +61,14 @@
* @author a href="mailto:[EMAIL PROTECTED]"Pier Fumagalli/a
* @author Copyright copy; 1999, 2000 a href="http://www.apache.org"The
* Apache Software Foundation.
  - * @version CVS $Id: WarpDebug.java,v 1.4 2000/12/07 21:12:58 pier Exp $
  + * @version CVS $Id: WarpDebug.java,v 1.5 2000/12/08 09:41:34 pier Exp $
*/
   public class WarpDebug {
   
   // -- CONSTANTS
   
   /** Our debug flag status (Used to compile out debugging information). */
  -public static final boolean DEBUG=true;
  +public static final boolean DEBUG=false;
   
   //  LOCAL VARIABLES
   
  
  
  



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

2000-12-08 Thread pier

pier00/12/08 01:42:49

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpConnector.java
  Log:
  Host mapping must not be done at Connector level but at Engine level.
  
  Revision  ChangesPath
  1.5   +1 -40 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnector.java
  
  Index: WarpConnector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnector.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WarpConnector.java2000/12/08 02:57:05 1.4
  +++ WarpConnector.java2000/12/08 09:42:49 1.5
  @@ -78,7 +78,7 @@
* @author a href="mailto:[EMAIL PROTECTED]"Pier Fumagalli/a
* @author Copyright copy; 1999, 2000 a href="http://www.apache.org"The
* Apache Software Foundation.
  - * @version CVS $Id: WarpConnector.java,v 1.4 2000/12/08 02:57:05 pier Exp $
  + * @version CVS $Id: WarpConnector.java,v 1.5 2000/12/08 09:42:49 pier Exp $
*/
   public class WarpConnector implements Connector, Lifecycle, Runnable {
   
  @@ -114,10 +114,6 @@
   private int port=8008;
   /** The number of concurrent connections we can handle. */
   private int acceptcount=10;
  -/** The root path for web applications. */
  -private String appbase="";
  -/** The current Host ID. */
  -private int hostid=0;
   
   //  CONSTRUCTOR
   
  @@ -176,22 +172,6 @@
   }
   
   /**
  - * Set up a virtual host in our Engine and return the associated host ID.
  - */
  -public int setupHost(String name) {
  -WarpHost host=new WarpHost();
  -int id=this.hostid++;
  -
  -host.setName(name);
  -host.setAppBase(this.getAppBase());
  -host.setHostID(id);
  -
  -this.getContainer().addChild(host);
  -
  -return(id);
  -}
  -
  -/**
* Begin processing requests via this Connector.
*/
   public void start() throws LifecycleException {
  @@ -385,25 +365,6 @@
   public void setAcceptCount(int acceptcount) {
   if (DEBUG) this.debug("Setting accept count to "+acceptcount);
   this.acceptcount=acceptcount;
  -}
  -
  -/**
  - * Return the application root for this Connector. This can be an absolute
  - * pathname, a relative pathname, or a URL.
  - */
  -public String getAppBase() {
  -return (this.appbase);
  -}
  -
  -/**
  - * Set the application root for this Connector. This can be an absolute
  - * pathname, a relative pathname, or a URL.
  - */
  -public void setAppBase(String appbase) {
  -if (appbase==null) return;
  -if (DEBUG) this.debug("Setting application root to "+appbase);
  -String old=this.appbase;
  -this.appbase=appbase;
   }
   
   // -- LOGGING AND DEBUGGING METHODS
  
  
  



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

2000-12-08 Thread pier

pier00/12/08 01:44:04

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpConnectionHandler.java
  Log:
  Configure all Catalina objects (Hosts and Applications/Contexts) from
  data gathered in the connection stage of the protocol.
  
  Revision  ChangesPath
  1.7   +47 -11
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnectionHandler.java
  
  Index: WarpConnectionHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnectionHandler.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WarpConnectionHandler.java2000/12/08 02:57:05 1.6
  +++ WarpConnectionHandler.java2000/12/08 09:44:04 1.7
  @@ -64,7 +64,7 @@
* @author a href="mailto:[EMAIL PROTECTED]"Pier Fumagalli/a
* @author Copyright copy; 1999, 2000 a href="http://www.apache.org"The
* Apache Software Foundation.
  - * @version CVS $Id: WarpConnectionHandler.java,v 1.6 2000/12/08 02:57:05 pier Exp $
  + * @version CVS $Id: WarpConnectionHandler.java,v 1.7 2000/12/08 09:44:04 pier Exp $
*/
   public class WarpConnectionHandler extends WarpHandler {
   /** The WarpReader associated with this WarpConnectionHandler. */
  @@ -91,36 +91,69 @@
* false if this was the last packet.
*/
   public boolean process(int type, byte buffer[]) {
  +WarpEngine engine=(WarpEngine)this.getConnector().getContainer();
  +
   this.reader.reset(buffer);
   this.packet.reset();
   try {
   switch (type) {
  -case WarpConstants.TYP_CONINIT_HST:
  +case WarpConstants.TYP_CONINIT_HST: {
   String name=reader.readString()+":"+reader.readShort();
   
   // Retrieve this host id
  -int hid=this.getConnector().setupHost(name);
  -if (DEBUG) this.debug("Created new host "+name+" ID="+hid);
  +int hid=engine.setupChild(name).getHostID();
  +if (DEBUG) this.debug("Host "+name+" has ID="+hid);
   
   // Send the HOST ID back to the WARP client
   this.packet.reset();
   this.packet.writeShort(hid);
   this.send(WarpConstants.TYP_CONINIT_HID,this.packet);
   break;
  +}
  +
  +case WarpConstants.TYP_CONINIT_APP: {
  +int hid=reader.readShort();
  +String name=reader.readString();
  +String path=reader.readString();
  +
  +// Retrieve this host (based on the host ID)
  +WarpHost host=(WarpHost)engine.findChild(hid);
  +if (host==null) {
  +this.log("Host ID "+hid+" not found");
  +this.packet.reset();
  +this.send(WarpConstants.TYP_CONINIT_ERR,this.packet);
  +return(false);
  +}
   
  -case WarpConstants.TYP_CONINIT_APP:
  +// Retrieve this application (based on the path)
  +WarpContext cont=(WarpContext)host.findChild(path);
  +// Check if we can find it by application name
  +if (cont==null)
  +cont=(WarpContext)host.findChild('/'+name);
   
  -// Retrieve this application id
  -int aid=321;
  -if (DEBUG) this.debug("CONINIT_APP "+reader.readString()+
  -  ":"+reader.readString()+"="+aid);
  +// We definitely didn't find the application
  +if (cont==null) {
  +this.log("Application "+name+" with path "+path+
  + " not found");
  +this.packet.reset();
  +this.send(WarpConstants.TYP_CONINIT_ERR,this.packet);
  +return(false);
  +}
  +
  +// Ok, we found the right application
  +int aid=cont.getApplicationID();
  +cont.setPath(path);
  +cont.setDisplayName(name);
  +if (DEBUG) this.debug("Application "+name+" mapped in "+
  +  host.getName()+path+" has ID "+aid);
   // Send the APPLICATION ID back to the WARP client
   this.packet.reset();
   this.packet.writeShort(aid);
   this.send(WarpConstants.TYP_CONINIT_AID,this.packet);
   break;
  +   

RE: A better proposal for compiling JSP's with debugging info

2000-12-08 Thread Larry Isaacs


 My preference would be to set the options on JspInterceptor, using the 
 server.xml format. 

 Context and ContextManager shouldn't know/care about what happens in 
 interceptors unless it's absolutely needed.  I think the biggest 
 priority 
 right now is to make sure all 9 core objects are "as simple as possible 
 and not simpler" - i.e. we should review all existing properties and 
 find 
 if they are indeed of general interest. 

I agree. For some reason, I seem to be having trouble actually 
following the design philosophy in practice.  Something must be thicker 
than I realize. :-) Thanks for fixing the goof in my earlier commit.

I'm also not doing a good job of making clear the reasons for this
functionality.  For the IDE we are developing here at SAS Institute,
one of my assignments is to be the "integrator of the web server".
The majority of people who will use our IDE to develop servlet's and
JSP propabably aren't interested in learning about Tomcat's server.xml.
They just want to be able to test what they develop.  

SAS's IDE is not intended to compete on the open market.  Its main value
is in the Java library that comes with it.  I would hope that the
functionality I'm proposing would help Tomcat achieve a better 
integration with other IDE's as well.  I think it is a weakness of
Jasper that doesn't make it easy to get debugging information.  While
making it easier to get debugging information, we might as well try to
make the other options easier to control too.

Right now, in Tomcat 3.2 I don't see a way to endable debugging info at
all in server.xml, and I really don't want to ask users to make Tomcat specific 
changes to their web.xml's to achieve it.  Tomcat 3.3 currently
supports enabling it in server.xml, but I would like to bring it
to the same level of functionality that I'm trying to reach in Tomcat
3.2.

As an illustration of the level of functionality I'm trying to reach,
it would be nice if you could have "keepgenerated" and "debugging info"
normally off. If a problem turns up in a JSP page, turn them on
temporarily, fix the JSP page, then turn them off again.  I would like
to be able to do that, for contexts I choose to allow it, without
modifying the server.xml or needing to keep multiple server.xml's with
different options in sync. 

For these JSP options, would it make sense then, if the JspInterceptor's 
constructor read a System property to update the built-in defaults using 
a string like I've proposed. The JspInterceptor's server.xml settings could then 
override these defaults. 

 Using notes is always a solution ( since it doesn't create any 
 dependency), but of course if you think this is important to have them 
 as 
 part of the core we can do that. 
 
 On the other side, using properties on JspInterceptor is very easy and 
 consistent with the rest of tomcat configuration. Even now you can 
 specify 
 
 Interceptor className="JspInterceptor" compiler="jikes" /, etc 
 
 You can also set the JspInterceptor per context ( if you want different 
 options for different contexts ). 

 What do you think ? 

Adding properties to the JspInterceptor sounds fine.  For some reason, 
I was thinking you would specify something like: 

Interceptor className="JspInterceptor"  
  Options className"TomcatOptions" keepGenerated="true" / 
/Interceptor 

which would be a little more complicated than I would prefer. 

Thanks. 

Larry 



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp WarpResponse.java WarpOutputStream.java WarpInputStream.java WarpRequestHandler.java WarpRequest.java WarpHost.java WarpHandler.java WarpEngine.java WarpDebug.java WarpContext.java WarpConstants.java WarpConnector.java WarpConnectionHandler.java

2000-12-08 Thread pier

pier00/12/08 07:33:49

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpRequestHandler.java WarpRequest.java
WarpHost.java WarpHandler.java WarpEngine.java
WarpDebug.java WarpContext.java WarpConstants.java
WarpConnector.java WarpConnectionHandler.java
  Added:   catalina/src/share/org/apache/catalina/connector/warp
WarpResponse.java WarpOutputStream.java
WarpInputStream.java
  Log:
  Done.
  
  Revision  ChangesPath
  1.5   +64 -15
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpRequestHandler.java
  
  Index: WarpRequestHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpRequestHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WarpRequestHandler.java   2000/12/08 02:57:02 1.4
  +++ WarpRequestHandler.java   2000/12/08 15:33:41 1.5
  @@ -64,9 +64,10 @@
* @author a href="mailto:[EMAIL PROTECTED]"Pier Fumagalli/a
* @author Copyright copy; 1999, 2000 a href="http://www.apache.org"The
* Apache Software Foundation.
  - * @version CVS $Id: WarpRequestHandler.java,v 1.4 2000/12/08 02:57:02 pier Exp $
  + * @version CVS $Id: WarpRequestHandler.java,v 1.5 2000/12/08 15:33:41 pier Exp $
*/
   public class WarpRequestHandler extends WarpHandler {
  +
   /** The WarpReader associated with this WarpConnectionHandler. */
   private WarpReader reader=new WarpReader();
   /** The WarpPacket used to write data. */
  @@ -74,6 +75,11 @@
   /** Wether we had an error in the request header. */
   private boolean headererr=false;
   
  +/** The WarpRequest object associated with this request handler. */
  +protected WarpRequest request=null;
  +/** The WarpRequest object associated with this request handler. */
  +protected WarpResponse response=null;
  +
   /**
* Process a WARP packet.
* br
  @@ -91,47 +97,90 @@
* false if this was the last packet.
*/
   public boolean process(int type, byte buffer[]) {
  +WarpConnector connector=this.getConnector();
  +WarpEngine engine=(WarpEngine)connector.getContainer();
  +String arg1=null;
  +String arg2=null;
  +int valu=-1;
  +
   this.reader.reset(buffer);
   this.packet.reset();
   try {
   switch (type) {
   // The Request method
   case WarpConstants.TYP_REQINIT_MET:
  -if (DEBUG) this.debug("REQINIT_MET "+reader.readString());
  +arg1=reader.readString();
  +if (DEBUG) this.debug("Request Method "+arg1);
  +this.request.setMethod(arg1);
   break;
  +
   // The Request URI
   case WarpConstants.TYP_REQINIT_URI:
  -if (DEBUG) this.debug("REQINIT_URI "+reader.readString());
  +arg1=reader.readString();
  +if (DEBUG) this.debug("Request URI "+arg1);
  +this.request.setRequestURI(arg1);
   break;
  +
   // The Request query arguments
   case WarpConstants.TYP_REQINIT_ARG:
  -if (DEBUG) this.debug("REQINIT_ARG "+reader.readString());
  +arg1=reader.readString();
  +if (DEBUG) this.debug("Request Query Argument "+arg1);
  +this.request.setQueryString(arg1);
   break;
  +
   // The Request protocol
   case WarpConstants.TYP_REQINIT_PRO:
  -if (DEBUG) this.debug("REQINIT_PRO "+reader.readString());
  +arg1=reader.readString();
  +if (DEBUG) this.debug("Request Protocol "+arg1);
  +this.request.setProtocol(arg1);
   break;
  +
   // A request header
   case WarpConstants.TYP_REQINIT_HDR:
  -if (DEBUG) this.debug("REQINIT_HDR "+reader.readString()+
  -  ": "+reader.readString());
  +arg1=reader.readString();
  +arg2=reader.readString();
  +if (DEBUG) this.debug("Request Header "+arg1+": "+arg2);
  +this.request.addHeader(arg1,arg2);
   break;
  +
   // A request variable
   case WarpConstants.TYP_REQINIT_VAR:
  -if (DEBUG) this.debug("REQINIT_VAR "+reader.readShort()+
  -  "="+reader.readString());
  +  

[Tomcat 4.0-M5] mod_webapp checked in.

2000-12-08 Thread Pier P. Fumagalli

I had to fix a couple of bugs on packet sinchronization. The initial version
(working on my Solaris 8, and compiling on Linux - didn't try it there), is
up.

Pier

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






Re: Problem to limit the number of connections

2000-12-08 Thread Arieh Markel


 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
 list-help: mailto:[EMAIL PROTECTED]
 list-unsubscribe: mailto:[EMAIL PROTECTED]
 list-post: mailto:[EMAIL PROTECTED]
 Delivered-To: mailing list [EMAIL PROTECTED]
 Delivered-To: moderator for [EMAIL PROTECTED]
 From: Sophie Lemonnier [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Problem to limit the number of connections
 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
 
 Hello,
 
 I have a machine with little ressouces and with other applications than
 tomcat are running.
 Consequently, I would like to prevent too many clients to connect to
 tomcat...
 I haven't managed yet to limit the number of connections
 Can anyone help me?

Sophie,

you did not mention the version of Tomcat that you are using.

In any case, I believe that for 3.2, the solution is in properties for the
org.apache.tomcat.service.PoolTcpConnector class:

the properties below control the number of threads (which will be associated
with inbound socket connections) that the connector has.

public static final String THREAD_POOL = "thread_pool";
public static final String MAX_THREADS = "max_threads";
public static final String MAX_SPARE_THREADS = "max_spare_threads";
public static final String MIN_SPARE_THREADS = "min_spare_threads";

What you need to do is modify your server.xml to explicitly set the
property values that are appropriate for you:

(Here is an example from an old server.xml I was using)

Connector className="org.apache.tomcat.service.PoolTcpConnector"
Parameter name="handler"
value="org.apache.tomcat.service.http.HttpConnectionHandler"/
Parameter name="port" value="8180"/
Parameter name="thread_pool" value="on"/
Parameter name="max_threads" value="100"/
Parameter name="max_spare_threads" value="30"/
Parameter name="min_spare_threads" value="10"/
/Connector

Arieh
--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Let's go Panthers  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




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

2000-12-08 Thread pier

pier00/12/08 07:34:13

  Modified:connectors/webapplib wa_provider_warp.c wa_provider_warp.h
  Log:
  Done.
  
  Revision  ChangesPath
  1.7   +116 -10   jakarta-tomcat-4.0/connectors/webapplib/wa_provider_warp.c
  
  Index: wa_provider_warp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/webapplib/wa_provider_warp.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- wa_provider_warp.c2000/12/07 17:36:40 1.6
  +++ wa_provider_warp.c2000/12/08 15:34:11 1.7
  @@ -55,7 +55,7 @@
*   *
* = */
   
  -// CVS $Id: wa_provider_warp.c,v 1.6 2000/12/07 17:36:40 pier Exp $
  +// CVS $Id: wa_provider_warp.c,v 1.7 2000/12/08 15:34:11 pier Exp $
   // Author: Pier Fumagalli mailto:[EMAIL PROTECTED]
   
   #include wa.h
  @@ -160,6 +160,25 @@
   }
   
   /**
  + * Retrieve a string from a WARP packet.
  + *
  + * @param p The ponter to a packet structure.
  + * @param buf The buffer where data needs to be stored.
  + * @param len The buffer length.
  + * @return The number of bytes copied, or a number greater than len indicating
  + * the number of bytes required to read this string.
  + */
  +static int wa_warp_packet_get_string(wa_warp_packet *p, char *buf, int len) {
  +int k=wa_warp_packet_get_short(p);
  +int x=0;
  +
  +if (klen) return(k);
  +for (x=0; xk; x++) buf[x]=p-buf[p-len++];
  +return(k);
  +}
  +
  +
  +/**
* Send a short integer (2 bytes) over a warp connection.
*
* @param c The connection configuration structure.
  @@ -225,7 +244,6 @@
   int rid=-1;
   int typ=-1;
   int siz=-1;
  -int ret=-1;
   
   // Get the packet RID
   if ((rid=wa_warp_recv_short(c))0) {
  @@ -255,14 +273,19 @@
   p=wa_warp_packet_create(siz);
   p-typ=typ;
   p-siz=siz;
  +p-len=0;
   if (siz==0) return(p);
  +
   // Read from the socket and fill the packet buffer
  -if ((ret=recv(c-sock,p-buf,siz,0))!=siz) {
  -fprintf(stderr,"SHORT rid=%d typ=%d siz=%d ret=%d\n",rid,typ,siz,ret);
  -wa_warp_packet_free(p);
  -return(NULL);
  +while(TRUE) {
  +p-len+=recv(c-sock,p-buf+p-len,(siz-p-len),0);
  +if (p-lensiz) fprintf(stderr,"SHORT len=%d siz=%d\n",p-len,siz);
  +if (p-lensiz) fprintf(stderr,"INCONSIST len=%d siz=%d\n",p-len,siz);
  +else {
  +p-len=0;
  +return(p);
  +}
   }
  -return(p);
   }
   
   /**
  @@ -508,8 +531,22 @@
   // Configure our list of hosts
   while(host!=NULL) {
   wa_application *appl=host-apps;
  +boolean found=FALSE;
   int hid=0;
  +
   
  +// Check if this host has applications configured with this provider
  +while(appl!=NULL) {
  +if (appl-conn-prov==wa_provider_warp) {
  +found=TRUE;
  +break;
  +} else appl=appl-next;
  +}
  +if (found==FALSE) {
  +host=host-next;
  +continue;
  +} else appl=host-apps;
  +
   wa_callback_debug(WA_LOG,NULL,"Attempting to configure host %s:%d",
host-name,host-port);
   // Setup the packet
  @@ -552,12 +589,19 @@
   
   // Iterate thru the list of configured applications
   while(appl!=NULL) {
  -int aid=0;
   wa_warp_appl_config *cnf=NULL;
  -
  +int aid=0;
  +
  +// Check if the current application is a warp application
  +if (appl-conn-prov!=wa_provider_warp) {
  +appl=appl-next;
  +continue;
  +}
  +
   wa_callback_debug(WA_LOG,NULL,"Attempting to configure app %s %s",
appl-name,appl-path);
   p-typ=TYP_CONINIT_APP;
  +wa_warp_packet_set_short(p,hid);
   wa_warp_packet_set_string(p,appl-name);
   wa_warp_packet_set_string(p,appl-path);
   
  @@ -679,6 +723,9 @@
   wa_warp_packet *out=NULL;
   int rid=0;
   int x=0;
  +char buf1[8192];
  +char buf2[8192];
  +boolean committed=FALSE;
   
   cc=(wa_warp_conn_config *)req-appl-conn-conf;
   ac=(wa_warp_appl_config *)req-appl-conf;
  @@ -820,8 +867,66 @@
   wa_warp_handle_error(req,"Unknown packet received (%d)",in-typ);
   return;
   }
  -wa_warp_packet_free(in);
   
  +wa_warp_packet_free(out);
  +while (TRUE) {
  +in=wa_warp_recv(cc,rid);
  +if (in==NULL) {
  +wa_warp_close(cc, "No 

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

2000-12-08 Thread pier

pier00/12/08 07:39:44

  Modified:catalina/src/share/org/apache/catalina/connector/warp
WarpDebug.java
  Log:
  Removed default debugging info.
  
  Revision  ChangesPath
  1.7   +2 -2  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpDebug.java
  
  Index: WarpDebug.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpDebug.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WarpDebug.java2000/12/08 15:33:43 1.6
  +++ WarpDebug.java2000/12/08 15:39:43 1.7
  @@ -61,14 +61,14 @@
* @author a href="mailto:[EMAIL PROTECTED]"Pier Fumagalli/a
* @author Copyright copy; 1999, 2000 a href="http://www.apache.org"The
* Apache Software Foundation.
  - * @version CVS $Id: WarpDebug.java,v 1.6 2000/12/08 15:33:43 pier Exp $
  + * @version CVS $Id: WarpDebug.java,v 1.7 2000/12/08 15:39:43 pier Exp $
*/
   public class WarpDebug {
   
   // -- CONSTANTS
   
   /** Our debug flag status (Used to compile out debugging information). */
  -public static final boolean DEBUG=true;
  +public static final boolean DEBUG=false;
   
   //  LOCAL VARIABLES
   
  
  
  



Re: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread Craig R. McClanahan

GOMEZ Henri wrote:

 Hi,

 1) any date for TC 4.0 M5 ?


As soon as I can get the Apache connector to compile and run on my Linux system
(and understand it enough to explain to others how to configure it, which should
be really easy thanks to Pier's hard work :-), I will cut a M5 release --
probably tonight unless unforseen problems crop up.


 2) There is many workspatch done on AJP13 by Dan Milstein but only for
 TC3.3 AJP13.
Will they be included in TC 3.2.1 ? I'm waiting for the patches on TC 3.3
 to see how
to incorporate in TC 3.2.1


If people running AJP13 think that the patches are good ones, I'd say let's go
ahead and incorporate them in the "tomcat_32" branch so that they'll be included
in 3.2.1.


 "Pour la plupart des hommes, se corriger consiste à changer de défauts."
 -- Voltaire

Craig





RE: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread David Rees

 If people running AJP13 think that the patches are good ones, I'd
 say let's go
 ahead and incorporate them in the "tomcat_32" branch so that
 they'll be included
 in 3.2.1.

In my setup, I can't even use AJP13 because it randomly returns blank pages,
so in IMHO it can't get any worse.  ;-)  Dan posted a bug fix which looked
like it might fix that problem, although I haven't tried it myself.  Maybe a
pre-release would be a good idea to shake out any new buglets in the updated
code might have been introduced?

-Dave




RE: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread GOMEZ Henri

Unfortunately, the patches are all against a file which 
doesn't exist in 3.2 (modules/server/Ajp13.java).  In 3.2, the 
relevant file is service/connector/Ajp13Connector.java.  So it 
wouldn't just be a matter of patching.

TC 3.3 use a new architecture...
 
If people do like the patches (and no bugs are found in them 
after a few days), I can probably make a few of the simpler 
fixes to Ajp13Connector (e.g. fix the multiple cookies 
problem).  Other things (e.g. multipart forms) are a lot more 
work, and I'm still trying to improve the 3.3 code in some 
basic ways.  I think it will make more sense to try to bring 
3.2 in line once I've got everything squared away.  Does that 
make sense?

I make sense ;-)

If there is around Linux users who want to test the latest TC 3.3 
(with the ajp13 patches), just take a look at :

http://rpmized.free.fr/




RE: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread GOMEZ Henri

Is there any way you can make these available in a standard 
.tar.gz or .zip
to save people the hassle of running the .rpms through alien?

The RPMS goes a step farther since they prepare installation
and remove. Also they take care of dependencies. 

I hope to see that some Debian packagers will take a look
at my RPM to do the same thing for Debian.



Re: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread Dan Milstein

Wait -- there's a new patch for the 3.3 code which fixes some of the biggest problems 
-- I'm doing some testing on that now and will publish it to the list today -- but 
it's *not* in cvs yet.

In particular, David -- I believe I've fixed the problem with Ajp13 randomly getting 
blank pages, but that is *not* yet under cvs.

Just trying to keep things clear,
-Dan

GOMEZ Henri wrote:
 
 Unfortunately, the patches are all against a file which
 doesn't exist in 3.2 (modules/server/Ajp13.java).  In 3.2, the
 relevant file is service/connector/Ajp13Connector.java.  So it
 wouldn't just be a matter of patching.
 
 TC 3.3 use a new architecture...
 
 If people do like the patches (and no bugs are found in them
 after a few days), I can probably make a few of the simpler
 fixes to Ajp13Connector (e.g. fix the multiple cookies
 problem).  Other things (e.g. multipart forms) are a lot more
 work, and I'm still trying to improve the 3.3 code in some
 basic ways.  I think it will make more sense to try to bring
 3.2 in line once I've got everything squared away.  Does that
 make sense?
 
 I make sense ;-)
 
 If there is around Linux users who want to test the latest TC 3.3
 (with the ajp13 patches), just take a look at :
 
 http://rpmized.free.fr/

-- 

Dan Milstein // [EMAIL PROTECTED]



Enterprise Tomcat

2000-12-08 Thread Michael Kuz
Title: Enterprise Tomcat 





Hello all, 


Does anyone know of Corperate (Fortune 500) companies using Tomcat as their enterprise servlet container? 
Anything like that at all? Links would be great.


We (tech types) want to use it, but have to prove mgmt. that it's in use in the big companies.


(Our mandate is no unproven technologies)
Don't flame me, that's not my definition of proven technology...


I've been trying to find _anything_ about Tomcat and enterprise usage and am having no luck.


What percentage of core coders on TC are from Sun? (guesses?) I think this would argue my case...


Any help is appreciated.
Cheers,
mk




Michael R. Kuz
Developer
Service Intelligence
(403) 261-5000 ext. 363
[EMAIL PROTECTED]






Re: A better proposal for compiling JSP's with debugging info

2000-12-08 Thread cmanolache

Hi Larry,

I'm +1 on implementing your changes - setting options for jsp is very
important ( I use jikes most of the time ).

Setting jasper options in web.xml has many problems, and I don't think we
should do it. 

I agree adding a ContextManager/Context property is the best solution for
3.2 - minimal changes, no "danger".

For 3.3 we can do the same thing, but it might be better to set the
properties on JspInterceptor - it's more direct and proably easier.

Whatever you choose is fine ( and we can fix it later ) - it's important
to get the functionality we need and see how it works, and then we can
do some refactoring if needed.

Costin




RE: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread David Rees

 Is there any way you can make these available in a standard
 .tar.gz or .zip
 to save people the hassle of running the .rpms through alien?

 The RPMS goes a step farther since they prepare installation
 and remove. Also they take care of dependencies.

Which can be a good thing if you're using Linux.  But if you're doing
development on Windows, it's a PITA to take it to your Linux box, and run it
through alien so you can put it on your Windows box.

-Dave




RE: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread David Rees

 If there is around Linux users who want to test the latest TC 3.3
 (with the ajp13 patches), just take a look at :

 http://rpmized.free.fr/

Is there any way you can make these available in a standard .tar.gz or .zip
to save people the hassle of running the .rpms through alien?

Thanks,
-Dave




RE: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread David Rees

 -Original Message-
 From: danmil [mailto:danmil]On Behalf Of Dan Milstein

 Wait -- there's a new patch for the 3.3 code which fixes some of
 the biggest problems -- I'm doing some testing on that now and
 will publish it to the list today -- but it's *not* in cvs yet.

 In particular, David -- I believe I've fixed the problem with
 Ajp13 randomly getting blank pages, but that is *not* yet under cvs.

Thanks for the clarification, Dan.  I hope to help test the new Ajp13 bug
fixes when they get into CVS.

-Dave




RE: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread Michael Grinder



On Fri, 8 Dec 2000, David Rees wrote:

 Which can be a good thing if you're using Linux.  But if you're doing
 development on Windows, it's a PITA to take it to your Linux box, and run it
 through alien so you can put it on your Windows box.

You are aware that zips and tgzs are available from the Tomcat website
aren't you?

Michael Grinder




src and bin inconsistency?

2000-12-08 Thread Doug Erickson


Dear Jakarta Gurus -- 

It seems like the binaries in release 3.2 are not built from the sources
in release 3.2.  Specifically, I noticed that the source for
org.apache.tomcat.net.ServerSocketFactory has a protected member
"attributes", while the class file in the binary distribution
(libs/webserver.jar) does not.

If this is so, could someone please build binaries from the 3.2 release
code and update the download site?

Thanks,

Doug Erickson



Customizing Error Pages!!

2000-12-08 Thread Pankaj Bhagat



Hi everybody:
 I using Apache and TomCat 3.2 
and was trying the option of having customized error pages for the application. 
Now for this as i need error pages corresponding to Exception's in my code i am 
trying that option using the web.xml file.
But somehow am not being taken to the error 
page.
Please not that i also tried to get to an error 
page by giving the error code also, but could not get that either.

Wishing if somebody has worked on this 
earlier..then he/she can be of great help to me.

Thanks and Regards
Pankaj


Re: relative redirect problem using port mapping vip

2000-12-08 Thread Joe Prevo

Technically you should never be relying on sending a relative redirect to 
begin with. The redirect method says that is should be an absolute URL. 
Here's the code we use in my project to overcome all of the redirect issues 
we ran into:

   protected String getServletUrl(HttpServletRequest req, String servletInfo)
   {
 StringBuffer url = new StringBuffer();

 String servletPath = req.getServletPath();
 int servletSlash = servletPath.lastIndexOf('/');

 url.append(req.getScheme());
 url.append("://");
 url.append(req.getHeader("Host"));
 if (servletSlash  0)
   url.append('/');
 else
   url.append(servletPath.substring(0, servletSlash + 1));
 url.append(servletInfo);

 return url.toString();
   }

Hope this helps.
Joe

At 12/7/2000 03:10 PM, you wrote:
Hi all

we use tomcat as a web server on multiple processors having different IP
addresses behind a VIP portal.  The VIP maps Ip adreeses and ports also
(therefore a request send to port 80 can reach a processor with port 8080,
etc.).

When doing a relative redirect (response.sendRedirect method), the Absolute
URL build from the relative URI does not seem to be produced properly.  It
takes the host name from the request header but takes the port from the web
server (from HttpRequestAdapter.getServerPort).  therefore creating a
redirect url command with the right IP address but the wrong port (in our
case 8080 i.o. 80).  That seems to be a bug in the tomcat code as it should
take the port from the request header.  But can someone tell me if I might
be doing something wrong before I change the code...?)

Benoit Lalumiere
Software Architect
Jambala Innovation Cell
Ericsson Canada (LMC)




RE: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread David Rees

Not for the version of TC 3.3 rolled from CVS that is on
http://rpmized.free.fr/.  Of course, what I should do is to use CVS and
check out my own tree instead of asking favors of other people.  :-)  I
should've realized this before asking for tarballs.

-Dave

 -Original Message-
 From: Michael Grinder [mailto:[EMAIL PROTECTED]]

 On Fri, 8 Dec 2000, David Rees wrote:

  Which can be a good thing if you're using Linux.  But if you're doing
  development on Windows, it's a PITA to take it to your Linux
 box, and run it
  through alien so you can put it on your Windows box.

 You are aware that zips and tgzs are available from the Tomcat website
 aren't you?

 Michael Grinder





cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources jsp12.dtd

2000-12-08 Thread pierred

pierred 00/12/08 12:26:10

  Modified:jasper/src/share/org/apache/jasper/resources jsp12.dtd
  Log:
  removed test line
  
  Revision  ChangesPath
  1.3   +1 -2  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/jsp12.dtd
  
  Index: jsp12.dtd
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/jsp12.dtd,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jsp12.dtd 2000/09/19 20:33:37 1.2
  +++ jsp12.dtd 2000/12/08 20:26:07 1.3
  @@ -96,5 +96,4 @@
   
   !ELEMENT jsp:root %jsp.body;
   !ATTLIST jsp:root
  -xmlns:jsp CDATA #FIXED "http://java.sun.com/products/jsp/dtd/jsp_1_0.dtd"
  -xmlns:ttl CDATA #FIXED "http://java.sun.com/products/jsp/dtd/jsptests_1_0.dtd"
  +xmlns:jsp CDATA #FIXED "http://java.sun.com/products/jsp/dtd/jsp_1_0.dtd"
  
  
  



RE: Ajp13 / Tomcat 3.2

2000-12-08 Thread David Rees

 -Original Message-
 From: danmil [mailto:danmil]On Behalf Of Dan Milstein

 Well, I just poked through the Tomcat 3.2 which handles Ajp13,
 and, though the code's laid out a bit differently, as far as I
 can tell, the critical problem I described with reading request
 data is only in 3.3 -- the 3.2 code should not suffer from that
 particular problem.

Hmmm, so I wonder what the problem I'm seeing with it is.  If I get some
time I'll try to investigate further.

-Dave




Re: Enterprise Tomcat

2000-12-08 Thread Falcon cheetah
 I used to work in the second largest financial institute in the world, as they call themselves, here in the US. And they were using stuff other than at that time JServ and early version Tomcat.
I tried to push tomcat, but it was to hard to change the mentality of ignorant managers who only knew of computers the Power of Perl and thought they were technology experts. Do not fight that war and let them go to Hell :)

 Michael Kuz [EMAIL PROTECTED] wrote: 


Hello all, 
Does anyone know of Corperate (Fortune 500) companies using Tomcat as their enterprise servlet container? Anything like that at all? Links would be great. 
We (tech types) want to use it, but have to prove mgmt. that it's in use in the big companies. 
(Our mandate is no unproven technologies) Don't flame me, that's not my definition of proven technology... 
I've been trying to find _anything_ about Tomcat and enterprise usage and am having no luck. 
What percentage of core coders on TC are from Sun? (guesses?) I think this would argue my case... 
Any help is appreciated. Cheers, mk 
Michael R. Kuz Developer Service Intelligence (403) 261-5000 ext. 363 [EMAIL PROTECTED] Do You Yahoo!?
Yahoo! Shopping - 
Thousands of Stores. Millions of Products.

Ajp13 / Tomcat 3.2

2000-12-08 Thread Dan Milstein

Well, I just poked through the Tomcat 3.2 which handles Ajp13, and, though the code's 
laid out a bit differently, as far as I can tell, the critical problem I described 
with reading request data is only in 3.3 -- the 3.2 code should not suffer from that 
particular problem.

-Dan
-- 

Dan Milstein // [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspParseEventListener.java TagLibraryInfoImpl.java XmlOutputter.java

2000-12-08 Thread pierred

pierred 00/12/08 12:45:19

  Modified:jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java TagLibraryInfoImpl.java
XmlOutputter.java
  Log:
  Misc bug fixes for XML syntax processing.
  
  Revision  ChangesPath
  1.16  +9 -6  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JspParseEventListener.java2000/12/05 12:23:46 1.15
  +++ JspParseEventListener.java2000/12/08 20:45:09 1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.15 2000/12/05 12:23:46 pierred Exp $
  - * $Revision: 1.15 $
  - * $Date: 2000/12/05 12:23:46 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.16 2000/12/08 20:45:09 pierred Exp $
  + * $Revision: 1.16 $
  + * $Date: 2000/12/08 20:45:09 $
*
* 
*
  @@ -777,7 +777,9 @@
   ex.getMessage());
}
}
  - xo.append("jsp:directive." + directive, attrs);
  + if (!directive.equals("include")) {
  + xo.append("jsp:directive." + directive, attrs);
  + }
   }
   
   
  @@ -988,7 +990,6 @@
  start, stop);
   
addGenerator(gen);
  -xo.append(chars);
   }
   
   public void handleTagBegin(Mark start, Mark stop, 
  @@ -1034,7 +1035,7 @@
   }
   
   public void handleRootEnd() {
  - xo.append("jsp:root");
  + xo.rootEnd();
   }
   
   public void handleRootBegin(Attributes attrs) 
  @@ -1076,6 +1077,7 @@
   {
if (data != null) {
handleCharData(start, stop, data);
  +xo.append(data);
}
   UninterpretedTagEndGenerator gen = 
new UninterpretedTagEndGenerator(rawName);
  @@ -1088,6 +1090,7 @@
throws JasperException
   {
handleCharData(start, stop, data);
  +xo.append("jsp:cdata", null, data);
   }
   
   /**
  
  
  
  1.16  +7 -9  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- TagLibraryInfoImpl.java   2000/11/18 22:36:48 1.15
  +++ TagLibraryInfoImpl.java   2000/12/08 20:45:12 1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.15 2000/11/18 22:36:48 pierred Exp $
  - * $Revision: 1.15 $
  - * $Date: 2000/11/18 22:36:48 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
 1.16 2000/12/08 20:45:12 pierred Exp $
  + * $Revision: 1.16 $
  + * $Date: 2000/12/08 20:45:12 $
*
* The Apache Software License, Version 1.1
*
  @@ -180,8 +180,6 @@
   URL url = null;
   boolean relativeURL = false;
   
  - //p("prefix: " + prefix + "  uriIn: " + uriIn);
  - //if (location != null) p("location: " + location[0]);
if (location == null) {
// The URI points to the TLD itself or to a jar
// file where the TLD is located
  @@ -215,23 +213,19 @@
parseTLD(location[0], in);
} else {
// Location points to a jar file
  - // p("JAR FILE: " + location[0]);
// tag library in jar file
JarFile jarFile = null;
ZipEntry jarEntry = null;
InputStream stream = null;
try {
url = ctxt.getResource(location[0]);
  - // p("url = " + url);
if (url == null) return;
url = new URL("jar:" + url.toString() + "!/");
JarURLConnection conn =
(JarURLConnection) url.openConnection();
conn.connect(); //@@@ necessary???
jarFile = conn.getJarFile();
  - // p("jarFile: " + jarFile);
jarEntry = jarFile.getEntry(location[1]);
  - // p("jarEntry name: " + jarEntry.getName());
stream = jarFile.getInputStream(jarEntry);
parseTLD(location[0], stream);
// FIXME @@@
  @@ -240,6 +234,10 @@
// it to 

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources messages.properties

2000-12-08 Thread pierred

pierred 00/12/08 12:46:28

  Modified:jasper/src/share/org/apache/jasper/resources
messages.properties
  Log:
  new error message
  
  Revision  ChangesPath
  1.12  +3 -1  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/messages.properties
  
  Index: messages.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/messages.properties,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- messages.properties   2000/12/08 20:31:30 1.11
  +++ messages.properties   2000/12/08 20:46:23 1.12
  @@ -1,4 +1,4 @@
  -# $Id: messages.properties,v 1.11 2000/12/08 20:31:30 pierred Exp $
  +# $Id: messages.properties,v 1.12 2000/12/08 20:46:23 pierred Exp $
   #
   # Default localized string information
   # Localized this the Default Locale as is en_US
  @@ -231,3 +231,5 @@
   jsp.error.taglibDirective.absUriCannotBeResolved=This absolute uri ({0}) cannot be 
resolved in either web.xml or the jar files deployed with this application
   jsp.error.unterminated.user.tag=Unterminated user-defined tag: ending tag {0} not 
found or incorrectly nested
   jspx.error.templateDataNotInJspCdata=Validation Error: Element lt;{0}gt; cannot 
have template data. Template data must be encapsulated within a lt;jsp:cdatagt; 
element. [JSP1.2 PFD section 5.1.9]\nTemplate data in error: {1}
  +#Error while processing taglib jar file {0}: {1}
  +jsp.error.taglib.jarFileException=
  
  
  



BugRat Report #556 has been filed.

2000-12-08 Thread BugRat Mail System

Bug report #556 has just been filed.

You can view the report at the following URL:

   http://znutar.cortexity.com/BugRatViewer/ShowReport/556

REPORT #556 Details.

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: high
Severity: critical
Confidence: public
Environment: 
   Release: 3.2
   JVM Release: JDK 1.3
   Operating System: Windows 2000 Professional
   OS Release: 5.00.2195 SP 1
   Platform: Win2K

Synopsis: 
Out of memory error

Description:
After a few request, random OutOfMemoryError(s) occur within Tomcat framework 
(detailled traces shown below)

D:\tomcat\bincall D:\tomcat\bin\tomcat.bat stop
Including all jars in D:\tomcat\lib in your CLASSPATH.

Using CLASSPATH: D:\tomcat\classes;D:\classes;D:\tomcat\lib\ant.jar;D:\tomcat\li
b\jasper.jar;D:\tomcat\lib\jaxp.jar;D:\tomcat\lib\parser.jar;D:\tomcat\lib\servl
et.jar;D:\tomcat\lib\webserver.jar;D:\lib\Acme.jar;D:\lib\activation.jar;D:\lib\
gnujsp10.jar;D:\lib\HTTPClient.jar;D:\lib\j2ee.jar;D:\lib\jai_codec.jar;D:\lib\j
ai_core.jar;D:\lib\JimiProClasses.jar;D:\lib\log4j-full.jar;D:\lib\mail.jar;D:\l
ib\Opta2000.jar;D:\lib\oreilly.jar;D:\lib\syslog.jar;D:\lib\TIMInfrastructure.ja
r;C:\java\jdk13\lib\tools.jar

Stop tomcat
Deleted file - D:\tomcat\work\localhost_8080\_0002fcompany_0002fprocess_0002ejsp
process.class
Deleted file - D:\tomcat\work\localhost_8080\_0002finc_0002fcommon_0002fselect_0
002fmake_0002f_00034_0002ejsp4.class
Deleted file - D:\tomcat\work\localhost_8080\_0002finc_0002fen_0002flogin_0002ft
ext_0002ejsptext.class
Deleted file - D:\tomcat\work\localhost_8080\_0002finc_0002fen_0002foptions_0002
f_00034_0002ejsp4.class
Deleted file - D:\tomcat\work\localhost_8080\_0002finc_0002fen_0002fselect_0002f
subcategory_0002f_00031_0002ejsp1.class
Deleted file - D:\tomcat\work\localhost_8080\_0002finc_0002fen_0002fselect_0002f
subsubcategory_0002f_00034_0002ejsp4.class
Deleted file - D:\tomcat\work\localhost_8080\_0002finventory_0002fcatprocess_000
2ejspcatprocess.class
Deleted file - D:\tomcat\work\localhost_8080\_0002finventory_0002fextraprocess_0
002ejspextraprocess.class
Deleted file - D:\tomcat\work\localhost_8080\_0002finventory_0002fprocess_0002ej
spprocess.class
Deleted file - D:\tomcat\work\localhost_8080\_0002flogin_0002fprocess_0002ejsppr
ocess.class
Including all jars in D:\tomcat\lib in your CLASSPATH.

Using CLASSPATH: D:\tomcat\classes;D:\classes;D:\tomcat\lib\ant.jar;D:\tomcat\li
b\jasper.jar;D:\tomcat\lib\jaxp.jar;D:\tomcat\lib\parser.jar;D:\tomcat\lib\servl
et.jar;D:\tomcat\lib\webserver.jar;D:\lib\Acme.jar;D:\lib\activation.jar;D:\lib\
gnujsp10.jar;D:\lib\HTTPClient.jar;D:\lib\j2ee.jar;D:\lib\jai_codec.jar;D:\lib\j
ai_core.jar;D:\lib\JimiProClasses.jar;D:\lib\log4j-full.jar;D:\lib\mail.jar;D:\l
ib\Opta2000.jar;D:\lib\oreilly.jar;D:\lib\syslog.jar;D:\lib\TIMInfrastructure.ja
r;C:\java\jdk13\lib\tools.jar

2000-12-08 04:29:09 - ContextManager: Adding context Ctx( /examples )
2000-12-08 04:29:09 - ContextManager: Adding context Ctx( /admin )
2000-12-08 04:29:09 - ContextManager: Adding context Ctx(  )
Starting tomcat. Check logs/tomcat.log for error messages
2000-12-08 04:29:09 - ContextManager: Adding context Ctx( /test )
2000-12-08 04:29:10 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
2000-12-08 04:29:10 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007
MTLInitializer: loading "file:/D:/classes/mtl.config.properties"
MTLInitializer: configuring System properties...
MTLInitializer: configuring Debug properties...
MTLInitializer: Debug mode is ON
MTLInitializer: configuring Resource...
MTLInitializer: already configured !
2000-12-08 04:30:45 - Ctx(  ): 400 R( /) null
2000-12-08 04:30:47 - Ctx(  ): IOException in: R(  + /js/selection.js + null) Co
nnection aborted by peer: socket write error
2000-12-08 04:30:47 - Ctx(  ): IOException in: R(  + /js/validation.js + null) C
onnection aborted by peer: socket write error
2000-12-08 05:09:08 - Ctx(  ): Exception in: R(  + /showroom/process.jsp + null)
 - javax.servlet.ServletException
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4
04)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372
)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.
java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743
)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
:498)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.OutOfMemoryError
  

cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspParseEventListener.java XmlOutputter.java

2000-12-08 Thread pierred

pierred 00/12/08 16:36:11

  Modified:jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java XmlOutputter.java
  Log:
  Added proper handling of jsp:include and jsp:forward
  tags when generating the XML stream for validation by tag
  libraries.
  
  Revision  ChangesPath
  1.17  +9 -5  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JspParseEventListener.java2000/12/08 20:45:09 1.16
  +++ JspParseEventListener.java2000/12/09 00:36:10 1.17
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.16 2000/12/08 20:45:09 pierred Exp $
  - * $Revision: 1.16 $
  - * $Date: 2000/12/08 20:45:09 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.17 2000/12/09 00:36:10 pierred Exp $
  + * $Revision: 1.17 $
  + * $Date: 2000/12/09 00:36:10 $
*
* 
*
  @@ -952,7 +952,9 @@
   new ForwardGenerator(start, attrs, param, isXml),
   start, stop);
addGenerator(gen);
  - //@@@ xo
  + xo.append("jsp:forward", attrs);
  + xo.append("jsp:param", param);
  + xo.append("jsp:forward");
   }
   
   public void handleInclude(Mark start, Mark stop, Attributes attrs, 
  @@ -971,7 +973,9 @@
   new IncludeGenerator(start, attrs, param, isXml),
   start, stop);
addGenerator(gen);
  - //@@@ xo
  + xo.append("jsp:include", attrs);
  + xo.append("jsp:param", param);
  + xo.append("jsp:include");
   }
   
   public void handleCharData(Mark start, Mark stop, char[] chars) throws 
JasperException {
  
  
  
  1.6   +20 -3 
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java
  
  Index: XmlOutputter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XmlOutputter.java 2000/12/08 20:45:13 1.5
  +++ XmlOutputter.java 2000/12/09 00:36:10 1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
 1.5 2000/12/08 20:45:13 pierred Exp $
  - * $Revision: 1.5 $
  - * $Date: 2000/12/08 20:45:13 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
 1.6 2000/12/09 00:36:10 pierred Exp $
  + * $Revision: 1.6 $
  + * $Date: 2000/12/09 00:36:10 $
*
* 
*
  @@ -153,6 +153,23 @@
*/
   void append(String tag, Attributes attrs) {
   append(tag, attrs, sb);
  +}
  +
  +/**
  + * Append the start tag along with its attributes 
  + * (name, value) to the XML stream.
  + */
  +void append(String tag, Hashtable table) {
  + Enumeration enum = table.keys();
  + while (enum.hasMoreElements()) {
  + String name = (String)enum.nextElement();
  + String value = ((String[])table.get(name))[0];
  + AttributesImpl attrs = new AttributesImpl();
  + attrs.addAttribute("", "name", "name", "CDATA", name);
  + attrs.addAttribute("", "value", "value", "CDATA", value);
  + append(tag, attrs, sb);
  + append(tag);
  + }
   }
   
   /**
  
  
  



Re: BugRat Report #556 has been filed.

2000-12-08 Thread Nick Bauman

Can you give us more information? Do you see the JVM growing and no
GC happening? Did you see this behavior with earlier versions of
tomcat? Other servlet container implementations?

On Fri, 8 Dec 2000, BugRat Mail System wrote:

 Bug report #556 has just been filed.
 
 You can view the report at the following URL:
 
http://znutar.cortexity.com/BugRatViewer/ShowReport/556
 
 REPORT #556 Details.
 
 Project: Tomcat
 Category: Bug Report
 SubCategory: New Bug Report
 Class: swbug
 State: received
 Priority: high
 Severity: critical
 Confidence: public
 Environment: 
Release: 3.2
JVM Release: JDK 1.3
Operating System: Windows 2000 Professional
OS Release: 5.00.2195 SP 1
Platform: Win2K
 
 Synopsis: 
 Out of memory error
 
 Description:
 After a few request, random OutOfMemoryError(s) occur within Tomcat framework 
(detailled traces shown below)
 
 D:\tomcat\bincall D:\tomcat\bin\tomcat.bat stop
 Including all jars in D:\tomcat\lib in your CLASSPATH.
 
 Using CLASSPATH: D:\tomcat\classes;D:\classes;D:\tomcat\lib\ant.jar;D:\tomcat\li
 b\jasper.jar;D:\tomcat\lib\jaxp.jar;D:\tomcat\lib\parser.jar;D:\tomcat\lib\servl
 et.jar;D:\tomcat\lib\webserver.jar;D:\lib\Acme.jar;D:\lib\activation.jar;D:\lib\
 gnujsp10.jar;D:\lib\HTTPClient.jar;D:\lib\j2ee.jar;D:\lib\jai_codec.jar;D:\lib\j
 ai_core.jar;D:\lib\JimiProClasses.jar;D:\lib\log4j-full.jar;D:\lib\mail.jar;D:\l
 ib\Opta2000.jar;D:\lib\oreilly.jar;D:\lib\syslog.jar;D:\lib\TIMInfrastructure.ja
 r;C:\java\jdk13\lib\tools.jar
 
 Stop tomcat
 Deleted file - D:\tomcat\work\localhost_8080\_0002fcompany_0002fprocess_0002ejsp
 process.class
 Deleted file - D:\tomcat\work\localhost_8080\_0002finc_0002fcommon_0002fselect_0
 002fmake_0002f_00034_0002ejsp4.class
 Deleted file - D:\tomcat\work\localhost_8080\_0002finc_0002fen_0002flogin_0002ft
 ext_0002ejsptext.class
 Deleted file - D:\tomcat\work\localhost_8080\_0002finc_0002fen_0002foptions_0002
 f_00034_0002ejsp4.class
 Deleted file - D:\tomcat\work\localhost_8080\_0002finc_0002fen_0002fselect_0002f
 subcategory_0002f_00031_0002ejsp1.class
 Deleted file - D:\tomcat\work\localhost_8080\_0002finc_0002fen_0002fselect_0002f
 subsubcategory_0002f_00034_0002ejsp4.class
 Deleted file - D:\tomcat\work\localhost_8080\_0002finventory_0002fcatprocess_000
 2ejspcatprocess.class
 Deleted file - D:\tomcat\work\localhost_8080\_0002finventory_0002fextraprocess_0
 002ejspextraprocess.class
 Deleted file - D:\tomcat\work\localhost_8080\_0002finventory_0002fprocess_0002ej
 spprocess.class
 Deleted file - D:\tomcat\work\localhost_8080\_0002flogin_0002fprocess_0002ejsppr
 ocess.class
 Including all jars in D:\tomcat\lib in your CLASSPATH.
 
 Using CLASSPATH: D:\tomcat\classes;D:\classes;D:\tomcat\lib\ant.jar;D:\tomcat\li
 b\jasper.jar;D:\tomcat\lib\jaxp.jar;D:\tomcat\lib\parser.jar;D:\tomcat\lib\servl
 et.jar;D:\tomcat\lib\webserver.jar;D:\lib\Acme.jar;D:\lib\activation.jar;D:\lib\
 gnujsp10.jar;D:\lib\HTTPClient.jar;D:\lib\j2ee.jar;D:\lib\jai_codec.jar;D:\lib\j
 ai_core.jar;D:\lib\JimiProClasses.jar;D:\lib\log4j-full.jar;D:\lib\mail.jar;D:\l
 ib\Opta2000.jar;D:\lib\oreilly.jar;D:\lib\syslog.jar;D:\lib\TIMInfrastructure.ja
 r;C:\java\jdk13\lib\tools.jar
 
 2000-12-08 04:29:09 - ContextManager: Adding context Ctx( /examples )
 2000-12-08 04:29:09 - ContextManager: Adding context Ctx( /admin )
 2000-12-08 04:29:09 - ContextManager: Adding context Ctx(  )
 Starting tomcat. Check logs/tomcat.log for error messages
 2000-12-08 04:29:09 - ContextManager: Adding context Ctx( /test )
 2000-12-08 04:29:10 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
 2000-12-08 04:29:10 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007
 MTLInitializer: loading "file:/D:/classes/mtl.config.properties"
 MTLInitializer: configuring System properties...
 MTLInitializer: configuring Debug properties...
 MTLInitializer: Debug mode is ON
 MTLInitializer: configuring Resource...
 MTLInitializer: already configured !
 2000-12-08 04:30:45 - Ctx(  ): 400 R( /) null
 2000-12-08 04:30:47 - Ctx(  ): IOException in: R(  + /js/selection.js + null) Co
 nnection aborted by peer: socket write error
 2000-12-08 04:30:47 - Ctx(  ): IOException in: R(  + /js/validation.js + null) C
 onnection aborted by peer: socket write error
 2000-12-08 05:09:08 - Ctx(  ): Exception in: R(  + /showroom/process.jsp + null)
  - javax.servlet.ServletException
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4
 04)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372
 )
 at org.apache.tomcat.core.ContextManager.internalService(ContextManager.
 java:797)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743
 )
 at 

BugRat Report #558 has been filed.

2000-12-08 Thread BugRat Mail System

Bug report #558 has just been filed.

You can view the report at the following URL:

   http://znutar.cortexity.com/BugRatViewer/ShowReport/558

REPORT #558 Details.

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: medium
Severity: serious
Confidence: public
Environment: 
   Release: 3.2 final
   JVM Release: 1.3
   Operating System: Solaris
   OS Release: 2.7
   Platform: Sparc

Synopsis: 
getUserPrincipal returns wrong user

Description:


Title: 
BugRat Report #
558





BugRat Report #
558




Project:
Tomcat


Release:
3.2 final




Category:
Bug Report


SubCategory:
New Bug Report




Class:
swbug


State:
received




Priority:
medium


Severity:
serious




Confidence:
public





Submitter:
_Anonymous ([EMAIL PROTECTED])

Date Submitted:
Dec 8 2000, 10:28:15 CST

Responsible:
Z_Tomcat Alias ([EMAIL PROTECTED])


Synopsis:

getUserPrincipal returns wrong user


 Environment: (jvm, os, osrel, platform)

1.3, Solaris, 2.7, Sparc



Additional Environment Description:

Environment is not relevant.



Report Description:





How To Reproduce:

null



Workaround:

null



View this report online...






fix for bug 558, getUserPrincipal returns wrong user

2000-12-08 Thread Brian Moore

I just entered bug 558, but the bug tool ignored the text in the
"how to reproduce" and "workaround" fields, which included my suggested
bug fix:

How to reproduce:
Access the jsp/security/protected/index.jsp
example then access it again as a different user.
getRemoteUser and getUserPrincipal won't match for the 2nd request.

To fix the bug:
In the initRequest() method of tomcat/core/RequestImpl.java
add the line
principal = null;
in with everything else that gets reset.

Brian Moore




Re: migration from JServ to Jakarta-Tomcat

2000-12-08 Thread Andy

óÁÌØÎÉËÏ× áÌÅËÓÅÊ áÌ ÅËÓÁÎÄÒÏ×ÉÞ wrote:

 Hello
 in ApacheModuleJServ:
 ApJServAction .jsp /servlets/oracle.jsp.JspServlet

 How it will be present in httpd.conf with mod_jk?

 Alexey Salnikov
 ICQ: 14293059

To my knowlege Oracle has not ported to mod_jk yet.

For standard tomcat/apache/mod_jk this will be automatically
configured (for the most part) whenever tomcat starts it
creates a mod_jk.config-auto that you can use the
"Include" directive in httpd.conf.  This way you should not have
to do much for jsp's.


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




how to maintain session between HTTP and HTTPS?

2000-12-08 Thread Weigen Liang

 I'm trying to find a way to maintain session between
 HTTP and HTTPS: some pages (html/jsp), 
 such as login and credit card info, need to 
 transported under HTTPS, but the rest does not 
 need to. I prefer not to spending the extra 
 cpu circles for unnecessary encryption since 
 the servers may be under heavy cpu utilization 
 due to generating images for returning to user.
 
 Any suggestions?
 
 Thanks.
 
 Weigen
 


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



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

2000-12-08 Thread pierred

pierred 00/12/08 21:45:48

  Modified:jasper/src/share/org/apache/jasper Constants.java
  Log:
  Cleaned up the default list of imports.
  Details (long) below.
  
  The list of "default" imports used in Jasper was as follows
  
1) default import list as defined in spec (section 2.10.1.1 p.47)
  
"javax.servlet.*",
"javax.servlet.jsp.*",
"javax.servlet.http.*",
  
2) Not in the default import list of the spec, but should be
   in it. [-- to be fixed in spec]
  
  "javax.servlet.jsp.tagext.*",
"java.io.IOException",
  
3) Jasper specific runtime environment
  
"org.apache.jasper.runtime.*",
"org.apache.jasper.JasperException"
  
4) beans import
  
"java.beans.*",
  
5) Imports we were doing but should not have been
  
"java.io.PrintWriter",
"java.io.FileInputStream",
  "java.io.ObjectInputStream",
"java.util.Vector",
"java.beans.*",
  
  I've cleaned it up by getting rid of the import list in 5).
  
  Regarding 4) (java.beans.*):
  In the JSP1.2 PFD, section 4.1 p. 65, it is said:
  
  "If the object is not found in the specified scope; and beanName is
  given, then the method instantiate() of java.beans.Beans will be
  invoked with the ClassLoader of the Servlet object and the beanName as
  arguments. If the method succeeds, the new object reference is
  associated the with the scripting variable and with the specified name
  in the specified scope using the appropriate scope dependent
  association mechanism (see PageContext). After this, step 7 is
  performed."
  
  Given this, the java.beans.Beans class is required. I therefore think
  that it should be in the default import list. (Jasper currently requires
  it).
  
  The new 'default' import list in Jasper therefore looks as follows
  (as of my last commit):
  
"javax.servlet.*",
"javax.servlet.jsp.*",
"javax.servlet.http.*",
  "javax.servlet.jsp.tagext.*",
"java.io.IOException",
"java.beans.Beans,"
"org.apache.jasper.runtime.*",
"org.apache.jasper.JasperException"
  
  I've run watchod (jsp tests) as well as all the examples
  in tomcat and all ran fine.
  
  Please let me know if I'm missing something, and if that default
  list should be modified.
  
  -- Pierre
  
  Revision  ChangesPath
  1.5   +6 -7  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Constants.java
  
  Index: Constants.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Constants.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Constants.java2000/10/04 05:10:45 1.4
  +++ Constants.java2000/12/09 05:45:47 1.5
  @@ -89,16 +89,15 @@
   /**
* These classes/packages are automatically imported by the
* generated code. 
  - *
  - * FIXME: Need to trim this to what is there in PR2 and verify
  - *with all our generators -akv.
*/
   public static final String[] STANDARD_IMPORTS = { 
  - "javax.servlet.*", "javax.servlet.http.*", "javax.servlet.jsp.*", 
  + "javax.servlet.*", 
  + "javax.servlet.http.*", 
  + "javax.servlet.jsp.*", 
   "javax.servlet.jsp.tagext.*",
  - "java.io.PrintWriter", "java.io.IOException", "java.io.FileInputStream",
  -"java.io.ObjectInputStream", "java.util.Vector",
  - "org.apache.jasper.runtime.*", "java.beans.*",
  + "java.io.IOException", 
  + "java.beans.Beans",
  + "org.apache.jasper.runtime.*", 
"org.apache.jasper.JasperException"
   };
   
  
  
  



RE: how to maintain session between HTTP and HTTPS?

2000-12-08 Thread cga

I find it strange that it doesn't maintains session accross http and https.
¿Are you redirecting?
Anyway, a not very good way of solving the problem is putting the session in
a hashtable and when you have your user back you retrieve the session from
there (and take it  out). Use a parameter to identify the session (or a
cookie). That is how I solved a similar problem when I had to redirect to
another server and get the answer as a http call.

Bye,

Gaston


- Original Message -
From: Elijah Roberts [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 09, 2000 4:11 AM
Subject: Re: how to maintain session between HTTP and HTTPS?


 On Saturday December 09, 2000 Weigen Liang wrote:
   I'm trying to find a way to maintain session between
   HTTP and HTTPS: some pages (html/jsp),
   such as login and credit card info, need to
   transported under HTTPS, but the rest does not
   need to. I prefer not to spending the extra
   cpu circles for unnecessary encryption since
   the servers may be under heavy cpu utilization
   due to generating images for returning to user.
  
   Any suggestions?

 Is a normal JSP session not maintained across HTTP and HTTPS. I have
 never tried it out, but I don't see any reason why it shouldn't work.
 Have you tried it and found it to not work? Your email is a little vague.

 Elijah Roberts
 [EMAIL PROTECTED]




BugRat Report #559 has been filed.

2000-12-08 Thread BugRat Mail System

Bug report #559 has just been filed.

You can view the report at the following URL:

   http://znutar.cortexity.com/BugRatViewer/ShowReport/559

REPORT #559 Details.

Project: Tomcat
Category: Feature Requests
SubCategory: Enhancement
Class: suggest
State: received
Priority: low
Severity: non-critical
Confidence: public
Environment: 
   Release: Regexp 1.2
   JVM Release: 1.3
   Operating System: WinNT
   OS Release: 4, SP6
   Platform: Intel

Synopsis: 
Why is the RE class not Serializable?

Description:
Hopefully I categorized this right -- I was trying out the org.apache.regexp package 
when I hit an odd omission: the RE class is not Serializable... which means the 
classes that use it cannot be saved out as files for JavaBeans and whatnot without 
some fancy footwork. Is there a reason why it cannot implement Serializable?

Title: 
BugRat Report #
559





BugRat Report #
559




Project:
Tomcat


Release:
Regexp 1.2




Category:
Feature Requests


SubCategory:
Enhancement




Class:
suggest


State:
received




Priority:
low


Severity:
non-critical




Confidence:
public





Submitter:
Carlos Bueno ([EMAIL PROTECTED])

Date Submitted:
Dec 9 2000, 01:11:12 CST

Responsible:
Z_Tomcat Alias ([EMAIL PROTECTED])


Synopsis:

Why is the RE class not Serializable?


 Environment: (jvm, os, osrel, platform)

1.3, WinNT, 4, SP6, Intel



Additional Environment Description:





Report Description:

Hopefully I categorized this right -- I was trying out the org.apache.regexp package when I hit an odd omission: the RE class is not Serializable... which means the classes that use it cannot be saved out as files for JavaBeans and whatnot without some fancy footwork. Is there a reason why it cannot implement Serializable?



How To Reproduce:

null



View this report online...






Re: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread Dan Milstein

  2) There is many workspatch done on AJP13 by Dan Milstein but only for
  TC3.3 AJP13.
 Will they be included in TC 3.2.1 ? I'm waiting for the patches on TC 3.3
  to see how
 to incorporate in TC 3.2.1
 
 
 If people running AJP13 think that the patches are good ones, I'd say let's go
 ahead and incorporate them in the "tomcat_32" branch so that they'll be included
 in 3.2.1.

Unfortunately, the patches are all against a file which doesn't exist in 3.2 
(modules/server/Ajp13.java).  In 3.2, the relevant file is 
service/connector/Ajp13Connector.java.  So it wouldn't just be a matter of patching.

If people do like the patches (and no bugs are found in them after a few days), I can 
probably make a few of the simpler fixes to Ajp13Connector (e.g. fix the multiple 
cookies problem).  Other things (e.g. multipart forms) are a lot more work, and I'm 
still trying to improve the 3.3 code in some basic ways.  I think it will make more 
sense to try to bring 3.2 in line once I've got everything squared away.  Does that 
make sense?

-Dan

-- 

Dan Milstein // [EMAIL PROTECTED]



RE: TC 4.0M5 / TC 3.2.1

2000-12-08 Thread David Rees

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]

 My understanding is that Dan is doing a refactoring of AJP13 and he's
 extending and fixing the protocol.

 I don't know if that would be a "safe" thing for 3.2.1, most refactoring
 requires a lot of testing and it's not the right thing for a minor
 release.

 Of course, fixes should be integrated ( if it's not a huge effort ).

 My hope is that 3.3 will be ready to Beta in January/February.

Sounds good.  The one fix I see that should be integrated into 3.2.1 is
Dan's "blank page" fix.  Hopefully it's a small one (sounded like it was
from his description the other day).

-Dave




More Ajp13 Patches

2000-12-08 Thread Dan Milstein

Okay, I've done some more basic testing of my new code, so here it is.  Let me know if 
you find any problems with it.

Here's what I've done: 

 - Fixed a basic problem with the way request data was read, which would have resulted 
in sporadic failure to get all the request data from the client.  Don't know if there 
are bug reports with this, but from feedback on this list, this has affected a lot of 
people.  This was a critical problem -- I don't think anyone should be using ajp13 if 
their code base has this bug.  I'll check out a copy of the 3.2 release this afternoon 
and see what's there.

 - Fixed the problem with multiple headers (which was causing multiple cookie settings 
to fail).  I had submitted a patch for this, but I rewrote it at Costin's suggestion 
to be more peformant. Bug report #371 (and several others).

 - Clarified something in the Ajp13 protocol (if the container tries to read past the 
end of the input stream, the server sends an empty packet back -- I'll add this to the 
spec soon).  This required modifications to some of the mod_jk C code, which I've 
attached.  This change is backward compatible with the old protocol (which simply hung 
the container in this case, so it's not hard to be backward compatible ;-).  To get 
this fix to work, you'll need to rebuild and reinstall mod_jk.so.

 - Fixed the problems with multipart form encodings.  Bug Reports  #536 + #542 and a 
bunch of others.  File upload is now working.

 - Made some performance improvements (replaced a byte-by-byte copy with 
System.arraycopy).

 - Some basic code improvements: new methods, improved debugging dumps.

On the other hand, despite my fond hopes, I don't think I've fixed the Bug Report 
#468, which hangs up the server when the client fails to send as many bytes as it 
promises in its content-length header.  I look into that a bit more.

I was also unable to test chunked-transfer -- can anyone supply me with a valid 
HTTP/1.1 request which uses chunked transfer?  I don't think browsers use this much, 
but it'd be nice to be sure it worked.

From feedback on this list, it seems like the most important things to look at next 
are:

 - Authentication of connections between the web server and the container.

 - Setting things up so that the Apache/Tomcat connection behaves better in case of 
Tomcat shutting down or restarting.  The current set up requires Apache to be 
restarted.

I'll keep you all posted...

-Dan

-- 

Dan Milstein // [EMAIL PROTECTED]

Index: Ajp13.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java,v
retrieving revision 1.6
diff -u -r1.6 Ajp13.java
--- Ajp13.java  2000/12/05 06:30:15 1.6
+++ Ajp13.java  2000/12/08 19:21:51
@@ -184,6 +184,9 @@
 
 public void recycle() 
 {
+  // This is a touch cargo-cultish, but I think wise.
+  blen = 0; 
+  pos = 0;
 }
 
 /**
@@ -257,7 +260,7 @@
 req.serverName().setString( msg.getString());
 req.setServerPort(  msg.getInt());
 
-   isSSL = (msg.getByte() != 0);
+   isSSL = msg.getBool();
 
// Decode headers
MimeHeaders headers = req.getMimeHeaders();
@@ -358,6 +361,7 @@
}

blen = msg.peekInt();
+   pos = 0;
msg.getBytes(bodyBuff);
}
 
@@ -374,7 +378,9 @@
 public int doRead() throws IOException 
 {
 if(pos = blen) {
-refillReadBuffer();
+if( ! refillReadBuffer()) {
+   return -1;
+   }
 }
 return bodyBuff[pos++];
 }
@@ -386,30 +392,61 @@
  * @param off The offset in the buffer at which to start filling.
  * @param len The number of bytes to copy into the buffer.
  *
- * @return The number of bytes actually copied into the buffer.
+ * @return The number of bytes actually copied into the buffer, or -1
+ * if the end of the stream has been reached.
  *
  * @see Ajp13Request#doRead
  */
 public int doRead(byte[] b, int off, int len) throws IOException 
 {
-// XXX Rewrite to use System.arrayCopy (please!)
-for(int i = off ; i  (len + off) ; i++) {
-int a = doRead();
-if(-1 == a) {
-return i-off;
-}
-b[i] = (byte)a;
-}
-
-return len;
+   if(pos = blen) {
+   if( ! refillReadBuffer()) {
+   return -1;
+   }
+   }
+
+   if(pos + len = blen) { // Fear the off by one error
+   // Sanity check b.length  off + len?
+   System.arraycopy(bodyBuff, pos, b, off, len);
+   pos += len;
+   return len;
+   }
+
+   // Not enough data (blen  pos + len)
+   int toCopy = len;
+   while(toCopy  0) {
+   int bytesRemaining = blen - pos;
+   if(bytesRemaining  0) 
+