BugRat Report #411 - jsp:setProperty doesn't call set methods in beans if params have no value

2000-12-31 Thread BugRat Mail System

Report #411 Details

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: closed
Priority: medium
Severity: serious
Confidence: public
Environment: 
   Release: Tomcat latest as of Nov 17 (stab
   JVM Release: 1.2
   Operating System: Linux
   OS Release: Suse 7.0
   Platform: ?

Synopsis: 
jsp:setProperty doesn't call set methods in beans if params have no value

Description:
If I have a url like so:

http://localhost:8080/foobar/LoginSubmit.jsp?username=password=

and then in LoginSubmit.jsp

jsp:useBean id="loginForm" class="some.class.LoginForm" /
jsp:setProperty name="loginForm" property="*" /

the setUsername() and setPassword() methods are not called.
If I move the setProperty into the useBean tag, it doesn't help.
Furthermore, if I do
jsp:setProperty name="loginForm" property="username" value="" /

The set method STILL isn't called.

I can think of no reason for this, but I can think of a good reason to always call it.
Namely, it's nice to know if your bean was initialized fresh or just had a bunch of 
setProp with empty string values.
Bean implementors can freely ignore empty string if they want to.

Title: 
BugRat Report #
411





BugRat Report #
411




Project:
Tomcat


Release:
Tomcat latest as of Nov 17 (stab




Category:
Bug Report


SubCategory:
New Bug Report




Class:
swbug


State:
closed




Priority:
medium


Severity:
serious




Confidence:
public





Submitter:
_Anonymous ([EMAIL PROTECTED])

Date Submitted:
Nov 20 2000, 01:45:11 CST

Responsible:
Z_Tomcat Alias ([EMAIL PROTECTED])


Synopsis:

jsp:setProperty doesn't call set methods in beans if params have no value


 Environment: (jvm, os, osrel, platform)

1.2, Linux, Suse 7.0, ?



Additional Environment Description:





Report Description:

If I have a url like so:

http://localhost:8080/foobar/LoginSubmit.jsp?username==

and then in LoginSubmit.jsp




the setUsername() and setPassword() methods are not called.
If I move the setProperty into the useBean tag, it doesn't help.
Furthermore, if I do


The set method STILL isn't called.

I can think of no reason for this, but I can think of a good reason to always call it.
Namely, it's nice to know if your bean was initialized fresh or just had a bunch of setProp with empty string values.
Bean implementors can freely ignore empty string if they want to.



How To Reproduce:





Workaround:





View this Report online...






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


Re: Licensing / Source Question

2000-12-31 Thread James Duncan Davidson

On 12/28/00 10:41 PM, "[EMAIL PROTECTED]" [EMAIL PROTECTED] wrote:

 - do you want to check in all the code ? It isn't bad, but maybe it would
 be a better idea to check in only a subset - or move the utils in a
 different top-level directory.

Unless it is contributed to the ASF -- and the ASF accepts, it's *much*
better to check in a .jar file. Very much cleaner from a legal standpoint.

-- 
James Duncan Davidson[EMAIL PROTECTED]
  !try; do()


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




Re: TC 4.0 vs. TC 3.x and division of labor

2000-12-31 Thread James Duncan Davidson

On 12/28/00 11:29 PM, "Remy Maucherat" [EMAIL PROTECTED] wrote:

 Quoting James Duncan Davidson [EMAIL PROTECTED]:
 
 Sideline this *now*. This will get discussed at the PMC meeting.
 
 Can non-PMC members like myself attend this ?

Yep. It will be an open meeting. Phone dialups are going to be investigated.

.duncan

-- 
James Duncan Davidson[EMAIL PROTECTED]
  !try; do()


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




Re: TC 4.0 vs. TC 3.x and division of labor

2000-12-31 Thread James Duncan Davidson

On 12/29/00 4:33 AM, "Paulo Gaspar" [EMAIL PROTECTED] wrote:

 Sorry Duncan. I am in a different time zone and I reply to mails by the
 date order they were sent. (That is how you got a batch of replies from
 me altogether.)

Cool enough. I should have been a bit clearer that I wasn't just trying to
say to you "knock it off" -- more like "just because there's mail here still
coming in on the topic, please don't make more" which is aimed at everyone
in general and nobody in particular.

-- 
James Duncan Davidson[EMAIL PROTECTED]
  !try; do()


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




Re: JMX to build TC 4.0 m5

2000-12-31 Thread James Duncan Davidson

On 12/29/00 12:04 PM, "Jon Stevens" [EMAIL PROTECTED] wrote:

 Yea, it denied my Berkeley, CA address at one point. :-)

Yep. No way to map IP's to physical location except by top level ISPs -- and
then only sortof. :)

.duncan

-- 
James Duncan Davidson[EMAIL PROTECTED]
  !try; do()


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




Re: Session Serialize code

2000-12-31 Thread James Duncan Davidson

On 12/29/00 6:35 PM, "Jon Stevens" [EMAIL PROTECTED] wrote:

 If the server crashes, then you are screwed either way.
 
 If you are live, then serializing/deserializing the sessions for each and
 every request could be a major slowdown (even with this code). This is why
 there still isn't a good session server available. :-)

Database folks will argue that the best session server would have a database
as a back end. After all -- databases have to solve problems of both speed
and safety as well. Of course going through SQL and an access API nukes out
some advantage. :) But without a lot of work (of which this looks like a
pretty damn good start), they are most likely right.

When session support was put into the servlet api, this was one of the
things that was debated. There's really no good answer except: use sessions
for data you don't mind getting splatted in a pinch, or that you won't do
anything more than annoy if it goes splat (loosing a shopping cart even is
annoying, but not totally reprehensible as long as you have 99.9% updtime).
Data that has to be preserved has to go into a database or an EJB. Anything
involving money for sure. :)

-- 
James Duncan Davidson[EMAIL PROTECTED]
  !try; do()


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




Re: Session Serialize code

2000-12-31 Thread James Duncan Davidson

On 12/30/00 6:00 AM, "Kief Morris" [EMAIL PROTECTED] wrote:

 It doesn't need to. I'm writing PersistentManager to put the session
 on a queue to be serialized by another thread. This shouldn't have a
 noticeable performance impact.

At least on a machine that is not totally tweaked out and running under
heavy load. Moving the performance hit around works until your site gets
pounded every time your company's commercial gets played during the
super-bowl :)

.duncan

-- 
James Duncan Davidson[EMAIL PROTECTED]
  !try; do()


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




RE: Session Serialize code

2000-12-31 Thread cmanolache

On Sat, 30 Dec 2000 [EMAIL PROTECTED] wrote:

 Thanks. I'll love to see this.
 I'm rewriting the session serialize code as a plug-in module (that was your
 offer), so I need sterilization support for ServerSession.
 
 Please take care of that as fast as you can.

I'm working on it - sorry for beeing so slow. 
( I'm almost done - and things start to come into place quite nicely, but
I want to run some tests and sleep on it ).

Anyway - I hope to finsih the changes this century, only 3 things left :-)

Costin


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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming LocalStrings_es.properties

2000-12-31 Thread nacho

nacho   00/12/31 08:32:09

  Added:   catalina/src/share/org/apache/naming
LocalStrings_es.properties
  Log:
  no message
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/LocalStrings_es.properties
  
  Index: LocalStrings_es.properties
  ===
  # $Id: LocalStrings_es.properties,v 1.1 2000/12/31 16:32:09 nacho Exp $
  
  # language es
  
  # package org.apache.naming
  
  
  contextBindings.unknownContext=Contexto {0} desconocido 
  contextBindings.noContextBoundToThread=No hay contexto de nombres asociado a este 
hilo
  selectorContext.noJavaUrl=Este contexto debe de ser accedido a traves de una URL de 
tipo java:
  namingContext.contextExpected=El nombre no esta asociado a ningun Contexto
  namingContext.nameNotBound=El nombre {0} no este asociado a este contexto
  namingContext.readOnly=El contexto es de solo lectura
  namingContext.invalidName=Nombre no valido
  namingContext.noAbsoluteName=No se puede generar un nombre absoluto para este 
espacio de nombres
  namingContext.alreadyBound=El nombre {0} este ya asociado en este Contexto
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/resources LocalStrings_es.properties

2000-12-31 Thread nacho

nacho   00/12/31 08:33:48

  Added:   catalina/src/share/org/apache/catalina/resources
LocalStrings_es.properties
  Log:
  no message
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/resources/LocalStrings_es.properties
  
  Index: LocalStrings_es.properties
  ===
  # $Id: LocalStrings_es.properties,v 1.1 2000/12/31 16:33:48 nacho Exp $
  
  # language es
  
  # package org.apache.catalina.resources
  
  
  directory.filename=Nombre
  directory.lastModified=Ultima Modificacion
  directory.parent=Ir a {0}
  directory.size=TamaƱo
  directory.title=Listado del directorio {0}
  directory.version=Tomcat Catalina version 4.0
  fileResources.base=La base de documentos {0} no existe o es un directorio no legible
  jarResources.syntax=la base de documentos {0} debe comenzar con 'jar:' y terminar 
con '!/'
  resources.alreadyStarted=Recursos ha sido ya iniciado
  resources.connect=No se puede conectar con la base de documentos {0}
  resources.input=No se puede crear un flujo de entrada para el recurso {0}
  resources.notStarted=Recursos no han sido aun iniciados
  resources.null=La base de documentos no puede ser nula
  resources.path=El camino relativo {0} debe empezar con '/'
  standardResources.alreadyStarted=Recursos ha sido ya iniciado
  standardResources.directory=La base de archivos {0} no es un directorio
  standardResources.exists=La base de archivos {0} no existe
  standardResources.notStarted=Recursos no han sido aun iniciados
  standardResources.null=La base de documentos no puede ser nula
  standardResources.slash=El base de documentos {0} debe terminar con '/'
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http LocalStrings_es.properties LocalStrings.properties

2000-12-31 Thread nacho

nacho   00/12/31 08:35:17

  Modified:catalina/src/share/org/apache/catalina/connector/http
LocalStrings.properties
  Added:   catalina/src/share/org/apache/catalina/connector/http
LocalStrings_es.properties
  Log:
  no message
  
  Revision  ChangesPath
  1.3   +8 -1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/LocalStrings.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LocalStrings.properties   2000/11/17 03:30:43 1.2
  +++ LocalStrings.properties   2000/12/31 16:35:16 1.3
  @@ -1,3 +1,10 @@
  +# $Id: LocalStrings.properties,v 1.3 2000/12/31 16:35:16 nacho Exp $
  +
  +# language 
  +
  +# package org.apache.catalina.connector.http
  +
  +
   httpConnector.alreadyStarted=HTTP connector has already been started
   httpConnector.allAddresses=Opening server socket on all host IP addresses
   httpConnector.failedSocketFactoryLoading=Failed to load socket factory
  @@ -25,4 +32,4 @@
   requestStream.read.closed=Unable to read from a closed stream
   requestStream.read.error=Unexpected end of stream
   requestStream.readline.error=Couldn't read line
  -requestStream.readline.toolong=Line too long
  \ No newline at end of file
  +requestStream.readline.toolong=Line too long
  
  
  
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/LocalStrings_es.properties
  
  Index: LocalStrings_es.properties
  ===
  # $Id: LocalStrings_es.properties,v 1.1 2000/12/31 16:35:16 nacho Exp $
  
  # language es
  
  # package org.apache.catalina.connector.http
  
  
  httpConnector.alreadyStarted=Conector HTTP ha sido ya iniciado
  httpConnector.allAddresses=Abriendo sockets de servidor en todas las direcciones IP 
disponibles
  httpConnector.failedSocketFactoryLoading=Problemas para cargar la factoria de sockets
  httpConnector.failedToCreateSocket=La factoria de sockets a fallado al crear un 
socket
  httpConnector.anAddress=Abriendo sockets en las direccion IP {0}
  httpConnector.noAddress=No existe la direccionb IP {0}, abriendo todas las 
disponibles
  httpConnector.noProcessor=No hay procesador disponible, rechazando esta conexion
  httpConnector.notStarted=Conector HTTP no ha sido iniciado todavia
  httpConnector.starting=Iniciando thread de posterior
  httpConnector.stopping=Parando  thread posterior
  httpProcessor.alreadyStarted=Procesador HTTP ha sido ya iniciado
  httpProcessor.notStarted=Procesador HTTP no ha sido iniciado todavia
  httpProcessor.parseHeaders.contentLength=Cabecera 'Content-Lenght' no valida
  httpProcessor.parseHeaders.colon=Cabecera HTTP no valida
  httpProcessor.parseHeaders.portNumber=Numero de puerto TCP/IP no  valido en la 
cabecera 'Host'
  httpProcessor.parseRequest.decode=No se puede decodificar el URI de la peticion HTTP
  httpProcessor.parseRequest.method=Metodo de la peticion HTTP inexistente
  httpProcessor.parseRequest.read=Linea de la peticion HTTP inexistente
  httpProcessor.parseRequest.uri=El URI peticion HTTP inexistente
  httpProcessor.parseHeaders.unknownExpectation=Campo de cabecera Expect desconocido
  httpProcessor.start=Procesador HTTP ha sido ya iniciado
  httpProcessor.starting=Iniciando thread de posterior
  httpProcessor.stopping=Parando  thread posterior
  requestStream.close.closed=El flujo de la peticion ha sido cerrado ya
  requestStream.read.closed=No se puede leer de un flujo cerrado
  requestStream.read.error=Final de flujo inesperado
  requestStream.readline.error=No puede leer la linea
  requestStream.readline.toolong=Linea demasiado larga
  
  
  

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




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

2000-12-31 Thread costin

costin  00/12/31 16:17:24

  Modified:.changes3.3
   src/facade22/org/apache/tomcat/facade
HttpServletRequestFacade.java
HttpSessionFacade.java Servlet22Interceptor.java
   src/share/org/apache/tomcat/context LoaderInterceptor11.java
LoaderInterceptor12.java
   src/share/org/apache/tomcat/core BaseInterceptor.java
Container.java ContextManager.java Request.java
   src/share/org/apache/tomcat/modules/session SessionId.java
SimpleSessionStore.java
   src/share/org/apache/tomcat/request
CredentialsInterceptor.java ReloadInterceptor.java
   src/share/org/apache/tomcat/util ObjectSerializer.java
   src/share/org/apache/tomcat/util/hooks Hooks.java
   src/share/org/apache/tomcat/util/http Parameters.java
  Added:   src/share/org/apache/tomcat/core ServerSession.java
  Removed: src/share/org/apache/tomcat/session ServerSession.java
ServerSessionManager.java
  Log:
  Finish ( I hope ) refactoring of session management.
  
  - ServerSession moved to core. It's no longer final - session manager modules
  can extend and replace the functionality.
  
  - added few more properties ( for symetry with other classes in core):
  notes, context, state, facade.
  
  - Replaced the "newSessionRequest" hook with 2 other hooks: findSession
  and sessionState. This allow modules to control most aspects of session
  processing.
  
  - Servlet22Interceptor now corectly handles servlet-specific aspects of
  session management - binding events, etc. That happens for both
  expired sessions and reloading.
  
  - Small improvement in reloading: we'll set a context note with the old
  class loader, and on session reloading we replace only the objects loaded
  with the old loader. That means an object that is loaded with the main
  class loader ( like DatabaseConnection ) will be valid after reload.
  ( should this be optional ? )
  
  - SessionId will now verify if the session is valid for both cookies and
  URL rewriting ( used to be only for cookies ). It'll also call "touch" -
  SimpleSessionManager will deal only with the 2 session hooks, no more
  intervention in the mapping hooks.
  
  - The ServerManager is now part of SimpleSessionStore. A session
  plugin is formed from a session manager and a tomcat 3.3 interceptor.
  
  Another small change: if the module implements "registerHooks", it'll
  be allowed to register the hooks itself, instead of using the automated
  code in Hooks. That means it can insert itself in front, end or after
  another module ( apache 2.0 style ) - by default the modules are inserted
  automatically at the end.
  
  Revision  ChangesPath
  1.5   +5 -0  jakarta-tomcat/changes3.3
  
  Index: changes3.3
  ===
  RCS file: /home/cvs/jakarta-tomcat/changes3.3,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- changes3.32000/12/27 19:52:49 1.4
  +++ changes3.32001/01/01 00:17:22 1.5
  @@ -1,5 +1,10 @@
    CORE 
   
  +- reloading: objects loaded with the parent class loader will not be touched.
  +( faster, fewer problems with non-serializable objects )
  +
  +- better session plugability
  +
   - improved authentication - a bit of performance and more flexibility
(CredentialInterceptor)
   
  
  
  
  1.16  +0 -1  
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java
  
  Index: HttpServletRequestFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- HttpServletRequestFacade.java 2000/12/30 07:54:10 1.15
  +++ HttpServletRequestFacade.java 2001/01/01 00:17:22 1.16
  @@ -64,7 +64,6 @@
   import org.apache.tomcat.util.http.*;
   import org.apache.tomcat.core.*;
   import org.apache.tomcat.facade.*;
  -import org.apache.tomcat.session.*;
   import java.io.*;
   import java.net.*;
   import java.security.*;
  
  
  
  1.6   +3 -2  
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpSessionFacade.java
  
  Index: HttpSessionFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpSessionFacade.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- HttpSessionFacade.java2000/12/01 19:59:21 1.5
  +++ HttpSessionFacade.java2001/01/01 00:17:22 1.6
  @@ -61,7 +61,6 @@
   package org.apache.tomcat.facade;
   
   import 

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/context WorkDirInterceptor.java

2000-12-31 Thread costin

costin  00/12/31 16:19:00

  Removed: src/share/org/apache/tomcat/context WorkDirInterceptor.java
  Log:
  Removed old WorkDirInterceptor.

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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa - New directory

2000-12-31 Thread costin

costin  00/12/31 17:29:10

  jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa - New directory

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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/generators - New directory

2000-12-31 Thread costin

costin  00/12/31 17:29:19

  jakarta-tomcat/src/share/org/apache/tomcat/modules/generators - New directory

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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/loggers - New directory

2000-12-31 Thread costin

costin  00/12/31 17:29:23

  jakarta-tomcat/src/share/org/apache/tomcat/modules/loggers - New directory

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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers - New directory

2000-12-31 Thread costin

costin  00/12/31 17:29:27

  jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers - New directory

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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup EmbededTomcat.java

2000-12-31 Thread costin

costin  00/12/31 17:58:39

  Modified:src/share/org/apache/tomcat/startup EmbededTomcat.java
  Added:   src/share/org/apache/tomcat/modules/config AutoSetup.java
DefaultCMSetter.java LoaderInterceptor11.java
LoaderInterceptor12.java PolicyInterceptor.java
   src/share/org/apache/tomcat/modules/generators
ErrorHandler.java
   src/share/org/apache/tomcat/modules/loggers LogEvents.java
  Removed: src/share/org/apache/tomcat/context AutoSetup.java
DefaultCMSetter.java ErrorHandler.java
LoaderInterceptor11.java LoaderInterceptor12.java
LogEvents.java PolicyInterceptor.java
  Log:
  Reorganized modules in tomcat.context, based on module type
  ( config, generators, loggers )
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/AutoSetup.java
  
  Index: AutoSetup.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
   * http://www.apache.org/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  
  
  package org.apache.tomcat.context;
  
  import org.apache.tomcat.core.*;
  import org.apache.tomcat.util.*;
  import java.io.*;
  import java.net.*;
  import java.util.*;
  
  /**
   *  Prepare a context manager - expand wars in webapps and
   *  automaticly install contexts
   *
   *  This happens _before_ Context.init()  
   * 
   * @author [EMAIL PROTECTED]
   */
  public class AutoSetup extends BaseInterceptor {
  int debug=0;
  Hashtable definedContexts=new Hashtable();
  
  public AutoSetup() {
  }
  
  /** This will add all contexts to the default host.
   *We need a mechanism ( or convention ) to configure
   *  virtual hosts too
   */
  public void engineStart(ContextManager cm) throws TomcatException {
String home=cm.getHome();
File webappD=new File(home + "/webapps");
if (! webappD.exists() || ! webappD.isDirectory()) {
log("No webapps/ directory " + webappD );
return ; // nothing to set up
}
  
Enumeration en=cm.getContexts();
 

Tomcat defect report #679

2000-12-31 Thread Frank Stock

Hi,

When I submitted defect #679, some (perhaps useful) information appears to
have been stripped.

A contact email address for me mailto:[EMAIL PROTECTED]

Steps to reproduce also did not seem to make it.
They are very simple on my machine... simply launch Tomcat 3.2.1 using jdk
1.3.  Boom!

Workaround also seem to have gotten lost.
None.

Is this expected behavior in the defect submission process?


Thanks,

Frank


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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup EmbededTomcat.java

2000-12-31 Thread costin

costin  00/12/31 18:07:24

  Modified:src/etc  server.xml
   src/share/org/apache/tomcat/modules/aaa
AccessInterceptor.java
   src/share/org/apache/tomcat/modules/config
DefaultCMSetter.java LoaderInterceptor11.java
LoaderInterceptor12.java PolicyInterceptor.java
RelativePathFix.java
   src/share/org/apache/tomcat/modules/generators
ErrorHandler.java StaticInterceptor.java
   src/share/org/apache/tomcat/startup EmbededTomcat.java
  Log:
  Fixed import statements.
  
  Revision  ChangesPath
  1.59  +25 -21jakarta-tomcat/src/etc/server.xml
  
  Index: server.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/etc/server.xml,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- server.xml2000/12/29 01:34:40 1.58
  +++ server.xml2001/01/01 02:07:23 1.59
  @@ -99,13 +99,15 @@
   
 !--  Interceptors  --
   ContextInterceptor 
  -className="org.apache.tomcat.context.DefaultCMSetter" /
  +className="org.apache.tomcat.modules.config.DefaultCMSetter" /
   
   !-- 
  - ContextInterceptor className="org.apache.tomcat.context.LogEvents" 
  + ContextInterceptor 
  +className="org.apache.tomcat.modules.loggers.LogEvents" 
--
   
  -ContextInterceptor className="org.apache.tomcat.context.AutoSetup" /
  +ContextInterceptor 
  +className="org.apache.tomcat.modules.config.AutoSetup" /
   
   ContextInterceptor 
   className="org.apache.tomcat.facade.WebXmlReader" /
  @@ -113,21 +115,21 @@
   !-- Uncomment out if you have JDK1.2 and want to implement
 the Java SecurityManager
   ContextInterceptor 
  -className="org.apache.tomcat.context.PolicyInterceptor" /
  +className="org.apache.tomcat.modules.config.PolicyInterceptor" /
   --
   
   !-- For JDK1.2 and URLClassLoader 
   ContextInterceptor 
  -className="org.apache.tomcat.context.LoaderInterceptor12" /
  +className="org.apache.tomcat.modules.config.LoaderInterceptor12" /
   --
   
   ContextInterceptor 
  -className="org.apache.tomcat.context.LoaderInterceptor11" /
  +className="org.apache.tomcat.modules.config.LoaderInterceptor11" /
   
   !-- Default Error handler 
 --
   ContextInterceptor 
  -className="org.apache.tomcat.context.ErrorHandler" /
  +className="org.apache.tomcat.modules.generators.ErrorHandler" /
   
   
   ContextInterceptor 
  @@ -137,26 +139,27 @@
   !-- Session interceptor will extract the session id from cookies and 
deal with URL rewriting ( by fixing the URL )
 --
  -RequestInterceptor className="SessionId" /
  +RequestInterceptor 
  +className="org.apache.tomcat.modules.session.SessionId" /
   
   !-- Find the container ( context and prefix/extension map ) 
for a request.
 --
   RequestInterceptor 
  -className="org.apache.tomcat.request.SimpleMapper1" 
  +className="org.apache.tomcat.modules.mappers.SimpleMapper1" 
   debug="0" /
   
   !-- fix the context class loader, other JDK1.2 specific code
   RequestInterceptor 
  -className="org.apache.tomcat.request.Jdk12Interceptor" 
  +className="org.apache.tomcat.modules.mappers.Jdk12Interceptor" 
   debug="0" /
 --
   
   !-- Non-standard invoker, for backward compat. ( /servlet/* )
 --
   RequestInterceptor 
  -className="org.apache.tomcat.request.InvokerInterceptor" 
  -debug="0" /
  +   className="org.apache.tomcat.modules.generators.InvokerInterceptor" 
  +   debug="0" /
   
   !-- "jsp" handler 
 --
  @@ -167,30 +170,31 @@
   !-- "default" handler - static files and dirs
 --
   RequestInterceptor 
  -className="org.apache.tomcat.request.StaticInterceptor" 
  +className="org.apache.tomcat.modules.generators.StaticInterceptor" 
   debug="0" listings="true" /
   
!-- Handle reloads - will be moved to per/context
 --
   RequestInterceptor 
  -className="org.apache.tomcat.request.ReloadInterceptor" 
  +className="org.apache.tomcat.modules.mappers.ReloadInterceptor" 
   debug="0" /
   
   !-- Plug a session manager. You can plug in more advanced session
modules.

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core Handler.java

2000-12-31 Thread costin

costin  00/12/31 18:36:00

  Modified:src/share/org/apache/tomcat/core Handler.java
  Log:
  Renamed Handler.doService() to Handler.invoke().
  
  Added comments and get/set Next/Prev for handlers that act as Valves.
  Same thing can be implemented in a ValveHandler ( that will be part
  of the module using valves ), but it's better to make clear in the
  core Handler that this mechanism is possible ( and simplify the life of
  whoever wants to use/reuse valves ). It's also a safety feature for tomcat
  extensibility - in case something is missing in the current hooks ( and
  we don't want/can't add more hooks )
  
  Revision  ChangesPath
  1.35  +45 -6 jakarta-tomcat/src/share/org/apache/tomcat/core/Handler.java
  
  Index: Handler.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Handler.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- Handler.java  2000/12/29 20:31:28 1.34
  +++ Handler.java  2001/01/01 02:36:00 1.35
  @@ -128,7 +128,10 @@
   // Debug
   protected int debug=0;
   protected Log logger=null;
  +Handler next;
  +Handler prev;
   
  +
   private Counters cntr=new Counters(ContextManager.MAX_NOTES);
   private Object notes[]=new Object[ContextManager.MAX_NOTES];
   
  @@ -241,6 +244,32 @@
handleServiceError( req, res, serviceException );
   }
   
  +/** A handler may either directly generate the response or it can
  + *   act as a part of a pipeline. Next/Prev allow modules to generically
  + *  set the pipeline.
  + *
  + *  Most handlers will generate the content themself. Few handlers
  + *  may prepare the request/response - one example is the Servlet
  + *  handler that wraps them and calls a servlet. Modules may
  + *  do choose to either hook into the server using the provided
  + *  callbacks, or use a pipeline of handler ( valves ). 
  + */  
  +public void setNext( Handler next ) {
  + this.next=next;
  +}
  +
  +public Handler getNext() {
  + return next;
  +}
  +
  +public Handler getPrevious() {
  + return prev;
  +}
  +
  +public void setPrevious( Handler prev ) {
  + this.prev=prev;
  +}
  +
   //  methods you can override 
   
   protected void handleServiceError( Request req, Response res, Throwable t )
  @@ -254,16 +283,26 @@
   public void reload() {
   }
   
  -/** This is the actual content generator. Can't be called
  - *  from outside.
  - *
  - *  This method can't be called directly, you must use service(),
  - *  which also tests the initialization and deals with the errors.
  - */
  +// Old name, deprecated
   protected void doService(Request req, Response res)
throws Exception
   {
   
  +}
  +
  +/** This is the actual content generator. A handler must generate
  + *  the response - either itself or by calling another class, after
  + *  setting/changing request properties or altering/wrapping
  + *  the request and response.
  + *
  + *  A Handler should use the "next" property if it is part
  + *  of a pipeline ( "valve") 
  + */
  +protected void invoke(Request req, Response res)
  + throws Exception
  +{
  + // backward compatibility
  + doService(req, res);
   }
   
   //  Debug 
  
  
  

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




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

2000-12-31 Thread costin

costin  00/12/31 19:42:59

  Modified:src/share/org/apache/tomcat/modules/config AutoSetup.java
DefaultCMSetter.java
  Log:
  Fix missing package names.
  
  Revision  ChangesPath
  1.2   +1 -2  
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/AutoSetup.java
  
  Index: AutoSetup.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/AutoSetup.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AutoSetup.java2001/01/01 01:58:38 1.1
  +++ AutoSetup.java2001/01/01 03:42:58 1.2
  @@ -57,8 +57,7 @@
*
*/ 
   
  -
  -package org.apache.tomcat.context;
  +package org.apache.tomcat.modules.config;
   
   import org.apache.tomcat.core.*;
   import org.apache.tomcat.util.*;
  
  
  
  1.3   +1 -1  
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/DefaultCMSetter.java
  
  Index: DefaultCMSetter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/DefaultCMSetter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultCMSetter.java  2001/01/01 02:07:23 1.2
  +++ DefaultCMSetter.java  2001/01/01 03:42:58 1.3
  @@ -57,7 +57,7 @@
*
*/
   
  -package org.apache.tomcat.modules.aaa;
  +package org.apache.tomcat.modules.config;
   
   import org.apache.tomcat.core.*;
   import java.io.*;
  
  
  

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