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

2004-01-21 Thread larryi
larryi  2004/01/21 18:44:18

  Modified:tester/web/WEB-INF web.xml
  Log:
  Tester expects invoker to be enabled.
  
  Revision  ChangesPath
  1.59  +4 -0  jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- web.xml   28 Dec 2002 04:22:55 -  1.58
  +++ web.xml   22 Jan 2004 02:44:17 -  1.59
  @@ -1013,6 +1013,10 @@
   
   !-- == Servlet Mappings == --
   
  +servlet-mapping
  +servlet-nameinvoker/servlet-name
  +url-pattern/servlet/*/url-pattern
  +/servlet-mapping
   
   !-- Map CGI Gateway Service for this Web App --
   !--
  
  
  

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



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

2002-12-27 Thread amyroh
amyroh  2002/12/27 20:22:55

  Modified:tester/web/WEB-INF web.xml
  Log:
  Fix bug 13300.  Patch submitted by Ville Skyttä [EMAIL PROTECTED].
  
  Revision  ChangesPath
  1.58  +1 -1  jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- web.xml   20 Jan 2002 03:00:57 -  1.57
  +++ web.xml   28 Dec 2002 04:22:55 -  1.58
  @@ -2,7 +2,7 @@
   
   !DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  -http://java.sun.com/j2ee/dtds/web-app_2_3.dtd;
  +http://java.sun.com/dtd/web-app_2_3.dtd;
   
   !-- Deployment Descriptor for the Tester Web Application --
   
  
  
  

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




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

2002-01-19 Thread craigmcc

craigmcc02/01/19 19:00:58

  Modified:catalina build.xml
   catalina/src/share/org/apache/catalina/core
NamingContextListener.java StandardServer.java
   catalina/src/share/org/apache/catalina/realm
LocalStrings.properties
   tester/web/WEB-INF web.xml
  Added:   catalina/src/share/org/apache/catalina Group.java User.java
UserDatabase.java
   catalina/src/share/org/apache/catalina/users
AbstractGroup.java AbstractUser.java Constants.java
LocalStrings.properties MemoryGroup.java
MemoryUser.java MemoryUserDatabase.java
MemoryUserDatabaseFactory.java
  Log:
  Initial check-ins to support a database of users and groups that can
  be edited through the administration application.  Groups are an
  enhancement over the existing capabilities, and allow users to inherit
  the roles of all groups that they are members of.
  
  * org.apache.catalina.{Group,User,UserDatabase} - Component definitions
for groups, users, and the user database itself.
  
  * org.apache.catalina.users.Abstract{Group,User} - Convenience
base classes for groups and users.
  
  * org.apache.catalina.users.Memory{Group,User} - Concrete implementations
used with a memory database fed by an enhanced version of the existing
conf/tomcat-users.xml file.
  
  * org.apache.catalina.users.MemoryUserDatabase - Concrete implementation
of o.a.c.UserDatabase that can load *and store* groups and users in the
conf/tomcat-users.xml file.  See below for revised syntax.
  
  * org.apache.catalina.users.MemoryUserDatabaseFactory - JNDI resource
factory so that an instance of MemoryUserDatabase can be configured
in the global JNDI resources, and then used by an appropriate Realm
implementation (see next check-in) as well as being editable.
  
  The revised syntax for the tomcat-users.xml file introduces a group
  element, and adds a groups attribute to the user element.  Groups
  must be defined first.  An example:
  
?xml version='1.0'?
tomcat-users
  group groupname='admins' description='System Administrators'
 roles='admin'/
  user username='tomcat' password='tomcat'
groups='admins' roles='tomcat,manager'/
  user username='role1' password='tomcat' roles='role1'/
  user username='both' password='tomcat'
groups='admins'  roles='tomcat,role1'/
/tomcat-users
  
  In this scenario, users 'tomcat' and 'both' inherit the 'admin' role by
  virtue of the fact that they belong to the admins group.
  
  For backwards compatibility, the file reader accepts either name or
  username on the user element, but it always writes username.
  
  Revision  ChangesPath
  1.97  +1 -1  jakarta-tomcat-4.0/catalina/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/build.xml,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- build.xml 17 Jan 2002 20:00:01 -  1.96
  +++ build.xml 20 Jan 2002 03:00:56 -  1.97
  @@ -880,7 +880,7 @@
   /jar
   
   !-- Naming - Factory JAR File --
  -jar jarfile=${catalina.deploy}/shared/lib/naming-factory.jar
  +jar jarfile=${catalina.deploy}/common/lib/naming-factory.jar
 fileset dir=${catalina.build}/server/classes
   include name=org/apache/naming/factory/** /
   exclude name=org/apache/naming/factory/Constants.class /
  
  
  
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java
  
  Index: Group.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java,v 1.1 
2002/01/20 03:00:56 craigmcc Exp $
   * $Revision: 1.1 $
   * $Date: 2002/01/20 03:00:56 $
   *
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2002 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 

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

2002-01-18 Thread craigmcc

craigmcc02/01/18 17:58:24

  Modified:catalina/src/share/org/apache/catalina/session
StandardManager.java StandardSession.java
   tester/src/tester/org/apache/tester Session01.java
Session04.java SessionListener01.java
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester SessionListener03.java
  Log:
  Correct the set of session related events fired at context startup and
  shutdown time by the StandardManager implementation, as follows:
  
  * At Tomcat shutdown (or in the shutdown portion of a
context reload), ONLY fire sessionWillPassivate() events
to session attributes that implement HttpSessionActivationListener.
Previously, a spurious valueUnbound() event was being sent
to session attributes that implemented HttpSessionBindingListener.
  
  * At Tomcat startup time (or in the reload portion of a
context reload), ONLY fire sessionDidActivate() events
to session attributes that implement HttpSessionActivationListener.
Previously, a spurious sessionCreated() event was sent to
registered HttpSessionListener listeners.
  
  None of this directly affects the behavior of PersistentManager, as reported
  in Bugzilla #5895, but that is the next thing to investigate.
  
  I consider this bugfix somewhat risky for the 4.0 branch, so I don't
  think we should necessarily port it.
  
  Revision  ChangesPath
  1.18  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java
  
  Index: StandardManager.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- StandardManager.java  3 Jan 2002 13:31:50 -   1.17
  +++ StandardManager.java  19 Jan 2002 01:58:24 -  1.18
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
 1.17 2002/01/03 13:31:50 remm Exp $
  - * $Revision: 1.17 $
  - * $Date: 2002/01/03 13:31:50 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
 1.18 2002/01/19 01:58:24 craigmcc Exp $
  + * $Revision: 1.18 $
  + * $Date: 2002/01/19 01:58:24 $
*
* 
*
  @@ -106,7 +106,7 @@
* codestop()/code methods of this class at the correct times.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.17 $ $Date: 2002/01/03 13:31:50 $
  + * @version $Revision: 1.18 $ $Date: 2002/01/19 01:58:24 $
*/
   
   public class StandardManager
  @@ -544,7 +544,7 @@
   while (expires.hasNext()) {
   StandardSession session = (StandardSession) expires.next();
   try {
  -session.expire();
  +session.expire(false);
   } catch (Throwable t) {
   ;
   }
  
  
  
  1.27  +53 -8 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java
  
  Index: StandardSession.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- StandardSession.java  18 Jan 2002 22:14:07 -  1.26
  +++ StandardSession.java  19 Jan 2002 01:58:24 -  1.27
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
 1.26 2002/01/18 22:14:07 craigmcc Exp $
  - * $Revision: 1.26 $
  - * $Date: 2002/01/18 22:14:07 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
 1.27 2002/01/19 01:58:24 craigmcc Exp $
  + * $Revision: 1.27 $
  + * $Date: 2002/01/19 01:58:24 $
*
* 
*
  @@ -115,7 +115,7 @@
* @author Craig R. McClanahan
* @author Sean Legassick
* @author a href=mailto:[EMAIL PROTECTED];Jon S. Stevens/a
  - * @version $Revision: 1.26 $ $Date: 2002/01/18 22:14:07 $
  + * @version $Revision: 1.27 $ $Date: 2002/01/19 01:58:24 $
*/
   
   class StandardSession
  @@ -580,6 +580,20 @@
*/
   public void expire() {
   
  +expire(true);
  +
  +}
  +
  +
  +/**
  + * Perform the internal processing required to invalidate this session,
  + * without triggering an exception if the session has already expired.
  + *
  + * @param notify Should we notify listeners about the demise of
  + *  this session?
  + */
  +public void expire(boolean notify) {
  

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

2001-12-12 Thread craigmcc

craigmcc01/12/12 14:34:20

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Redirect01.java
Redirect01a.java
   tester/web Redirect02.jsp Redirect02a.jsp Redirect03.jsp
Redirect03a.jsp
  Log:
  Add unit tests to demonstrate that response.sendRedirect() is handled
  correctly, including ignoring any subsequent output, from either a servlet
  or a JSP page.
  
  Revision  ChangesPath
  1.75  +20 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- tester.xml2001/12/12 02:26:10 1.74
  +++ tester.xml2001/12/12 22:34:20 1.75
  @@ -1464,6 +1464,26 @@
 outHeaders=Content-Language:en-US/
   
   
  +!-- == SendRedirect Handling = --
  +
  +tester host=${host} port=${port} protocol=
  + request=${context.path}/Redirect01 debug=${debug}
  +  outContent=Redirect01a PASSED redirect=true/
  +
  +tester host=${host} port=${port} protocol=
  + request=${context.path}/WrappedRedirect01 debug=${debug}
  +  outContent=Redirect01a PASSED redirect=true/
  +
  +!-- JSP page includes return after redirect --
  +tester host=${host} port=${port} protocol=
  + request=${context.path}/Redirect02.jsp debug=${debug}
  +  outContent=Redirect02a.jsp PASSED redirect=true/
  +
  +!-- Same as Redirect02.jsp except without the return --
  +tester host=${host} port=${port} protocol=
  + request=${context.path}/Redirect03.jsp debug=${debug}
  +  outContent=Redirect03a.jsp PASSED redirect=true/
  +
 /target
   
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Redirect01.java
  
  Index: Redirect01.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   * Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.   *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *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 

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

2001-11-12 Thread craigmcc

craigmcc01/11/12 13:37:28

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Log:
  Remove the test on PropertyEditor support because it cannot run under a
  security manager without an unacceptably broad security setting in
  catalina.policy (PropertyEditor requires read/write access to all system
  properties).  Now, you should be able to pass 100% of the tester either
  under or not under a security manager.
  
  Revision  ChangesPath
  1.73  +5 -0  jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- tester.xml2001/10/25 18:08:32 1.72
  +++ tester.xml2001/11/12 21:37:28 1.73
  @@ -591,9 +591,14 @@
   
   !-- == Property Editor Support === --
   
  +!-- Cannot test PropertyEditor support under security manager
  + unless catalina.policy grants read/write access to
  + system properties --
  +!--
   tester host=${host} port=${port} protocol=HTTP/1.0
request=${context.path}/Property01.jsp debug=${debug}
 golden=${golden.path}/Property01.txt/
  +--
   
   tester host=${host} port=${port} protocol=HTTP/1.0
request=${context.path}/Property02.jsp debug=${debug}
  
  
  
  1.54  +4 -0  jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- web.xml   2001/10/23 17:06:15 1.53
  +++ web.xml   2001/11/12 21:37:28 1.54
  @@ -436,9 +436,13 @@
   listener-classorg.apache.tester.ContextListener01/listener-class
   /listener
   
  +!-- Can not run PropertyEditor tests under security manager unless
  + catalina.policy allows read/write access to system properties --
  +!--
   listener
   listener-classorg.apache.tester.ContextListener02/listener-class
   /listener
  +--
   
   listener
   listener-classorg.apache.tester.SessionListener01/listener-class
  
  
  

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




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

2001-09-25 Thread craigmcc

craigmcc01/09/25 16:31:09

  Modified:tester/src/bin Tag: tomcat_40_branch tester.xml
   tester/web/WEB-INF Tag: tomcat_40_branch web.xml
  Added:   tester/src/tester/org/apache/tester Tag: tomcat_40_branch
FilterRequest02.java FilterRequest02a.java
FilterResponse04.java FilterResponse04a.java
  Log:
  Add unit tests which prove that Tomcat 4 is correctly implementing Section
  6.2 of the servlet spec.  It is legal to use wrappers to implement the
  required functionality, but if the application (filter or servlet) wraps
  the request and response objects, those application wrapped instances must
  be the ones that are passed on to the invoked servlet.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.69.2.1  +52 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.69
  retrieving revision 1.69.2.1
  diff -u -r1.69 -r1.69.2.1
  --- tester.xml2001/09/18 00:08:00 1.69
  +++ tester.xml2001/09/25 23:31:09 1.69.2.1
  @@ -381,6 +381,32 @@
  inContent=FilterRequest01 Wrapped Stream PASSED
 outContent=FILTERREQUEST01 WRAPPED STREAM PASSED/
   
  +!-- == Servlet Sees Application Wrapper = --
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/FilterRequest02?wrap=false
  +  outContent=FilterRequest02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterRequest02?wrap=true
  +  outContent=FilterRequest02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/FilterRequest02?wrap=falseamp;dispatch=F
  +  outContent=FilterRequest02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterRequest02?wrap=trueamp;dispatch=F
  +  outContent=FilterRequest02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/FilterRequest02?wrap=falseamp;dispatch=I
  +  outContent=FilterRequest02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterRequest02?wrap=trueamp;dispatch=I
  +  outContent=FilterRequest02 PASSED/
  +
 /target
   
   
  @@ -426,6 +452,32 @@
  debug=${debug}
 status=200
 outContent=FILTERRESPONSE03 PASSED/
  +
  +!-- == Servlet Sees Application Wrapper = --
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/FilterResponse04?wrap=false debug=${debug}
  +  outContent=FilterResponse04 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterResponse04?wrap=true
  +  outContent=FilterResponse04 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/FilterResponse04?wrap=falseamp;dispatch=F
  +  outContent=FilterResponse04 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterResponse04?wrap=trueamp;dispatch=F
  +  outContent=FilterResponse04 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/FilterResponse04?wrap=falseamp;dispatch=I
  +  outContent=FilterResponse04 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterResponse04?wrap=trueamp;dispatch=I
  +  outContent=FilterResponse04 PASSED/
   
 /target
   
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +126 -0
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Attic/FilterRequest02.java
  
  
  
  
  1.1.2.1   +103 -0
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Attic/FilterRequest02a.java
  
  
  
  
  1.1.2.1   +126 -0
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Attic/FilterResponse04.java
  
  
  
  
  1.1.2.1   +103 -0
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Attic/FilterResponse04a.java
  
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.50.2.1  +60 -0 jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 

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

2001-09-25 Thread craigmcc

craigmcc01/09/25 17:23:28

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester FilterRequest02.java
FilterRequest02a.java FilterResponse04.java
FilterResponse04a.java
  Log:
  Port the new unit tests for ensuring correct implementation of Servlet
  2.3, Section 6.2.2.
  
  Revision  ChangesPath
  1.70  +52 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- tester.xml2001/09/18 00:08:00 1.69
  +++ tester.xml2001/09/26 00:23:28 1.70
  @@ -381,6 +381,32 @@
  inContent=FilterRequest01 Wrapped Stream PASSED
 outContent=FILTERREQUEST01 WRAPPED STREAM PASSED/
   
  +!-- == Servlet Sees Application Wrapper = --
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/FilterRequest02?wrap=false
  +  outContent=FilterRequest02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterRequest02?wrap=true
  +  outContent=FilterRequest02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/FilterRequest02?wrap=falseamp;dispatch=F
  +  outContent=FilterRequest02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterRequest02?wrap=trueamp;dispatch=F
  +  outContent=FilterRequest02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/FilterRequest02?wrap=falseamp;dispatch=I
  +  outContent=FilterRequest02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterRequest02?wrap=trueamp;dispatch=I
  +  outContent=FilterRequest02 PASSED/
  +
 /target
   
   
  @@ -426,6 +452,32 @@
  debug=${debug}
 status=200
 outContent=FILTERRESPONSE03 PASSED/
  +
  +!-- == Servlet Sees Application Wrapper = --
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/FilterResponse04?wrap=false debug=${debug}
  +  outContent=FilterResponse04 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterResponse04?wrap=true
  +  outContent=FilterResponse04 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/FilterResponse04?wrap=falseamp;dispatch=F
  +  outContent=FilterResponse04 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterResponse04?wrap=trueamp;dispatch=F
  +  outContent=FilterResponse04 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/FilterResponse04?wrap=falseamp;dispatch=I
  +  outContent=FilterResponse04 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0 debug=${debug}
  + request=${context.path}/WrappedFilterResponse04?wrap=trueamp;dispatch=I
  +  outContent=FilterResponse04 PASSED/
   
 /target
   
  
  
  
  1.2   +126 -0
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/FilterRequest02.java
  
  
  
  
  1.2   +103 -0
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/FilterRequest02a.java
  
  
  
  
  1.2   +126 -0
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/FilterResponse04.java
  
  
  
  
  1.2   +103 -0
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/FilterResponse04a.java
  
  
  
  
  1.51  +60 -0 jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- web.xml   2001/09/18 00:08:00 1.50
  +++ web.xml   2001/09/26 00:23:28 1.51
  @@ -149,6 +149,11 @@
   /filter-mapping
   
   filter-mapping
  +filter-nameHttpFilter/filter-name
  +url-pattern/WrappedFilterRequest02/url-pattern
  +/filter-mapping
  +
  +filter-mapping
   filter-nameUpperCaseFilter/filter-name
   url-pattern/FilterResponse01/url-pattern
   /filter-mapping
  @@ -195,6 +200,11 @@
   
   filter-mapping
   filter-nameHttpFilter/filter-name
  +   

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

2001-09-09 Thread craigmcc

craigmcc01/09/09 21:20:53

  Modified:tester/web/WEB-INF web.xml
  Log:
  Add the ssi servlet to the tester web.xml file, since it is no longer
  enabled by default.
  
  Revision  ChangesPath
  1.49  +6 -0  jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- web.xml   2001/08/22 21:25:16 1.48
  +++ web.xml   2001/09/10 04:20:53 1.49
  @@ -957,6 +957,12 @@
   url-pattern/cgi-bin/*/url-pattern
   /servlet-mapping
   
  +!-- Map SSI Service for this Web App --
  +servlet-mapping
  +servlet-namessi/servlet-name
  +url-pattern*.shtml/url-pattern
  +/servlet-mapping
  +
   servlet-mapping
   servlet-nameAggregate01/servlet-name
   url-pattern/Aggregate01/url-pattern
  
  
  



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

2001-08-19 Thread craigmcc

craigmcc01/08/19 17:33:58

  Modified:tester/web/WEB-INF web.xml
  Log:
  Add an explicit mapping for the CGI servlet, since it is no longer
  available by default.
  
  Revision  ChangesPath
  1.47  +7 -0  jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- web.xml   2001/08/15 23:44:24 1.46
  +++ web.xml   2001/08/20 00:33:58 1.47
  @@ -940,6 +940,13 @@
   
   !-- == Servlet Mappings == --
   
  +
  +!-- Map CGI Gateway Service for this Web App --
  +servlet-mapping
  +servlet-namecgi/servlet-name
  +url-pattern/cgi-bin/*/url-pattern
  +/servlet-mapping
  +
   servlet-mapping
   servlet-nameAggregate01/servlet-name
   url-pattern/Aggregate01/url-pattern
  
  
  



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

2001-08-15 Thread craigmcc

craigmcc01/08/15 16:44:24

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Forward09.java
Include09.java
  Log:
  Add unit tests for ServletRequest.getRequestDispatcher(), with both
  relative and absolute paths, doing both forwards and includes.
  
  Revision  ChangesPath
  1.65  +98 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- tester.xml2001/08/15 00:57:08 1.64
  +++ tester.xml2001/08/15 23:44:23 1.65
  @@ -823,6 +823,104 @@
request=${context.path}/servlet/Forward08
 outContent=Forward08b PASSED debug=${debug}/
   
  +!-- == ServletRequest.getRequestDispatcher() = --
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward09?path=/Forward00a
  +  outContent=Forward00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward09?path=/Forward00a
  +  outContent=Forward00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward09?path=/Forward00b
  +  outContent=Forward00b PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward09?path=/Forward00b
  +  outContent=Forward00b PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward09?path=/Forward00c.jsp
  +  outContent=Forward00c PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward09?path=/Forward00c.jsp
  +  outContent=Forward00c PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward09?path=Forward00a
  +  outContent=Forward00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward09?path=Forward00a
  +  outContent=Forward00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward09?path=Forward00b
  +  outContent=Forward00b PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward09?path=Forward00b
  +  outContent=Forward00b PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward09?path=Forward00c.jsp
  +  outContent=Forward00c PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward09?path=Forward00c.jsp
  +  outContent=Forward00c PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include09?path=/Include00a
  +  outContent=Include00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedInclude09?path=/Include00a
  +  outContent=Include00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include09?path=/Include00b
  +  outContent=Include00b PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedInclude09?path=/Include00b
  +  outContent=Include00b PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include09?path=/Include00c.jsp
  +  outContent=Include00c PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedInclude09?path=/Include00c.jsp
  +  outContent=Include00c PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include09?path=Include00a
  +  outContent=Include00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedInclude09?path=Include00a
  +  outContent=Include00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include09?path=Include00b
  +  outContent=Include00b PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  

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

2001-07-25 Thread craigmcc

craigmcc01/07/24 21:27:11

  Modified:tester/src/bin tester.xml
   tester/src/tester/org/apache/tester SessionBean.java
   tester/src/tester/org/apache/tester/shared
SharedSessionBean.java
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester ContextListener02.java
DatePropertyEditor.java
   tester/web Property01.jsp Property02.jsp
  Log:
  Add unit tests (positive and negative) for setting a bean property through
  a PropertyEditor, per JSP 1.2 PFD2, Section 2.13.2.1.
  
  Revision  ChangesPath
  1.63  +10 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- tester.xml2001/07/23 23:46:01 1.62
  +++ tester.xml2001/07/25 04:27:11 1.63
  @@ -537,6 +537,16 @@
request=${context.path}/Encoding03.jsp debug=${debug}
 golden=${golden.path}/Encoding03.txt/
   
  +!-- == Property Editor Support === --
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/Property01.jsp debug=${debug}
  +  golden=${golden.path}/Property01.txt/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/Property02.jsp debug=${debug}
  +  status=500/
  +
 /target
   
   
  
  
  
  1.5   +19 -1 
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/SessionBean.java
  
  Index: SessionBean.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/SessionBean.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SessionBean.java  2001/06/22 21:57:08 1.4
  +++ SessionBean.java  2001/07/25 04:27:11 1.5
  @@ -59,6 +59,7 @@
   
   
   import java.io.Serializable;
  +import java.sql.Date;
   import javax.servlet.http.HttpSessionActivationListener;
   import javax.servlet.http.HttpSessionBindingEvent;
   import javax.servlet.http.HttpSessionBindingListener;
  @@ -70,7 +71,7 @@
* so that instances can be saved and restored across server restarts.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/06/22 21:57:08 $
  + * @version $Revision: 1.5 $ $Date: 2001/07/25 04:27:11 $
*/
   
   public class SessionBean implements
  @@ -81,6 +82,21 @@
   
   
   /**
  + * A date property for use with property editor tests.
  + */
  +protected Date dateProperty =
  +new Date(System.currentTimeMillis());
  +
  +public Date getDateProperty() {
  +return (this.dateProperty);
  +}
  +
  +public void setDateProperty(Date dateProperty) {
  +this.dateProperty = dateProperty;
  +}
  +
  +
  +/**
* The lifecycle events that have happened on this bean instance.
*/
   protected String lifecycle = ;
  @@ -118,6 +134,8 @@
   
   StringBuffer sb = new StringBuffer(SessionBean[lifecycle=);
   sb.append(this.lifecycle);
  +sb.append(,dateProperty=);
  +sb.append(dateProperty);
   sb.append(,stringProperty=);
   sb.append(this.stringProperty);
   sb.append(]);
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/ContextListener02.java
  
  Index: ContextListener02.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.  *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *notice, this list of conditions and the following disclaimer.  *
   *   *
   * 2. Redistributions  in 

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

2001-07-18 Thread craigmcc

craigmcc01/07/18 13:17:18

  Modified:tester/src/bin tester.xml
   tester/src/tester/org/apache/tester UpperCaseResponse.java
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester CharArrayResponse.java
CharArrayWriterUpperCase.java ResponseWrap01.java
ResponseWrap01a.java ResponseWrap01c.java
  Log:
  Unit tests for creating a response wrapper and then using it with a
  request dispatcher, testing both includes and forwards to servlets and JSP
  pages.
  
  Revision  ChangesPath
  1.59  +18 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- tester.xml2001/07/17 22:34:52 1.58
  +++ tester.xml2001/07/18 20:17:17 1.59
  @@ -737,6 +737,24 @@
request=${context.path}/Include07 debug=${debug}
 golden=${golden.path}/Include07.txt/
   
  +!-- == Response Wrapping = --
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/ResponseWrap01?type=Famp;page=/ResponseWrap01a
  +  outContent=RESPONSEWRAP01A PASSED debug=${debug} /
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + 
request=${context.path}/ResponseWrap01?type=Famp;page=/ResponseWrap01b.jsp
  +  outContent=RESPONSEWRAP01B PASSED debug=${debug} /
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/ResponseWrap01?type=Iamp;page=/ResponseWrap01c
  +  outContent=RESPONSEWRAP01C PASSED debug=${debug} /
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + 
request=${context.path}/ResponseWrap01?type=Iamp;page=/ResponseWrap01d.jsp
  +  outContent=RESPONSEWRAP01D PASSED debug=${debug} /
  +
 /target
   
   
  
  
  
  1.2   +12 -2 
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/UpperCaseResponse.java
  
  Index: UpperCaseResponse.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/UpperCaseResponse.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UpperCaseResponse.java2001/05/30 19:42:46 1.1
  +++ UpperCaseResponse.java2001/07/18 20:17:17 1.2
  @@ -69,7 +69,7 @@
* upper case.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/05/30 19:42:46 $
  + * @version $Revision: 1.2 $ $Date: 2001/07/18 20:17:17 $
*/
   
   public class UpperCaseResponse extends HttpServletResponseWrapper {
  @@ -77,9 +77,16 @@
   
   HttpServletResponse response = null;
   
  +boolean stream = false; // Wrap our own output stream
  +
   public UpperCaseResponse(HttpServletResponse response) {
  +this(response, false);
  +}
  +
  +public UpperCaseResponse(HttpServletResponse response, boolean stream) {
   super(response);
   this.response = response;
  +this.stream = stream;
   }
   
   public ServletOutputStream getOutputStream() throws IOException {
  @@ -87,7 +94,10 @@
   }
   
   public PrintWriter getWriter() throws IOException {
  -return (new UpperCaseWriter(response.getWriter()));
  +if (stream)
  +return (new PrintWriter(getOutputStream(), true));
  +else
  +return (new UpperCaseWriter(response.getWriter()));
   }
   
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/CharArrayResponse.java
  
  Index: CharArrayResponse.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.  *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the 

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

2001-07-10 Thread craigmcc

craigmcc01/07/10 16:30:16

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Lifecycle01.java
Lifecycle02.java
  Log:
  Add unit tests to prove that servlet lifecycle is handled correctly - i.e.
  init() is called exactly once before the service() method is invoked, and
  the first call can be either a GET or a POST.
  
  These tests indicate that the error reported by Bugzilla #206 does *not*
  occur with current Tomcat 4.0 code.
  
  Revision  ChangesPath
  1.53  +24 -1 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- tester.xml2001/06/25 15:40:47 1.52
  +++ tester.xml2001/07/10 23:30:10 1.53
  @@ -15,7 +15,7 @@
 taskdef  name=tester classname=org.apache.tester.TestClient/
   
   
  -  target name=all 
depends=ROOT,Authentication,CaseSensitive,Decoding,ErrorPage,FilterRequest,FilterResponse,Jndi,RequestDispatcher,Resources,ServletContext,ServletRequest,ServletResponse,HttpSession,XercesTest,SSITest,CGITest/
  +  target name=all 
depends=ROOT,Authentication,CaseSensitive,Decoding,ErrorPage,FilterRequest,FilterResponse,Jndi,Lifecycle,RequestDispatcher,Resources,ServletContext,ServletRequest,ServletResponse,HttpSession,XercesTest,SSITest,CGITest/
   
   
 target name=ROOT
  @@ -493,6 +493,29 @@
   tester host=${host} port=${port} protocol=${protocol}
request=${context.path}/WrappedJndi02 debug=${debug}
 outContent=Jndi02 PASSED/
  +
  +  /target
  +
  +
  +  target name=Lifecycle
  +
  +!-- == Lifecycle Management == --
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Lifecycle01
  +  outContent=Lifecycle01 PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedLifecycle01
  +  outContent=Lifecycle01 PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Lifecycle02 method=POST
  +  outContent=Lifecycle02 PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedLifecycle02 method=POST
  +  outContent=Lifecycle02 PASSED debug=${debug}/
   
 /target
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Lifecycle01.java
  
  Index: Lifecycle01.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   * Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.   *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *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 

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

2001-06-23 Thread craigmcc

craigmcc01/06/23 12:27:24

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Context00.java
Context01.java Context02.java ContextBean.java
  Log:
  Add a set of unit tests for servlet context attributes.
  
  NOTE:  If you uncomment the clearAttributes() call in StandardContext, and
  then run the ServletContext target in tester.xml, the application
  restart will fail on ClassNotFoundException errors on the listeners and
  filters.
  
  Revision  ChangesPath
  1.51  +52 -1 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- tester.xml2001/06/20 22:37:06 1.50
  +++ tester.xml2001/06/23 19:27:24 1.51
  @@ -15,7 +15,7 @@
 taskdef  name=tester classname=org.apache.tester.TestClient/
   
   
  -  target name=all 
depends=ROOT,Authentication,CaseSensitive,Decoding,ErrorPage,FilterRequest,FilterResponse,Jndi,RequestDispatcher,Resources,ServletRequest,ServletResponse,HttpSession,XercesTest,SSITest,CGITest/
  +  target name=all 
depends=ROOT,Authentication,CaseSensitive,Decoding,ErrorPage,FilterRequest,FilterResponse,Jndi,RequestDispatcher,Resources,ServletContext,ServletRequest,ServletResponse,HttpSession,XercesTest,SSITest,CGITest/
   
   
 target name=ROOT
  @@ -852,6 +852,57 @@
  debug=${debug}
request=${context.path}/Resources06?path=/WEB-INF
 outContent=Resources06 PASSED/
  +
  +  /target
  +
  +
  +  target name=ServletContext
  +
  +!-- == Servlet Context Attributes  --
  +
  +tester host=${host} port=${port} protocol=${protocol}
  +   debug=${debug}
  + request=${context.path}/Context00
  +  outContent=Context00 PASSED/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  +   debug=${debug}
  + request=${context.path}/Context01
  +  outContent=Context01 PASSED/
  +
  +!-- NOTE: Assign role manager to user tomcat for this to work --
  +tester host=${host} port=${port} protocol=${protocol}
  +   debug=${debug}
  +   inHeaders=Authorization:Basic dG9tY2F0OnRvbWNhdA==
  + request=${manager.path}/reload?path=${reload.path}
  +  outContent=OK - Reloaded application at context path ${reload.path}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  +   debug=${debug}
  + request=${context.path}/Context02
  +  outContent=Context02 PASSED/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  +   debug=${debug}
  + request=${context.path}/WrappedContext00
  +  outContent=Context00 PASSED/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  +   debug=${debug}
  + request=${context.path}/WrappedContext01
  +  outContent=Context01 PASSED/
  +
  +!-- NOTE: Assign role manager to user tomcat for this to work --
  +tester host=${host} port=${port} protocol=${protocol}
  +   debug=${debug}
  +   inHeaders=Authorization:Basic dG9tY2F0OnRvbWNhdA==
  + request=${manager.path}/reload?path=${reload.path}
  +  outContent=OK - Reloaded application at context path ${reload.path}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  +   debug=${debug}
  + request=${context.path}/WrappedContext02
  +  outContent=Context02 PASSED/
   
 /target
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Context00.java
  
  Index: Context00.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   * Copyright (c) 1999, 2000  The Apache Software Foundation. *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *notice, this list of 

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

2001-06-23 Thread craigmcc

craigmcc01/06/23 17:00:07

  Modified:tester/src/tester/org/apache/tester Context01.java
ContextBean.java
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester ContextListener01.java
  Log:
  Extend the new context tests so that they check for correct calls to the
  appropriate context event listeners as well.
  
  Revision  ChangesPath
  1.2   +50 -9 
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Context01.java
  
  Index: Context01.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Context01.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Context01.java2001/06/23 19:27:24 1.1
  +++ Context01.java2001/06/24 00:00:05 1.2
  @@ -71,7 +71,7 @@
* present, which should be erased after a web application restart.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/06/23 19:27:24 $
  + * @version $Revision: 1.2 $ $Date: 2001/06/24 00:00:05 $
*/
   
   public class Context01 extends HttpServlet {
  @@ -94,7 +94,9 @@
   
   // Create and stash a context attribute
   if (ok) {
  -context.setAttribute(context01, This is Context01);
  +ContextBean bean = new ContextBean();
  +bean.setStringProperty(Context01);
  +context.setAttribute(context01, bean);
   }
   
   // Ensure that we can retrieve the attribute successfully
  @@ -103,18 +105,57 @@
   if (bean == null) {
   writer.println(Context01 FAILED - Cannot retrieve attribute);
   ok = false;
  -} else if (!(bean instanceof String)) {
  -writer.println(Context01 FAILED - Attribute instance of  +
  -   bean.getClass().getName());
  -ok = false;
  -} else {
  -String value = (String) bean;
  -if (!This is Context01.equals(value)) {
  +}
  +if (ok) {
  +if (!(bean instanceof ContextBean)) {
  +writer.println(Context01 FAILED - Bean instance of  +
  +   bean.getClass().getName());
  +ok = false;
  +}
  +}
  +if (ok) {
  +String value = ((ContextBean) bean).getStringProperty();
  +if (!Context01.equals(value)) {
   writer.println(Context01 FAILED - Value =  + value);
   ok = false;
   }
   }
  +if (ok) {
  +String lifecycle = ((ContextBean) bean).getLifecycle();
  +if (!/add.equals(lifecycle)) {
  +writer.println(Context01 FAILED - Bean lifecycle is  +
  +   lifecycle);
  +ok = false;
  +}
  +}
   }
  +
  +// Ensure that we can update this attribute and check its lifecycle
  +if (ok) {
  +ContextBean bean = (ContextBean) context.getAttribute(context01);
  +context.setAttribute(context01, bean);
  +String lifecycle = bean.getLifecycle();
  +if (!/add/rep.equals(lifecycle)) {
  +writer.println(Context01 FAILED - Bean lifecycle is  +
  +   lifecycle);
  +ok = false;
  +}
  +}
  +
  +// Ensure that we can remove this attribute and check its lifecycle
  +if (ok) {
  +ContextBean bean = (ContextBean) context.getAttribute(context01);
  +context.removeAttribute(context01);
  +String lifecycle = bean.getLifecycle();
  +if (!/add/rep/rem.equals(lifecycle)) {
  +writer.println(Context01 FAILED - Bean lifecycle is  +
  +   lifecycle);
  +ok = false;
  +}
  +}
  +
  +// Add a bean back for the restart application test
  +context.setAttribute(context01, new ContextBean());
   
   // Ensure that setAttribute(name, null) works correctly
   if (ok) {
  
  
  
  1.2   +18 -2 
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/ContextBean.java
  
  Index: ContextBean.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/ContextBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContextBean.java  2001/06/23 19:27:24 1.1
  +++ ContextBean.java  2001/06/24 00:00:05 1.2
  @@ -65,7 +65,7 @@
* Simple JavaBean to use for context attribute tests.
*
* @author Craig R. McClanahan
  - * @version 

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

2001-05-30 Thread craigmcc

craigmcc01/05/30 12:42:50

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester FilterResponse01.java
UpperCaseFilter.java UpperCaseOutputStream.java
UpperCaseResponse.java UpperCaseWriter.java
   tester/web FilterResponse02.jsp FilterResponse03.txt
WrappedFilterResponse02.jsp
WrappedFilterResponse03.txt
  Log:
  Add some unit tests for a filter that wraps the response (and converts all
  characters to upper case).  Wrapped output is tested from a servlet, a JSP
  page, and a static file -- all accessed directly or with the second
  wrapper filter used on most unit tests.
  
  This all works with the standard test client (HTTP/1.0 only), so it
  doesn't test all the scenarios currently being reported on TOMCAT-DEV.
  I'm going to explore those next.
  
  Revision  ChangesPath
  1.47  +47 -1 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- tester.xml2001/05/29 17:55:31 1.46
  +++ tester.xml2001/05/30 19:42:44 1.47
  @@ -15,7 +15,7 @@
 taskdef  name=tester classname=org.apache.tester.TestClient/
   
   
  -  target name=all 
depends=ROOT,Authentication,CaseSensitive,Decoding,ErrorPage,Jndi,RequestDispatcher,Resources,ServletRequest,ServletResponse,HttpSession,XercesTest,SSITest/
  +  target name=all 
depends=ROOT,Authentication,CaseSensitive,Decoding,ErrorPage,FilterResponse,Jndi,RequestDispatcher,Resources,ServletRequest,ServletResponse,HttpSession,XercesTest,SSITest/
   
   
 target name=ROOT
  @@ -343,6 +343,52 @@
 status=200
 outContent=ErrorPage10 PASSED/
   
  +
  +  /target
  +
  +
  +  target name=FilterResponse
  +
  +!-- == Apply Upper Case Filter === --
  +
  +!-- Output from a servlet --
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/FilterResponse01
  +   debug=${debug}
  +  status=200
  +  outContent=FILTERRESPONSE01 PASSED/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedFilterResponse01
  +   debug=${debug}
  +  status=200
  +  outContent=FILTERRESPONSE01 PASSED/
  +
  +!-- Output from a JSP Page --
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/FilterResponse02.jsp
  +   debug=${debug}
  +  status=200
  +  outContent=FILTERRESPONSE02 PASSED/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedFilterResponse02.jsp
  +   debug=${debug}
  +  status=200
  +  outContent=FILTERRESPONSE02 PASSED/
  +
  +!-- Output from a static page --
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/FilterResponse03.txt
  +   debug=${debug}
  +  status=200
  +  outContent=FILTERRESPONSE03 PASSED/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedFilterResponse03.txt
  +   debug=${debug}
  +  status=200
  +  outContent=FILTERRESPONSE03 PASSED/
   
 /target
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/FilterResponse01.java
  
  Index: FilterResponse01.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.  *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *notice, this list of conditions and the following disclaimer.  *
   *   

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

2001-05-30 Thread craigmcc

craigmcc01/05/30 14:54:55

  Modified:tester/src/bin tester.xml
   tester/src/tester/org/apache/tester UpperCaseFilter.java
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester FilterRequest01.java
UpperCaseInputStream.java UpperCaseReader.java
UpperCaseRequest.java
  Log:
  Add some corresponding tests for input that is wrapped by a filter.
  
  Revision  ChangesPath
  1.48  +38 -1 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- tester.xml2001/05/30 19:42:44 1.47
  +++ tester.xml2001/05/30 21:54:48 1.48
  @@ -15,7 +15,7 @@
 taskdef  name=tester classname=org.apache.tester.TestClient/
   
   
  -  target name=all 
depends=ROOT,Authentication,CaseSensitive,Decoding,ErrorPage,FilterResponse,Jndi,RequestDispatcher,Resources,ServletRequest,ServletResponse,HttpSession,XercesTest,SSITest/
  +  target name=all 
depends=ROOT,Authentication,CaseSensitive,Decoding,ErrorPage,FilterRequest,FilterResponse,Jndi,RequestDispatcher,Resources,ServletRequest,ServletResponse,HttpSession,XercesTest,SSITest/
   
   
 target name=ROOT
  @@ -343,6 +343,43 @@
 status=200
 outContent=ErrorPage10 PASSED/
   
  +
  +  /target
  +
  +
  +  target name=FilterRequest
  +
  +!-- == Apply Upper Case Filter === --
  +
  +!-- Input via buffered reader --
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/FilterRequest01?type=reader
  +   debug=${debug}
  +  status=200
  +   inContent=FilterRequest01 Unwrapped Reader PASSED
  +  outContent=FILTERREQUEST01 UNWRAPPED READER PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/WrappedFilterRequest01?type=reader
  +   debug=${debug}
  +  status=200
  +   inContent=FilterRequest01 Wrapped Reader PASSED
  +  outContent=FILTERREQUEST01 WRAPPED READER PASSED/
  +
  +!-- Input via servlet input stream --
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/FilterRequest01?type=reader
  +   debug=${debug}
  +  status=200
  +   inContent=FilterRequest01 Unwrapped Stream PASSED
  +  outContent=FILTERREQUEST01 UNWRAPPED STREAM PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/WrappedFilterRequest01?type=reader
  +   debug=${debug}
  +  status=200
  +   inContent=FilterRequest01 Wrapped Stream PASSED
  +  outContent=FILTERREQUEST01 WRAPPED STREAM PASSED/
   
 /target
   
  
  
  
  1.2   +4 -2  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/UpperCaseFilter.java
  
  Index: UpperCaseFilter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/UpperCaseFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UpperCaseFilter.java  2001/05/30 19:42:46 1.1
  +++ UpperCaseFilter.java  2001/05/30 21:54:51 1.2
  @@ -68,7 +68,7 @@
* Filter that simply transforms its output to upper case.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/05/30 19:42:46 $
  + * @version $Revision: 1.2 $ $Date: 2001/05/30 21:54:51 $
*/
   
   public class UpperCaseFilter implements Filter {
  @@ -88,10 +88,12 @@
FilterChain chain)
   throws IOException, ServletException {
   
  +HttpServletRequest wrequest =
  +new UpperCaseRequest((HttpServletRequest) request);
   HttpServletResponse wresponse =
   new UpperCaseResponse((HttpServletResponse) response);
   StaticLogger.write(UpperCaseFilter.doFilter() begin);
  -chain.doFilter(request, wresponse);
  +chain.doFilter(wrequest, wresponse);
   StaticLogger.write(UpperCaseFilter.doFilter() end);
   
   }
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/FilterRequest01.java
  
  Index: FilterRequest01.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.  *
   *

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

2001-05-29 Thread craigmcc

craigmcc01/05/29 10:55:40

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/web ErrorPage09.jsp ErrorPage10.jsp
  Log:
  Additional tests for JSP errorPage declarations.
  
  Revision  ChangesPath
  1.46  +15 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- tester.xml2001/05/12 04:58:27 1.45
  +++ tester.xml2001/05/29 17:55:31 1.46
  @@ -329,6 +329,21 @@
 status=200
 outContent=ErrorPage06 PASSED - HTML/
   
  +!-- == Exception Mapping (JSP Error Page)  --
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/ErrorPage09
  +   debug=${debug}
  +  status=200
  +  outContent=ErrorPage10 PASSED/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedErrorPage09
  +   debug=${debug}
  +  status=200
  +  outContent=ErrorPage10 PASSED/
  +
  +
 /target
   
   
  
  
  
  1.1  jakarta-tomcat-4.0/tester/web/ErrorPage09.jsp
  
  Index: ErrorPage09.jsp
  ===
  %@ page contentType=text/plain errorPage=/ErrorPage10.jsp %%
  
  // Write a FAILED message that should get replaced by the error text
  out.println(ErrorPage09 FAILED - Original response returned);
  
  // Throw the specified exception
  int i = 1;
  if (i  0) {
  throw new ArrayIndexOutOfBoundsException
  (ErrorPage09 Threw ArrayIndexOutOfBoundsException);
  }
  
  %
  
  
  
  1.1  jakarta-tomcat-4.0/tester/web/ErrorPage10.jsp
  
  Index: ErrorPage10.jsp
  ===
  %@ page contentType=text/plain isErrorPage=true %%
  
  // Accumulate all the reasons this request might fail
  StringBuffer sb = new StringBuffer();
  Object value = null;
  
  if (exception == null) {
  sb.append( exception is missing/);
  } else {
  if (!(exception instanceof java.lang.ArrayIndexOutOfBoundsException)) {
  sb.append( exception class is );
  sb.append(exception.getClass().getName());
  sb.append(/);
  }
  if (!ErrorPage09 Threw 
ArrayIndexOutOfBoundsException.equals(exception.getMessage())) {
  sb.append( exception message is );
  sb.append(exception.getMessage());
  sb.append(/);
  }
  }
  
  // Report ultimate success or failure
  if (sb.length()  1)
  out.println(ErrorPage10 PASSED);
  else
  out.println(ErrorPage10 FAILED - + sb.toString());
  
  %
  %
out.println(EXCEPTION:   + exception);
  %
  
  
  
  1.35  +20 -0 jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- web.xml   2001/05/12 04:58:27 1.34
  +++ web.xml   2001/05/29 17:55:37 1.35
  @@ -109,6 +109,11 @@
   
   filter-mapping
   filter-nameHttpFilter/filter-name
  +url-pattern/WrappedErrorPage09/url-pattern
  +/filter-mapping
  +
  +filter-mapping
  +filter-nameHttpFilter/filter-name
   url-pattern/WrappedForward00/url-pattern
   /filter-mapping
   
  @@ -392,6 +397,11 @@
   /servlet
   
   servlet
  +servlet-nameErrorPage09/servlet-name
  +jsp-file/ErrorPage09.jsp/jsp-file
  +/servlet
  +
  +servlet
   servlet-nameForward00/servlet-name
   servlet-classorg.apache.tester.Forward00/servlet-class
   /servlet
  @@ -768,6 +778,16 @@
   servlet-mapping
   servlet-nameErrorPage08/servlet-name
   url-pattern/WrappedErrorPage08/url-pattern
  +/servlet-mapping
  +
  +servlet-mapping
  +servlet-nameErrorPage09/servlet-name
  +url-pattern/ErrorPage09/url-pattern
  +/servlet-mapping
  +
  +servlet-mapping
  +servlet-nameErrorPage09/servlet-name
  +url-pattern/WrappedErrorPage09/url-pattern
   /servlet-mapping
   
   servlet-mapping
  
  
  



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

2001-05-11 Thread craigmcc

craigmcc01/05/11 21:58:27

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Reflection01.java
  Log:
  Add a unit test that attempts to access public methods of the servlet API
  objects that are exposed, via Java reflection.  To test, run:
  
$CATALINA_HOME/tester.sh Internals
  
  Currently, this test passes (i.e. inappropriate access is blocked) when
  Tomcat is started with a security manager.
  
  Revision  ChangesPath
  1.45  +18 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- tester.xml2001/05/10 23:57:05 1.44
  +++ tester.xml2001/05/12 04:58:27 1.45
  @@ -332,6 +332,24 @@
 /target
   
   
  +  target name=Internals
  +
  +
  +!-- == Access Internals Via Reflection === --
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Reflection01
  +   debug=${debug}
  +  outContent=Reflection01 PASSED/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedReflection01
  +   debug=${debug}
  +  outContent=Reflection01 PASSED/
  +
  +  /target
  +
  +
 target name=Jndi
   
   !-- == JNDI Naming Context === --
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Reflection01.java
  
  Index: Reflection01.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.  *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *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 Software Foundation.*
   *   *
   * 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  

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

2001-05-10 Thread craigmcc

craigmcc01/05/10 13:46:03

  Modified:tester/src/bin tester.xml
   tester/src/tester/org/apache/tester ErrorPage06.java
   tester/web ErrorPage06.jsp
   tester/web/WEB-INF web.xml
  Added:   tester/web ErrorPage08.jsp
  Log:
  Expand error page tests to check for runtime exceptions thrown by JSP
  pages as well as servlets.
  
  Revision  ChangesPath
  1.42  +39 -1 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- tester.xml2001/05/10 01:21:26 1.41
  +++ tester.xml2001/05/10 20:45:48 1.42
  @@ -216,7 +216,7 @@
 outContent=ErrorPage02 PASSED/
   
   
  -!-- == Exception Mapping = --
  +!-- == Exception Mapping (Servlet Source)  --
   
   tester host=${host} port=${port} protocol=${protocol}
request=${context.path}/ErrorPage03 debug=${debug}
  @@ -274,6 +274,44 @@
request=${context.path}/WrappedErrorPage07
  debug=${debug}
 status=503/
  +
  +!-- == Exception Mapping (JSP Source)  --
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/ErrorPage08?type=Arithmetic
  +   debug=${debug}
  +  status=200
  +  outContent=ErrorPage06 PASSED - SERVLET/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedErrorPage08?type=Arithmetic
  +   debug=${debug}
  +  status=200
  +  outContent=ErrorPage06 PASSED - SERVLET/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/ErrorPage08?type=Array
  +   debug=${debug}
  +  status=200
  +  outContent=ErrorPage06 PASSED - JSP/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedErrorPage08?type=Array
  +   debug=${debug}
  +  status=200
  +  outContent=ErrorPage06 PASSED - JSP/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/ErrorPage08?type=Number
  +   debug=${debug}
  +  status=200
  +  outContent=ErrorPage06 PASSED - HTML/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedErrorPage08?type=Number
  +   debug=${debug}
  +  status=200
  +  outContent=ErrorPage06 PASSED - HTML/
   
 /target
   
  
  
  
  1.4   +9 -4  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/ErrorPage06.java
  
  Index: ErrorPage06.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/ErrorPage06.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ErrorPage06.java  2001/05/10 19:20:29 1.3
  +++ ErrorPage06.java  2001/05/10 20:45:52 1.4
  @@ -67,7 +67,7 @@
* the ErrorPage05 servlet returns the appropriate exception.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/05/10 19:20:29 $
  + * @version $Revision: 1.4 $ $Date: 2001/05/10 20:45:52 $
*/
   
   public class ErrorPage06 extends HttpServlet {
  @@ -123,7 +123,8 @@
   sb.append( message class is );
   sb.append(value.getClass().getName());
   sb.append(/);
  -} else if (!ErrorPage05 Threw ArithmeticException.equals(value)) {
  +} else if (!ErrorPage05 Threw ArithmeticException.equals(value) 
  +   !ErrorPage08 Threw ArithmeticException.equals(value)) {
   sb.append( message is not correct);
   }
   
  @@ -139,7 +140,10 @@
   String request_uri = (String) value;
   String test1 = request.getContextPath() + /ErrorPage05;
   String test2 = request.getContextPath() + /WrappedErrorPage05;
  -if (!request_uri.equals(test1)  !request_uri.equals(test2)) {
  +String test3 = request.getContextPath() + /ErrorPage08.jsp;
  +String test4 = request.getContextPath() + /WrappedErrorPage08.jsp;
  +if (!request_uri.equals(test1)  !request_uri.equals(test2) 
  +!request_uri.equals(test3)  !request_uri.equals(test4)) {
   sb.append( request_uri is );
   sb.append(request_uri);
   sb.append(/);
  @@ -156,7 +160,8 @@
   sb.append(/);
   } else {
   String servlet_name = (String) value;
  -if (!ErrorPage05.equals(servlet_name)) {
  +if 

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

2001-05-10 Thread craigmcc

craigmcc01/05/10 15:52:29

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester GetLocales01.java
GetLocales02.java
  Log:
  Add tests for request.getLocale() and request.getLocales().
  
  Revision  ChangesPath
  1.43  +40 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- tester.xml2001/05/10 20:45:48 1.42
  +++ tester.xml2001/05/10 22:52:23 1.43
  @@ -807,6 +807,46 @@
request=${context.path}/WrappedGetInputStream01 debug=${debug}
 outContent=GetInputStream01 PASSED/
   
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/GetLocales01 debug=${debug}
  +   inHeaders=Accept-Language:en-ca##Accept-Language:en-gb
  +  outContent=GetLocales01 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/WrappedGetLocales01 debug=${debug}
  +   inHeaders=Accept-Language:en-ca##Accept-Language:en-gb
  +  outContent=GetLocales01 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/GetLocales01 debug=${debug}
  +   inHeaders=Accept-Language:en-ca,en-gb
  +  outContent=GetLocales01 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/WrappedGetLocales01 debug=${debug}
  +   inHeaders=Accept-Language:en-ca,en-gb
  +  outContent=GetLocales01 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/GetLocales02 debug=${debug}
  +   inHeaders=Accept-Language:en-ca##Accept-Language:en-gb
  +  outContent=GetLocales02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/WrappedGetLocales02 debug=${debug}
  +   inHeaders=Accept-Language:en-ca##Accept-Language:en-gb
  +  outContent=GetLocales02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/GetLocales02 debug=${debug}
  +   inHeaders=Accept-Language:en-ca,en-gb
  +  outContent=GetLocales02 PASSED/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/WrappedGetLocales02 debug=${debug}
  +   inHeaders=Accept-Language:en-ca,en-gb
  +  outContent=GetLocales02 PASSED/
  +
 /target
   
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/GetLocales01.java
  
  Index: GetLocales01.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   * Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.   *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *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 

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

2001-05-09 Thread craigmcc

craigmcc01/05/09 18:21:26

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/web Authentication04.jsp
  Log:
  Add a unit test for retrieving roles (directly and via an alias) from a
  JSP page (Authentication04) as well as a servlet (Authentication03).
  
  Revision  ChangesPath
  1.41  +8 -1  jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- tester.xml2001/05/08 18:36:22 1.40
  +++ tester.xml2001/05/10 01:21:26 1.41
  @@ -72,12 +72,19 @@
  inHeaders=Authorization:Basic dG9tY2F0OnRvbWNhdA==
 outContent=Authentication02 PASSED/
   
  -!-- Test isUserInRole() on actual role and on an alias --
  +!-- Test isUserInRole() on actual role and on an alias (servlet) --
   tester host=${host} port=${port} protocol=${protocol}
 debug=${debug}
request=${context.path}/protected/Authentication03
  inHeaders=Authorization:Basic dG9tY2F0OnRvbWNhdA==
 outContent=Authentication03 PASSED/
  +
  +!-- Test isUserInRole() on actual role and on an alias (JSP page) --
  +tester host=${host} port=${port} protocol=${protocol}
  +  debug=${debug}
  + request=${context.path}/protected/Authentication04
  +   inHeaders=Authorization:Basic dG9tY2F0OnRvbWNhdA==
  +  outContent=Authentication04 PASSED/
   
 /target
   
  
  
  
  1.1  jakarta-tomcat-4.0/tester/web/Authentication04.jsp
  
  Index: Authentication04.jsp
  ===
  %@ page contentType=text/plain %%
StringBuffer results = new StringBuffer();
String remoteUser = request.getRemoteUser();
if (remoteUser == null) {
  results.append( Not Authenticated/);
} else if (!tomcat.equals(remoteUser)) {
  results.append( Authenticated as ');
  results.append(remoteUser);
  results.append('/);
}
if (!request.isUserInRole(tomcat)) {
  results.append( Not in role 'tomcat'/);
}
if (!request.isUserInRole(alias)) {
  results.append( Not in role 'alias'/);
}
if (request.isUserInRole(unknown)) {
  results.append( In role 'unknown'/);
}
if (results.length()  1) {
  out.println(Authentication04 PASSED);
} else {
  out.print(Authentication04 FAILED -);
  out.println(results.toString());
}
  %
  
  
  
  1.30  +14 -2 jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- web.xml   2001/05/03 23:06:35 1.29
  +++ web.xml   2001/05/10 01:21:26 1.30
  @@ -312,6 +312,15 @@
   /servlet
   
   servlet
  +servlet-nameAuthentication04/servlet-name
  +jsp-file/Authentication04.jsp/jsp-file
  +security-role-ref
  +role-namealias/role-name
  +role-linktomcat/role-link
  +/security-role-ref
  +/servlet
  +
  +servlet
   servlet-nameDecoding01/servlet-name
   servlet-classorg.apache.tester.Decoding01/servlet-class
   /servlet
  @@ -612,6 +621,11 @@
   /servlet-mapping
   
   servlet-mapping
  +servlet-nameAuthentication04/servlet-name
  +url-pattern/protected/Authentication04/url-pattern
  +/servlet-mapping
  +
  +servlet-mapping
   servlet-nameDecoding01/servlet-name
   url-pattern/Decoding01/*/url-pattern
   /servlet-mapping
  @@ -1112,12 +1126,10 @@
   realm-nameAuthentication Servlet/realm-name
   /login-config
   
  -!--
   security-role
   descriptionSecurity role we are testing for/description
   role-nametomcat/role-name
   /security-role
  ---
   
   
   !-- == Environment Entries === --
  
  
  



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

2001-05-03 Thread craigmcc

craigmcc01/05/03 11:41:48

  Modified:tester/src/bin tester.xml
   tester/src/tester/org/apache/tester Include03.java
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Forward03.java
Forward03a.java
   tester/web Forward03b.jsp Include03b.jsp
  Log:
  Add additional tests for setting request attributes in forwarded-to as well
  as included servlets.
  
  Revision  ChangesPath
  1.38  +29 -3 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- tester.xml2001/05/02 20:44:39 1.37
  +++ tester.xml2001/05/03 18:41:30 1.38
  @@ -375,14 +375,40 @@
request=${context.path}/WrappedInclude02?exception=NullPointerException
 outContent=Include02 PASSED debug=${debug}/
   
  -!-- == Included Servlet Sets Attribute === --
  +!-- == Forwarded Servlet/Page Sets Attribute  --
   
   tester host=${host} port=${port} protocol=${protocol}
  - request=${context.path}/Include03
  + request=${context.path}/Forward03?path=/Forward03a
  +  outContent=Forward03 PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward03?path=/Forward03a
  +  outContent=Forward03 PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward03?path=/Forward03b.jsp
  +  outContent=Forward03 PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward03?path=/Forward03b.jsp
  +  outContent=Forward03 PASSED debug=${debug}/
  +
  +!-- == Included Servlet/Page Sets Attribute = --
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include03?path=/Include03a
  +  outContent=Include03 PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedInclude03?path=/Include03a
  +  outContent=Include03 PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include03?path=/Include03b.jsp
 outContent=Include03 PASSED debug=${debug}/
   
   tester host=${host} port=${port} protocol=${protocol}
  - request=${context.path}/WrappedInclude03
  + request=${context.path}/WrappedInclude03?path=/Include03b.jsp
 outContent=Include03 PASSED debug=${debug}/
   
 /target
  
  
  
  1.2   +14 -3 
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Include03.java
  
  Index: Include03.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Include03.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Include03.java2001/05/02 20:44:48 1.1
  +++ Include03.java2001/05/03 18:41:37 1.2
  @@ -68,8 +68,12 @@
* The spec is silent on this topic, but it seems consistent with the overall
* intent to behave in this manner.
*
  + * The test includes either a servlet (/Include03a) or a JSP page
  + * (/Include03b.jsp) depending on the value specified for the path
  + * parameter.  The default is the servlet.
  + *
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/05/02 20:44:48 $
  + * @version $Revision: 1.2 $ $Date: 2001/05/03 18:41:37 $
*/
   
   public class Include03 extends HttpServlet {
  @@ -90,19 +94,26 @@
   response.setContentType(text/plain);
PrintWriter writer = response.getWriter();
   
  +// Acquire the path to which we will issue an include
  +String path = request.getParameter(path);
  +if (path == null)
  +path = /Include03a;
  +
   // Create a request dispatcher and call include() on it
   RequestDispatcher rd =
  -getServletContext().getRequestDispatcher(/Include03a);
  +getServletContext().getRequestDispatcher(path);
   if (rd == null) {
   sb.append( No RequestDispatcher returned/);
   } else {
   rd.include(request, response);
   }
  +response.resetBuffer();
   
   // We MUST be able to see the attribute created by the includee
   String value = null;
   try {
  -value = (String) request.getAttribute(Include03a);
  +value = (String)
  +request.getAttribute(path.substring(1));
   } catch 

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

2001-05-03 Thread craigmcc

craigmcc01/05/03 16:06:36

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Forward00.java
Forward00a.java Forward00d.java Include00.java
Include00a.java Include00d.java
   tester/web Forward00b.jsp Forward00c.jsp Forward00e.jsp
Include00b.jsp Include00c.jsp Include00e.jsp
  Log:
  Add unit tests to cover the combinations of include vs forward, servlet
  vs JSP page vs jsp-file, and named versus path-based dispatching.
  
  Revision  ChangesPath
  1.39  +82 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- tester.xml2001/05/03 18:41:30 1.38
  +++ tester.xml2001/05/03 23:06:28 1.39
  @@ -331,6 +331,88 @@
   
 target name=RequestDispatcher
   
  +!-- == Basic Forward and Include Functionality === --
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward00?path=/Forward00a
  +  outContent=Forward00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward00?path=/Forward00a
  +  outContent=Forward00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward00?path=/Forward00b
  +  outContent=Forward00b PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward00?path=/Forward00b
  +  outContent=Forward00b PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward00?path=/Forward00c.jsp
  +  outContent=Forward00c PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward00?path=/Forward00c.jsp
  +  outContent=Forward00c PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward00?path=!Forward00d
  +  outContent=Forward00d PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward00?path=!Forward00d
  +  outContent=Forward00d PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Forward00?path=!Forward00e
  +  outContent=Forward00e PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedForward00?path=!Forward00e
  +  outContent=Forward00e PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include00?path=/Include00a
  +  outContent=Include00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedInclude00?path=/Include00a
  +  outContent=Include00a PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include00?path=/Include00b
  +  outContent=Include00b PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedInclude00?path=/Include00b
  +  outContent=Include00b PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include00?path=/Include00c.jsp
  +  outContent=Include00c PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedInclude00?path=/Include00c.jsp
  +  outContent=Include00c PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include00?path=!Include00d
  +  outContent=Include00d PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedInclude00?path=!Include00d
  +  outContent=Include00d PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/Include00?path=!Include00e
  +  outContent=Include00e PASSED debug=${debug}/
  +
  +tester host=${host} port=${port} protocol=${protocol}
  + request=${context.path}/WrappedInclude00?path=!Include00e
  +  outContent=Include00e PASSED debug=${debug}/
  +
   !-- == Forward and Include to Static Resource  

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

2001-04-30 Thread craigmcc

craigmcc01/04/30 14:57:17

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester ErrorPage07.java
  Log:
  Add a unit test to validate the load-on-startup servlet throws exception
  from init() fix that was just committed.
  
  Revision  ChangesPath
  1.36  +13 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- tester.xml2001/04/26 18:23:44 1.35
  +++ tester.xml2001/04/30 21:57:14 1.36
  @@ -264,6 +264,19 @@
 status=200
 outContent=ErrorPage06 PASSED - HTML/
   
  +!-- == Load On Startup Exception Handling  --
  +
  +!-- NOTE: HttpURLConnection throws FileNotFoundException on 503s --
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/ErrorPage07
  +   debug=${debug}
  +  status=503/
  +
  +tester host=${host} port=${port} protocol=HTTP/1.0
  + request=${context.path}/WrappedErrorPage07
  +   debug=${debug}
  +  status=503/
  +
 /target
   
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/ErrorPage07.java
  
  Index: ErrorPage07.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   * Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.   *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *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 Software Foundation.*
   *   *
   * 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 

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

2001-04-17 Thread craigmcc

craigmcc01/04/17 09:35:06

  Modified:tester/src/tester/org/apache/tester WrapperFilter.java
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester StaticFilter.java
  Log:
  Add a separate Filter to reset the static logger at the beginning of each
  request, so that nothing can accidentally leak through from previous
  requests.
  
  Revision  ChangesPath
  1.4   +2 -3  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/WrapperFilter.java
  
  Index: WrapperFilter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/WrapperFilter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WrapperFilter.java2001/03/17 18:50:32 1.3
  +++ WrapperFilter.java2001/04/17 16:34:55 1.4
  @@ -68,7 +68,7 @@
* it passes on with either generic or HTTP-specific wrappers.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/03/17 18:50:32 $
  + * @version $Revision: 1.4 $ $Date: 2001/04/17 16:34:55 $
*/
   
   public class WrapperFilter implements Filter {
  @@ -137,8 +137,7 @@
   ((HttpServletResponse) inResponse);
   }
   
  -// Reset our logger and perform this request
  -StaticLogger.reset();
  +// Perform this request
   chain.doFilter(outRequest, outResponse);
   
   }
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/StaticFilter.java
  
  Index: StaticFilter.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.  *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *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 Software Foundation.*
   *   *
   * 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 

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

2001-04-13 Thread craigmcc

craigmcc01/04/13 17:03:18

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester ErrorPage05.java
ErrorPage06.java
   tester/web ErrorPage06.html ErrorPage06.jsp
  Log:
  Add additional tests of the error-page mechanism to ensure that
  RuntimeException errors thrown by a servlet are also handled correctly,
  and that an error page handler can be any of a servlet, a JSP page, and an
  HTML page.
  
  Revision  ChangesPath
  1.28  +35 -2 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- tester.xml2001/04/11 04:31:07 1.27
  +++ tester.xml2001/04/14 00:03:17 1.28
  @@ -202,7 +202,6 @@
request="${context.path}/ErrorPage01" debug="${debug}"
 outContent="ErrorPage02 PASSED"/
   
  -
   tester host="${host}" port="${port}" protocol="${protocol}"
request="${context.path}/WrappedErrorPage01" debug="${debug}"
 outContent="ErrorPage02 PASSED"/
  @@ -214,11 +213,45 @@
request="${context.path}/ErrorPage03" debug="${debug}"
 outContent="ErrorPage04 PASSED"/
   
  -
   tester host="${host}" port="${port}" protocol="${protocol}"
request="${context.path}/WrappedErrorPage03" debug="${debug}"
 outContent="ErrorPage04 PASSED"/
   
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/ErrorPage05?type=Arithmetic"
  +   debug="${debug}"
  +  status="200"
  +  outContent="ErrorPage06 PASSED - SERVLET"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedErrorPage05?type=Arithmetic"
  +   debug="${debug}"
  +  status="200"
  +  outContent="ErrorPage06 PASSED - SERVLET"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/ErrorPage05?type=Array"
  +   debug="${debug}"
  +  status="200"
  +  outContent="ErrorPage06 PASSED - JSP"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedErrorPage05?type=Array"
  +   debug="${debug}"
  +  status="200"
  +  outContent="ErrorPage06 PASSED - JSP"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/ErrorPage05?type=Number"
  +   debug="${debug}"
  +  status="200"
  +  outContent="ErrorPage06 PASSED - HTML"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedErrorPage05?type=Number"
  +   debug="${debug}"
  +  status="200"
  +  outContent="ErrorPage06 PASSED - HTML"/
   
 /target
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/ErrorPage05.java
  
  Index: ErrorPage05.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   * Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.   *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *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:

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

2001-04-10 Thread craigmcc

craigmcc01/04/10 21:31:08

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Session04.java
  Log:
  Add a more aggressive session test to ensure that you can invalidate an
  old session and create a new one in the same request.
  
  Revision  ChangesPath
  1.27  +10 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- tester.xml2001/04/02 21:15:46 1.26
  +++ tester.xml2001/04/11 04:31:07 1.27
  @@ -643,6 +643,11 @@
 outContent="Session03 PASSED"/
   
   tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/Session04" debug="${debug}"
  + joinSession="true"
  +  outContent="Session04 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
request="${context.path}/WrappedSession01" debug="${debug}"
 outContent="Session01 PASSED"/
   
  @@ -662,6 +667,11 @@
request="${context.path}/WrappedSession03" debug="${debug}"
joinSession="true"
 outContent="Session03 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedSession04" debug="${debug}"
  + joinSession="true"
  +  outContent="Session04 PASSED"/
   
 /target
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Session04.java
  
  Index: Session04.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   * Copyright (c) 1999, 2000  The Apache Software Foundation. *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *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 Software Foundation.*
   *   *
   * 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 

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

2001-04-04 Thread remm

remm01/04/04 17:06:32

  Modified:tester/src/tester/org/apache/tester Jndi01.java
   tester/web/WEB-INF web.xml
  Log:
  - Add test for bug 1202.
  
  Revision  ChangesPath
  1.2   +12 -1 
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Jndi01.java
  
  Index: Jndi01.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Jndi01.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Jndi01.java   2001/02/22 01:07:26 1.1
  +++ Jndi01.java   2001/04/05 00:06:31 1.2
  @@ -74,10 +74,21 @@
* should succeed.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/02/22 01:07:26 $
  + * @version $Revision: 1.2 $ $Date: 2001/04/05 00:06:31 $
*/
   
   public class Jndi01 extends HttpServlet {
  +
  +public void init() throws ServletException {
  +Context ctx = null;
  +try {
  +ctx = new InitialContext();
  +log("initialized successfully");
  +} catch (NamingException e) {
  +log("Cannot create context", e);
  +throw new ServletException(e);
  +}
  +}
   
   public void doGet(HttpServletRequest request, HttpServletResponse response)
   throws IOException, ServletException {
  
  
  
  1.18  +1 -0  jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- web.xml   2001/03/30 21:20:04 1.17
  +++ web.xml   2001/04/05 00:06:32 1.18
  @@ -300,6 +300,7 @@
   servlet
   servlet-nameJndi01/servlet-name
   servlet-classorg.apache.tester.Jndi01/servlet-class
  +load-on-startup1/load-on-startup
   /servlet
   
   servlet
  
  
  



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

2001-03-26 Thread craigmcc

craigmcc01/03/26 12:04:41

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Authentication03.java
  Log:
  Add a new unit test to validate correct behavior of isUserInRole() for
  three circumstances:
  * Role name mapped directly to a user -- true
  * Role name specified in a security-role-ref element for a role name
mapped directly to a user -- true
  * Role name not mapped to a user -- false
  
  PR: Bugzilla #1086
  Submitted by: [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.24  +33 -22jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- tester.xml2001/03/21 20:28:24 1.23
  +++ tester.xml2001/03/26 20:04:37 1.24
  @@ -12,7 +12,7 @@
 taskdef  name="tester" classname="org.apache.tester.TestClient"/
   
   
  -  target name="all" 
depends="ROOT,CaseSensitive,ErrorPage,Jndi,RequestDispatcher,Resources,ServletRequest,ServletResponse,HttpSession,XercesTest"/
  +  target name="all" 
depends="ROOT,Authentication,CaseSensitive,ErrorPage,Jndi,RequestDispatcher,Resources,ServletRequest,ServletResponse,HttpSession,XercesTest"/
   
   
 target name="ROOT"
  @@ -37,6 +37,38 @@
 /target
   
   
  +  target name="Authentication"
  +
  +!-- == Authentication  --
  +
  +!-- Once a user has been authenticated, the corresponding user identity
  + should be visible to all other requests in this web application, even
  + for URIs that are not protected by security constraints.  This is
  + tested by invoking a protected URI followed by a non-protected URI
  +--
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +  debug="${debug}"
  + request="${context.path}/protected/Authentication01"
  +   inHeaders="Authorization:Basic dG9tY2F0OnRvbWNhdA=="
  +  outContent="Authentication01 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +  debug="${debug}"
  + request="${context.path}/protected/Authentication02"
  +   inHeaders="Authorization:Basic dG9tY2F0OnRvbWNhdA=="
  +  outContent="Authentication02 PASSED"/
  +
  +!-- Test isUserInRole() on actual role and on an alias --
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +  debug="${debug}"
  + request="${context.path}/protected/Authentication03"
  +   inHeaders="Authorization:Basic dG9tY2F0OnRvbWNhdA=="
  +  outContent="Authentication03 PASSED"/
  +
  +  /target
  +
  +
 target name="CaseSensitive"
   
   !-- == Case Sensitive Request URI Matching === --
  @@ -489,27 +521,6 @@
   tester host="${host}" port="${port}" protocol="${protocol}"
request="${context.path}/WrappedGetInputStream01" debug="${debug}"
 outContent="GetInputStream01 PASSED"/
  -
  -
  -!-- == Authentication  --
  -
  -!-- Once a user has been authenticated, the corresponding user identity
  - should be visible to all other requests in this web application, even
  - for URIs that are not protected by security constraints.  This is
  - tested by invoking a protected URI followed by a non-protected URI
  ---
  -
  -tester host="${host}" port="${port}" protocol="${protocol}"
  -  debug="${debug}"
  - request="${context.path}/protected/Authentication01"
  -   inHeaders="Authorization:Basic dG9tY2F0OnRvbWNhdA=="
  -  outContent="Authentication01 PASSED"/
  -
  -tester host="${host}" port="${port}" protocol="${protocol}"
  -  debug="${debug}"
  - request="${context.path}/protected/Authentication02"
  -   inHeaders="Authorization:Basic dG9tY2F0OnRvbWNhdA=="
  -  outContent="Authentication02 PASSED"/
   
   
 /target
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Authentication03.java
  
  Index: Authentication03.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   *  Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.  *
   *   All rights reserved.*
   *   *
   * 

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

2001-03-21 Thread craigmcc

craigmcc01/03/21 11:38:54

  Modified:tester   build.xml
   tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Resources05.java
Resources05.txt
  Log:
  Add test cases where the URL returned by getResource() is actually opened
  and read, to ensure that the appropriate stream handler is provided.
  
  Revision  ChangesPath
  1.7   +2 -0  jakarta-tomcat-4.0/tester/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/build.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build.xml 2001/03/13 19:06:09 1.6
  +++ build.xml 2001/03/21 19:38:28 1.7
  @@ -70,6 +70,8 @@
   
tofile="${tester.build}/web/WEB-INF/classes/org/apache/tester/Unpacked01.txt"/
   copy file="src/tester/org/apache/tester/Resources03.txt"
   
tofile="${tester.build}/web/WEB-INF/classes/org/apache/tester/Unpacked03.txt"/
  +copy file="src/tester/org/apache/tester/Resources05.txt"
  +
tofile="${tester.build}/web/WEB-INF/classes/org/apache/tester/Unpacked05.txt"/
   
   !-- Install Xerces --
   copy  todir="${tester.build}/web/WEB-INF/lib"
  
  
  
  1.22  +27 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- tester.xml2001/03/17 19:48:20 1.21
  +++ tester.xml2001/03/21 19:38:40 1.22
  @@ -350,6 +350,33 @@

request="${context.path}/Resources04?mode=classamp;path=/org/apache/tester/Unpacked04.txt.bad"
 outContent="Resources04 PASSED"/
   
  +!-- == Positive Combined getResource/Open Tests == --
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +   debug="${debug}"
  + 
request="${context.path}/Resources05?mode=contextamp;path=/WEB-INF/web.xml"
  +  outContent="lt;?xml version=quot;1.0quot; 
encoding=quot;ISO-8859-1quot;?gt;"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +   debug="${debug}"
  + request="${context.path}/Resources05?mode=contextamp;path=/Forward01.txt"
  +  outContent="Forward01 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +   debug="${debug}"
  + request="${context.path}/Resources05?mode=contextamp;path=/Include01.txt"
  +  outContent="Include01 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +   debug="${debug}"
  + 
request="${context.path}/Resources05?mode=classamp;path=/org/apache/tester/Resources05.txt"
  +  outContent="Resources05 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +   debug="${debug}"
  + 
request="${context.path}/Resources05?mode=classamp;path=/org/apache/tester/Unpacked05.txt"
  +  outContent="Resources05 PASSED"/
  +
 /target
   
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Resources05.java
  
  Index: Resources05.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   * Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.   *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *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.   *
   * 

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

2001-03-17 Thread craigmcc

craigmcc01/03/17 11:48:22

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/web Xerces00.jsp Xerces02.jsp
  Log:
  Add some additional tests to access JSP pages both before and after a
  servlet that uses Xerces itself.
  
  Revision  ChangesPath
  1.21  +23 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- tester.xml2001/03/13 19:10:42 1.20
  +++ tester.xml2001/03/17 19:48:20 1.21
  @@ -550,6 +550,18 @@
   !-- == Xerces Sealing Violation Test = --
   
   tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/Xerces00.jsp" debug="${debug}"
  +  outContent="Xerces00 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/Xerces00" debug="${debug}"
  +  outContent="Xerces00 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedXerces00" debug="${debug}"
  +  outContent="Xerces00 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
request="${context.path}/Xerces01" debug="${debug}"
 outContent="Xerces01 PASSED"/
   
  @@ -557,6 +569,17 @@
request="${context.path}/WrappedXerces01" debug="${debug}"
 outContent="Xerces01 PASSED"/
   
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/Xerces02.jsp" debug="${debug}"
  +  outContent="Xerces02 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/Xerces02" debug="${debug}"
  +  outContent="Xerces02 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedXerces02" debug="${debug}"
  +  outContent="Xerces02 PASSED"/
   
 /target
   
  
  
  
  1.1  jakarta-tomcat-4.0/tester/web/Xerces00.jsp
  
  Index: Xerces00.jsp
  ===
  !DOCTYPE root
  PUBLIC "-//Sun Microsystems Inc.//DTD JavaServer Pages Version 1.2//EN"
  "http://java.sun.com/products/jsp/dtd/jspcore_1_2.dtd"  
  !-- This File is generated automatically by jsp2XML converter tool -- 
  !-- Written By Ramesh Mandava/Santosh Singh --
  jsp:root
  xmlns:jsp="http://java.sun.com/products/jsp/dtd/jsp_1_2.dtd"
  jsp:directive.page contentType="text/plain"
  /jsp:cdata![CDATA[Xerces00 PASSED]]/jsp:cdata
  /jsp:root
  
  
  
  
  1.1  jakarta-tomcat-4.0/tester/web/Xerces02.jsp
  
  Index: Xerces02.jsp
  ===
  %@ page contentType="text/plain"%Xerces02 PASSED
  
  
  
  1.14  +40 -0 jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- web.xml   2001/03/13 19:06:22 1.13
  +++ web.xml   2001/03/17 19:48:21 1.14
  @@ -172,9 +172,19 @@
   
   filter-mapping
   filter-nameHttpFilter/filter-name
  +url-pattern/WrappedXerces00/url-pattern
  +/filter-mapping
  +
  +filter-mapping
  +filter-nameHttpFilter/filter-name
   url-pattern/WrappedXerces01/url-pattern
   /filter-mapping
   
  +filter-mapping
  +filter-nameHttpFilter/filter-name
  +url-pattern/WrappedXerces02/url-pattern
  +/filter-mapping
  +
   
   !-- == Servlet Definitions === --
   
  @@ -324,11 +334,21 @@
   /servlet
   
   servlet
  +servlet-nameXerces00/servlet-name
  +jsp-file/Xerces00.jsp/jsp-file
  +/servlet
  +
  +servlet
   servlet-nameXerces01/servlet-name
   servlet-classorg.apache.tester.Xerces01/servlet-class
   /servlet
   
  +servlet
  +servlet-nameXerces02/servlet-name
  +jsp-file/Xerces02.jsp/jsp-file
  +/servlet
   
  +
   !-- == Servlet Mappings == --
   
   servlet-mapping
  @@ -617,6 +637,16 @@
   /servlet-mapping
   
   servlet-mapping
  +servlet-nameXerces00/servlet-name
  +url-pattern/Xerces00/url-pattern
  +/servlet-mapping
  +
  +servlet-mapping
  +servlet-nameXerces00/servlet-name
  +url-pattern/WrappedXerces00/url-pattern
  +/servlet-mapping
  +
  +servlet-mapping
   servlet-nameXerces01/servlet-name
   

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

2001-03-14 Thread craigmcc

craigmcc01/03/14 19:24:13

  Modified:tester   Tag: J2EE_13_BRANCH build.xml
   tester/src/bin Tag: J2EE_13_BRANCH tester.xml
   tester/src/tester/org/apache/tester Tag: J2EE_13_BRANCH
SetBufferSize01.java TestClient.java
   tester/web/WEB-INF Tag: J2EE_13_BRANCH web.xml
  Added:   tester/src/tester/org/apache/tester Tag: J2EE_13_BRANCH
Aggregate01.java Aggregate02.java ErrorPage01.java
ErrorPage02.java ErrorPage03.java ErrorPage04.java
Include02.java Include02a.java Jndi01.java
Jndi02.java Resources01.java Resources02.java
Resources03.java Resources04.java Session01.java
Session02.java Session03.java SessionBean.java
TesterException.java Xerces01.java
Xerces01Parser.java
  Log:
  Create branch for J2EE RI, and port the current unit test suite from the
  HEAD branch.  Currently, the following unit tests fail:
  - ErrorPage:  All
  - Resources:  #4, #5, #14, #15
  - ServletResponse: #3, #4
  - HttpSession: #4, #8
  
  but these will be corrected as the corresponding bug fix patches get
  ported into the branch.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +1 -1  jakarta-tomcat-4.0/tester/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- build.xml 2000/12/18 05:06:12 1.1
  +++ build.xml 2001/03/15 03:24:06 1.1.2.1
  @@ -3,7 +3,7 @@
   
 !-- = Initialize Property Values === --
 property name="build.compiler"  value="classic"/
  -  property name="servletapi.home" value="../../jakarta-servletapi"/
  +  property name="servletapi.home" value="../../jakarta-servletapi-4"/
 property name="tester.build"value="../../build/tester"/
 property name="tester.deploy"   value="../../build/tomcat-4.0"/
 property name="tester.dist" value="../../dist/tester"/
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.7.2.1   +355 -39   jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- tester.xml2001/01/06 02:38:12 1.7
  +++ tester.xml2001/03/15 03:24:06 1.7.2.1
  @@ -2,15 +2,17 @@
   
 !-- == Global Properties === --
 property name="catalina.home"  value="../../build/tomcat-4.0"/
  +  property name="debug"  value="0"/
 property name="host"   value="localhost"/
 property name="port"   value="8080"/
   !--  property name="protocol"   value="HTTP/1.0"/ --
 property name="protocol"   value=""/ !-- Use HttpURLConnection --
 property name="context.path"   value="/tester"/
  +  property name="manager.path"   value="/manager"/
 taskdef  name="tester" classname="org.apache.tester.TestClient"/
   
   
  -  target name="all" 
depends="ROOT,CaseSensitive,RequestDispatcher,ServletRequest,ServletResponse"/
  +  target name="all" 
depends="ROOT,CaseSensitive,ErrorPage,Jndi,RequestDispatcher,Resources,ServletRequest,ServletResponse,HttpSession"/
   
   
 target name="ROOT"
  @@ -19,9 +21,19 @@
   
   !-- Should be able to see the home page --
   tester host="${host}" port="${port}" protocol="${protocol}"
  - request="/index.html"
  + request="/index.html" debug="${debug}"
 status="200"/
   
  +!-- Should be able to use relative path to document root --
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="/examples/.." debug="${debug}"
  +  status="302"/
  +
  +!-- Should not be able to use relative path above document root --
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="/examples/../.." debug="${debug}"
  +  status="404"/
  +
 /target
   
   
  @@ -31,119 +43,372 @@
   
   !-- Make sure that static resources are matched case sensitively --
   tester host="${host}" port="${port}" protocol="${protocol}"
  - request="/index.HTML"
  + request="/index.HTML" debug="${debug}"
 status="404"/
   
   !-- Should be able to execute the Date example --
   touch  file="${catalina.home}/webapps/examples/jsp/dates/date.jsp"/
   tester host="${host}" port="${port}" protocol="${protocol}"
  - request="/examples/jsp/dates/date.jsp"
  + 

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

2001-03-13 Thread craigmcc

craigmcc01/03/13 11:06:23

  Modified:tester   build.bat build.sh build.xml
   tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Xerces01.java
Xerces01Parser.java
   tester/web Xerces01.xml
  Log:
  Add a test to prove that we can run a web application using Xerces (which
  is installed under WEB-INF/lib) in a Tomcat 4.0 environment.
  
  Also, added debugging attributes on all remaining tests that did not
  include it.
  
  Submitted by:  Amy Roh [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.3   +12 -2 jakarta-tomcat-4.0/tester/build.bat
  
  Index: build.bat
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/build.bat,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.bat 2001/02/01 16:52:59 1.2
  +++ build.bat 2001/03/13 19:06:06 1.3
  @@ -11,7 +11,10 @@
   rem
   rem   JAVA_HOMEMust point at your Java Development Kit [REQUIRED]
   rem
  -rem $Id: build.bat,v 1.2 2001/02/01 16:52:59 craigmcc Exp $
  +rem   XERCES_HOME  Must point at your Xerces installation
  +rem[../../xerces-1_3_0]
  +rem
  +rem $Id: build.bat,v 1.3 2001/03/13 19:06:06 craigmcc Exp $
   rem ---
   
   
  @@ -19,6 +22,7 @@
   
   set _CLASSPATH=%CLASSPATH%
   set _ANT_HOME=%ANT_HOME%
  +set _XERCES_HOME=%XERCES_HOME%
   
   
   rem - Verify and Set Required Environment Variables ---
  @@ -33,7 +37,11 @@
   set ANT_HOME=../../jakarta-ant
   :gotAntHome
   
  +if not "%XERCES_HOME%" == "" goto gotXercesHome
  +set XERCES_HOME=../../xerces-1_3_0
  +:gotXercesHome
   
  +
   rem - Set Up The Runtime Classpath 
   
   if not "%CLASSPATH%" == "" set CLASSPATH=%CLASSPATH%;
  @@ -42,7 +50,7 @@
   
   rem - Execute The Requested Build -
   
  -%JAVA_HOME%\bin\java %ANT_OPTS% org.apache.tools.ant.Main -Dant.home="%ANT_HOME%" 
-Djava.home="%JAVA_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
  +%JAVA_HOME%\bin\java %ANT_OPTS% org.apache.tools.ant.Main -Dant.home="%ANT_HOME%" 
-Djava.home="%JAVA_HOME%" -Dxerces.home="%XERCES_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
   
   
   rem - Restore Environment Variables ---
  @@ -52,5 +60,7 @@
   set _CLASSPATH=
   set ANT_HOME=%_ANT_HOME%
   set _ANT_HOME=
  +set XERCES_HOME=%_XERCES_HOME%
  +set _XERCES_HOME=
   :finish
   
  
  
  
  1.2   +10 -1 jakarta-tomcat-4.0/tester/build.sh
  
  Index: build.sh
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/build.sh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.sh  2000/12/18 05:06:12 1.1
  +++ build.sh  2001/03/13 19:06:07 1.2
  @@ -11,7 +11,10 @@
   #
   #   JAVA_HOMEMust point at your Java Development Kit [REQUIRED]
   #
  -# $Id: build.sh,v 1.1 2000/12/18 05:06:12 craigmcc Exp $
  +#   XERCES_HOME  Must point at your Xerces installation
  +#[../../xerces-1_3_0]
  +#
  +# $Id: build.sh,v 1.2 2001/03/13 19:06:07 craigmcc Exp $
   # -
   
   
  @@ -30,6 +33,11 @@
 ANT_OPTS=""
   fi
   
  +if [ "$XERCES_HOME" = "" ] ; then
  +  XERCES_HOME="../../xerces-1_3_0"
  +fi
  +
  +
   # - Set Up The Runtime Classpath --
   
   CP=$ANT_HOME/lib/ant.jar:$JAVA_HOME/lib/tools.jar
  @@ -43,4 +51,5 @@
   $JAVA_HOME/bin/java $ANT_OPTS -classpath $CP org.apache.tools.ant.Main \
-Dant.home=$ANT_HOME \
-Djava.home=$JAVA_HOME \
  + -Dxerces.home=$XERCES_HOME \
"$@"
  
  
  
  1.6   +8 -1  jakarta-tomcat-4.0/tester/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/build.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.xml 2001/02/22 20:28:58 1.5
  +++ build.xml 2001/03/13 19:06:09 1.6
  @@ -7,10 +7,12 @@
 property name="tester.build"value="build"/
 property name="tester.deploy"   value="../build"/
 property name="tester.dist" value="dist"/
  +  property name="xerces.home" value="../../xerces-1_3_0"/
   
 !-- == Derived Property Values = --
 property name="ant.jar" value="${ant.home}/lib/ant.jar"/
 property name="servlet.jar" value="${servletapi.home}/lib/servlet.jar"/
  +  property name="xerces.jar"  value="${xerces.home}/xerces.jar"/
   
 !-- === BUILD: Create Directories == --
 target name="build-prepare"
  @@ -51,7 

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

2001-02-06 Thread craigmcc

craigmcc01/02/06 09:16:28

  Modified:tester/src/bin tester.xml
   tester/src/tester/org/apache/tester Session03.java
SessionBean.java
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Include02.java
Include02a.java
  Log:
  Enhance the session management test to validate that the appropriate
  lifecycle events have been called at the correct times across an application
  shutdown and restart.
  
  Add a unit test for the corrected handling of exceptions thrown by
  an included or forwarded-to servlet.
  
  Revision  ChangesPath
  1.14  +26 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- tester.xml2001/02/04 05:34:18 1.13
  +++ tester.xml2001/02/06 17:16:21 1.14
  @@ -115,6 +115,32 @@
request="${context.path}/WrappedInclude01"
 outContent="Include01 PASSED"/
   
  +!-- == Included Servlet Throwing Exceptions == --
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/Include02?exception=IOException"
  +  outContent="Include02 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/Include02?exception=ServletException"
  +  outContent="Include02 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/Include02?exception=NullPointerException"
  +  outContent="Include02 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedInclude02?exception=IOException"
  +  outContent="Include02 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedInclude02?exception=ServletException"
  +  outContent="Include02 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedInclude02?exception=NullPointerException"
  +  outContent="Include02 PASSED"/
  +
 /target
   
   
  
  
  
  1.2   +18 -6 
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Session03.java
  
  Index: Session03.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Session03.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Session03.java2001/02/04 04:49:38 1.1
  +++ Session03.java2001/02/06 17:16:24 1.2
  @@ -68,7 +68,7 @@
* Then, it removes that attribute and verifies successful removal.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/02/04 04:49:38 $
  + * @version $Revision: 1.2 $ $Date: 2001/02/06 17:16:24 $
*/
   
   public class Session03 extends HttpServlet {
  @@ -89,17 +89,19 @@
   }
   
   // Ensure that we can retrieve the attribute successfully
  + SessionBean bean = null;
   if (ok) {
  -Object bean = session.getAttribute("sessionBean");
  -if (bean == null) {
  +Object object = session.getAttribute("sessionBean");
  +if (object == null) {
   writer.println("Session03 FAILED - Cannot retrieve attribute");
   ok = false;
  -} else if (!(bean instanceof SessionBean)) {
  +} else if (!(object instanceof SessionBean)) {
   writer.println("Session03 FAILED - Attribute instance of " +
  -   bean.getClass().getName());
  +   object.getClass().getName());
   ok = false;
   } else {
  -String value = ((SessionBean) bean).getStringProperty();
  +bean = (SessionBean) object;
  +String value = bean.getStringProperty();
   if (!"Session01".equals(value)) {
   writer.println("Session03 FAILED - Property = " + value);
   ok = false;
  @@ -115,6 +117,16 @@
   ok = false;
   }
   }
  +
  + // Validate the bean lifecycle of this bean
  + if (ok) {
  + String lifecycle = bean.getLifecycle();
  + if (!"/vb/swp/sda/vu".equals(lifecycle)) {
  + writer.println("Session03 FAILED - Invalid bean lifecycle '" +
  +lifecycle + "'");
  + ok = false;
  + }
  + }
   
   // Report success if everything is still ok
   if (ok)
  
  
  
  1.2   +75 -2 

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

2001-02-03 Thread craigmcc

craigmcc01/02/03 20:49:39

  Modified:tester/src/bin tester.xml
   tester/src/tester/org/apache/tester TestClient.java
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Session01.java
Session02.java Session03.java SessionBean.java
  Log:
  Add a series of unit tests for session attributes.
  
  TODO:  Add a mechanism to test session reloading after a webapp restart.
  
  Revision  ChangesPath
  1.11  +35 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- tester.xml2001/02/04 01:46:38 1.10
  +++ tester.xml2001/02/04 04:49:38 1.11
  @@ -381,4 +381,39 @@
 /target
   
   
  +  target name="HttpSession"
  +
  +!-- == Session Attribute Persistence = --
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/Session01" debug="${debug}"
  +  outContent="Session01 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/Session02" debug="${debug}"
  + joinSession="true"
  +  outContent="Session02 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/Session03" debug="${debug}"
  + joinSession="true"
  +  outContent="Session03 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedSession01" debug="${debug}"
  +  outContent="Session01 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedSession02" debug="${debug}"
  + joinSession="true"
  +  outContent="Session02 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  + request="${context.path}/WrappedSession03" debug="${debug}"
  + joinSession="true"
  +  outContent="Session03 PASSED"/
  +
  +  /target
  +
  +
   /project
  
  
  
  1.6   +73 -1 
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/TestClient.java
  
  Index: TestClient.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/TestClient.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestClient.java   2001/01/27 01:49:14 1.5
  +++ TestClient.java   2001/02/04 04:49:38 1.6
  @@ -115,7 +115,7 @@
* /ul
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2001/01/27 01:49:14 $
  + * @version $Revision: 1.6 $ $Date: 2001/02/04 04:49:38 $
*/
   
   public class TestClient extends Task {
  @@ -194,6 +194,21 @@
   
   
   /**
  + * Should we join the session whose session identifier was returned
  + * on the previous request.
  + */
  +protected boolean joinSession = false;
  +
  +public boolean getJoinSession() {
  +return (this.joinSession);
  +}
  +
  +public void setJoinSession(boolean joinSession) {
  +this.joinSession = true;
  +}
  +
  +
  +/**
* The HTTP response message to be expected in the response.
*/
   protected String message = null;
  @@ -308,6 +323,17 @@
   }
   
   
  +// --- Static Variables
  +
  +
  +/**
  + * The session identifier returned by the most recent request, or
  + * codenull/code if the previous request did not specify a session
  + * identifier.
  + */
  +protected static String sessionId = null;
  +
  +
   // - Public Methods
   
   
  @@ -363,6 +389,16 @@
   } else {
   conn.setDoOutput(false);
   }
  +
  +// Send the session id cookie (if any)
  +if (joinSession  (sessionId != null)) {
  +conn.setRequestProperty("Cookie",
  +"JSESSIONID=" + sessionId);
  +if (debug = 1)
  +System.out.println("INPH: Cookie: JSESSIONID=" +
  +   sessionId);
  +}
  +
   conn.setFollowRedirects(false);
   conn.setRequestMethod(method);
   if (inHeaders != null) {
  @@ -432,6 +468,8 @@
   if (debug = 1)
   System.out.println("HEAD: " + name + ": " + value);
   save(name, value);
  +if ("Set-Cookie".equals(name))
  +parseSession(value);
   }
   if (debug = 1) {
  

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

2001-01-26 Thread craigmcc

craigmcc01/01/26 17:49:15

  Modified:tester/src/bin tester.xml
   tester/src/tester/org/apache/tester TestClient.java
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Aggregate01.java
Aggregate02.java
  Log:
  Add unit tests for the spec requirement that request parameters from the
  query string and POST data be aggregated, and that the values from the
  query string will show up first from request.getParameterValue()
  [Servlet Specification version 2.3 PFD, Section 4.1].
  
  Also, cleaned up the test client's handling of input data -- previously
  it was appending \r\n when using HttpURLConnection.
  
  Revision  ChangesPath
  1.9   +28 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- tester.xml2001/01/23 20:12:00 1.8
  +++ tester.xml2001/01/27 01:49:14 1.9
  @@ -266,6 +266,34 @@
request="${context.path}/WrappedGetQueryString01?foo=1"
 outContent="GetQueryString01 PASSED"/
   
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +   debug="${debug}" method="POST"
  +   inHeaders="Content-Type:application/x-www-form-urlencoded"
  +   inContent="b=3amp;a=2"
  + request="${context.path}/Aggregate01?a=1"
  +  outContent="Aggregate01 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +   debug="${debug}" method="POST"
  +   inHeaders="Content-Type:application/x-www-form-urlencoded"
  +   inContent="b=3amp;a=2"
  + request="${context.path}/WrappedAggregate01?a=1"
  +  outContent="Aggregate01 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +   debug="${debug}" method="POST"
  +   inHeaders="Content-Type:application/x-www-form-urlencoded"
  +   inContent="b=3amp;a=2"
  + request="${context.path}/Aggregate02?a=1"
  +  outContent="Aggregate02 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}"
  +   debug="${debug}" method="POST"
  +   inHeaders="Content-Type:application/x-www-form-urlencoded"
  +   inContent="b=3amp;a=2"
  + request="${context.path}/WrappedAggregate02?a=1"
  +  outContent="Aggregate02 PASSED"/
  +
   !-- == Other ServletRequest Tests  --
   
   !-- Servlet compliance tests, until equivalent tests are included
  
  
  
  1.5   +12 -9 
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/TestClient.java
  
  Index: TestClient.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/TestClient.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestClient.java   2001/01/03 05:50:45 1.4
  +++ TestClient.java   2001/01/27 01:49:14 1.5
  @@ -115,7 +115,7 @@
* /ul
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/01/03 05:50:45 $
  + * @version $Revision: 1.5 $ $Date: 2001/01/27 01:49:14 $
*/
   
   public class TestClient extends Task {
  @@ -355,9 +355,11 @@
   conn.setDoInput(true);
   if (inContent != null) {
   conn.setDoOutput(true);
  -inContent += "\r\n";
   conn.setRequestProperty("Content-Length",
   "" + inContent.length());
  +if (debug = 1)
  +System.out.println("INPH: Content-Length: " +
  +   inContent.length());
   } else {
   conn.setDoOutput(false);
   }
  @@ -381,12 +383,16 @@
   String name = header.substring(0, colon).trim();
   String value = header.substring(colon + 1).trim();
   conn.setRequestProperty(name, value);
  +if (debug = 1)
  +System.out.println("INPH: " + name + ": " + value);
   }
   }
   
   // Connect to the server and send our output if necessary
   conn.connect();
   if (inContent != null) {
  +if (debug = 1)
  +System.out.println("INPD: " + inContent);
   OutputStream os = conn.getOutputStream();
   for (int i = 0; i  inContent.length(); i++)
   os.write(inContent.charAt(i));
  @@ -528,7 +534,7 @@
   pw.print(command + "\r\n");
   if (inContent != null) {
   if (debug = 1)
  -System.out.println("HEAD: " 

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

2001-01-02 Thread craigmcc

craigmcc01/01/02 21:50:46

  Modified:tester/src/bin tester.xml
   tester/src/tester/org/apache/tester TestClient.java
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester SetLocale01.java
  Log:
  Refactor TestClient so that common validation logic is shared.  Also, add
  the missing logic to validate the output headers.
  
  Add a positive test for ServletResponse.setLocale() since the current
  Watchdog 4.0 version of this test is broken.
  
  Revision  ChangesPath
  1.6   +11 -1 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- tester.xml2001/01/03 02:46:07 1.5
  +++ tester.xml2001/01/03 05:50:45 1.6
  @@ -188,9 +188,19 @@
request="${context.path}/SetBufferSize01"
 outContent="SetBufferSize01 PASSED"/
   
  -tester host="${host}" port="${port}" protocol="${protocol}"
  +tester host="${host}" port="${port}" protocol="${protocol}" debug="0"
request="${context.path}/WrappedSetBufferSize01"
 outContent="SetBufferSize01 PASSED"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}" debug="0"
  + request="${context.path}/SetLocale01"
  +  outContent="SetLocale01 PASSED"
  +  outHeaders="Content-Language:en"/
  +
  +tester host="${host}" port="${port}" protocol="${protocol}" debug="0"
  + request="${context.path}/WrappedSetLocale01"
  +  outContent="SetLocale01 PASSED"
  +  outHeaders="Content-Language:en"/
   
   
 /target
  
  
  
  1.4   +188 -35   
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/TestClient.java
  
  Index: TestClient.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/TestClient.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestClient.java   2000/12/26 18:57:44 1.3
  +++ TestClient.java   2001/01/03 05:50:45 1.4
  @@ -67,6 +67,9 @@
   import java.net.HttpURLConnection;
   import java.net.Socket;
   import java.net.URL;
  +import java.util.ArrayList;
  +import java.util.HashMap;
  +import java.util.Iterator;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Task;
   
  @@ -112,12 +115,23 @@
* /ul
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2000/12/26 18:57:44 $
  + * @version $Revision: 1.4 $ $Date: 2001/01/03 05:50:45 $
*/
   
   public class TestClient extends Task {
   
   
  +// - Instance Variables
  +
  +
  +/**
  + * The saved headers we received in our response.  The key is the header
  + * name (converted to lower case), and the value is an ArrayList of the
  + * string value(s) received for that header.
  + */
  +protected HashMap saveHeaders = new HashMap();
  +
  +
   // - Properties
   
   
  @@ -304,6 +318,7 @@
*/
   public void execute() throws BuildException {
   
  +saveHeaders.clear();
   if ((protocol == null) || (protocol.length() == 0))
   executeHttp();
   else
  @@ -400,36 +415,45 @@
   }
   
   // Dump out the response stuff
  -if (debug = 1) {
  +if (debug = 1)
   System.out.println("RESP: " + conn.getResponseCode() + " " +
  conn.getResponseMessage());
  -for (int i = 0; i  1000; i++) {
  -String name = conn.getHeaderFieldKey(i);
  -String value = conn.getHeaderField(i);
  -if ((name == null) || (value == null))
  -break;
  +for (int i = 1; i  1000; i++) {
  +String name = conn.getHeaderFieldKey(i);
  +String value = conn.getHeaderField(i);
  +if ((name == null) || (value == null))
  +break;
  +if (debug = 1)
   System.out.println("HEAD: " + name + ": " + value);
  -}
  +save(name, value);
  +}
  +if (debug = 1) {
   System.out.println("DATA: " + outData);
   if (outText.length()  2)
   System.out.println("TEXT: " + outText);
   }
   
   // Validate the response against our criteria
  -if (status != conn.getResponseCode()) {
  -success = false;
  -result = "Expected status=" + status + ", got status=" +
  -

Re: cvs commit: jakarta-tomcat-4.0/tester/web/WEB-INF web.xml

2001-01-02 Thread Jon Stevens

on 1/2/2001 9:50 PM, "[EMAIL PROTECTED]" [EMAIL PROTECTED] wrote:

 +protected HashMap saveHeaders = new HashMap();

What if there is more than one header?

Set-Cookie:

-jon


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




Re: cvs commit: jakarta-tomcat-4.0/tester/web/WEB-INF web.xml

2000-12-26 Thread Jon Stevens

on 12/26/2000 10:57 AM, "[EMAIL PROTECTED]"
[EMAIL PROTECTED] wrote:

 NOTE:  The
 HttpURLConnection class does not handle this correctly, so the test client
 now has the option to use a low-level socket connection instead of
 HttpURLConnection on each test.

Please note, HttpURLConnection doesn't handle MANY things correctly. I
suggest not using it at all.

-jon




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

2000-12-17 Thread craigmcc

craigmcc00/12/17 21:06:16

  Added:   tester   build.bat build.sh build.xml
   tester/src/bin tester.bat tester.sh tester.xml
   tester/src/tester/org/apache/tester Authentication01.java
Authentication02.java GetInputStream01.java
GetParameter01.java GetParameterMap00.java
GetQueryString01.java TestClient.java
   tester/web/WEB-INF web.xml
  Log:
  Add the initial version of a unit testing suite for Tomcat 4.0.  The test
  client is a custom Ant task modelled after the GTest task used by the
  Watchdog tests, but which uses HttpURLConnection instead of a low level
  socket connection for processing.
  
  The intent of this suite is to host unit tests for Tomcat-specific
  functionality, rather than the spec compliance that is checked by
  Watchdog.  As such, the tests rely on specifics of the way that a default
  Tomcat 4.0 installation is laid out.
  
  Currently, the tester suite is *not* integrated in the top-level build
  scripts for Tomcat 4.0.  To build and deploy it to the "build" version,
  execute the following commands from the top level directory of the source:
  
cd tester
./build.sh deploy-main
  
  and then restart Tomcat 4.0.  To execute the tests, execute:
  
$CATALINA_HOME/bin/tester.sh
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-4.0/tester/build.bat
  
  Index: build.bat
  ===
  @echo off
  rem ---
  rem build.bat - Build Script for Tester
  rem
  rem Environment Variable Prerequisites:
  rem
  rem   ANT_HOME Must point at your Ant installation [../jakarta-ant]
  rem
  rem   ANT_OPTS Command line options to the Java runtime
  remthat executes Ant [NONE]
  rem
  rem   JAVA_HOMEMust point at your Java Development Kit [REQUIRED]
  rem
  rem $Id: build.bat,v 1.1 2000/12/18 05:06:11 craigmcc Exp $
  rem ---
  
  
  rem - Save Environment Variables --
  
  set _CLASSPATH=%CLASSPATH%
  set _ANT_HOME=%ANT_HOME%
  
  
  rem - Verify and Set Required Environment Variables ---
  
  
  if not "%JAVA_HOME%" == "" goto gotJavaHome
  echo You must set JAVA_HOME to point at your Java Development Kit installation
  goto cleanup
  :gotJavaHome
  
  if not "%ANT_HOME%" == "" goto gotAntHome
  set ANT_HOME=../jakarta-ant
  :gotAntHome
  
  
  rem - Set Up The Runtime Classpath 
  
  if not "%CLASSPATH%" == "" set CLASSPATH=%CLASSPATH%;
  set CLASSPATH=%CLASSPATH%;%ANT_HOME%\lib\ant.jar;%JAVA_HOME%\lib\tools.jar
  
  
  rem - Execute The Requested Build -
  
  %JAVA_HOME%\bin\java %ANT_OPTS% org.apache.tools.ant.Main -Dant.home="%ANT_HOME%" 
-Djava.home="%JAVA_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
  
  
  rem - Restore Environment Variables ---
  
  :cleanup
  set CLASSPATH=%_CLASSPATH%
  set _CLASSPATH=
  set ANT_HOME=%_ANT_HOME%
  set _ANT_HOME=
  :finish
  
  
  
  
  1.1  jakarta-tomcat-4.0/tester/build.sh
  
  Index: build.sh
  ===
  #!/bin/sh
  # -
  # build.sh - Build Script for Tester
  #
  # Environment Variable Prerequisites:
  #
  #   ANT_HOME Must point at your Ant installation [../jakarta-ant]
  #
  #   ANT_OPTS Command line options to the Java runtime
  #that executes Ant [NONE]
  #
  #   JAVA_HOMEMust point at your Java Development Kit [REQUIRED]
  #
  # $Id: build.sh,v 1.1 2000/12/18 05:06:12 craigmcc Exp $
  # -
  
  
  # - Verify and Set Required Environment Variables -
  
  if [ "$JAVA_HOME" = "" ] ; then
echo You must set JAVA_HOME to point at your Java Development Kit install
exit 1
  fi
  
  if [ "$ANT_HOME" = "" ] ; then
ANT_HOME=../jakarta-ant
  fi
  
  if [ "$ANT_OPTS" = "" ] ; then
ANT_OPTS=""
  fi
  
  # - Set Up The Runtime Classpath --
  
  CP=$ANT_HOME/lib/ant.jar:$JAVA_HOME/lib/tools.jar
  
  if [ "$CLASSPATH" != "" ] ; then
CP=$CLASSPATH:$CP
  fi
  
  # - Execute The Requested Build ---
  
  $JAVA_HOME/bin/java $ANT_OPTS -classpath $CP org.apache.tools.ant.Main \
   -Dant.home=$ANT_HOME \
   -Djava.home=$JAVA_HOME \
   "$@"
  
  
  
  1.1  jakarta-tomcat-4.0/tester/build.xml
  
  Index: build.xml