patched

2005-06-20 Thread craigmcc
Requested file.


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

patched

2005-06-20 Thread craigmcc
Requested file.


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

hello

2005-04-26 Thread craigmcc
The message contains Unicode characters and has been sent as a binary 
attachment.



Norton AntiVirus Deleted1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

hello

2005-04-15 Thread craigmcc
It's the long-awaited film version of the Broadway hit. The  message  sent as  
a binary attachment.

**
**
WARNING: Panda Antivirus GateDefender has detected a virus in file
attached to this e-mail message!
The attachment has been automatically removed to
protect your network.
Panda Antivirus GateDefender Administrator: [EMAIL PROTECTED]
04/15/05 18:53:40 
Panda Antivirus GateDefender (Version 5.1 R1c (5.0.60.2)) - http://www.pandasoftware.com/
Antivirus Vendor: Panda Software
Scan Engine Version: 4.1.4.307
Pattern File Version: 3.93703 (Timestamp: 15/04/2005 025025)

Machine name: epoc-F6-7200
Machine IP address: 192.168.70.13
Server: 192.168.70.3
Client: 221.253.199.172
Protocol: SMTP
Virus: W32/Lovgate.AC.worm found!
Attachment: readme.zip
**
**

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

MAIL TRANSACTION FAILED

2005-04-06 Thread craigmcc
The message contains Unicode characters and has been sent as a binary 
attachment.


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

Re: patched

2004-12-11 Thread craigmcc
Your document is attached to this mail.


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

Hello

2004-10-05 Thread craigmcc
Mail  failed.  For further assistance, please contact!

* added by MailScan Anti-Virus and Content Security Software *
The attachment(s) that came with the following mail 
received by you had Viruses in it.

=
The Mail came from: [EMAIL PROTECTED]
The Mail recipient: [EMAIL PROTECTED]
Subject of the Mail   : Hello
Message-ID: 

Attachment-Name Virus-Name  Action-Taken

body.zipI-Worm.LovGate.wDeleted
=

Use  MailScan on your  EMail  Servers  and  eScan on your
Windows-based PCs and Servers for maximum protection from
Internet-borne viruses.

* added by MailScan Anti-Virus and Content Security Software *

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

Re: hi

2004-10-01 Thread craigmcc
Please read the document.



Norton AntiVirus eliminato1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Document

2004-07-29 Thread craigmcc
Please read the attached file.

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

Important

2004-06-16 Thread craigmcc
Important!


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

Re: Re: Document

2004-05-05 Thread craigmcc
Please read the attached file.

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

Hey

2004-05-03 Thread craigmcc


Norton AntiVirus gelöscht1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Approved

2004-05-02 Thread craigmcc
Your document is attached.

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

Hi!

2004-04-22 Thread craigmcc


Norton AntiVirus gelöscht1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Database #Error

2004-04-22 Thread craigmcc


Norton AntiVirus gelöscht1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Hey

2004-04-21 Thread craigmcc


Norton AntiVirus gelöscht1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Your document

2004-04-21 Thread craigmcc
Please have a look at the attached file.

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

Oh my God

2004-04-20 Thread craigmcc


Norton AntiVirus gelöscht1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

hey you

2004-04-19 Thread craigmcc


Norton AntiVirus gelöscht1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

hey you

2004-04-11 Thread craigmcc


Norton AntiVirus Deleted1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Hey

2004-04-10 Thread craigmcc


Norton AntiVirus Deleted1.txt
Description: plain/text
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

unknown

2004-02-26 Thread craigmcc
thats wrong
attachment: friend.zip
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

{Virus?} test

2004-02-11 Thread craigmcc
Warning: This message has had one or more attachments removed
Warning: (doc.zip).
Warning: Please read the VirusWarning.txt attachment(s) for more information.

The message contains Unicode characters and has been sent as a binary attachment.

This is a message from the MailScanner E-Mail Virus Protection Service
--
The original e-mail attachment doc.zip
was believed to be infected by a virus and has been replaced by this warning
message.

If you wish to receive a copy of the *infected* attachment, please

message in your request. Alternatively, you can call them, with the
contents of this message to hand when you call.

At Wed Feb 11 18:48:57 2004 the virus scanner said:
   doc.zipFound the W32/[EMAIL PROTECTED] virus !!!

Note to Help Desk: Look on yttrium in /var/spool/MailScanner/quarantine/20040211 
(message i1BImp3U004846).
-- 

MailScanner thanks transtec Computers for their support

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

SERVER REPORT

2004-01-28 Thread craigmcc
--  Virus Warning Message (on fig1)

Found virus WORM_MIMAIL.R in file data.doc 
 .scr (in data.zip)
The uncleanable file is deleted.

-
nxQoE
_lkC[
G
vO400Vz#:
]pXx?*#9?#4DP8.*6#{'/
J*C6scX?)M;LiKYGDrW?#GL?xZ;kKp8Q!
(8D?eFO-U|( 
TA{zY]~?Pg8|61zU
)82uNb7xK4W'nCEI7]
yay
D53KBJXyC~;`!P$7\)EF:MtoN]%Sis^RU!#k?2?lPQ(Nd]FJniyK-|W!up`))|$kHdE
 ?PJR
cu4TqJZQg1L85?teXQB!H0ASJmaQO
]i|
A j~l/${JC0?{,gP{?F!
L\Jzgt)B AiX})b T?k4`N 
E0uwKjTx*ZfIZmgj2x88AV-^]!,Kb3A0~F
tBJ*PCXJ[1Ss5d
W4?^`I2fHE9NC/)KnH
n?4$ZF|hXXfjOJ)mD`?*WZ]vJDz(n8`?(OWZ'i?h?iOqb?o


--  Virus Warning Message (on fig1)

data.zip is removed from here because it contains a virus.

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

HELLO

2004-01-26 Thread craigmcc
The message contains Unicode characters and has been sent as a binary attachment.


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

cvs commit: jakarta-tomcat-5 build.xml

2003-02-27 Thread craigmcc
craigmcc2003/02/27 11:14:14

  Modified:.build.xml
  Log:
  Local build.properties settings should win over ${user.home}/build.properties
  settings.
  
  Revision  ChangesPath
  1.90  +1 -1  jakarta-tomcat-5/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- build.xml 26 Feb 2003 19:40:33 -  1.89
  +++ build.xml 27 Feb 2003 19:14:14 -  1.90
  @@ -5,8 +5,8 @@
   
 !-- See build.properties.sample in the top level directory for all --
 !-- property values you must customize for successful building!!!--
  -  property file=${user.home}/build.properties/
 property file=build.properties/
  +  property file=${user.home}/build.properties/
 property file=build.properties.default/
   
 !-- Project Properties --
  
  
  

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



cvs commit: jakarta-tomcat-4.0/tester/web/WEB-INF/cgi test-cgi.pl

2002-05-30 Thread craigmcc

craigmcc02/05/30 09:35:15

  Modified:tester/web/WEB-INF/cgi test-cgi.pl
  Log:
  Remove Sun license that was mistakenly left on the initial commit.
  This file has been contributed to the Apache Software Foundation.
  
  Revision  ChangesPath
  1.2   +57 -17jakarta-tomcat-4.0/tester/web/WEB-INF/cgi/test-cgi.pl
  
  Index: test-cgi.pl
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/cgi/test-cgi.pl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- test-cgi.pl   1 Jun 2001 00:24:21 -   1.1
  +++ test-cgi.pl   30 May 2002 16:35:15 -  1.2
  @@ -1,21 +1,61 @@
   #!/usr/local/bin/perl
   #
  -# @(#)test-cgi.pl1.2 98/05/28
  -#
  -# Copyright (c) 1996-1998 Sun Microsystems, Inc. All Rights Reserved.
  -#
  -# Permission to use, copy, modify, and distribute this software
  -# and its documentation for NON-COMMERCIAL purposes and without
  -# fee is hereby granted provided that this copyright notice
  -# appears in all copies. Please refer to the file copyright.html
  -# for further important copyright and licensing information.
  -#
  -# SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  -# THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  -# TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  -# PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  -# ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  -# DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  +# = *
  +#   *
  +# 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

cvs commit: jakarta-tomcat-4.0/tester/web/WEB-INF/cgi test-cgi.pl

2002-05-30 Thread craigmcc

craigmcc02/05/30 09:36:40

  Modified:tester/web/WEB-INF/cgi Tag: tomcat_40_branch test-cgi.pl
  Log:
  Replace the Sun license that was mistakenly left on the original commit.
  This file has been contributed to the Apache Software Foundation.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.2   +56 -16jakarta-tomcat-4.0/tester/web/WEB-INF/cgi/test-cgi.pl
  
  Index: test-cgi.pl
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/cgi/test-cgi.pl,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- test-cgi.pl   26 Mar 2002 14:18:43 -  1.1.2.1
  +++ test-cgi.pl   30 May 2002 16:36:40 -  1.1.2.2
  @@ -1,21 +1,61 @@
   #!/usr/local/bin/perl
   #
  -# @(#)test-cgi.pl1.2 98/05/28
  -#
  -# Copyright (c) 1996-1998 Sun Microsystems, Inc. All Rights Reserved.
  -#
  -# Permission to use, copy, modify, and distribute this software
  -# and its documentation for NON-COMMERCIAL purposes and without
  -# fee is hereby granted provided that this copyright notice
  -# appears in all copies. Please refer to the file copyright.html
  -# for further important copyright and licensing information.
  -#
  -# SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  -# THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  -# TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  -# PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  -# ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  -# DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  +# = *
  +#   *
  +# 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

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

2002-05-06 Thread craigmcc

craigmcc02/05/06 12:55:06

  Modified:catalina/src/share/org/apache/catalina/core
NamingContextListener.java
   catalina/src/share/org/apache/catalina/mbeans
NamingResourcesMBean.java
  Log:
  Make NamingContextListener a little bit smarter so that it handles dynamically
  added/removed global naming resources, as well as those configured at startup
  time.
  
  Revision  ChangesPath
  1.12  +154 -5
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
  
  Index: NamingContextListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- NamingContextListener.java16 Apr 2002 00:43:04 -  1.11
  +++ NamingContextListener.java6 May 2002 19:55:05 -   1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java,v
 1.11 2002/04/16 00:43:04 remm Exp $
  - * $Revision: 1.11 $
  - * $Date: 2002/04/16 00:43:04 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java,v
 1.12 2002/05/06 19:55:05 craigmcc Exp $
  + * $Revision: 1.12 $
  + * $Date: 2002/05/06 19:55:05 $
*
* 
*
  @@ -65,6 +65,8 @@
   package org.apache.catalina.core;
   
   
  +import java.beans.PropertyChangeEvent;
  +import java.beans.PropertyChangeListener;
   import java.io.IOException;
   import java.util.ArrayList;
   import java.util.HashMap;
  @@ -116,11 +118,11 @@
* with each context and server.
*
* @author Remy Maucherat
  - * @version $Revision: 1.11 $ $Date: 2002/04/16 00:43:04 $
  + * @version $Revision: 1.12 $ $Date: 2002/05/06 19:55:05 $
*/
   
   public class NamingContextListener
  -implements LifecycleListener, ContainerListener {
  +implements LifecycleListener, ContainerListener, PropertyChangeListener {
   
   
   // --- Constructors
  @@ -264,6 +266,7 @@
   namingResources = ((Context) container).getNamingResources();
   } else if (container instanceof Server) {
   namingResources = ((Server) container).getGlobalNamingResources();
  +namingResources.addPropertyChangeListener(this);
   } else {
   return;
   }
  @@ -337,6 +340,7 @@
   }
   
   if (container instanceof Server) {
  +namingResources.removePropertyChangeListener(this);
   ContextBindings.unbindClassLoader
   (container, container, 
this.getClass().getClassLoader());
  @@ -507,7 +511,152 @@
   }
   
   
  +// - PropertyChangeListener Methods
  +
  +
  +/**
  + * Process property change events.  Currently, only listens to such events
  + * on the codeNamingResources/code instance for the global naming
  + * resources.
  + *
  + * @param event The property change event that has occurred
  + */
  +public void propertyChange(PropertyChangeEvent event) {
  +
  +Object source = event.getSource();
  +if (source == namingResources) {
  +processGlobalResourcesChange(event.getPropertyName(),
  + event.getOldValue(),
  + event.getNewValue());
  +}
  +
  +}
  +
  +
   //  Private Methods
  +
  +
  +/**
  + * Process a property change on the global naming resources, by making the
  + * corresponding addition or removal to the associated JNDI context.
  + *
  + * @param name Property name of the change to be processed
  + * @param oldValue The old value (or codenull/code if adding)
  + * @param newValue The new value (or codenull/code if removing)
  + */
  +private void processGlobalResourcesChange(String name,
  +  Object oldValue,
  +  Object newValue) {
  +
  +// NOTE - It seems that the Context for global JNDI resources
  +// is left in read-write mode, so we do not have to change it here
  +
  +if (name.equals(ejb)) {
  +if (oldValue != null) {
  +ContextEjb ejb = (ContextEjb) oldValue;
  +if (ejb.getName() != null) {
  +removeEjb(ejb.getName());
  +}
  +}
  +if (newValue != null) {
  +ContextEjb ejb = (ContextEjb) newValue

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets ManagerServlet.java

2002-05-04 Thread craigmcc

craigmcc02/05/04 11:37:50

  Modified:catalina/src/share/org/apache/catalina/servlets
ManagerServlet.java
  Log:
  Make the /deploy command recognize a META-INF/context.xml file embedded
  inside the WAR, and process it as a context configuration file.  This allows
  deployment tool clients to customize the configuration of a webapp with
  exactly the same degree of freedom as those that use the /install command,
  with the added benefit of being able to deploy onto a Tomcat instance
  running on a different server.
  
  Revision  ChangesPath
  1.20  +193 -34   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java
  
  Index: ManagerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ManagerServlet.java   8 Apr 2002 17:46:08 -   1.19
  +++ ManagerServlet.java   4 May 2002 18:37:49 -   1.20
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.19 2002/04/08 17:46:08 craigmcc Exp $
  - * $Revision: 1.19 $
  - * $Date: 2002/04/08 17:46:08 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.20 2002/05/04 18:37:49 craigmcc Exp $
  + * $Revision: 1.20 $
  + * $Date: 2002/05/04 18:37:49 $
*
* 
*
  @@ -74,6 +74,8 @@
   import java.net.URL;
   import java.util.Enumeration;
   import java.util.Iterator;
  +import java.util.jar.JarEntry;
  +import java.util.jar.JarFile;
   import javax.naming.InitialContext;
   import javax.naming.NameClassPair;
   import javax.naming.NamingEnumeration;
  @@ -196,7 +198,7 @@
* /ul
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.19 $ $Date: 2002/04/08 17:46:08 $
  + * @version $Revision: 1.20 $ $Date: 2002/05/04 18:37:49 $
*/
   
   public class ManagerServlet
  @@ -219,6 +221,14 @@
   
   
   /**
  + * File object representing the directory into which the deploy() command
  + * will store the WAR and context configuration files that have been
  + * uploaded.
  + */
  +protected File deployed = null;
  +
  +
  +/**
* The Deployer container that contains our own web application's Context,
* along with the associated Contexts for web applications that we
* are managing.
  @@ -435,6 +445,10 @@
   global = ((StandardServer) server).getGlobalNamingContext();
   }
   
  +// Calculate the directory into which we will be deploying applications
  +deployed = (File) getServletContext().getAttribute
  +(javax.servlet.context.tempdir);
  +
   // Log debugging messages as necessary
   if (debug = 1) {
   log(init: Associated with Deployer ' +
  @@ -488,46 +502,52 @@
   }
   
   // Upload the web application archive to a local WAR file
  -File tempDir = (File) getServletContext().getAttribute
  -(javax.servlet.context.tempdir);
  -File localWar = new File(tempDir, basename + .war);
  -localWar.delete();
  +File localWar = new File(deployed, basename + .war);
  +if (debug = 2) {
  +log(Uploading WAR file to  + localWar);
  +}
   try {
  -if (debug = 2) {
  -log(Uploading WAR file to  + localWar);
  -}
  -ServletInputStream istream = request.getInputStream();
  -BufferedOutputStream ostream =
  -new BufferedOutputStream(new FileOutputStream(localWar), 1024);
  -byte buffer[] = new byte[1024];
  -while (true) {
  -int n = istream.read(buffer);
  -if (n  0) {
  -break;
  -}
  -ostream.write(buffer, 0, n);
  -}
  -ostream.flush();
  -ostream.close();
  -istream.close();
  +uploadWar(request, localWar);
   } catch (IOException e) {
   log(managerServlet.upload[ + displayPath + ], e);
   writer.println(sm.getString(managerServlet.exception,
   e.toString()));
  -localWar.delete();
   return;
   }
   
  -// Deploy the local WAR file
  +// Extract the nested context deployment file (if any)
  +File localXml = new File(deployed, basename + .xml);
  +if (debug = 2) {
  +log(Extracting XML file to  + localXml);
  +}
   try {
  -deployer.install(path,
  - new URL

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup HostConfig.java

2002-05-03 Thread craigmcc

craigmcc02/05/03 16:19:37

  Modified:catalina/src/share/org/apache/catalina/mbeans
StandardServerMBean.java
   catalina/src/share/org/apache/catalina/startup
HostConfig.java
  Log:
  Implement saving the server configuration back to conf/server.xml, after
  saving the old version to conf/server.xml.{timestamp} as discussed on
  TOMCAT-DEV.
  
  Optimize the very common cases where the Loader and Manager elements
  contain all default values, and need not be written out (because the startup
  process will install them automatically).
  
  Ignore a spurious application already installed error when auto-deploying
  context configuration files (equivalent to the existing behavior when a
  WAR file or webapp directory is found in webapps, and the corresponding
  context path is already in use.
  
  Revision  ChangesPath
  1.21  +103 -6
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java
  
  Index: StandardServerMBean.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- StandardServerMBean.java  3 May 2002 02:19:23 -   1.20
  +++ StandardServerMBean.java  3 May 2002 23:19:37 -   1.21
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.20 2002/05/03 02:19:23 craigmcc Exp $
  - * $Revision: 1.20 $
  - * $Date: 2002/05/03 02:19:23 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.21 2002/05/03 23:19:37 craigmcc Exp $
  + * $Revision: 1.21 $
  + * $Date: 2002/05/03 23:19:37 $
*
* 
*
  @@ -70,6 +70,7 @@
   import java.io.FileWriter;
   import java.io.IOException;
   import java.io.PrintWriter;
  +import java.sql.Timestamp;
   import java.util.Enumeration;
   import java.util.Hashtable;
   import java.util.Iterator;
  @@ -109,8 +110,10 @@
   import org.apache.catalina.deploy.ContextResourceLink;
   import org.apache.catalina.deploy.ContextEnvironment;
   import org.apache.catalina.deploy.ResourceParams;
  +import org.apache.catalina.loader.WebappLoader;
   import org.apache.catalina.net.ServerSocketFactory;
   import org.apache.catalina.session.PersistentManager;
  +import org.apache.catalina.session.StandardManager;
   import org.apache.commons.beanutils.PropertyUtils;
   import org.apache.commons.modeler.BaseModelMBean;
   
  @@ -120,7 +123,7 @@
* codeorg.apache.catalina.core.StandardServer/code component./p
*
* @author Amy Roh
  - * @version $Revision: 1.20 $ $Date: 2002/05/03 02:19:23 $
  + * @version $Revision: 1.21 $ $Date: 2002/05/03 23:19:37 $
*/
   
   public class StandardServerMBean extends BaseModelMBean {
  @@ -140,9 +143,14 @@
* be persisted because they are automatically calculated.
*/
   private static String exceptions[][] = {
  +{ org.apache.catalina.core.StandardContext, available },
   { org.apache.catalina.core.StandardContext, configured },
  +{ org.apache.catalina.core.StandardContext, distributable },
   { org.apache.catalina.core.StandardContext, name },
  +{ org.apache.catalina.core.StandardContext, override },
   { org.apache.catalina.core.StandardContext, publicId },
  +{ org.apache.catalina.core.StandardContext, replaceWelcomeFiles },
  +{ org.apache.catalina.core.StandardContext, sessionTimeout },
   { org.apache.catalina.core.StandardContext, workDir },
   { org.apache.catalina.session.StandardManager, distributable },
   { org.apache.catalina.session.StandardManager, entropy },
  @@ -241,6 +249,22 @@
   configNew = new File(System.getProperty(catalina.base),
configFile + .new);
   }
  +String ts = (new Timestamp(System.currentTimeMillis())).toString();
  +//-mm-dd hh:mm:ss
  +//0123456789012345678
  +StringBuffer sb = new StringBuffer(.);
  +sb.append(ts.substring(0, 10));
  +sb.append('.');
  +sb.append(ts.substring(11, 13));
  +sb.append('-');
  +sb.append(ts.substring(14, 16));
  +sb.append('-');
  +sb.append(ts.substring(17, 19));
  +File configSave = new File(configFile + sb.toString());
  +if (!configSave.isAbsolute()) {
  +configSave = new File(System.getProperty(catalina.base),
  +  configFile + sb.toString());
  +}
   
   // Open an output writer for the new configuration file
   PrintWriter writer = null;
  @@ -273,7

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup NamingRuleSet.java

2002-05-02 Thread craigmcc

craigmcc02/05/02 15:14:45

  Modified:catalina/src/share/org/apache/catalina/core
StandardEngine.java StandardHost.java
   catalina/src/share/org/apache/catalina/mbeans
StandardServerMBean.java
   catalina/src/share/org/apache/catalina/startup
NamingRuleSet.java
  Log:
  Refactor storing of resource related information (under GlobalJNDIResources
  and Context elements) into a shared common method.
  
  Remaining issues for 100% reproducible configuration:
  
  * StandardDefaultContext needs to be refactored to use a NamingResources
instance underneath (like StandardContext does) in order to save
resource definitions nested inside DefaultContext.
  
  * Need to create o.a.c.deploy.ContextResourceEnvRef and the associated
handling of ResourceEnvRef elements so that such things can be
registered and saved in naming resources.
  
  * Currently, resources that are defined only in web.xml (such as
env-entry settings) are saved to server.xml as well, instead of
only the things that originally came from server.xml.  Generally,
this is benign (because updating values in web.xml will override
the stored values), but we should really only be saving the stuff
that was originally configured here.
  
  Once these items are addressed, changes made via the admin webapp (or other
  dynamic changes, such as applications deployed via the manager webapp) will
  be persisted across Tomcat restarts.
  
  Revision  ChangesPath
  1.15  +12 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardEngine.java
  
  Index: StandardEngine.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- StandardEngine.java   6 Mar 2002 06:49:11 -   1.14
  +++ StandardEngine.java   2 May 2002 22:14:45 -   1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
 1.14 2002/03/06 06:49:11 craigmcc Exp $
  - * $Revision: 1.14 $
  - * $Date: 2002/03/06 06:49:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
 1.15 2002/05/02 22:14:45 craigmcc Exp $
  + * $Revision: 1.15 $
  + * $Date: 2002/05/02 22:14:45 $
*
* 
*
  @@ -86,7 +86,7 @@
* fully qualified host name of that virtual host.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.14 $ $Date: 2002/03/06 06:49:11 $
  + * @version $Revision: 1.15 $ $Date: 2002/05/02 22:14:45 $
*/
   
   public class StandardEngine
  @@ -217,6 +217,14 @@
   support.firePropertyChange(defaultContext,
  oldDefaultContext, this.defaultContext);
   
  +}
  +
  +
  +/**
  + * Retrieve the DefaultContext for new web applications.
  + */
  +public DefaultContext getDefaultContext() {
  +return (this.defaultContext);
   }
   
   
  
  
  
  1.27  +12 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java
  
  Index: StandardHost.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- StandardHost.java 20 Mar 2002 12:29:55 -  1.26
  +++ StandardHost.java 2 May 2002 22:14:45 -   1.27
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
 1.26 2002/03/20 12:29:55 glenn Exp $
  - * $Revision: 1.26 $
  - * $Date: 2002/03/20 12:29:55 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
 1.27 2002/05/02 22:14:45 craigmcc Exp $
  + * $Revision: 1.27 $
  + * $Date: 2002/05/02 22:14:45 $
*
* 
*
  @@ -95,7 +95,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.26 $ $Date: 2002/03/20 12:29:55 $
  + * @version $Revision: 1.27 $ $Date: 2002/05/02 22:14:45 $
*/
   
   public class StandardHost
  @@ -309,6 +309,14 @@
   support.firePropertyChange(defaultContext,
  oldDefaultContext, this.defaultContext);
   
  +}
  +
  +
  +/**
  + * Retrieve the DefaultContext for new web applications.
  + */
  +public DefaultContext getDefaultContext() {
  +return (this.defaultContext);
   }
   
   
  
  
  
  1.17  +319 -183

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup NamingRuleSet.java

2002-05-02 Thread craigmcc

craigmcc02/05/02 16:10:13

  Modified:catalina/src/share/org/apache/catalina/mbeans
StandardServerMBean.java
   catalina/src/share/org/apache/catalina/startup
NamingRuleSet.java
  Log:
  Work around the lack of an o.a.c.deploy.ContextResourceEnvRef for now.
  
  Revision  ChangesPath
  1.18  +29 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java
  
  Index: StandardServerMBean.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- StandardServerMBean.java  2 May 2002 22:14:45 -   1.17
  +++ StandardServerMBean.java  2 May 2002 23:10:13 -   1.18
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.17 2002/05/02 22:14:45 craigmcc Exp $
  - * $Revision: 1.17 $
  - * $Date: 2002/05/02 22:14:45 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.18 2002/05/02 23:10:13 craigmcc Exp $
  + * $Revision: 1.18 $
  + * $Date: 2002/05/02 23:10:13 $
*
* 
*
  @@ -120,7 +120,7 @@
* codeorg.apache.catalina.core.StandardServer/code component./p
*
* @author Amy Roh
  - * @version $Revision: 1.17 $ $Date: 2002/05/02 22:14:45 $
  + * @version $Revision: 1.18 $ $Date: 2002/05/02 23:10:13 $
*/
   
   public class StandardServerMBean extends BaseModelMBean {
  @@ -1188,6 +1188,31 @@
   writer.print(Resource);
   storeAttributes(writer, false, dresources[i]);
   writer.println(/);
  +}
  +
  +// Store nested ResourceEnvRef elements
  +String[] eresources = resources.findResourceEnvRefs();
  +for (int i = 0; i  eresources.length; i++) {
  +for (int j = 0; j  indent; j++) {
  +writer.print(' ');
  +}
  +writer.println(ResourceEnvRef);
  +for (int j = 0; j  indent + 2; j++) {
  +writer.print(' ');
  +}
  +writer.print(name);
  +writer.print(eresources[i]);
  +writer.println(/name);
  +for (int j = 0; j  indent + 2; j++) {
  +writer.print(' ');
  +}
  +writer.print(type);
  +writer.print(resources.findResourceEnvRef(eresources[i]));
  +writer.println(/type);
  +for (int j = 0; j  indent; j++) {
  +writer.print(' ');
  +}
  +writer.println(/ResourceEnvRef);
   }
   
   // Store nested ResourceParams elements
  
  
  
  1.3   +9 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/NamingRuleSet.java
  
  Index: NamingRuleSet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/NamingRuleSet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NamingRuleSet.java2 May 2002 22:14:45 -   1.2
  +++ NamingRuleSet.java2 May 2002 23:10:13 -   1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/NamingRuleSet.java,v
 1.2 2002/05/02 22:14:45 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/05/02 22:14:45 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/NamingRuleSet.java,v
 1.3 2002/05/02 23:10:13 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/05/02 23:10:13 $
*
* 
*
  @@ -82,7 +82,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.2 $ $Date: 2002/05/02 22:14:45 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/02 23:10:13 $
*/
   
   public class NamingRuleSet extends RuleSetBase {
  @@ -168,6 +168,11 @@
   digester.addSetNext(prefix + Resource,
   addResource,
   org.apache.catalina.deploy.ContextResource);
  +
  +digester.addCallMethod(prefix + ResourceEnvRef,
  +   addResourceEnvRef, 2);
  +digester.addCallParam(prefix + ResourceEnvRef/name, 0);
  +digester.addCallParam(prefix + ResourceEnvRef/type, 1);
   
   digester.addObjectCreate(prefix + ResourceParams,
org.apache.catalina.deploy.ResourceParams);
  
  
  

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

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

2002-05-02 Thread craigmcc

craigmcc02/05/02 16:21:02

  Modified:catalina/src/share/org/apache/catalina/mbeans
StandardServerMBean.java
  Log:
  Flag the missing saves of resources defined under DefaultContext with a
  FIXME note.
  
  Revision  ChangesPath
  1.19  +12 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java
  
  Index: StandardServerMBean.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- StandardServerMBean.java  2 May 2002 23:10:13 -   1.18
  +++ StandardServerMBean.java  2 May 2002 23:21:02 -   1.19
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.18 2002/05/02 23:10:13 craigmcc Exp $
  - * $Revision: 1.18 $
  - * $Date: 2002/05/02 23:10:13 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.19 2002/05/02 23:21:02 craigmcc Exp $
  + * $Revision: 1.19 $
  + * $Date: 2002/05/02 23:21:02 $
*
* 
*
  @@ -120,7 +120,7 @@
* codeorg.apache.catalina.core.StandardServer/code component./p
*
* @author Amy Roh
  - * @version $Revision: 1.18 $ $Date: 2002/05/02 23:10:13 $
  + * @version $Revision: 1.19 $ $Date: 2002/05/02 23:21:02 $
*/
   
   public class StandardServerMBean extends BaseModelMBean {
  @@ -778,6 +778,14 @@
   writer.print(wListeners[i]);
   writer.println(/WrapperListener);
   }
  +
  +// Store nested naming resources elements
  +/* FIXME - DefaultContext does not have a getNamingResources() method
  +NamingResources nresources = dcontext.getNamingResources();
  +if (nresources != null) {
  +storeNamingResources(writer, indent + 2, nresources);
  +}
  +*/
   
   // Store the ending of this element
   for (int i = 0; i  indent; i++) {
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy ContextEjb.java ContextEnvironment.java ContextLocalEjb.java ContextResource.java ContextResourceLink.java NamingResources.java ResourceParams.java

2002-05-02 Thread craigmcc

craigmcc02/05/02 17:13:02

  Modified:catalina/src/share/org/apache/catalina/deploy
ContextEjb.java ContextEnvironment.java
ContextLocalEjb.java ContextResource.java
ContextResourceLink.java NamingResources.java
ResourceParams.java
  Log:
  Add listener registration support to NamingResources, so that we'll be able
  to dynamically create and remove MBeans for global JNDI resources defined
  via the admin tool (or any other dynamic mechanism) while Tomcat is running.
  
  Add cross reference links from each of the resource definition objects so
  that they can find the NamingResources collection with which they are
  associated.  At present, this is only needed to get from a
  ContextResource to the corresponding ResourceParams (and vice versa), but
  it's better to do things consistently across all types.
  
  Revision  ChangesPath
  1.6   +21 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/ContextEjb.java
  
  Index: ContextEjb.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/ContextEjb.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ContextEjb.java   22 Jul 2001 20:25:10 -  1.5
  +++ ContextEjb.java   3 May 2002 00:13:01 -   1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/ContextEjb.java,v
 1.5 2001/07/22 20:25:10 pier Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/07/22 20:25:10 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/ContextEjb.java,v
 1.6 2002/05/03 00:13:01 craigmcc Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/05/03 00:13:01 $
*
* 
*
  @@ -71,7 +71,7 @@
* deployment descriptor.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2001/07/22 20:25:10 $
  + * @version $Revision: 1.6 $ $Date: 2002/05/03 00:13:01 $
*/
   
   public final class ContextEjb {
  @@ -198,6 +198,23 @@
   sb.append(]);
   return (sb.toString());
   
  +}
  +
  +
  +//  Package Methods
  +
  +
  +/**
  + * The NamingResources with which we are associated (if any).
  + */
  +protected NamingResources resources = null;
  +
  +public NamingResources getNamingResource() {
  +return (this.resources);
  +}
  +
  +void setNamingResources(NamingResources resources) {
  +this.resources = resources;
   }
   
   
  
  
  
  1.6   +21 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/ContextEnvironment.java
  
  Index: ContextEnvironment.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/ContextEnvironment.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ContextEnvironment.java   9 Sep 2001 00:48:11 -   1.5
  +++ ContextEnvironment.java   3 May 2002 00:13:01 -   1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/ContextEnvironment.java,v
 1.5 2001/09/09 00:48:11 craigmcc Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/09/09 00:48:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/ContextEnvironment.java,v
 1.6 2002/05/03 00:13:01 craigmcc Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/05/03 00:13:01 $
*
* 
*
  @@ -70,7 +70,7 @@
* an codelt;env-entrygt;/code element in the deployment descriptor.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2001/09/09 00:48:11 $
  + * @version $Revision: 1.6 $ $Date: 2002/05/03 00:13:01 $
*/
   
   public final class ContextEnvironment {
  @@ -177,6 +177,23 @@
   sb.append(]);
   return (sb.toString());
   
  +}
  +
  +
  +//  Package Methods
  +
  +
  +/**
  + * The NamingResources with which we are associated (if any).
  + */
  +protected NamingResources resources = null;
  +
  +public NamingResources getNamingResource() {
  +return (this.resources);
  +}
  +
  +void setNamingResources(NamingResources resources) {
  +this.resources = resources;
   }
   
   
  
  
  
  1.3   +21 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/deploy/ContextLocalEjb.java
  
  Index: ContextLocalEjb.java
  ===
  RCS file: 
/home/cvs

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

2002-05-02 Thread craigmcc

craigmcc02/05/02 19:19:23

  Modified:catalina/src/share/org/apache/catalina/core
StandardServer.java
   catalina/src/share/org/apache/catalina/mbeans
ServerLifecycleListener.java
StandardServerMBean.java
  Log:
  Plug in the infrastructure for creating and destroying MBeans for the
  global NamingResources instance (that corresponds to the
  GlobalNamingResources section of server.xml), in preparation for the
  admin tool supporting the dynamic creation, editing, and removal of
  global JNDI resource configurations (and the associated resources themselves).
  
  TODOs for the rest of this support:
  
  * Update MBeanUtils to include the MBean-related methods for
NamingResources, ContextEnvironment, and ContextResource objects.
  
  * Uncomment the corresponding MBeanUtils.createMBean() and
MBeanUtils.destroyMBean() calls in ServerLifecycleListener.
  
  * Write MBeans for NamingResources et al that do the required
manipulations to NamingResources (and add/remove resources in the
corresponding javax.naming.directory.DirContext).
  
  Revision  ChangesPath
  1.23  +9 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java
  
  Index: StandardServer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- StandardServer.java   6 Mar 2002 06:49:11 -   1.22
  +++ StandardServer.java   3 May 2002 02:19:23 -   1.23
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v
 1.22 2002/03/06 06:49:11 craigmcc Exp $
  - * $Revision: 1.22 $
  - * $Date: 2002/03/06 06:49:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardServer.java,v
 1.23 2002/05/03 02:19:23 craigmcc Exp $
  + * $Revision: 1.23 $
  + * $Date: 2002/05/03 02:19:23 $
*
* 
*
  @@ -93,7 +93,7 @@
* (but not required) when deploying and starting Catalina.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.22 $ $Date: 2002/03/06 06:49:11 $
  + * @version $Revision: 1.23 $ $Date: 2002/05/03 02:19:23 $
*/
   
   public final class StandardServer
  @@ -277,7 +277,12 @@
   public void setGlobalNamingResources
   (NamingResources globalNamingResources) {
   
  +NamingResources oldGlobalNamingResources =
  +this.globalNamingResources;
   this.globalNamingResources = globalNamingResources;
  +support.firePropertyChange(globalNamingResources,
  +   oldGlobalNamingResources,
  +   this.globalNamingResources);
   
   }
   
  
  
  
  1.24  +388 -99   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java
  
  Index: ServerLifecycleListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ServerLifecycleListener.java  18 Apr 2002 00:13:07 -  1.23
  +++ ServerLifecycleListener.java  3 May 2002 02:19:23 -   1.24
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v
 1.23 2002/04/18 00:13:07 amyroh Exp $
  - * $Revision: 1.23 $
  - * $Date: 2002/04/18 00:13:07 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v
 1.24 2002/05/03 02:19:23 craigmcc Exp $
  + * $Revision: 1.24 $
  + * $Date: 2002/05/03 02:19:23 $
*
* 
*
  @@ -98,6 +98,10 @@
   import org.apache.catalina.core.StandardHost;
   import org.apache.catalina.core.StandardServer;
   import org.apache.catalina.core.StandardService;
  +import org.apache.catalina.deploy.ContextEnvironment;
  +import org.apache.catalina.deploy.ContextResource;
  +import org.apache.catalina.deploy.NamingResources;
  +import org.apache.catalina.deploy.ResourceParams;
   
   
   /**
  @@ -107,7 +111,7 @@
*
* @author Craig R. McClanahan
* @author Amy Roh
  - * @version $Revision: 1.23 $ $Date: 2002/04/18 00:13:07 $
  + * @version $Revision: 1.24 $ $Date: 2002/05/03 02:19:23 $
*/
   
   public class ServerLifecycleListener
  @@ -176,12 +180,20 @@
   
   Lifecycle lifecycle = event.getLifecycle();
   if (Lifecycle.START_EVENT.equals(event.getType

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

2002-04-26 Thread craigmcc

craigmcc02/04/26 10:40:50

  Modified:catalina/src/share/org/apache/catalina/mbeans
StandardServerMBean.java mbeans-descriptors.xml
  Log:
  Enable saving of most of the simple-to-access configuration elements.
  There are FIXMEs to mark the remaining ones.
  
  Revision  ChangesPath
  1.9   +407 -14   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java
  
  Index: StandardServerMBean.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StandardServerMBean.java  26 Apr 2002 02:27:33 -  1.8
  +++ StandardServerMBean.java  26 Apr 2002 17:40:50 -  1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.8 2002/04/26 02:27:33 craigmcc Exp $
  - * $Revision: 1.8 $
  - * $Date: 2002/04/26 02:27:33 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.9 2002/04/26 17:40:50 craigmcc Exp $
  + * $Revision: 1.9 $
  + * $Date: 2002/04/26 17:40:50 $
*
* 
*
  @@ -68,6 +68,7 @@
   import java.io.FileWriter;
   import java.io.IOException;
   import java.io.PrintWriter;
  +import java.util.Iterator;
   import javax.management.InstanceNotFoundException;
   import javax.management.MBeanAttributeInfo;
   import javax.management.MBeanException;
  @@ -85,7 +86,7 @@
* codeorg.apache.catalina.core.StandardServer/code component./p
*
* @author Amy Roh
  - * @version $Revision: 1.8 $ $Date: 2002/04/26 02:27:33 $
  + * @version $Revision: 1.9 $ $Date: 2002/04/26 17:40:50 $
*/
   
   public class StandardServerMBean extends BaseModelMBean {
  @@ -258,14 +259,17 @@
   if (managedResource.equals(aname)) {
   continue; // KLUDGE - these should be removed
   }
  -if (!ainfo[i].isReadable() || !ainfo[i].isWritable()) {
  -continue; // We cannot configure this attribute
  +if (!ainfo[i].isReadable()) {
  +continue; // We cannot read the current value
  +}
  +if (!className.equals(aname)  !ainfo[i].isWritable()) {
  +continue; // We will not be able to configure this attribute
   }
   
   // Acquire the value of this attribute
   Object value = mserver.getAttribute(oname, aname);
   if (value == null) {
  -value = ;
  +continue; // No need to explicitly record this
   }
   if (!(value instanceof String)) {
   value = value.toString();
  @@ -285,6 +289,358 @@
   
   
   /**
  + * Store the specified Connector properties.
  + *
  + * @param writer PrintWriter to which we are storing
  + * @param indent Number of spaces to indent this element
  + * @param oname ObjectName of the MBean for the object we are storing
  + *
  + * @exception Exception if an exception occurs while storing
  + */
  +private void storeConnector(PrintWriter writer, int indent,
  +ObjectName oname) throws Exception {
  +
  +// Store the beginning of this element
  +for (int i = 0; i  indent; i++) {
  +writer.print(' ');
  +}
  +writer.print(Connector);
  +storeAttributes(writer, oname);
  +writer.println();
  +
  +// Store nested Listener elements
  +; // FIXME
  +
  +// Store nested Factory element
  +; // FIXME
  +
  +// Store the ending of this element
  +for (int i = 0; i  indent; i++) {
  +writer.print(' ');
  +}
  +writer.println(/Connector);
  +
  +}
  +
  +
  +/**
  + * Store the specified Context properties.
  + *
  + * @param writer PrintWriter to which we are storing
  + * @param indent Number of spaces to indent this element
  + * @param oname ObjectName of the MBean for the object we are storing
  + *
  + * @exception Exception if an exception occurs while storing
  + */
  +private void storeContext(PrintWriter writer, int indent,
  +  ObjectName oname) throws Exception {
  +
  +// Store the beginning of this element
  +for (int i = 0; i  indent; i++) {
  +writer.print(' ');
  +}
  +writer.print(Context);
  +storeAttributes(writer, oname);
  +writer.println();
  +
  +// Store nested InstanceListener elements
  +; // FIXME
  +
  +// Store nested Listener elements
  +; // FIXME

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger FileLogger.java SystemErrLogger.java SystemOutLogger.java

2002-04-26 Thread craigmcc

craigmcc02/04/26 14:09:06

  Modified:catalina/src/share/org/apache/catalina/logger
FileLogger.java SystemErrLogger.java
SystemOutLogger.java
  Log:
  Make the standard logger classes non-final so that they can be subclassed.
  
  PR: Bugzilla #7984.
  Submitted by: Jeff Larsen larsen at qec.com
  
  Revision  ChangesPath
  1.7   +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/FileLogger.java
  
  Index: FileLogger.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/FileLogger.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FileLogger.java   20 Feb 2002 15:58:03 -  1.6
  +++ FileLogger.java   26 Apr 2002 21:09:06 -  1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/FileLogger.java,v
 1.6 2002/02/20 15:58:03 seguin Exp $
  - * $Revision: 1.6 $
  - * $Date: 2002/02/20 15:58:03 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/FileLogger.java,v
 1.7 2002/04/26 21:09:06 craigmcc Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/04/26 21:09:06 $
*
* 
*
  @@ -84,10 +84,10 @@
* optional preceding timestamp.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2002/02/20 15:58:03 $
  + * @version $Revision: 1.7 $ $Date: 2002/04/26 21:09:06 $
*/
   
  -public final class FileLogger
  +public class FileLogger
   extends LoggerBase
   implements Lifecycle {
   
  
  
  
  1.3   +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/SystemErrLogger.java
  
  Index: SystemErrLogger.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/SystemErrLogger.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SystemErrLogger.java  22 Jul 2001 20:25:11 -  1.2
  +++ SystemErrLogger.java  26 Apr 2002 21:09:06 -  1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/SystemErrLogger.java,v
 1.2 2001/07/22 20:25:11 pier Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/07/22 20:25:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/SystemErrLogger.java,v
 1.3 2002/04/26 21:09:06 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/04/26 21:09:06 $
*
* 
*
  @@ -69,10 +69,10 @@
* Simple implementation of bLogger/b that writes to System.err.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/07/22 20:25:11 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/26 21:09:06 $
*/
   
  -public final class SystemErrLogger
  +public class SystemErrLogger
   extends LoggerBase {
   
   
  
  
  
  1.3   +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/SystemOutLogger.java
  
  Index: SystemOutLogger.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/SystemOutLogger.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SystemOutLogger.java  22 Jul 2001 20:25:11 -  1.2
  +++ SystemOutLogger.java  26 Apr 2002 21:09:06 -  1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/SystemOutLogger.java,v
 1.2 2001/07/22 20:25:11 pier Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/07/22 20:25:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/SystemOutLogger.java,v
 1.3 2002/04/26 21:09:06 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/04/26 21:09:06 $
*
* 
*
  @@ -71,10 +71,10 @@
* Therefore, Lifecycle is not implemented.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/07/22 20:25:11 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/26 21:09:06 $
*/
   
  -public final class SystemOutLogger
  +public class SystemOutLogger
   extends LoggerBase {
   
   
  
  
  

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




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

2002-04-26 Thread craigmcc

craigmcc02/04/26 22:09:03

  Modified:catalina/src/share/org/apache/catalina/mbeans
StandardServerMBean.java mbeans-descriptors.xml
  Log:
  Switch to using the Catalina component tree directly for all persistence
  operations -- since we will need this for components that are not reflected
  as MBeans directly anyway, it's better to be consistent.
  
  This still leaves a few FIXMEs, but for the most part a running Catalina
  configuration is faithfully recorded into a conf/server.xml.new file that
  would (if renamed) reproduce the same configuration after a restart.
  
  Revision  ChangesPath
  1.10  +532 -210  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java
  
  Index: StandardServerMBean.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StandardServerMBean.java  26 Apr 2002 17:40:50 -  1.9
  +++ StandardServerMBean.java  27 Apr 2002 05:09:03 -  1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.9 2002/04/26 17:40:50 craigmcc Exp $
  - * $Revision: 1.9 $
  - * $Date: 2002/04/26 17:40:50 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.10 2002/04/27 05:09:03 craigmcc Exp $
  + * $Revision: 1.10 $
  + * $Date: 2002/04/27 05:09:03 $
*
* 
*
  @@ -64,6 +64,8 @@
   package org.apache.catalina.mbeans;
   
   
  +import java.beans.IndexedPropertyDescriptor;
  +import java.beans.PropertyDescriptor;
   import java.io.File;
   import java.io.FileWriter;
   import java.io.IOException;
  @@ -76,8 +78,25 @@
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
   import javax.management.RuntimeOperationsException;
  +import org.apache.catalina.Connector;
  +import org.apache.catalina.Container;
  +import org.apache.catalina.Context;
  +import org.apache.catalina.Engine;
  +import org.apache.catalina.Host;
  +import org.apache.catalina.Lifecycle;
  +import org.apache.catalina.LifecycleListener;
  +import org.apache.catalina.Loader;
  +import org.apache.catalina.Logger;
  +import org.apache.catalina.Manager;
  +import org.apache.catalina.Pipeline;
  +import org.apache.catalina.Realm;
   import org.apache.catalina.Server;
  -import org.apache.catalina.core.StandardServer;
  +import org.apache.catalina.ServerFactory;
  +import org.apache.catalina.Service;
  +import org.apache.catalina.Store;
  +import org.apache.catalina.Valve;
  +import org.apache.catalina.net.ServerSocketFactory;
  +import org.apache.commons.beanutils.PropertyUtils;
   import org.apache.commons.modeler.BaseModelMBean;
   
   
  @@ -86,17 +105,74 @@
* codeorg.apache.catalina.core.StandardServer/code component./p
*
* @author Amy Roh
  - * @version $Revision: 1.9 $ $Date: 2002/04/26 17:40:50 $
  + * @version $Revision: 1.10 $ $Date: 2002/04/27 05:09:03 $
*/
   
   public class StandardServerMBean extends BaseModelMBean {
   
  +
  +// --- Static Variables
  +
  +
   /**
* The codeMBeanServer/code for this application.
*/
   private static MBeanServer mserver = MBeanUtils.createServer();
   
   
  +/**
  + * The set of class/property combinations that should strongNOT/strong
  + * be persisted because they are automatically calculated.
  + */
  +private static String exceptions[][] = {
  +{ org.apache.catalina.core.StandardContext, configured },
  +{ org.apache.catalina.core.StandardContext, publicId },
  +{ org.apache.catalina.core.StandardContext, workDir },
  +{ org.apache.catalina.session.StandardManager, distributable },
  +{ org.apache.catalina.session.StandardManager, entropy },
  +};
  +
  +
  +/**
  + * The set of classes that represent persistable properties.
  + */
  +private static Class persistables[] = {
  +String.class,
  +Integer.class, Integer.TYPE,
  +Boolean.class, Boolean.TYPE,
  +Byte.class, Byte.TYPE,
  +Character.class, Character.TYPE,
  +Double.class, Double.TYPE,
  +Float.class, Float.TYPE,
  +Long.class, Long.TYPE,
  +Short.class, Short.TYPE,
  +};
  +
  +
  +/**
  + * The set of class names that should be skipped when persisting state,
  + * because the corresponding listeners, valves, etc. are configured
  + * automatically at startup time.
  + */
  +private static String skippables[] = {
  +org.apache.catalina.authenticator.BasicAuthenticator

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

2002-04-25 Thread craigmcc

craigmcc02/04/25 19:27:33

  Modified:catalina/src/share/org/apache/catalina/mbeans
StandardServerMBean.java mbeans-descriptors.xml
  Log:
  Add the beginnings of the ability to save the current Tomcat configuration
  to conf/server.xml.
  
  Revision  ChangesPath
  1.8   +237 -6
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java
  
  Index: StandardServerMBean.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StandardServerMBean.java  8 Mar 2002 00:42:14 -   1.7
  +++ StandardServerMBean.java  26 Apr 2002 02:27:33 -  1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.7 2002/03/08 00:42:14 amyroh Exp $
  - * $Revision: 1.7 $
  - * $Date: 2002/03/08 00:42:14 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
 1.8 2002/04/26 02:27:33 craigmcc Exp $
  + * $Revision: 1.8 $
  + * $Date: 2002/04/26 02:27:33 $
*
* 
*
  @@ -64,14 +64,19 @@
   package org.apache.catalina.mbeans;
   
   
  +import java.io.File;
  +import java.io.FileWriter;
  +import java.io.IOException;
  +import java.io.PrintWriter;
  +import javax.management.InstanceNotFoundException;
  +import javax.management.MBeanAttributeInfo;
   import javax.management.MBeanException;
  +import javax.management.MBeanInfo;
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
   import javax.management.RuntimeOperationsException;
   import org.apache.catalina.Server;
  -import org.apache.catalina.Service;
   import org.apache.catalina.core.StandardServer;
  -import org.apache.catalina.core.StandardService;
   import org.apache.commons.modeler.BaseModelMBean;
   
   
  @@ -80,7 +85,7 @@
* codeorg.apache.catalina.core.StandardServer/code component./p
*
* @author Amy Roh
  - * @version $Revision: 1.7 $ $Date: 2002/03/08 00:42:14 $
  + * @version $Revision: 1.8 $ $Date: 2002/04/26 02:27:33 $
*/
   
   public class StandardServerMBean extends BaseModelMBean {
  @@ -114,10 +119,236 @@
   // - Attributes
   
   
  +/**
  + * Set the value of a specific attribute of this MBean.
  + *
  + * @param attribute The identification of the attribute to be set
  + *  and the new value
  + *
  + * @exception AttributeNotFoundException if this attribute is not
  + *  supported by this MBean
  + * @exception MBeanException if the initializer of an object
  + *  throws an exception
  + * @exception ReflectionException if a Java reflection exception
  + *  occurs when invoking the getter
  + */
  +public void setAttribute(javax.management.Attribute attribute)
  +throws javax.management.AttributeNotFoundException,
  +   MBeanException,
  +   javax.management.ReflectionException {
  +
  +// KLUDGE - This is only here to force calling store()
  +// until the admin webapp calls it directly
  +super.setAttribute(attribute);
  +try {
  +store();
  +} catch (InstanceNotFoundException e) {
  +throw new MBeanException(e);
  +}
  +
  +}
   
   
   // - Operations
   
  +
  +/**
  + * Write the configuration information for this entire codeServer/code
  + * out to the server.xml configuration file.
  + *
  + * @exception InstanceNotFoundException if the managed resource object
  + *  cannot be found
  + * @exception MBeanException if the initializer of the object throws
  + *  an exception, or persistence is not supported
  + * @exception RuntimeOperationsException if an exception is reported
  + *  by the persistence mechanism
  + */
  +public synchronized void store() throws InstanceNotFoundException,
  +MBeanException, RuntimeOperationsException {
  +
  +// Calculate file objects for the old and new configuration files.
  +String configFile = conf/server.xml; // FIXME - configurable?
  +File configOld = new File(configFile);
  +if (!configOld.isAbsolute()) {
  +configOld = new File(System.getProperty(catalina.base),
  + configFile);
  +}
  +File configNew = new File(configFile + .new);
  +if (!configNew.isAbsolute()) {
  +configNew = new File(System.getProperty(catalina.base),
  + configFile + .new

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets SnoopAllServlet.java

2002-04-23 Thread craigmcc

craigmcc02/04/23 09:16:50

  Removed: catalina/src/share/org/apache/catalina/servlets
SnoopAllServlet.java
  Log:
  Remove one more useful debugging tool that can be misused ...

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Catalina.java ContextConfig.java

2002-04-22 Thread craigmcc

craigmcc02/04/22 12:04:01

  Modified:catalina/src/share/org/apache/catalina/startup Catalina.java
ContextConfig.java
  Log:
  When parsing server.xml and web.xml files, use an InputSource rather than an
  InputStream so that we can set a system identifier.  Among other things, this
  allows developers to split up their input files with the use of external
  entities like this:
  
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
[
!ENTITY webinc PUBLIC webinc webinc.xml
]

web-app
  webinc;
/web-app
  
  Tested this with web.xml files in both unpacked directories and a packaged
  WAR file, and it seems to work.
  
  NOTE:  This patch doesn't address trying to parse tag library descriptors
  that have external entities included in them.  The same approach would probably
  work, but will require a couple of API changes to some private methods in
  o.a.c.ContextConfig and the corresponding code in Jasper.
  
  Based on a patch provided by Attila Szegedi szegedia at freemail.hu for
  Bugzilla #8024.
  
  Revision  ChangesPath
  1.47  +18 -6 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java
  
  Index: Catalina.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- Catalina.java 15 Apr 2002 09:34:06 -  1.46
  +++ Catalina.java 22 Apr 2002 19:04:01 -  1.47
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.46 2002/04/15 09:34:06 remm Exp $
  - * $Revision: 1.46 $
  - * $Date: 2002/04/15 09:34:06 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.47 2002/04/22 19:04:01 craigmcc Exp $
  + * $Revision: 1.47 $
  + * $Date: 2002/04/22 19:04:01 $
*
* 
*
  @@ -66,6 +66,7 @@
   
   
   import java.io.File;
  +import java.io.FileInputStream;
   import java.io.IOException;
   import java.io.OutputStream;
   import java.lang.reflect.InvocationTargetException;
  @@ -82,6 +83,7 @@
   import org.apache.commons.digester.Digester;
   import org.apache.commons.digester.Rule;
   import org.xml.sax.Attributes;
  +import org.xml.sax.InputSource;
   
   
   /**
  @@ -97,7 +99,7 @@
* /u
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.46 $ $Date: 2002/04/15 09:34:06 $
  + * @version $Revision: 1.47 $ $Date: 2002/04/22 19:04:01 $
*/
   
   public class Catalina {
  @@ -438,8 +440,13 @@
   Digester digester = createStartDigester();
   File file = configFile();
   try {
  +InputSource is =
  +new InputSource(file:// + file.getAbsolutePath());
  +FileInputStream fis = new FileInputStream(file);
  +is.setByteStream(fis);
   digester.push(this);
  -digester.parse(file);
  +digester.parse(is);
  +fis.close();
   } catch (Exception e) {
   System.out.println(Catalina.start:  + e);
   e.printStackTrace(System.out);
  @@ -548,8 +555,13 @@
   Digester digester = createStopDigester();
   File file = configFile();
   try {
  +InputSource is =
  +new InputSource(file:// + file.getAbsolutePath());
  +FileInputStream fis = new FileInputStream(file);
  +is.setByteStream(fis);
   digester.push(this);
  -digester.parse(file);
  +digester.parse(is);
  +fis.close();
   } catch (Exception e) {
   System.out.println(Catalina.stop:  + e);
   e.printStackTrace(System.out);
  
  
  
  1.62  +23 -8 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- ContextConfig.java4 Apr 2002 20:30:34 -   1.61
  +++ ContextConfig.java22 Apr 2002 19:04:01 -  1.62
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.61 2002/04/04 20:30:34 craigmcc Exp $
  - * $Revision: 1.61 $
  - * $Date: 2002/04/04 20:30:34 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup

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

2002-04-09 Thread craigmcc

craigmcc02/04/09 16:48:21

  Modified:catalina/src/share/org/apache/catalina Deployer.java
   catalina/src/share/org/apache/catalina/core
StandardHostDeployer.java
  Log:
  When using the Manager webapp to deploy, add a container event *after* the
  new context has been created, but *before* it is started.  This lets you
  customize configuration properties in the same way that you can when using
  the Embedded interface, in between the Embedded.createContext() and
  host.addChild() method calls.
  
  Revision  ChangesPath
  1.6   +13 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java
  
  Index: Deployer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Deployer.java 25 Oct 2001 00:23:02 -  1.5
  +++ Deployer.java 9 Apr 2002 23:48:21 -   1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java,v 
1.5 2001/10/25 00:23:02 craigmcc Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/10/25 00:23:02 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java,v 
1.6 2002/04/09 23:48:21 craigmcc Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/04/09 23:48:21 $
*
* 
*
  @@ -76,7 +76,7 @@
* for each web application will be the context path to which it is attached.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2001/10/25 00:23:02 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/09 23:48:21 $
*/
   
   /* public interface Deployer extends Container { */
  @@ -88,7 +88,15 @@
   
   /**
* The ContainerEvent event type sent when a new application is
  - * installed by codeinstall()/code.
  + * being installed by codeinstall()/code, before it has been
  + * started.
  + */
  +public static final String PRE_INSTALL_EVENT = pre-install;
  +
  +
  +/**
  + * The ContainerEvent event type sent when a new application is
  + * installed by codeinstall()/code, after it has been started.
*/
   public static final String INSTALL_EVENT = install;
   
  
  
  
  1.9   +17 -10
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java
  
  Index: StandardHostDeployer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StandardHostDeployer.java 20 Mar 2002 12:29:55 -  1.8
  +++ StandardHostDeployer.java 9 Apr 2002 23:48:21 -   1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
 1.8 2002/03/20 12:29:55 glenn Exp $
  - * $Revision: 1.8 $
  - * $Date: 2002/03/20 12:29:55 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
 1.9 2002/04/09 23:48:21 craigmcc Exp $
  + * $Revision: 1.9 $
  + * $Date: 2002/04/09 23:48:21 $
*
* 
*
  @@ -91,7 +91,7 @@
* codeStandardHost/code implementation class./p
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.8 $ $Date: 2002/03/20 12:29:55 $
  + * @version $Revision: 1.9 $ $Date: 2002/04/09 23:48:21 $
*/
   
   public class StandardHostDeployer implements Deployer {
  @@ -189,8 +189,11 @@
* start with a slash.
* p
* If this application is successfully installed, a ContainerEvent of type
  - * codeINSTALL_EVENT/code will be sent to all registered listeners,
  - * with the newly created codeContext/code as an argument.
  + * codePRE_INSTALL_EVENT/code will be sent to registered listeners
  + * before the associated Context is started, and a ContainerEvent of type
  + * codeINSTALL_EVENT/code will be sent to all registered listeners
  + * after the associated Context is started, with the newly created
  + * codeContext/code as an argument.
*
* @param contextPath The context path to which this application should
*  be installed (must be unique)
  @@ -250,6 +253,7 @@
   (LifecycleListener) clazz.newInstance();
   ((Lifecycle) context).addLifecycleListener(listener);
   }
  +host.fireContainerEvent(PRE_INSTALL_EVENT, context);
   host.addChild(context);
   host.fireContainerEvent(INSTALL_EVENT, context);
   } catch (Exception e

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

2002-04-08 Thread craigmcc

craigmcc02/04/08 10:46:08

  Modified:catalina/src/share/org/apache/catalina/servlets
LocalStrings.properties ManagerServlet.java
   webapps/manager manager.xml
   webapps/manager/WEB-INF web.xml
  Log:
  Implement a lookup mechanism to enumerate the security roles (and corresponding
  descriptions) defined in the user database.  This will be useful, for example,
  in deployment tools that wish to create security-role-ref elements in the
  web.xml file that link role names used in the web application to those that are
  actually defined in the container.
  
  Revision  ChangesPath
  1.15  +3 -0  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- LocalStrings.properties   12 Mar 2002 21:14:15 -  1.14
  +++ LocalStrings.properties   8 Apr 2002 17:46:08 -   1.15
  @@ -34,6 +34,7 @@
   managerServlet.removed=OK - Removed application at context path {0}
   managerServlet.resourcesAll=OK - Listed global resources of all types
   managerServlet.resourcesType=OK - Listed global resources of type {0}
  +managerServlet.rolesList=OK - Listed security roles
   managerServlet.sessiondefaultmax=Default maximum session inactive interval {0} 
minutes
   managerServlet.sessiontimeout={0} minutes:{1} sessions
   managerServlet.sessions=OK - Session information for application at context path {0}
  @@ -42,6 +43,8 @@
   managerServlet.stopped=OK - Stopped application at context path {0}
   managerServlet.undeployed=OK - Undeployed application at context path {0}
   managerServlet.unknownCommand=FAIL - Unknown command {0}
  +managerServlet.userDatabaseError=FAIL - Cannot resolve user database reference
  +managerServlet.userDatabaseMissing=FAIL - No user database is available
   webdavservlet.jaxpfailed=JAXP initialization failed
   directory.filename=Filename
   directory.lastModified=Last Modified
  
  
  
  1.19  +63 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java
  
  Index: ManagerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ManagerServlet.java   13 Mar 2002 01:26:49 -  1.18
  +++ ManagerServlet.java   8 Apr 2002 17:46:08 -   1.19
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.18 2002/03/13 01:26:49 craigmcc Exp $
  - * $Revision: 1.18 $
  - * $Date: 2002/03/13 01:26:49 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.19 2002/04/08 17:46:08 craigmcc Exp $
  + * $Revision: 1.19 $
  + * $Date: 2002/04/08 17:46:08 $
*
* 
*
  @@ -73,8 +73,11 @@
   import java.io.PrintWriter;
   import java.net.URL;
   import java.util.Enumeration;
  +import java.util.Iterator;
  +import javax.naming.InitialContext;
   import javax.naming.NameClassPair;
   import javax.naming.NamingEnumeration;
  +import javax.naming.NamingException;
   import javax.naming.directory.DirContext;
   import javax.servlet.ServletException;
   import javax.servlet.ServletInputStream;
  @@ -88,9 +91,11 @@
   import org.apache.catalina.Deployer;
   import org.apache.catalina.Globals;
   import org.apache.catalina.Host;
  +import org.apache.catalina.Role;
   import org.apache.catalina.Server;
   import org.apache.catalina.ServerFactory;
   import org.apache.catalina.Session;
  +import org.apache.catalina.UserDatabase;
   import org.apache.catalina.Wrapper;
   import org.apache.catalina.core.StandardServer;
   import org.apache.catalina.util.StringManager;
  @@ -137,6 +142,9 @@
* lib/resources?type=/b - Enumerate the available global JNDI
* resources, optionally limited to those of the specified type
* (fully qualified Java class name), if available./li
  + * lib/roles/b - Enumerate the available security role names and
  + * descriptions from the user database connected to the codeusers/code
  + * resource reference.
* lib/sessions?path=/xxx/b - List session information about the web
* application attached to context path code/xxx/code for this
* virtual host./li
  @@ -188,7 +196,7 @@
* /ul
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.18 $ $Date: 2002/03/13 01:26:49 $
  + * @version $Revision: 1.19 $ $Date: 2002/04/08 17

cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs manager-howto.xml

2002-04-08 Thread craigmcc

craigmcc02/04/08 11:02:07

  Modified:webapps/tomcat-docs manager-howto.xml
  Log:
  Update the Manager HOW-TO docs for the new /roles command.
  
  Revision  ChangesPath
  1.13  +55 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/manager-howto.xml
  
  Index: manager-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/manager-howto.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- manager-howto.xml 14 Mar 2002 22:20:18 -  1.12
  +++ manager-howto.xml 8 Apr 2002 18:02:07 -   1.13
  @@ -39,6 +39,7 @@
   liList the available global JNDI resources, for use in deployment
   tools that are preparing codelt;ResourceLinkgt;/code elements
   nested in a codelt;Contextgt;/code deployment description./li
  +liList the available security roles defined in the user database./li
   liRemove an installed web application./li
   liStart a stopped application (thus making it available again)./li
   liStop an existing application (so that it becomes unavailable), but
  @@ -487,6 +488,60 @@
   
   
   /subsection
  +
  +
  +subsection name=List Available Security Roles
  +
  +source
  +http://localhost:8080/manager/roles
  +/source
  +
  +pList the security role names (and corresponding descriptions) that are
  +available in the codeorg.apache.catalina.UserDatabase/code resource that
  +is linked to the codeusers/code resource reference in the web.xml file
  +for the Manager web application.  This would typically be used, for example,
  +by a deployment tool that wanted to create
  +codelt;security-role-refgt;/code elements to map security role names
  +used in a web application to the role names actually defined within the
  +container./p
  +
  +pBy default, the codeusers/code resource reference is pointed at the
  +global codeUserDatabase/code resource.  If you choose to utilize a
  +different user database per virtual host, you should modify the
  +codelt;ResourceLinkgt;/code element in the default
  +codemanager.xml/code context configuration file to point at the global
  +user database resource for this virtual host./p
  +
  +pWhen this command is executed, the first line of the response will be:/p
  +pre
  +  OK - Listed security roles
  +/pre
  +pfollowed by one line for each security role.  Each line is composed of
  +fields delimited by colon characters (:) as follows:/p
  +ul
  +liemSecurity Role Name/em - A security role name that is known to Tomcat
  +in the user database./li
  +liemDescription/em - Description of this security role (useful in
  +creating user interfaces for selecting roles./li
  +/ul
  +
  +pIf an error occurs, the response will start with codeFAIL/code and
  +include an error message.  Possible causes for problems include:/p
  +ul
  +liemCannot resolve user database reference/em - A JNDI error prevented
  +the successful lookup of the codeorg.apache.catalina.UserDatabase/code
  +resource.  Check the Tomcat log files for a stack trace associated with
  +this error./li
  +liemNo user database is available/em - You have not configured a resource
  +reference for the codeusers/code resource that points at an
  +appropriate user database instance.  Check your codemanager.xml/code
  +file and ensure that you have created an appropriate
  +codelt;ResourceLinkgt;/code or
  +codelt;ResourceParamsgt;/code element for this resource./li
  +/ul
  +
  +/subsection
  +
   
   subsection name=Session Statistics
   
  
  
  

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




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

2002-04-04 Thread craigmcc

craigmcc02/04/04 12:30:34

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

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session FileStore.java

2002-03-18 Thread craigmcc

craigmcc02/03/18 10:56:21

  Modified:catalina/src/share/org/apache/catalina/session
FileStore.java
  Log:
  Refactor FileStore to clean up the code, and to create the storage directory
  if it does not already exist.
  
  PR: Bugzilla #7171
  Submitted by: Peter Rossbach pr at webapp.de
  
  Revision  ChangesPath
  1.7   +99 -80
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java
  
  Index: FileStore.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FileStore.java22 Jul 2001 20:25:12 -  1.6
  +++ FileStore.java18 Mar 2002 18:56:21 -  1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java,v
 1.6 2001/07/22 20:25:12 pier Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/07/22 20:25:12 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java,v
 1.7 2002/03/18 18:56:21 craigmcc Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/03/18 18:56:21 $
*
* 
*
  @@ -77,9 +77,7 @@
   import java.io.ObjectOutputStream;
   import java.io.ObjectStreamClass;
   import java.io.Serializable;
  -import java.util.Enumeration;
  -import java.util.Hashtable;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import javax.servlet.ServletContext;
   import org.apache.catalina.Context;
   import org.apache.catalina.Globals;
  @@ -96,7 +94,7 @@
* saved are still subject to being expired based on inactivity.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2001/07/22 20:25:12 $
  + * @version $Revision: 1.7 $ $Date: 2002/03/18 18:56:21 $
*/
   
   public final class FileStore
  @@ -117,7 +115,8 @@
   
   /**
* The pathname of the directory in which Sessions are stored.
  - * Relative to the temp directory for the web application.
  + * This may be an absolute pathname, or a relative path that is
  + * resolved against the temporary work directory for this application.
*/
   private String directory = .;
   
  @@ -206,15 +205,20 @@
*/
   public int getSize() throws IOException {
   
  -String[] files = getDirectoryFile().list();
  +// Acquire the list of files in our storage directory
  +File file = directory();
  +if (file == null) {
  +return (0);
  +}
  +String files[] = file.list();
   
   // Figure out which files are sessions
   int keycount = 0;
   for (int i = 0; i  files.length; i++) {
  -if (files[i].endsWith(FILE_EXT))
  +if (files[i].endsWith(FILE_EXT)) {
   keycount++;
  +}
   }
  -
   return (keycount);
   
   }
  @@ -222,6 +226,23 @@
   
   // - Public Methods
   
  +
  +/**
  + * Remove all of the Sessions in this Store.
  + *
  + * @exception IOException if an input/output error occurs
  + */
  +public void clear()
  +throws IOException {
  +
  +String[] keys = keys();
  +for (int i = 0; i  keys.length; i++) {
  +remove(keys[i]);
  +}
  +
  +}
  +
  +
   /**
* Return an array containing the session identifiers of all Sessions
* currently saved in this Store.  If there are no such Sessions, a
  @@ -231,30 +252,22 @@
*/
   public String[] keys() throws IOException {
   
  -String[] files = getDirectoryFile().list();
  -
  -// Figure out which files contain sessions
  -int keycount = 0;
  -for (int i = 0; i  files.length; i++) {
  -if (files[i].endsWith(FILE_EXT))
  -keycount++;
  -else
  -files[i] = null;
  +// Acquire the list of files in our storage directory
  +File file = directory();
  +if (file == null) {
  +return (new String[0]);
   }
  +String files[] = file.list();
   
  -// Get keys from relevant filenames.
  -String[] keys = new String[keycount];
  -if (keycount  0) {
  -keycount = 0;
  -for (int i = 0; i  files.length; i++) {
  -if (files[i] != null) {
  -keys[keycount] = files[i].substring (0, 
files[i].lastIndexOf('.'));
  -keycount++;
  -}
  +// Build and return the list of session identifiers
  +ArrayList list = new ArrayList();
  +int n = FILE_EXT.length();
  +for (int i = 0; i  files.length; i

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session FileStore.java

2002-03-18 Thread craigmcc

craigmcc02/03/18 14:24:11

  Modified:catalina/src/share/org/apache/catalina/session Tag:
tomcat_40_branch FileStore.java
  Log:
  Port the FileStore fix for creating the working directory if it is not there
  (and the associated refactoring/cleanup) from the HEAD branch.
  
  PR: Bugzilla #7171
  Submitted by: Peter Rossbach pr at webapp.de
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.6.2.1   +99 -80
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java
  
  Index: FileStore.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- FileStore.java22 Jul 2001 20:25:12 -  1.6
  +++ FileStore.java18 Mar 2002 22:24:11 -  1.6.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java,v
 1.6 2001/07/22 20:25:12 pier Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/07/22 20:25:12 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java,v
 1.6.2.1 2002/03/18 22:24:11 craigmcc Exp $
  + * $Revision: 1.6.2.1 $
  + * $Date: 2002/03/18 22:24:11 $
*
* 
*
  @@ -77,9 +77,7 @@
   import java.io.ObjectOutputStream;
   import java.io.ObjectStreamClass;
   import java.io.Serializable;
  -import java.util.Enumeration;
  -import java.util.Hashtable;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import javax.servlet.ServletContext;
   import org.apache.catalina.Context;
   import org.apache.catalina.Globals;
  @@ -96,7 +94,7 @@
* saved are still subject to being expired based on inactivity.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2001/07/22 20:25:12 $
  + * @version $Revision: 1.6.2.1 $ $Date: 2002/03/18 22:24:11 $
*/
   
   public final class FileStore
  @@ -117,7 +115,8 @@
   
   /**
* The pathname of the directory in which Sessions are stored.
  - * Relative to the temp directory for the web application.
  + * This may be an absolute pathname, or a relative path that is
  + * resolved against the temporary work directory for this application.
*/
   private String directory = .;
   
  @@ -206,15 +205,20 @@
*/
   public int getSize() throws IOException {
   
  -String[] files = getDirectoryFile().list();
  +// Acquire the list of files in our storage directory
  +File file = directory();
  +if (file == null) {
  +return (0);
  +}
  +String files[] = file.list();
   
   // Figure out which files are sessions
   int keycount = 0;
   for (int i = 0; i  files.length; i++) {
  -if (files[i].endsWith(FILE_EXT))
  +if (files[i].endsWith(FILE_EXT)) {
   keycount++;
  +}
   }
  -
   return (keycount);
   
   }
  @@ -222,6 +226,23 @@
   
   // - Public Methods
   
  +
  +/**
  + * Remove all of the Sessions in this Store.
  + *
  + * @exception IOException if an input/output error occurs
  + */
  +public void clear()
  +throws IOException {
  +
  +String[] keys = keys();
  +for (int i = 0; i  keys.length; i++) {
  +remove(keys[i]);
  +}
  +
  +}
  +
  +
   /**
* Return an array containing the session identifiers of all Sessions
* currently saved in this Store.  If there are no such Sessions, a
  @@ -231,30 +252,22 @@
*/
   public String[] keys() throws IOException {
   
  -String[] files = getDirectoryFile().list();
  -
  -// Figure out which files contain sessions
  -int keycount = 0;
  -for (int i = 0; i  files.length; i++) {
  -if (files[i].endsWith(FILE_EXT))
  -keycount++;
  -else
  -files[i] = null;
  +// Acquire the list of files in our storage directory
  +File file = directory();
  +if (file == null) {
  +return (new String[0]);
   }
  +String files[] = file.list();
   
  -// Get keys from relevant filenames.
  -String[] keys = new String[keycount];
  -if (keycount  0) {
  -keycount = 0;
  -for (int i = 0; i  files.length; i++) {
  -if (files[i] != null) {
  -keys[keycount] = files[i].substring (0, 
files[i].lastIndexOf('.'));
  -keycount++;
  -}
  +// Build and return the list

cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config context.xml

2002-03-16 Thread craigmcc

craigmcc02/03/16 12:32:31

  Modified:webapps/tomcat-docs jndi-resources-howto.xml
   webapps/tomcat-docs/config context.xml
  Log:
  Document the configuration properties for the COMMONS-DBCP-based data source
  factory in the HEAD branch.
  
  Revision  ChangesPath
  1.13  +36 -1 jakarta-tomcat-4.0/webapps/tomcat-docs/jndi-resources-howto.xml
  
  Index: jndi-resources-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/jndi-resources-howto.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- jndi-resources-howto.xml  13 Mar 2002 04:13:34 -  1.12
  +++ jndi-resources-howto.xml  16 Mar 2002 20:32:31 -  1.13
  @@ -515,9 +515,17 @@
 lt;valuegt;org.hsql.jdbcDriverlt;/valuegt;
   lt;/parametergt;
   lt;parametergt;
  -  lt;namegt;driverNamelt;/namegt;
  +  lt;namegt;urllt;/namegt;
 lt;valuegt;jdbc:HypersonicSQL:databaselt;/valuegt;
   lt;/parametergt;
  +lt;parametergt;
  +  lt;namegt;maxActivelt;/namegt;
  +  lt;valuegt;8lt;/valuegt;
  +lt;/parametergt;
  +lt;parametergt;
  +  lt;namegt;maxIdlelt;/namegt;
  +  lt;valuegt;4lt;/valuegt;
  +lt;/parametergt;
 lt;/ResourceParamsgt;
 ...
   lt;/Contextgt;
  @@ -530,6 +538,33 @@
   JDBC driver.  Customize the codedriverClassName/code and
   codedriverName/code parameters to match your actual database's
   JDBC driver and connection URL./p
  +
  +pThe configuration properties for Tomcat's standard data source
  +resource factory
  +(codeorg.apache.naming.factory.DbcpDataSourceFactory/code) are
  +as follows:/p
  +ul
  +listrongdriverClassName/strong - Fully qualified Java class name
  +of the JDBC driver to be used./li
  +listrongmaxActive/strong - The maximum number of active instances
  +that can be allocated from this pool at the same time./li
  +listrongmaxIdle/strong - The maximum number of connections that
  +can sit idle in this pool at the same time./li
  +listrongmaxWait/strong - The maximum number of milliseconds that the
  +pool will wait (when there are no available connections) for a
  +connection to be returned before throwing an exception./li
  +listrongpassword/strong - Database password to be passed to our
  +JDBC driver./li
  +listrongurl/strong - Connection URL to be passed to our JDBC driver.
  +(For backwards compatibility, the property codedriverName/code
  +is also recognized.)/li
  +listronguser/strong - Database username to be passed to our
  +JDBC driver./li
  +listrongvalidationQuery/strong - SQL query that can be used by the
  +pool to validate connections before they are returned to the
  +application.  If specified, this query MUST be an SQL SELECT
  +statement that returns at least one row./li
  +/ul
   
 /subsection
   
  
  
  
  1.8   +1 -1  jakarta-tomcat-4.0/webapps/tomcat-docs/config/context.xml
  
  Index: context.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/context.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- context.xml   30 Nov 2001 06:23:13 -  1.7
  +++ context.xml   16 Mar 2002 20:32:31 -  1.8
  @@ -601,7 +601,7 @@
 lt;valuegt;org.hsql.jdbcDriverlt;/valuegt;
   lt;/parametergt;
   lt;parametergt;
  -  lt;namegt;driverNamelt;/namegt;
  +  lt;namegt;urllt;/namegt;
 lt;/valuegt;jdbc:HypersonicSQL:databaselt;/valuegt;
   lt;/parametergt;
   lt;parametergt;
  
  
  

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




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config realm.xml

2002-03-15 Thread craigmcc

craigmcc02/03/15 10:37:42

  Modified:catalina/src/share/org/apache/catalina/realm JNDIRealm.java
   webapps/tomcat-docs/config realm.xml
  Log:
  Major enhancements to the JNDIRealm implementation.  While remaining
  backwards compatible with the previous implementation, the following new
  functionality is supported:
  
  * The realm can authenticate a user by binding to the directory
server using the username and password specified by the user,
instead of retrieving the password attribute and performing the
comparison locally.  (Remove the userPassword property to
activate this mode, which also eliminates the need for connectionName
and connectionPassword).
  
  * The realm can search the directory for the user's entry, instead
of picking a particular one.  (Use userSearch, userBase, and
userSubtree for this instead of userPattern.)
  
  * The realm can combine roles held as the values of an attribute
in the user's entry with those retrieved by the search for roles.
(Use userRoleName to specify this attribute.)
  
  John, thanks for your patience with me on getting this patch committed!
  Could you also make sure that I got the facts right on my edits to the
  configuration docs?  (A patch to tomcat-docs/realm-howto.xml to explain
  the new options would also be cool.)
  
  Submitted by: John Holman j.g.holman at qmul.ac.uk
  
  Revision  ChangesPath
  1.6   +669 -148  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
  
  Index: JNDIRealm.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JNDIRealm.java7 Sep 2001 20:45:12 -   1.5
  +++ JNDIRealm.java15 Mar 2002 18:37:42 -  1.6
  @@ -1,7 +1,12 @@
   /*
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java,v
 1.6 2002/03/15 18:37:42 craigmcc Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/03/15 18:37:42 $
  + *
  + * 
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -68,6 +73,9 @@
   import javax.naming.NameNotFoundException;
   import javax.naming.NamingEnumeration;
   import javax.naming.NamingException;
  +import javax.naming.NameParser;
  +import javax.naming.Name;
  +import javax.naming.AuthenticationException;
   import javax.naming.directory.Attribute;
   import javax.naming.directory.Attributes;
   import javax.naming.directory.DirContext;
  @@ -85,20 +93,42 @@
* The following constraints are imposed on the data structure in the
* underlying directory server:/p
* ul
  + *
* liEach user that can be authenticated is represented by an individual
* element in the top level codeDirContext/code that is accessed
  - * via the codeconnectionURL/code property.  This element has the
  - * following characteristics:
  + * via the codeconnectionURL/code property./li
  + *
  + * liEach user element has a distinguished name that can be formed by
  + * substituting the presented username into a pattern configured by the
  + * codeuserPattern/code property./li
  + *
  + * liAlternatively, if the codeuserPattern/code property is not 
  + * specified, a unique element can be located by searching the directory
  + * context. In this case:
* ul
  - * liThe distinguished name (codedn/code) attribute of this element
  - * contains the username that is being presented for authentication.
  - * /li
  - * liThe distinguished name can be represented by a pattern passed to
  - * an instance of codeMessageFormat/code, where the string {0}
  - * in the pattern is replaced by the username being presented./li
  - * liThe element for this user contains an attribute named by the
  - * codeuserPassword/code property.  The value of this attribute
  - * is retrieved for use in authentication./li
  + * liThe codeuserSearch/code pattern specifies the search filter
  + * after substitution of the username./li
  + * liThe codeuserBase/code property can be set to the element that
  + * is the base of the subtree containing users.  If not specified,
  + * the search base is the top-level context./li
  + * liThe codeuserSubtree/code property can be set to
  + * codetrue/code if you wish to search the entire subtree of the
  + * directory context.  The default value of codefalse/code
  + * requests a search of only the current level

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup ContextConfig.java HostConfig.java LocalStrings.properties

2002-03-14 Thread craigmcc

craigmcc02/03/14 15:58:36

  Modified:catalina/src/share/org/apache/catalina/startup
ContextConfig.java HostConfig.java
LocalStrings.properties
  Log:
  Refactor the TLD scanning code in ContextConfig to improve clarity, avoid
  redundant parsing of the same TLD, and some wasted effort trying to parse
  a JAR as an XML document (and vice versa) in the old code.
  
  Currently, the jarFile.close() statement to close a JAR file after scanning
  is still commented out (as it was before).  Closing the JAR file here seems
  to mess up the WebappClassLoader (which has already included this JAR file
  in its repository of available URLs) by causing Zip File Is Closed
  exceptions when it attempts to load classes from that JAR.
  
  In HostConfig, the only change was to close the JAR in a finally block when
  expanding a WAR, even if an exception has occurred.
  
  Revision  ChangesPath
  1.60  +221 -130  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- ContextConfig.java5 Mar 2002 01:53:11 -   1.59
  +++ ContextConfig.java14 Mar 2002 23:58:35 -  1.60
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.59 2002/03/05 01:53:11 craigmcc Exp $
  - * $Revision: 1.59 $
  - * $Date: 2002/03/05 01:53:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.60 2002/03/14 23:58:35 craigmcc Exp $
  + * $Revision: 1.60 $
  + * $Date: 2002/03/14 23:58:35 $
*
* 
*
  @@ -77,16 +77,20 @@
   import java.net.URL;
   import java.util.ArrayList;
   import java.util.Enumeration;
  +import java.util.HashSet;
  +import java.util.Iterator;
   import java.util.MissingResourceException;
   import java.util.ResourceBundle;
  +import java.util.Set;
   import java.util.Stack;
   import java.util.jar.JarEntry;
   import java.util.jar.JarFile;
  -import javax.servlet.ServletContext;
   import javax.naming.NamingException;
   import javax.naming.NameClassPair;
   import javax.naming.NamingEnumeration;
   import javax.naming.directory.DirContext;
  +import javax.servlet.ServletContext;
  +import javax.servlet.ServletException;
   import org.apache.catalina.Authenticator;
   import org.apache.catalina.Container;
   import org.apache.catalina.Context;
  @@ -127,7 +131,7 @@
* of that Context, and the associated defined servlets.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.59 $ $Date: 2002/03/05 01:53:11 $
  + * @version $Revision: 1.60 $ $Date: 2002/03/14 23:58:35 $
*/
   
   public final class ContextConfig
  @@ -591,8 +595,14 @@
   applicationConfig();
   
   // Scan tag library descriptor files for additional listener classes
  -if (ok)
  -tldConfig();
  +if (ok) {
  +try {
  +tldScan();
  +} catch (Exception e) {
  +log(e.getMessage(), e);
  +ok = false;
  +}
  +}
   
   // Configure a certificates exposer valve, if required
   if (ok)
  @@ -781,76 +791,24 @@
   
   
   /**
  - * Scan the tag library descriptors of all tag libraries we can find, and
  - * register any application descriptor classes that are found there.
  + * Scan for and configure all tag library descriptors found in this
  + * web application.
  + *
  + * @exception Exception if a fatal input/output or parsing error occurs
*/
  -private void tldConfig() {
  -
  -// Acquire a Digester to use for parsing
  -synchronized (tldDigester) {
  -
  -// First, scan tag libraries declared in our deployment descriptor
  -if (debug = 1)
  -log(Scanning web.xml tag libraries);
  -ArrayList resourcePaths = new ArrayList(); // Already done TLDs
  -String taglibs[] = context.findTaglibs();
  -for (int i = 0; i  taglibs.length; i++) {
  -
  -// Calculate the resource path of the next tag library to check
  -String resourcePath = context.findTaglib(taglibs[i]);
  -if (!resourcePath.startsWith(/))
  -resourcePath = /WEB-INF/web.xml/../ + resourcePath;
  -if (debug = 2)
  -log(  URI=' + taglibs[i] + ', ResourcePath=' +
  -resourcePath + ');
  -if (resourcePaths.contains

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

2002-03-13 Thread craigmcc

craigmcc02/03/13 12:09:55

  Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin
TreeControlTag.java
  Log:
  Perform URL rewriting on the URL that is used to refresh the tree control.
  Without this, the admin webapp won't work with cookies turned off -- clicking
  any node of the tree would force you back to the login page.
  
  Submitted by:  Stephanie Bodoff Stephanie.Bodoff at sun.com
  
  Revision  ChangesPath
  1.7   +7 -4  
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TreeControlTag.java
  
  Index: TreeControlTag.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TreeControlTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TreeControlTag.java   18 Dec 2001 22:59:41 -  1.6
  +++ TreeControlTag.java   13 Mar 2002 20:09:55 -  1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TreeControlTag.java,v
 1.6 2001/12/18 22:59:41 amyroh Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/12/18 22:59:41 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TreeControlTag.java,v
 1.7 2002/03/13 20:09:55 craigmcc Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/03/13 20:09:55 $
*
* 
*
  @@ -104,7 +104,7 @@
* strongFIXME/strong - Internationalize the exception messages!
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2001/12/18 22:59:41 $
  + * @version $Revision: 1.7 $ $Date: 2002/03/13 20:09:55 $
*/
   
   public class TreeControlTag extends TagSupport {
  @@ -400,6 +400,9 @@
   
   String updateTreeAction =
   replace(getAction(), tree=${name}, select= + encodedNodeName);
  +updateTreeAction =
  +((HttpServletResponse) pageContext.getResponse()).
  +encodeURL(updateTreeAction);
   
   out.print(td);
   if ((action != null)  !node.isLeaf()) {
  
  
  

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




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs manager-howto.xml

2002-03-12 Thread craigmcc

craigmcc02/03/12 13:14:16

  Modified:catalina/src/share/org/apache/catalina/servlets
LocalStrings.properties ManagerServlet.java
   webapps/tomcat-docs manager-howto.xml
  Added:   catalina/src/share/org/apache/catalina/ant
ResourcesTask.java
  Log:
  Add a new /resources command that will enumerate the available global JNDI
  resources (either all of them, or all of them for a specific type like
  javax.sql.DataSource).  This is useful to tools that want to package up
  webapps and create the Context configuration element, with embedded
  ResourceLink elements that link resource references in the web.xml to
  the corresponding actual resources.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/ResourcesTask.java
  
  Index: ResourcesTask.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/ResourcesTask.java,v
 1.1 2002/03/12 21:14:15 craigmcc Exp $
   * $Revision: 1.1 $
   * $Date: 2002/03/12 21:14:15 $
   *
   * 
   *
   * 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 developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   */
  
  
  package org.apache.catalina.ant;
  
  
  import org.apache.tools.ant.BuildException;
  import org.apache.tools.ant.Task;
  
  
  /**
   * Ant task that implements the code/list/code command, supported by the
   * Tomcat manager application.
   *
   * @author Craig R. McClanahan
   * @version $Revision: 1.1 $ $Date: 2002/03/12 21:14:15 $
   * @since 4.1
   */
  public class ResourcesTask extends AbstractCatalinaTask {
  
  
  // - Properties
  
  
  /**
   * The fully qualified class name of the resource type being requested
   * (if any).
   */
  protected String type = null;
  
  public String getType() {
  return (this.type);
  }
  
  public void setType(String type) {
  this.type = type;
  }
  
  
  // - Public Methods
  
  
  /**
   * Execute the requested operation.
   *
   * @exception BuildException if an error occurs
   */
  public void execute

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets ManagerServlet.java

2002-03-12 Thread craigmcc

craigmcc02/03/12 17:26:49

  Modified:catalina/src/share/org/apache/catalina/core
StandardHostDeployer.java
   catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java
   catalina/src/share/org/apache/catalina/servlets
ManagerServlet.java
  Log:
  Remove obsolete JAR related imports from StandardHostDeployer and
  ManagerServlet.  Enhance JAR handling in StandardClassLoader to close a
  JAR file even if an exception occurs.
  
  Revision  ChangesPath
  1.7   +4 -7  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java
  
  Index: StandardHostDeployer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StandardHostDeployer.java 1 Mar 2002 16:44:32 -   1.6
  +++ StandardHostDeployer.java 13 Mar 2002 01:26:49 -  1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
 1.6 2002/03/01 16:44:32 glenn Exp $
  - * $Revision: 1.6 $
  - * $Date: 2002/03/01 16:44:32 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
 1.7 2002/03/13 01:26:49 craigmcc Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/03/13 01:26:49 $
*
* 
*
  @@ -70,11 +70,8 @@
   import java.io.FileOutputStream;
   import java.io.InputStream;
   import java.io.IOException;
  -import java.net.JarURLConnection;
   import java.net.URL;
   import java.util.Enumeration;
  -import java.util.jar.JarEntry;
  -import java.util.jar.JarFile;
   import org.apache.catalina.Container;
   import org.apache.catalina.Context;
   import org.apache.catalina.Deployer;
  @@ -94,7 +91,7 @@
* codeStandardHost/code implementation class./p
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2002/03/01 16:44:32 $
  + * @version $Revision: 1.7 $ $Date: 2002/03/13 01:26:49 $
*/
   
   public class StandardHostDeployer implements Deployer {
  
  
  
  1.26  +11 -7 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- StandardClassLoader.java  9 Nov 2001 17:59:16 -   1.25
  +++ StandardClassLoader.java  13 Mar 2002 01:26:49 -  1.26
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.25 2001/11/09 17:59:16 remm Exp $
  - * $Revision: 1.25 $
  - * $Date: 2001/11/09 17:59:16 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.26 2002/03/13 01:26:49 craigmcc Exp $
  + * $Revision: 1.26 $
  + * $Date: 2002/03/13 01:26:49 $
*
* 
*
  @@ -112,7 +112,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.25 $ $Date: 2001/11/09 17:59:16 $
  + * @version $Revision: 1.26 $ $Date: 2002/03/13 01:26:49 $
*/
   
   public class StandardClassLoader
  @@ -1063,8 +1063,8 @@
   
   // Validate the manifest of a JAR file repository
   if (!repository.endsWith(File.separator)) {
  +JarFile jarFile = null;
   try {
  -JarFile jarFile = null;
   Manifest manifest = null;
   if (repository.startsWith(jar:)) {
   URL url = new URL(null, repository, streamHandler);
  @@ -1104,12 +1104,16 @@
   required.add(extensions.next());
   }
   }
  -if (jarFile != null)
  -jarFile.close();
   } catch (Throwable t) {
   t.printStackTrace();
   throw new IllegalArgumentException
   (addRepositoryInternal:  + t);
  +} finally {
  +if (jarFile != null) {
  +try {
  +jarFile.close();
  +} catch (Throwable t) {}
  +}
   }
   }
   
  
  
  
  1.18  +4 -6  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java
  
  Index: ManagerServlet.java

cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs jndi-resources-howto.xml

2002-03-12 Thread craigmcc

craigmcc02/03/12 20:13:34

  Modified:webapps/tomcat-docs jndi-resources-howto.xml
  Log:
  Update JNDI documentation to reflect the switch from Tyrex to DBCP for default
  connection pool support.
  
  Revision  ChangesPath
  1.12  +5 -28 jakarta-tomcat-4.0/webapps/tomcat-docs/jndi-resources-howto.xml
  
  Index: jndi-resources-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/jndi-resources-howto.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- jndi-resources-howto.xml  18 Dec 2001 18:17:44 -  1.11
  +++ jndi-resources-howto.xml  13 Mar 2002 04:13:34 -  1.12
  @@ -420,9 +420,11 @@
   /ul
   
   pstrongNOTE/strong - The default data source support in Tomcat
  -supports Tyrex.  However, it is possible to use any other connection pool
  -that implements codejavax.sql.DataSource/code, by writing your own
  -custom resource factory, as described
  +is based on the strongDBCP/strong connection pool from the
  +a href=http://jakarta.apache.org/commons;Jakarta Commons/a
  +subproject.  However, it is possible to use any other connection pool
  +that implements codejavax.sql.DataSource/code, by writing your
  +own custom resource factory, as described
   a href=#Adding Custom Resource Factoriesbelow/a./p
   
   h31.  Install Your JDBC Driver/h3
  @@ -528,31 +530,6 @@
   JDBC driver.  Customize the codedriverClassName/code and
   codedriverName/code parameters to match your actual database's
   JDBC driver and connection URL./p
  -
  -  /subsection
  -
  -  subsection name=User Transactions
  -
  -pIf you utilize Tyrex for your JDBC resource factory as described
  -a href=#JDBC Data Sourcesabove/a, you will also have support for
  -the codejava.transaction.UserTransaction/code resource provided by
  -Tyrex (since it is XA-capable).  To use this feature, code your
  -application as follows:/p
  -source
  -Context initCtx = new InitialContext();
  -Context envCtx = (Context) initCtx.lookup(java:comp/env);
  -Transaction tx = (Transaction) envCtx.lookup(UserTransaction);
  -
  -tx.begin();
  -... perform transactional operations on data ...
  -tx.commit();
  -/source
  -
  -pThis is useful when you need to do two-phased commits across more
  -than one database, where the commit needs to either succeed completely
  -or fail completely across all associated databases.  This feature
  -requires a JDBC driver that also supports XA capabilities.  See the
  -J2EE and JDBC documentation for more information./p
   
 /subsection
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/appdev build.xml.txt

2002-03-11 Thread craigmcc

craigmcc02/03/11 16:01:24

  Modified:webapps/tomcat-docs/appdev Tag: tomcat_40_branch
build.xml.txt
  Log:
  Correct a typo in a commented-out directive that will cause you grief if you
  uncomment it.
  
  Submitted by:  Harold Carr harold.carr at sun.com
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.2.2.3   +1 -1  jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/build.xml.txt
  
  Index: build.xml.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/build.xml.txt,v
  retrieving revision 1.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- build.xml.txt 12 Feb 2002 23:57:15 -  1.2.2.2
  +++ build.xml.txt 12 Mar 2002 00:01:24 -  1.2.2.3
  @@ -330,7 +330,7 @@
   !-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** --
   mkdir  dir=${build.home}/WEB-INF/lib/
   !--
  -copy todir=${build..home}/WEB-INF/lib file=${foo.jar}/
  +copy todir=${build.home}/WEB-INF/lib file=${foo.jar}/
   --
   
   !-- Copy static files from external dependencies as needed --
  
  
  

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




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/appdev build.xml.txt

2002-03-09 Thread craigmcc

craigmcc02/03/09 14:39:19

  Modified:webapps/tomcat-docs/appdev build.xml.txt
  Log:
  Add a list target for conveniently determining whether or not the app
  you are building has been installed yet or not.
  
  Make the reload target depend on compile, so that the typical development
  cycle becomes:
   - Modify files as required
   - ant reload
   - Test modified app
  
  Revision  ChangesPath
  1.6   +24 -2 jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/build.xml.txt
  
  Index: build.xml.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/build.xml.txt,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.xml.txt 14 Feb 2002 07:06:36 -  1.5
  +++ build.xml.txt 9 Mar 2002 22:39:19 -   1.6
  @@ -18,7 +18,7 @@
image files), including the WEB-INF subdirectory
and its configuration file contents.
   
  - $Id: build.xml.txt,v 1.5 2002/02/14 07:06:36 craigmcc Exp $
  + $Id: build.xml.txt,v 1.6 2002/03/09 22:39:19 craigmcc Exp $
   --
   
   
  @@ -144,6 +144,7 @@
   --
   
 taskdef name=install classname=org.apache.catalina.ant.InstallTask/
  +  taskdef name=listclassname=org.apache.catalina.ant.ListTask/
 taskdef name=reload  classname=org.apache.catalina.ant.ReloadTask/
 taskdef name=remove  classname=org.apache.catalina.ant.RemoveTask/
   
  @@ -390,6 +391,27 @@
   
   
   
  +!-- == List Target === --
  +
  +!--
  +
  +  The list target asks the specified Tomcat 4 installation to list the
  +  currently running web applications, either loaded at startup time or
  +  installed dynamically.  It is useful to determine whether or not the
  +  application you are currently developing has been installed.
  +
  +--
  +
  +  target name=list
  +   description=List installed applications on servlet container
  +
  +listurl=${manager.url}
  +username=${manager.username}
  +password=${manager.password}/
  +
  +  /target
  +
  +
   !--  Prepare Target == --
   
   !--
  @@ -439,7 +461,7 @@
   
   --
   
  -  target name=reload
  +  target name=reload depends=compile
  description=Reload application on servlet container
   
   reload url=${manager.url}
  
  
  

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




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

2002-03-08 Thread craigmcc

craigmcc02/03/08 11:01:32

  Modified:catalina/src/share/org/apache/catalina/mbeans
MBeanUtils.java mbeans-descriptors.xml
  Log:
  Add mbean definition for CoyoteConnector, refine properties for Ajp13Connector.
  
  Revision  ChangesPath
  1.29  +23 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- MBeanUtils.java   8 Mar 2002 00:12:29 -   1.28
  +++ MBeanUtils.java   8 Mar 2002 19:01:32 -   1.29
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.28 2002/03/08 00:12:29 craigmcc Exp $
  - * $Revision: 1.28 $
  - * $Date: 2002/03/08 00:12:29 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.29 2002/03/08 19:01:32 craigmcc Exp $
  + * $Revision: 1.29 $
  + * $Date: 2002/03/08 19:01:32 $
*
* 
*
  @@ -109,7 +109,7 @@
*
* @author Craig R. McClanahan
* @author Amy Roh
  - * @version $Revision: 1.28 $ $Date: 2002/03/08 00:12:29 $
  + * @version $Revision: 1.29 $ $Date: 2002/03/08 19:01:32 $
*/
   
   public class MBeanUtils {
  @@ -126,6 +126,8 @@
   private static String exceptions[][] = {
   { org.apache.ajp.tomcat4.Ajp13Connector,
 Ajp13Connector },
  +{ org.apache.coyote.tomcat4.Ajp13Connector,
  +  CoyoteConnector },
   { org.apache.catalina.core.StandardDefaultContext,
 DefaultContext },
   { org.apache.catalina.connector.http10.HttpConnector,
  @@ -693,6 +695,23 @@
 ,address= + httpConnector.getAddress());
   return (name);
   } else if (org.apache.ajp.tomcat4.Ajp13Connector.equals
  +   (connector.getClass().getName())) {
  +try {
  +String address = (String)
  +PropertyUtils.getSimpleProperty(connector, address);
  +Integer port = (Integer)
  +PropertyUtils.getSimpleProperty(connector, port);
  +name = new ObjectName(domain + :type=Connector +
  +  ,service= +
  +  connector.getService().getName() +
  +  ,port= + port +
  +  ,address= + address);
  +return (name);
  +} catch (Exception e) {
  +throw new MalformedObjectNameException
  +(Cannot create object name for  + connector);
  +}
  +} else if (org.apache.coyote.tomcat4.CoyoteConnector.equals
  (connector.getClass().getName())) {
   try {
   String address = (String)
  
  
  
  1.36  +109 -5
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- mbeans-descriptors.xml8 Mar 2002 06:58:17 -   1.35
  +++ mbeans-descriptors.xml8 Mar 2002 19:01:32 -   1.36
  @@ -6,7 +6,7 @@
   !--
Descriptions of JMX MBeans for Catalina
   
  - $Id: mbeans-descriptors.xml,v 1.35 2002/03/08 06:58:17 amyroh Exp $
  + $Id: mbeans-descriptors.xml,v 1.36 2002/03/08 19:01:32 craigmcc Exp $
--
   
   mbeans-descriptors
  @@ -80,14 +80,27 @@
 description=Timeout value on the incoming connection
type=int/
   
  +attribute   name=curProcessors
  +  description=Current number of active processors
  + type=int
  +writeable=false/
  +
   attribute   name=debug
 description=The debugging detail level for this component
type=int/
   
  +attribute   name=secret
  +  description=Authentication secret (I guess ... not in Javadocs)
  + type=java.lang.String/
  +
   attribute   name=enableLookups
 description=The 'enable DNS lookups' flag for this Connector
type=boolean/
   
  +attribute   name=redirectPort
  +  description=The redirect port for non-SSL to SSL redirects
  + type=int/
  +
   attribute   name=maxProcessors
 description=The maximum number of processors allowed

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

2002-03-08 Thread craigmcc

craigmcc02/03/08 11:23:01

  Modified:coyote/src/java/org/apache/coyote/tomcat4
LocalStrings.properties
  Log:
  Add missing message strings.
  
  Revision  ChangesPath
  1.2   +28 -0 
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocalStrings.properties   8 Mar 2002 05:18:29 -   1.1
  +++ LocalStrings.properties   8 Mar 2002 19:23:01 -   1.2
  @@ -1,3 +1,31 @@
  +coyoteConnector.allAddresses=Opening server socket on all host IP addresses
  +coyoteConnector.alreadyInitialized=Coyote connector has already been initialized
  +coyoteConnector.alreadyStarted=Coyote connector has already been started
  +coyoteConnector.anAddress=Opening server socket on host IP address {0}
  +coyoteConnector.certificateProblem=General certificate error
  +coyoteConnector.initException=Problem during connector initialization
  +coyoteConnector.IOProblem=Input/output exception opening server socket
  +coyoteConnector.keyManagementProblem=Problem in the key management layer
  +coyoteConnector.keystoreAlgorithmProblem=Keystore algorithm not supported
  +coyoteConnector.keystoreProblem=Problem accessing keystore file
  +coyoteConnector.newProcessor=Creating new Coyote processor
  +coyoteConnector.noAddress=No host IP address matching {0}, opening on all addresses
  +coyoteConnector.noProcessor=No processor available, rejecting this connection
  +coyoteConnector.notStarted=Coyote connector has not been started
  +coyoteConnector.securityException=Encountered security exception
  +coyoteConnector.serverSocketReopenFail=IOException reopening server socket
  +coyoteConnector.starting=Starting background thread
  +coyoteConnector.stopException=Exception while stopping background thread
  +coyoteConnector.stopping=Stopping background thread
  +coyoteConnector.unrecoverableKey=Internal keystore problem with the certificate
  +coyoteProcessor.parseHeaders.portNumber=Cannot parse port number from header
  +coyoteProcessor.process=Exception while processing a request
  +coyoteProcessor.processorInitializationFailed=Exception initializing a processor
  +coyoteProcessor.run=Exception while processing a socket
  +coyoteProcessor.alreadyStarted=Coyote processor has already been started
  +coyoteProcessor.notStarted=Coyote processor has not yet been started
  +coyoteProcessor.starting=Starting background thread
  +coyoteProcessor.stopping=Stopping background thread
   coyoteRequest.createCommitted=Cannot create a session after the response has been 
committed
   coyoteResponse.sendError.ise=Cannot call sendError() after the response has been 
committed
   coyoteResponse.sendRedirect.ise=Cannot call sendRedirect() after the response has 
been committed
  
  
  

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




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

2002-03-08 Thread craigmcc

craigmcc02/03/08 11:26:01

  Modified:coyote/src/java/org/apache/coyote/tomcat4
CoyoteProcessor.java
  Log:
  Update message string keys.
  
  Revision  ChangesPath
  1.7   +8 -8  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java
  
  Index: CoyoteProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CoyoteProcessor.java  8 Mar 2002 18:50:41 -   1.6
  +++ CoyoteProcessor.java  8 Mar 2002 19:26:01 -   1.7
  @@ -1,6 +1,6 @@
  -/* * $Header: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java,v
 1.6 2002/03/08 18:50:41 remm Exp $
  - * $Revision: 1.6 $
  - * $Date: 2002/03/08 18:50:41 $
  +/* * $Header: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java,v
 1.7 2002/03/08 19:26:01 craigmcc Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/03/08 19:26:01 $
*
* 
*
  @@ -111,7 +111,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.6 $ $Date: 2002/03/08 18:50:41 $
  + * @version $Revision: 1.7 $ $Date: 2002/03/08 19:26:01 $
*/
   
   final class CoyoteProcessor
  @@ -569,7 +569,7 @@
*/
   private void threadStart() {
   
  -log(sm.getString(httpProcessor.starting));
  +log(sm.getString(coyoteProcessor.starting));
   
   thread = new Thread(this, threadName);
   thread.setDaemon(true);
  @@ -586,7 +586,7 @@
*/
   private void threadStop() {
   
  -log(sm.getString(httpProcessor.stopping));
  +log(sm.getString(coyoteProcessor.stopping));
   
   stopped = true;
   assign(null);
  @@ -653,7 +653,7 @@
   
   if (started)
   throw new LifecycleException
  -(sm.getString(httpProcessor.alreadyStarted));
  +(sm.getString(coyoteProcessor.alreadyStarted));
   
   // Instantiate the Coyote processor
   String className = connector.getProcessorClassName();
  @@ -684,7 +684,7 @@
   
   if (!started)
   throw new LifecycleException
  -(sm.getString(httpProcessor.notStarted));
  +(sm.getString(coyoteProcessor.notStarted));
   lifecycle.fireLifecycleEvent(STOP_EVENT, null);
   started = false;
   
  
  
  

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




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

2002-03-08 Thread craigmcc

craigmcc02/03/08 16:10:57

  Modified:webapps/admin connector.jsp context.jsp
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin
Lists.java TomcatTreeBuilder.java
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector
ConnectorForm.java SetUpConnectorAction.java
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context
ContextForm.java
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/logger
SetUpLoggerAction.java
   webapps/admin/host host.jsp
  Log:
  Refactor logic that builds the tree control to use the common list building
  methods.
  
  Make key properties read-only on edit screens.
  
  Tweak validation rules to match the values that are actually supported.
  
  Revision  ChangesPath
  1.4   +14 -0 jakarta-tomcat-4.0/webapps/admin/connector.jsp
  
  Index: connector.jsp
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/connector.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- connector.jsp 13 Feb 2002 00:03:32 -  1.3
  +++ connector.jsp 9 Mar 2002 00:10:56 -   1.4
  @@ -106,7 +106,12 @@
   controls:row labelStyle=table-label-text dataStyle=table-normal-text
   controls:labelbean:message 
key=connector.address.ip/:/controls:label
   controls:data
  +%-- FIXME - input only allowed on create transaction --%
  +%--
  html:text property=address size=20/
  +--%
  +   bean:write name=connectorForm property=address/
  +   html:hidden property=address/
   /controls:data
   /controls:row

  @@ -118,7 +123,12 @@
   controls:row labelStyle=table-label-text dataStyle=table-normal-text
   controls:labelbean:message 
key=server.portnumber/:/controls:label
   controls:data
  +%-- FIXME - input only allowed on create transaction --%
  +%--
  html:text property=portText size=5/ 
  +--%
  +   bean:write name=connectorForm property=portText/
  +   html:hidden property=portText/
   /controls:data
   /controls:row
   
  @@ -148,6 +158,9 @@
   /controls:data
   /controls:row
   
  +%-- FIXME - The proxyName and proxyPort properties not supported   --%
  +%-- on all connectors, so comment this section out for now --%
  +%--
   controls:row header=true labelStyle=table-header-text 
dataStyle=table-header-text
   controls:labelProxy/controls:label
   controls:datanbsp;/controls:data
  @@ -166,6 +179,7 @@
   html:text property=proxyPortText size=5/ 
   /controls:data
   /controls:row
  +--%
 /controls:table
 
 /td
  
  
  
  1.5   +15 -0 jakarta-tomcat-4.0/webapps/admin/context.jsp
  
  Index: context.jsp
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/context.jsp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- context.jsp   13 Feb 2002 00:03:32 -  1.4
  +++ context.jsp   9 Mar 2002 00:10:56 -   1.5
  @@ -109,7 +109,12 @@
  controls:row labelStyle=table-label-text dataStyle=table-normal-text
   controls:labelbean:message key=context.docBase/:/controls:label
   controls:data
  +%-- FIXME - input only allowed on create transaction --%
  +%--
  html:text property=docBase size=30/
  +--%
  +   bean:write name=contextForm property=docBase/
  +   html:hidden property=docBase/
   /controls:data
   /controls:row
   
  @@ -128,7 +133,12 @@
  controls:row labelStyle=table-label-text dataStyle=table-normal-text
   controls:labelbean:message key=context.path/:/controls:label
   controls:data
  +%-- FIXME - input only allowed on create transaction --%
  +%--
  html:text property=path size=30/
  +--%
  +   bean:write name=contextForm property=path/
  +   html:hidden property=path/
   /controls:data
   /controls:row
   
  @@ -157,7 +167,12 @@
  controls:row labelStyle=table-label-text dataStyle=table-normal-text
   controls:labelbean:message key=context.workdir/:/controls:label
   controls:data
  +%-- FIXME - input only allowed on create transaction --%
  +%--
  html:text property=workDir size=30/
  +--%
  +   bean:write name=contextForm property=workDir/
  +   html:hidden property=workDir/
   /controls:data
   /controls:row
  /controls:table
  
  
  
  1.2   +203 -4
jakarta

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

2002-03-08 Thread craigmcc

craigmcc02/03/08 16:29:05

  Modified:catalina/src/share/org/apache/catalina/mbeans
mbeans-descriptors.xml
  Log:
  Fix typo.
  
  Revision  ChangesPath
  1.39  +2 -2  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- mbeans-descriptors.xml8 Mar 2002 23:59:26 -   1.38
  +++ mbeans-descriptors.xml9 Mar 2002 00:29:04 -   1.39
  @@ -6,7 +6,7 @@
   !--
Descriptions of JMX MBeans for Catalina
   
  - $Id: mbeans-descriptors.xml,v 1.38 2002/03/08 23:59:26 amyroh Exp $
  + $Id: mbeans-descriptors.xml,v 1.39 2002/03/09 00:29:04 craigmcc Exp $
--
   
   mbeans-descriptors
  @@ -832,7 +832,7 @@
   username
type=java.lang.String/
   
  -attribute   name=userRoleTableremove
  +attribute   name=userRoleTable
 description=The table that holds the relation between user's and
   roles
type=java.lang.String/
  
  
  

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




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

2002-03-06 Thread craigmcc

craigmcc02/03/06 18:48:55

  Modified:catalina/src/share/org/apache/catalina/mbeans
MBeanFactory.java mbeans-descriptors.xml
   webapps/admin saved.jsp server.jsp
   webapps/admin/WEB-INF struts-config.xml
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin
ApplicationResources_en.properties
DumpServerAction.java TreeControl.java
TreeControlNode.java
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/service
AddServiceAction.java DeleteServiceAction.java
EditServiceAction.java SaveServiceAction.java
ServiceForm.java
   webapps/admin/service service.jsp
  Added:   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/service
DeleteServicesAction.java ServicesForm.java
   webapps/admin/service services.jsp
  Removed: webapps/admin/WEB-INF/classes/org/apache/webapp/admin/service
SetUpDeleteServiceAction.java
   webapps/admin/service deleteService.jsp
  Log:
  Finish refactoring admin transactions for services (including deletes).
  
  Revision  ChangesPath
  1.8   +48 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java
  
  Index: MBeanFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- MBeanFactory.java 6 Mar 2002 06:49:11 -   1.7
  +++ MBeanFactory.java 7 Mar 2002 02:48:53 -   1.8
  @@ -1,13 +1,13 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
 1.7 2002/03/06 06:49:11 craigmcc Exp $
  - * $Revision: 1.7 $
  - * $Date: 2002/03/06 06:49:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
 1.8 2002/03/07 02:48:53 craigmcc Exp $
  + * $Revision: 1.8 $
  + * $Date: 2002/03/07 02:48:53 $
*
* 
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -106,7 +106,7 @@
* codeorg.apache.catalina.core.StandardServer/code component./p
*
* @author Amy Roh
  - * @version $Revision: 1.7 $ $Date: 2002/03/06 06:49:11 $
  + * @version $Revision: 1.8 $ $Date: 2002/03/07 02:48:53 $
*/
   
   public class MBeanFactory extends BaseModelMBean {
  @@ -836,6 +836,49 @@
   }
   
   
  +/**
  + * Remove an existing Host.
  + *
  + * @param name MBean Name of the comonent to remove
  + *
  + * @exception Exception if a component cannot be removed
  + */
  +public void removeHost(String name) throws Exception {
  +
  +// Acquire a reference to the component to be removed
  +ObjectName oname = new ObjectName(name);
  +String serviceName = oname.getKeyProperty(service);
  +String hostName = oname.getKeyProperty(host);
  +Server server = ServerFactory.getServer();
  +Service service = server.findService(serviceName);
  +Engine engine = (Engine) service.getContainer();
  +Host host = (Host) engine.findChild(hostName);
  +
  +// Remove this component from its parent component
  +engine.removeChild(host);
  +
  +}
  +
  +
  +/**
  + * Remove an existing Service.
  + *
  + * @param name MBean Name of the component to remove
  + *
  + * @exception Exception if a component cannot be removed
  + */
  +public void removeService(String name) throws Exception {
  +
  +// Acquire a reference to the component to be removed
  +ObjectName oname = new ObjectName(name);
  +String serviceName = oname.getKeyProperty(name);
  +Server server = ServerFactory.getServer();
  +Service service = server.findService(serviceName);
  +
  +// Remove this component from its parent component
  +server.removeService(service);
  +
  +}
   
   
   }
  
  
  
  1.34  +31 -7 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- mbeans-descriptors.xml6 Mar 2002

cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/service AddServiceAction.java

2002-03-05 Thread craigmcc

craigmcc02/03/05 22:50:25

  Added:   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/service
AddServiceAction.java
  Log:
  Re-add obsolete file that was replaced with a new version.
  
  Revision  ChangesPath
  1.5   +52 -159   
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/service/AddServiceAction.java
  
  
  
  

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




cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/service SetUpAddServiceAction.java SetUpServiceAction.java

2002-03-05 Thread craigmcc

craigmcc02/03/05 22:55:57

  Removed: webapps/admin/WEB-INF/classes/org/apache/webapp/admin/service
SetUpAddServiceAction.java SetUpServiceAction.java
  Log:
  Remove obsolete files.

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup ContextConfig.java

2002-03-04 Thread craigmcc

craigmcc02/03/04 17:53:12

  Modified:catalina/src/share/org/apache/catalina/startup
ContextConfig.java
  Log:
  Fix a race condition that could cause problems if two contexts are being
  started simultaneously.  The start() method was already synchronized, but
  this only helps you deal with two attempts to start the *same* app at the
  same time.  The underlying Digester instance would still be incorrectly
  shared.
  
  The symptom was parsing failures on one or both web.xml files -- this would
  happen rarely during a normal startup when you have lots of virtual
  hosts, but more often when you hammer on the manager webapp deploying and
  undeploying applications.
  
  Revision  ChangesPath
  1.59  +129 -134  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- ContextConfig.java20 Feb 2002 03:18:19 -  1.58
  +++ ContextConfig.java5 Mar 2002 01:53:11 -   1.59
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.58 2002/02/20 03:18:19 remm Exp $
  - * $Revision: 1.58 $
  - * $Date: 2002/02/20 03:18:19 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.59 2002/03/05 01:53:11 craigmcc Exp $
  + * $Revision: 1.59 $
  + * $Date: 2002/03/05 01:53:11 $
*
* 
*
  @@ -127,7 +127,7 @@
* of that Context, and the associated defined servlets.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.58 $ $Date: 2002/02/20 03:18:19 $
  + * @version $Revision: 1.59 $ $Date: 2002/03/05 01:53:11 $
*/
   
   public final class ContextConfig
  @@ -174,14 +174,14 @@
* The codeDigester/code we will use to process tag library
* descriptor files.
*/
  -private static Digester tldDigester = null;
  +private static Digester tldDigester = createTldDigester();
   
   
   /**
* The codeDigester/code we will use to process web application
* deployment descriptor files.
*/
  -private static Digester webDigester = null;
  +private static Digester webDigester = createWebDigester();
   
   
   // - Properties
  @@ -261,29 +261,30 @@
   }
   
   // Process the application web.xml file
  -try {
  -Digester digester = createWebDigester();
  -digester.setDebug(getDebug());
  -synchronized (digester) {
  -if (context instanceof StandardContext)
  -((StandardContext) context).setReplaceWelcomeFiles(true);
  -digester.push(context);
  -digester.parse(stream);
  -}
  -} catch (SAXParseException e) {
  -log(sm.getString(contextConfig.applicationParse), e);
  -log(sm.getString(contextConfig.applicationPosition,
  -  + e.getLineNumber(),
  -  + e.getColumnNumber()));
  -ok = false;
  -} catch (Exception e) {
  -log(sm.getString(contextConfig.applicationParse), e);
  -ok = false;
  -} finally {
  +synchronized (webDigester) {
   try {
  -stream.close();
  -} catch (IOException e) {
  -log(sm.getString(contextConfig.applicationClose), e);
  +webDigester.setDebug(getDebug());
  +if (context instanceof StandardContext) {
  +((StandardContext) context).setReplaceWelcomeFiles(true);
  +}
  +webDigester.clear();
  +webDigester.push(context);
  +webDigester.parse(stream);
  +} catch (SAXParseException e) {
  +log(sm.getString(contextConfig.applicationParse), e);
  +log(sm.getString(contextConfig.applicationPosition,
  +  + e.getLineNumber(),
  +  + e.getColumnNumber()));
  +ok = false;
  +} catch (Exception e) {
  +log(sm.getString(contextConfig.applicationParse), e);
  +ok = false;
  +} finally {
  +try {
  +stream.close();
  +} catch (IOException e) {
  +log(sm.getString(contextConfig.applicationClose), e);
  +}
   }
   }
   
  @@ -431,22 +432,18

cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config host.xml

2002-03-04 Thread craigmcc

craigmcc02/03/04 17:55:03

  Modified:catalina/src/share/org/apache/catalina/startup
HostConfig.java
   webapps/tomcat-docs/config host.xml
  Log:
  Separate the concepts of autoDeploy of applications in the appBase
  subdirectory from the concept of liveDeploy (checking for new apps in a
  background thread while Tomcat is running).  These can now be configured
  separately in the Host element.
  
  Default for both properties is true to mirror the previous behavior.
  
  Submitted by: Glenn Nielsen [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.18  +45 -10
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java
  
  Index: HostConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- HostConfig.java   1 Mar 2002 03:04:44 -   1.17
  +++ HostConfig.java   5 Mar 2002 01:55:02 -   1.18
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v
 1.17 2002/03/01 03:04:44 craigmcc Exp $
  - * $Revision: 1.17 $
  - * $Date: 2002/03/01 03:04:44 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v
 1.18 2002/03/05 01:55:02 craigmcc Exp $
  + * $Revision: 1.18 $
  + * $Date: 2002/03/05 01:55:02 $
*
* 
*
  @@ -102,7 +102,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.17 $ $Date: 2002/03/01 03:04:44 $
  + * @version $Revision: 1.18 $ $Date: 2002/03/05 01:55:02 $
*/
   
   public class HostConfig
  @@ -157,6 +157,13 @@
   
   
   /**
  + * Should we monitor the codeappBase/code directory for new
  + * applications and automatically deploy them?
  + */
  +private boolean liveDeploy = false;
  +
  +
  +/**
* The background thread.
*/
   private Thread thread = null;
  @@ -258,6 +265,28 @@
   
   
   /**
  + * Return the live deploy flag for this component.
  + */
  +public boolean isLiveDeploy() {
  +
  +return (this.liveDeploy);
  +
  +}
  +
  +
  +/**
  + * Set the live deploy flag for this component.
  + *
  + * @param liveDeploy The new live deploy flag
  + */
  +public void setLiveDeploy(boolean liveDeploy) {
  +
  +this.liveDeploy = liveDeploy;
  +
  +}
  +
  +
  +/**
* Return the unpack WARs flag.
*/
   public boolean isUnpackWARs() {
  @@ -297,6 +326,7 @@
   if (hostDebug  this.debug) {
   this.debug = hostDebug;
   }
  +setLiveDeploy(((StandardHost) host).getLiveDeploy());
   setUnpackWARs(((StandardHost) host).isUnpackWARs());
   }
   } catch (ClassCastException e) {
  @@ -746,7 +776,13 @@
   if (debug = 1)
   log(sm.getString(hostConfig.start));
   
  -threadStart();
  +if (host.getAutoDeploy()) {
  +deployApps();
  +}
  +
  +if (isLiveDeploy()) {
  +threadStart();
  +}
   
   }
   
  @@ -869,15 +905,14 @@
   // Loop until the termination semaphore is set
   while (!threadDone) {
   
  +// Wait for our check interval
  +threadSleep();
  +
   // Deploy apps if the Host allows auto deploying
  -if (host.getAutoDeploy())
  -deployApps();
  +deployApps();
   
   // Check for web.xml modification
   checkWebXmlLastModified();
  -
  -// Wait for our check interval
  -threadSleep();
   
   }
   
  
  
  
  1.11  +14 -8 jakarta-tomcat-4.0/webapps/tomcat-docs/config/host.xml
  
  Index: host.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/host.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- host.xml  2 Mar 2002 16:38:58 -   1.10
  +++ host.xml  5 Mar 2002 01:55:03 -   1.11
  @@ -126,6 +126,14 @@
   will be used by default./p
 /attribute
   
  +  attribute name=liveDeploy required=false
  +pThis flag value indicates if new web applications, dropped in to
  +the codeappBase/code directory while Tomcat is running, should
  +be automatically deployed.  The flag's value defaults to true.  See
  +a href=#Automatic Application DeploymentAutomatic Application
  +Deployment/a for more information./p
  +  /attribute
  +
 attribute name=unpackWARs required

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

2002-03-04 Thread craigmcc

craigmcc02/03/04 18:01:03

  Modified:catalina/src/share/org/apache/catalina/core
StandardHost.java
  Log:
  Forgot one updated file for the liveDeploy update.
  
  Revision  ChangesPath
  1.25  +40 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java
  
  Index: StandardHost.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- StandardHost.java 28 Feb 2002 17:20:56 -  1.24
  +++ StandardHost.java 5 Mar 2002 02:01:02 -   1.25
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
 1.24 2002/02/28 17:20:56 glenn Exp $
  - * $Revision: 1.24 $
  - * $Date: 2002/02/28 17:20:56 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
 1.25 2002/03/05 02:01:02 craigmcc Exp $
  + * $Revision: 1.25 $
  + * $Date: 2002/03/05 02:01:02 $
*
* 
*
  @@ -95,7 +95,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.24 $ $Date: 2002/02/28 17:20:56 $
  + * @version $Revision: 1.25 $ $Date: 2002/03/05 02:01:02 $
*/
   
   public class StandardHost
  @@ -177,6 +177,12 @@
   
   
   /**
  + * The live deploy flag for this Host.
  + */
  +private boolean liveDeploy = true;
  +
  +
  +/**
* The Java class name of the default Mapper class for this Container.
*/
   private String mapperClass =
  @@ -233,7 +239,7 @@
   /**
* Return the value of the auto deploy flag.  If true, it indicates that 
* this host's child webapps should be discovred and automatically 
  - * deployed.
  + * deployed at startup time.
*/
   public boolean getAutoDeploy() {
   
  @@ -323,6 +329,35 @@
   this.contextClass = contextClass;
   support.firePropertyChange(contextClass,
  oldContextClass, this.contextClass);
  +
  +}
  +
  +
  +/**
  + * Return the value of the live deploy flag.  If true, it indicates that 
  + * a background thread should be started that looks for web application
  + * context files, WAR files, or unpacked directories being dropped in to
  + * the codeappBase/code directory, and deploys new ones as they are
  + * encountered.
  + */
  +public boolean getLiveDeploy() {
  +
  +return (this.liveDeploy);
  +
  +}
  +
  +
  +/**
  + * Set the live deploy flag value for this host.
  + * 
  + * @param liveDeploy The new live deploy flag
  + */
  +public void setLiveDeploy(boolean liveDeploy) {
  +
  +boolean oldLiveDeploy = this.liveDeploy;
  +this.liveDeploy = liveDeploy;
  +support.firePropertyChange(liveDeploy, oldLiveDeploy, 
  +   this.liveDeploy);
   
   }
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/docs/dev/xdocs/stylesheets project.xml tempoarary.xsl

2002-03-01 Thread craigmcc

craigmcc02/03/01 12:13:52

  Removed: catalina/docs JDBCRealm-howto.html index.html manager.html
singlesignon.html tomcat-security.html
   catalina/docs/appdev build.xml.txt contents.html
deployment.html footer.html header.html index.html
installation.html introduction.html processes.html
source.html tomcat.gif web.xml.txt
   catalina/docs/appdev/sample build.bat build.xml
   catalina/docs/appdev/sample/etc web.xml
   catalina/docs/appdev/sample/src Hello.java
   catalina/docs/appdev/sample/web hello.jsp index.html
   catalina/docs/appdev/sample/web/images tomcat.gif
   catalina/docs/config categories.html context.html
default.html engine.html example.html host.html
http11.html index.html introduction.html
logger.html main.html realm.html server.html
service.html valve.html warp.html
   catalina/docs/dev README.html building.html
classloaders.html new_spec.html
   catalina/docs/dev/xdocs building.xml classloaders.xml
fs-admin-apps.xml fs-default.xml fs-invoker.xml
fs-jdbc-realm.xml fs-jndi-realm.xml index.xml
   catalina/docs/dev/xdocs/stylesheets project.xml
tempoarary.xsl
  Log:
  First pass through the docs (Tomcat 4 HEAD branch only) to remove stuff
  that has migrated to the webapps/tomcat-docs hierarchy.

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup HostConfig.java

2002-02-28 Thread craigmcc

craigmcc02/02/28 19:04:44

  Modified:catalina/src/share/org/apache/catalina/core
StandardHostDeployer.java
   catalina/src/share/org/apache/catalina/servlets
ManagerServlet.java
   catalina/src/share/org/apache/catalina/startup
HostConfig.java
  Log:
  Restore the unpackWARs behavior (but only for WAR files in the appBase
  subdirectory) that was broken by previous changes to deployment and the
  Manager webapp's servlet.  The WAR-expansion logic was refactored from
  StandardHostDeployer to HostConfig, which is the only place that requires it.
  
  Applications that are added via the Manager webapp's /install or /deploy
  commands are *not* auto-expanded -- if you want your webapp to run from an
  unpacked directory, you should install an unpacked directory.
  
  NOTE:  You can also get auto-unpack service by simply dropping a WAR file
  into the appBase directory while Tomcat is running - a background thread
  will notice this and unpack it in the same way that startup works.
  
  NOTE:  As before, any auto-unpacked directory is *never* deleted, because
  the user has probably changed things and would be very annoyed if it was
  removed.
  
  I'm going to make a pass through the JavaDocs and the documentation files
  to make sure that they are all up to date with respect to the actual
  functionality.
  
  Revision  ChangesPath
  1.5   +32 -226   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java
  
  Index: StandardHostDeployer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StandardHostDeployer.java 27 Feb 2002 01:17:00 -  1.4
  +++ StandardHostDeployer.java 1 Mar 2002 03:04:43 -   1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
 1.4 2002/02/27 01:17:00 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2002/02/27 01:17:00 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
 1.5 2002/03/01 03:04:43 craigmcc Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/03/01 03:04:43 $
*
* 
*
  @@ -94,7 +94,7 @@
* codeStandardHost/code implementation class./p
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2002/02/27 01:17:00 $
  + * @version $Revision: 1.5 $ $Date: 2002/03/01 03:04:43 $
*/
   
   public class StandardHostDeployer implements Deployer {
  @@ -206,9 +206,10 @@
* @exception IllegalStateException if the specified context path
*  is already attached to an existing web application
* @exception IOException if an input/output error was encountered
  - *  during install
  + *  during installation
*/
  -public void install(String contextPath, URL war) throws IOException {
  +public synchronized void install(String contextPath, URL war)
  +throws IOException {
   
   // Validate the format and state of our arguments
   if (contextPath == null)
  @@ -224,49 +225,23 @@
   throw new IllegalArgumentException
   (sm.getString(standardHost.warRequired));
   
  -// Prepare the local variables we will require
  +// Calculate the document base for the new web application
  +host.log(sm.getString(standardHost.installing,
  +  contextPath, war.toString()));
   String url = war.toString();
   String docBase = null;
  -host.log(sm.getString(standardHost.installing, contextPath, url));
  -
  -// Expand a WAR archive into an unpacked directory if needed
  -// NOTE:  If the user supplies a jar:file: URL, assume that
  -// they do not want WAR expansion even if unpackWARs is set
  -if (host.isUnpackWARs()  !url.startsWith(jar:file:)) {
  -
  -if (url.startsWith(jar:))
  -docBase = expand(war);
  -else if (url.startsWith(file://))
  -docBase = url.substring(7);
  -else if (url.startsWith(file:))
  -docBase = url.substring(5);
  -else
  -throw new IllegalArgumentException
  -(sm.getString(standardHost.warURL, url));
  -
  -// Make sure the document base directory exists and is readable
  -File docBaseDir = new File(docBase);
  -if (!docBaseDir.exists() || !docBaseDir.isDirectory() ||
  -!docBaseDir.canRead())
  -throw new IllegalArgumentException

cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config host.xml

2002-02-28 Thread craigmcc

craigmcc02/02/28 21:46:52

  Modified:webapps/tomcat-docs/config host.xml
  Log:
  Tweak the auto-deployment documentation to reflect the current
  functionality.
  
  Revision  ChangesPath
  1.9   +21 -15jakarta-tomcat-4.0/webapps/tomcat-docs/config/host.xml
  
  Index: host.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/host.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- host.xml  25 Oct 2001 00:38:49 -  1.8
  +++ host.xml  1 Mar 2002 05:46:52 -   1.9
  @@ -73,7 +73,9 @@
 attribute name=autoDeploy required=false
   pThis flag value indicates if web applications from this host should
   be automatically deployed by the host configurator.
  -The flag's value defaults to true./p
  +The flag's value defaults to true.  See
  +a href=#Automatic Application DeploymentAutomatic Application
  +Deployment/a for more information./p
 /attribute
   
 attribute name=className required=false
  @@ -117,18 +119,21 @@
   pJava class name of the error reporting valve which will be used
   by this Host. The responsability of this valve is to output error
   reports. Setting this property allows to customize the look of the
  -error pages which will be generated by Tomcat. This class must 
  -implement the 
  +error pages which will be generated by Tomcat. This class must
  +implement the
   codeorg.apache.catalina.Valve/code interface. If none is specified,
  -the value codeorg.apache.catalina.valves.ErrorReportValve/code 
  +the value codeorg.apache.catalina.valves.ErrorReportValve/code
   will be used by default./p
 /attribute
   
 attribute name=unpackWARs required=false
   pSet to codetrue/code if you want web applications that are
  -deployed into this virtual host from a Web Application Archive (WAR)
  -file to be unpacked into a disk directory structure, or
  -codefalse/code to run the application directly from a WAR file./p
  +placed in the codeappBase/code directory as web application
  +archive (WAR) files to be unpacked into a corresponding disk directory
  +structure, codefalse/code to run such web applications directly
  +from a WAR file.  See
  +a href=#Automatic Application DeploymentAutomatic Application
  +Deployment/a for more information./p
 /attribute
   
   /attributes
  @@ -215,6 +220,13 @@
   This behavior is enabled by setting the codeautoDeploy/code attribute
   to codetrue/code (which is the default value):/p
   ul
  +liAny XML file in this directory is assumed to contain a
  +a href=context.htmlContext/a element (and its associated
  +subelements) for a single web application.  The codedocBase/code
  +attribute of this codelt;Contextgt;/code element will typically
  +be the absolute pathname to a web applicationd directory, or the
  +absolute pathname of a web application archive (WAR) file (which
  +will not be expanded)./li
   liAny web application archive file that does not have a corresponding
   directory of the same name (without the .war extension) will be
   automatically expanded, unless the codeunpackWARs/code property
  @@ -232,19 +244,13 @@
   deployed Context will be a slash character (/) followed by the
   directory name, unless the directory name is ROOT, in which case
   the context path will be an empty string ()./li
  -liAny XML file in this directory is assumed to contain a
  -a href=context.htmlContext/a element (and its associated
  -subelements) for a single web application.  The codedocBase/code
  -attribute of this codelt;Contextgt;/code element will typically
  -be the absolute pathname to a web applicationd directory, or the
  -absolute pathname of a web application archive (WAR) file (which
  -will not be expanded)./li
   /ul
   
   pIn addition to the automatic deployment that occurs at startup time,
   you can also add new WAR files, directory, or XML configuration files
   into the codeappBase/code directory at any time, and the corresponding
  -applications will be automatically deployed./p
  +applications will be automatically deployed if the codeautoDeploy/code
  +property is set to codetrue/code./p
   
 /subsection
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets LocalStrings.properties LocalStrings_ja.properties ManagerServlet.java

2002-02-27 Thread craigmcc

craigmcc02/02/27 14:43:56

  Modified:catalina/src/share/org/apache/catalina/servlets
LocalStrings.properties LocalStrings_ja.properties
ManagerServlet.java
  Log:
  Add the docBase property to the information displayed by the /list command,
  to assist tools in remembering the connection between a context path and the
  application that is deployed on that path.
  
  Revision  ChangesPath
  1.13  +1 -1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- LocalStrings.properties   27 Feb 2002 05:40:57 -  1.12
  +++ LocalStrings.properties   27 Feb 2002 22:43:56 -  1.13
  @@ -18,7 +18,7 @@
   managerServlet.invalidPath=FAIL - Invalid context path {0} was specified
   managerServlet.invalidWar=FAIL - Invalid application URL {0} was specified
   managerServlet.listed=OK - Listed applications for virtual host {0}
  -managerServlet.listitem={0}:{1}:{2}
  +managerServlet.listitem={0}:{1}:{2}:{3}
   managerServlet.noAppBase=FAIL - Cannot identify application base for context path 
{0}
   managerServlet.noCommand=FAIL - No command was specified
   managerServlet.noContext=FAIL - No context exists for path {0}
  
  
  
  1.4   +1 -1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/LocalStrings_ja.properties
  
  Index: LocalStrings_ja.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/LocalStrings_ja.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LocalStrings_ja.properties3 Nov 2001 03:58:51 -   1.3
  +++ LocalStrings_ja.properties27 Feb 2002 22:43:56 -  1.4
  @@ -15,7 +15,7 @@
   managerServlet.invalidPath=\u5931\u6557 - 
\u7121\u52b9\u306a\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} 
\u304c\u6307\u5b9a\u3055\u308c\u307e\u3057\u305f
   managerServlet.invalidWar=\u5931\u6557 - 
\u7121\u52b9\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eURL {0} 
\u304c\u6307\u5b9a\u3055\u308c\u307e\u3057\u305f
   managerServlet.listed=OK - \u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8 {0} 
\u306e\u30ea\u30b9\u30c8\u3055\u308c\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3
  -managerServlet.listitem={0}:{1}:{2}
  +managerServlet.listitem={0}:{1}:{2}:{3}
   managerServlet.noCommand=\u5931\u6557 - 
\u30b3\u30de\u30f3\u30c9\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093
   managerServlet.noContext=\u5931\u6557 - \u30d1\u30b9 {0} 
\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u304c\u5b58\u5728\u3057\u307e\u305b\u3093
   managerServlet.noPath=\u5931\u6557 - 
\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093
  
  
  
  1.14  +8 -6  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java
  
  Index: ManagerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ManagerServlet.java   27 Feb 2002 05:40:57 -  1.13
  +++ ManagerServlet.java   27 Feb 2002 22:43:56 -  1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.13 2002/02/27 05:40:57 craigmcc Exp $
  - * $Revision: 1.13 $
  - * $Date: 2002/02/27 05:40:57 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.14 2002/02/27 22:43:56 craigmcc Exp $
  + * $Revision: 1.14 $
  + * $Date: 2002/02/27 22:43:56 $
*
* 
*
  @@ -182,7 +182,7 @@
* /ul
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.13 $ $Date: 2002/02/27 05:40:57 $
  + * @version $Revision: 1.14 $ $Date: 2002/02/27 22:43:56 $
*/
   
   public class ManagerServlet
  @@ -708,12 +708,14 @@
   writer.println(sm.getString(managerServlet.listitem,
   displayPath,
   running,
  -   + 
context.getManager().findSessions().length));
  +   + 
context.getManager().findSessions().length,
  +context.getDocBase

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets ManagerServlet.java

2002-02-27 Thread craigmcc

craigmcc02/02/27 22:10:55

  Modified:catalina/src/share/org/apache/catalina/servlets
ManagerServlet.java
  Log:
  Refine the mechanism used for the /deploy command so that undeploy/redeploy
  works reliably.
  
  Revision  ChangesPath
  1.15  +61 -114   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java
  
  Index: ManagerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ManagerServlet.java   27 Feb 2002 22:43:56 -  1.14
  +++ ManagerServlet.java   28 Feb 2002 06:10:55 -  1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.14 2002/02/27 22:43:56 craigmcc Exp $
  - * $Revision: 1.14 $
  - * $Date: 2002/02/27 22:43:56 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.15 2002/02/28 06:10:55 craigmcc Exp $
  + * $Revision: 1.15 $
  + * $Date: 2002/02/28 06:10:55 $
*
* 
*
  @@ -182,7 +182,7 @@
* /ul
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.14 $ $Date: 2002/02/27 22:43:56 $
  + * @version $Revision: 1.15 $ $Date: 2002/02/28 06:10:55 $
*/
   
   public class ManagerServlet
  @@ -432,6 +432,7 @@
   log(deploy: Deploying web application at ' + path + ');
   }
   
  +// Validate the requested context path
   if ((path == null) || (!path.startsWith(/)  path.equals())) {
   writer.println(sm.getString(managerServlet.invalidPath, path));
   return;
  @@ -440,19 +441,30 @@
   if (displayPath.equals()) {
   displayPath = /;
   }
  +String basename = null;
  +if (path.equals()) {
  +basename = _;
  +} else {
  +basename = path.substring(1);
  +}
  +if (deployer.findDeployedApp(path) != null) {
  +writer.println
  +(sm.getString(managerServlet.alreadyContext, displayPath));
  +return;
  +}
   
   // Upload the web application archive to a temporary JAR file
   File tempDir = (File) getServletContext().getAttribute
   (javax.servlet.context.tempdir);
  -File tempJar = new File(tempDir, webapp.war);
  -tempJar.delete();
  +File localWar = new File(tempDir, basename + .war);
  +localWar.delete();
   try {
   if (debug = 2) {
  -log(Uploading WAR file to  + tempJar);
  +log(Uploading WAR file to  + localWar);
   }
   ServletInputStream istream = request.getInputStream();
   BufferedOutputStream ostream =
  -new BufferedOutputStream(new FileOutputStream(tempJar), 1024);
  +new BufferedOutputStream(new FileOutputStream(localWar), 1024);
   byte buffer[] = new byte[1024];
   while (true) {
   int n = istream.read(buffer);
  @@ -468,99 +480,24 @@
   log(managerServlet.upload[ + displayPath + ], e);
   writer.println(sm.getString(managerServlet.exception,
   e.toString()));
  -tempJar.delete();
  +localWar.delete();
   return;
   }
   
  -// Validate that the context path and directory name are available
  -if (deployer.findDeployedApp(path) != null) {
  -writer.println
  -(sm.getString(managerServlet.alreadyContext, displayPath));
  -tempJar.delete();
  -return;
  -}
  -if (!(context.getParent() instanceof Host)) {
  -writer.println(sm.getString(managerServlet.noAppBase,
  -displayPath));
  -tempJar.delete();
  -return;
  -}
  -String appBase = ((Host) context.getParent()).getAppBase();
  -File appBaseDir = new File(appBase);
  -if (!appBaseDir.isAbsolute()) {
  -appBaseDir = new File(System.getProperty(catalina.base),
  -  appBase);
  -}
  -String docBase = displayPath.substring(1);
  -if (docBase.length()  1) {
  -docBase = _;
  -}
  -File docBaseDir = new File(appBaseDir, docBase);
  -if (docBaseDir.exists()) {
  -writer.println(sm.getString(managerServlet.alreadyDocBase,
  -docBaseDir));
  -tempJar.delete();
  -return

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources BaseDirContext.java FileDirContext.java ProxyDirContext.java WARDirContext.java

2002-02-26 Thread craigmcc

craigmcc02/02/26 17:17:01

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java StandardHostDeployer.java
   catalina/src/share/org/apache/naming/resources
BaseDirContext.java FileDirContext.java
ProxyDirContext.java WARDirContext.java
  Log:
  Fix the process of undeploying a web applcation (in StandardContext.stop())
  so that, if the application is deployed from a WAR file instead of an
  unpacked directory, the WAR file is actually closed.  Otherwise, you run into
  problems trying to redeploy a WAR file from the same pathname (on Unix, you
  see the old webapp again because the old WAR is still open, on Windows you
  get errors trying to write onto a WAR file open for reading).
  
  Revision  ChangesPath
  1.98  +24 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- StandardContext.java  20 Feb 2002 08:29:56 -  1.97
  +++ StandardContext.java  27 Feb 2002 01:17:00 -  1.98
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.97 2002/02/20 08:29:56 remm Exp $
  - * $Revision: 1.97 $
  - * $Date: 2002/02/20 08:29:56 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.98 2002/02/27 01:17:00 craigmcc Exp $
  + * $Revision: 1.98 $
  + * $Date: 2002/02/27 01:17:00 $
*
* 
*
  @@ -98,9 +98,10 @@
   import org.apache.naming.ResourceRef;
   import org.apache.naming.ResourceEnvRef;
   import org.apache.naming.TransactionRef;
  +import org.apache.naming.resources.BaseDirContext;
   import org.apache.naming.resources.FileDirContext;
  +import org.apache.naming.resources.ProxyDirContext;
   import org.apache.naming.resources.WARDirContext;
  -import org.apache.naming.resources.BaseDirContext;
   import org.apache.naming.resources.DirContextURLStreamHandler;
   import org.apache.catalina.Container;
   import org.apache.catalina.ContainerListener;
  @@ -146,7 +147,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.97 $ $Date: 2002/02/20 08:29:56 $
  + * @version $Revision: 1.98 $ $Date: 2002/02/27 01:17:00 $
*/
   
   public class StandardContext
  @@ -3565,6 +3566,24 @@
   if ((loader != null)  (loader instanceof Lifecycle)) {
   ((Lifecycle) loader).stop();
   }
  +
  +// Release our resources DirContext
  +DirContext dirContext = resources;
  +if ((dirContext != null) 
  +(dirContext instanceof ProxyDirContext)) {
  +dirContext = ((ProxyDirContext) dirContext).getDirContext();
  +}
  +if (dirContext != null) {
  +if (debug = 1) {
  +log(Releasing document base  + docBase);
  +}
  +if (dirContext instanceof BaseDirContext) {
  +((BaseDirContext) dirContext).release();
  +} else {
  +log(Cannot release  + resources);
  +}
  +}
  +
   
   } finally {
   
  
  
  
  1.4   +12 -7 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java
  
  Index: StandardHostDeployer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StandardHostDeployer.java 27 Jan 2002 21:11:20 -  1.3
  +++ StandardHostDeployer.java 27 Feb 2002 01:17:00 -  1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
 1.3 2002/01/27 21:11:20 remm Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/01/27 21:11:20 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
 1.4 2002/02/27 01:17:00 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/02/27 01:17:00 $
*
* 
*
  @@ -78,6 +78,7 @@
   import org.apache.catalina.Container;
   import org.apache.catalina.Context;
   import org.apache.catalina.Deployer;
  +import org.apache.catalina.Globals;
   import org.apache.catalina.Lifecycle;
   import

cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs manager-howto.xml

2002-02-26 Thread craigmcc

craigmcc02/02/26 21:40:57

  Modified:catalina/src/share/org/apache/catalina/servlets
LocalStrings.properties ManagerServlet.java
   webapps/admin banner.jsp
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin
ApplicationResources_en.properties
   webapps/tomcat-docs manager-howto.xml
  Log:
  Since a /reload command has no effect on an application that is loaded
  directly from a WAR file, report it as an error instead of pretending to
  perform the reload.
  
  Revision  ChangesPath
  1.12  +1 -0  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- LocalStrings.properties   12 Feb 2002 22:14:02 -  1.11
  +++ LocalStrings.properties   27 Feb 2002 05:40:57 -  1.12
  @@ -25,6 +25,7 @@
   managerServlet.noDirectory=FAIL - Non-directory document base for path {0}
   managerServlet.noDocBase=FAIL - Cannot remove document base for path {0}
   managerServlet.noPath=FAIL - No context path was specified
  +managerServlet.noReload=FAIL - Reload not supported on WAR deployed at path {0}
   managerServlet.noRename=FAIL - Cannot deploy uploaded WAR for path {0}
   managerServlet.noRole=FAIL - User does not possess role {0}
   managerServlet.noWrapper=Container has not called setWrapper() for this servlet
  
  
  
  1.13  +15 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java
  
  Index: ManagerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ManagerServlet.java   12 Feb 2002 22:14:02 -  1.12
  +++ ManagerServlet.java   27 Feb 2002 05:40:57 -  1.13
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.12 2002/02/12 22:14:02 craigmcc Exp $
  - * $Revision: 1.12 $
  - * $Date: 2002/02/12 22:14:02 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.13 2002/02/27 05:40:57 craigmcc Exp $
  + * $Revision: 1.13 $
  + * $Date: 2002/02/27 05:40:57 $
*
* 
*
  @@ -75,6 +75,7 @@
   import java.util.Enumeration;
   import java.util.jar.JarEntry;
   import java.util.jar.JarFile;
  +import javax.naming.directory.DirContext;
   import javax.servlet.ServletException;
   import javax.servlet.ServletInputStream;
   import javax.servlet.UnavailableException;
  @@ -90,6 +91,8 @@
   import org.apache.catalina.Session;
   import org.apache.catalina.Wrapper;
   import org.apache.catalina.util.StringManager;
  +import org.apache.naming.resources.ProxyDirContext;
  +import org.apache.naming.resources.WARDirContext;
   
   
   /**
  @@ -179,7 +182,7 @@
* /ul
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.12 $ $Date: 2002/02/12 22:14:02 $
  + * @version $Revision: 1.13 $ $Date: 2002/02/27 05:40:57 $
*/
   
   public class ManagerServlet
  @@ -741,6 +744,14 @@
   if (context == null) {
   writer.println(sm.getString(managerServlet.noContext, 
displayPath));
   return;
  +}
  +DirContext resources = context.getResources();
  +if (resources instanceof ProxyDirContext) {
  +resources = ((ProxyDirContext) resources).getDirContext();
  +}
  +if (resources instanceof WARDirContext) {
  +writer.println(sm.getString(managerServlet.noReload, 
displayPath));
  +return;
   }
   context.reload();
   writer.println(sm.getString(managerServlet.reloaded, displayPath));
  
  
  
  1.3   +3 -7  jakarta-tomcat-4.0/webapps/admin/banner.jsp
  
  Index: banner.jsp
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/banner.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- banner.jsp13 Nov 2001 01:00:03 -  1.2
  +++ banner.jsp27 Feb 2002 05:40:57 -  1.3
  @@ -15,16 +15,14 @@
   
   body bgcolor=white
   
  -center
  -
  -h2bean:message key=index.success//h2
  +h2 align=centerbean:message key=index.success//h2
   p
  -h2
  +h3 align=center
 bean:message key=index.logout/
 html:link page=/logOut.do target=_top

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant DeployTask.java InstallTask.java ReloadTask.java RemoveTask.java StartTask.java StopTask.java

2002-02-25 Thread craigmcc

craigmcc02/02/25 17:24:33

  Modified:catalina/src/share/org/apache/catalina/ant DeployTask.java
InstallTask.java ReloadTask.java RemoveTask.java
StartTask.java StopTask.java
  Log:
  Update Ant tasks to URLEncode the query parameters that are sent along with
  the commands to the Manager webapp.  This deals with issues like spaces in
  the context path, which were not being deployed correctly.
  
  FIXME - The code that maps a request URI to a context still chokes on a
  space in the context path; that is the next thing to be fixed.
  
  Revision  ChangesPath
  1.2   +5 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/DeployTask.java
  
  Index: DeployTask.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/DeployTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeployTask.java   12 Feb 2002 22:14:01 -  1.1
  +++ DeployTask.java   26 Feb 2002 01:24:33 -  1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/DeployTask.java,v
 1.1 2002/02/12 22:14:01 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/02/12 22:14:01 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/DeployTask.java,v
 1.2 2002/02/26 01:24:33 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/02/26 01:24:33 $
*
* 
*
  @@ -67,6 +67,7 @@
   import java.io.IOException;
   import java.net.URL;
   import java.net.URLConnection;
  +import java.net.URLEncoder;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Task;
   
  @@ -76,7 +77,7 @@
* the Tomcat manager application.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2002/02/12 22:14:01 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/26 01:24:33 $
* @since 4.1
*/
   public class DeployTask extends AbstractCatalinaTask {
  @@ -142,7 +143,7 @@
   } catch (IOException e) {
   throw new BuildException(e);
   }
  -execute(/deploy?path= + this.path, stream,
  +execute(/deploy?path= + URLEncoder.encode(this.path), stream,
   application/octet-stream, contentLength);
   
   }
  
  
  
  1.3   +8 -7  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/InstallTask.java
  
  Index: InstallTask.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/InstallTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InstallTask.java  12 Feb 2002 22:14:01 -  1.2
  +++ InstallTask.java  26 Feb 2002 01:24:33 -  1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/InstallTask.java,v
 1.2 2002/02/12 22:14:01 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/02/12 22:14:01 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/InstallTask.java,v
 1.3 2002/02/26 01:24:33 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/02/26 01:24:33 $
*
* 
*
  @@ -63,6 +63,7 @@
   package org.apache.catalina.ant;
   
   
  +import java.net.URLEncoder;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Task;
   
  @@ -72,7 +73,7 @@
* Tomcat manager application.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2002/02/12 22:14:01 $
  + * @version $Revision: 1.3 $ $Date: 2002/02/26 01:24:33 $
* @since 4.1
*/
   public class InstallTask extends AbstractCatalinaTask {
  @@ -144,14 +145,14 @@
   (Must specify at least one of 'config' and 'war');
   }
   StringBuffer sb = new StringBuffer(/install?path=);
  -sb.append(this.path);
  +sb.append(URLEncoder.encode(this.path));
   if (config != null) {
   sb.append(config=);
  -sb.append(config);
  +sb.append(URLEncoder.encode(config));
   }
   if (war != null) {
   sb.append(war=);
  -sb.append(war);
  +sb.append(URLEncoder.encode(war));
   }
   execute(sb.toString());
   
  
  
  
  1.3   +6 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/ReloadTask.java
  
  Index: ReloadTask.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/ReloadTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator BasicAuthenticator.java DigestAuthenticator.java FormAuthenticator.java SSLAuthenticator.java

2002-02-19 Thread craigmcc

craigmcc02/02/19 09:13:26

  Modified:catalina/src/share/org/apache/catalina/authenticator Tag:
tomcat_40_branch BasicAuthenticator.java
DigestAuthenticator.java FormAuthenticator.java
SSLAuthenticator.java
  Log:
  Port (from the HEAD branch) making the Authenticator implementations
  non-final so that they can be subclassed.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.10.2.1  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java
  
  Index: BasicAuthenticator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v
  retrieving revision 1.10
  retrieving revision 1.10.2.1
  diff -u -r1.10 -r1.10.2.1
  --- BasicAuthenticator.java   1 Aug 2001 03:04:04 -   1.10
  +++ BasicAuthenticator.java   19 Feb 2002 17:13:26 -  1.10.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v
 1.10 2001/08/01 03:04:04 craigmcc Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/08/01 03:04:04 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v
 1.10.2.1 2002/02/19 17:13:26 craigmcc Exp $
  + * $Revision: 1.10.2.1 $
  + * $Date: 2002/02/19 17:13:26 $
*
* 
*
  @@ -84,10 +84,10 @@
* and Digest Access Authentication.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.10 $ $Date: 2001/08/01 03:04:04 $
  + * @version $Revision: 1.10.2.1 $ $Date: 2002/02/19 17:13:26 $
*/
   
  -public final class BasicAuthenticator
  +public class BasicAuthenticator
   extends AuthenticatorBase {
   
   
  
  
  
  1.9.2.1   +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java
  
  Index: DigestAuthenticator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- DigestAuthenticator.java  1 Aug 2001 03:04:04 -   1.9
  +++ DigestAuthenticator.java  19 Feb 2002 17:13:26 -  1.9.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java,v
 1.9 2001/08/01 03:04:04 craigmcc Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/08/01 03:04:04 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java,v
 1.9.2.1 2002/02/19 17:13:26 craigmcc Exp $
  + * $Revision: 1.9.2.1 $
  + * $Date: 2002/02/19 17:13:26 $
*
* 
*
  @@ -88,10 +88,10 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.9 $ $Date: 2001/08/01 03:04:04 $
  + * @version $Revision: 1.9.2.1 $ $Date: 2002/02/19 17:13:26 $
*/
   
  -public final class DigestAuthenticator
  +public class DigestAuthenticator
   extends AuthenticatorBase {
   
   
  
  
  
  1.17.2.2  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java
  
  Index: FormAuthenticator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v
  retrieving revision 1.17.2.1
  retrieving revision 1.17.2.2
  diff -u -r1.17.2.1 -r1.17.2.2
  --- FormAuthenticator.java11 Oct 2001 22:52:38 -  1.17.2.1
  +++ FormAuthenticator.java19 Feb 2002 17:13:26 -  1.17.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v
 1.17.2.1 2001/10/11 22:52:38 craigmcc Exp $
  - * $Revision: 1.17.2.1 $
  - * $Date: 2001/10/11 22:52:38 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v
 1.17.2.2 2002/02/19 17:13:26 craigmcc Exp $
  + * $Revision: 1.17.2.2 $
  + * $Date: 2002/02/19 17:13:26 $
*
* 
*
  @@ -88,10 +88,10 @@
* Authentication, as described in the Servlet API Specification, Version 2.2.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.17.2.1 $ $Date: 2001/10/11 22:52:38 $
  + * @version $Revision: 1.17.2.2 $ $Date: 2002/02/19 17:13:26 $
*/
   
  -public final class

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup ContextConfig.java

2002-02-19 Thread craigmcc

craigmcc02/02/19 14:16:00

  Modified:catalina/src/share/org/apache/catalina/mbeans
MBeanUtils.java ServerLifecycleListener.java
   catalina/src/share/org/apache/catalina/startup
ContextConfig.java
  Log:
  Correct the mechanism by which MBean names were generated for Valves.  The
  previous algorithm did not support repeated generation of the same name for
  the same Valve instance, which manifested itself as failure to find the
  appropriate MBeans at shutdown time (so that shutdown could complete).
  
  Fix a couple of places in ContextConfig where new valves were being added,
  but the appropriate event listener notifications were not getting sent.
  This causes some Valve MBeans to not get created at startup time.
  
  PR: 4639432
  
  Revision  ChangesPath
  1.27  +13 -30
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- MBeanUtils.java   19 Feb 2002 02:15:27 -  1.26
  +++ MBeanUtils.java   19 Feb 2002 22:16:00 -  1.27
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.26 2002/02/19 02:15:27 craigmcc Exp $
  - * $Revision: 1.26 $
  - * $Date: 2002/02/19 02:15:27 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.27 2002/02/19 22:16:00 craigmcc Exp $
  + * $Revision: 1.27 $
  + * $Date: 2002/02/19 22:16:00 $
*
* 
*
  @@ -109,7 +109,7 @@
*
* @author Craig R. McClanahan
* @author Amy Roh
  - * @version $Revision: 1.26 $ $Date: 2002/02/19 02:15:27 $
  + * @version $Revision: 1.27 $ $Date: 2002/02/19 22:16:00 $
*/
   
   public class MBeanUtils {
  @@ -159,14 +159,6 @@
   private static MBeanServer mserver = createServer();
   
   
  -/**
  - * The sequence number for Valve
  - */
  -private static int contextValveSequence = 0;
  -private static int hostValveSequence = 0;
  -private static int engineValveSequence = 0;
  -
  -
   // - Static Methods
   
   
  @@ -1172,21 +1164,15 @@
   
   if (container instanceof Engine) {
   Service service = ((Engine)container).getService();
  -Integer sequenceInt = new Integer(engineValveSequence);
  -String sequenceStr = sequenceInt.toString();
   name = new ObjectName(domain + :type=Valve,sequence= +
  -sequenceStr + ,service= +
  -service.getName());
  -engineValveSequence++;
  +  valve.hashCode() + ,service= +
  +  service.getName());
   } else if (container instanceof Host) {
   Service service = ((Engine)container.getParent()).getService();
  -Integer sequenceInt = new Integer(hostValveSequence);
  -String sequenceStr = sequenceInt.toString();
   name = new ObjectName(domain + :type=Valve,sequence= +
  -sequenceStr + ,host= +
  -container.getName() + ,service= +
  -service.getName());
  -hostValveSequence++;
  +  valve.hashCode() + ,host= +
  +  container.getName() + ,service= +
  +  service.getName());
   } else if (container instanceof Context) {
   String path = ((Context)container).getPath();
   if (path.length()  1) {
  @@ -1194,14 +1180,11 @@
   }
   Host host = (Host) container.getParent();
   Service service = ((Engine) host.getParent()).getService();
  -Integer sequenceInt = new Integer(contextValveSequence);
  -String sequenceStr = sequenceInt.toString();
   name = new ObjectName(domain + :type=Valve,sequence= +
  -sequenceStr + ,path= +
  -path + ,host= +
  -host.getName() + ,service= +
  -service.getName());
  -contextValveSequence++;
  +  valve.hashCode() + ,path= +
  +  path + ,host= +
  +  host.getName() + ,service= +
  +  service.getName());
   }
   
   return (name);
  
  
  
  1.20

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

2002-02-15 Thread craigmcc

craigmcc02/02/15 15:03:42

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpRequestImpl.java
  Log:
  Implement clearHeaders() in the HttpRequest implementation class that is
  actually used by the HTTP/1.1 connector.  This fixes #5422, where the
  headers were doubled up on the request after a successful form-based login,
  because calling request.clearHeaders() had no functional impact.
  
  PR: Bugzilla #5422
  Submitted by: Ben Walding [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.12  +14 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestImpl.java
  
  Index: HttpRequestImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- HttpRequestImpl.java  22 Jul 2001 20:25:07 -  1.11
  +++ HttpRequestImpl.java  15 Feb 2002 23:03:42 -  1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestImpl.java,v
 1.11 2001/07/22 20:25:07 pier Exp $
  - * $Revision: 1.11 $
  - * $Date: 2001/07/22 20:25:07 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestImpl.java,v
 1.12 2002/02/15 23:03:42 craigmcc Exp $
  + * $Revision: 1.12 $
  + * $Date: 2002/02/15 23:03:42 $
*
* 
*
  @@ -81,7 +81,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.11 $ $Date: 2001/07/22 20:25:07 $
  + * @version $Revision: 1.12 $ $Date: 2002/02/15 23:03:42 $
*/
   
   final class HttpRequestImpl
  @@ -262,6 +262,16 @@
   headerPool = newHeaderPool;
   }
   headerPool[nextHeader++] = new HttpHeader(name, value);
  +
  +}
  +
  +
  +/**
  + * Clear the collection of Headers associated with this Request.
  + */
  +public void clearHeaders() {
  +
  +nextHeader = 0;
   
   }
   
  
  
  

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




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

2002-02-15 Thread craigmcc

craigmcc02/02/15 15:05:36

  Modified:catalina/src/share/org/apache/catalina/connector/http Tag:
tomcat_40_branch HttpRequestImpl.java
  Log:
  Port the fix for 5422.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.11.2.1  +14 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestImpl.java
  
  Index: HttpRequestImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- HttpRequestImpl.java  22 Jul 2001 20:25:07 -  1.11
  +++ HttpRequestImpl.java  15 Feb 2002 23:05:36 -  1.11.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestImpl.java,v
 1.11 2001/07/22 20:25:07 pier Exp $
  - * $Revision: 1.11 $
  - * $Date: 2001/07/22 20:25:07 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestImpl.java,v
 1.11.2.1 2002/02/15 23:05:36 craigmcc Exp $
  + * $Revision: 1.11.2.1 $
  + * $Date: 2002/02/15 23:05:36 $
*
* 
*
  @@ -81,7 +81,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.11 $ $Date: 2001/07/22 20:25:07 $
  + * @version $Revision: 1.11.2.1 $ $Date: 2002/02/15 23:05:36 $
*/
   
   final class HttpRequestImpl
  @@ -262,6 +262,16 @@
   headerPool = newHeaderPool;
   }
   headerPool[nextHeader++] = new HttpHeader(name, value);
  +
  +}
  +
  +
  +/**
  + * Clear the collection of Headers associated with this Request.
  + */
  +public void clearHeaders() {
  +
  +nextHeader = 0;
   
   }
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets InvokerHttpRequest.java InvokerServlet.java

2002-02-15 Thread craigmcc

craigmcc02/02/15 17:07:11

  Modified:catalina/src/share/org/apache/catalina/servlets
InvokerHttpRequest.java InvokerServlet.java
  Log:
  Wrap the getPathTranslated() method of the wrapped request used the first
  time a particular servlet is invoked, so that it returns the correct value
  on the first call.  It already returned the correct value on all subsequent
  calls, which bypass the invoker.
  
  PR: Bugzilla #6480
  Submitted by: Amar Mattey [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.4   +34 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java
  
  Index: InvokerHttpRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InvokerHttpRequest.java   22 Jul 2001 20:25:11 -  1.3
  +++ InvokerHttpRequest.java   16 Feb 2002 01:07:11 -  1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java,v
 1.3 2001/07/22 20:25:11 pier Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/07/22 20:25:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java,v
 1.4 2002/02/16 01:07:11 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/02/16 01:07:11 $
*
* 
*
  @@ -88,7 +88,7 @@
* to the servlet, because a new servlet mapping will have been created.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/07/22 20:25:11 $
  + * @version $Revision: 1.4 $ $Date: 2002/02/16 01:07:11 $
*/
   
   class InvokerHttpRequest extends HttpServletRequestWrapper {
  @@ -106,6 +106,7 @@
   
   super(request);
   this.pathInfo = request.getPathInfo();
  +this.pathTranslated = request.getPathTranslated();
   this.requestURI = request.getRequestURI();
   this.servletPath = request.getServletPath();
   
  @@ -129,6 +130,12 @@
   
   
   /**
  + * The translated path information for this request.
  + */
  +protected String pathTranslated = null;
  +
  +
  +/**
* The request URI for this request.
*/
   protected String requestURI = null;
  @@ -161,6 +168,17 @@
   
   
   /**
  + * Override the codegetPathTranslated()/code method of the
  + * wrapped request.
  + */
  +public String getPathTranslated() {
  +
  +return (this.pathTranslated);
  +
  +}
  +
  +
  +/**
* Override the codegetRequestURI()/code method of the wrapped request.
*/
   public String getRequestURI() {
  @@ -203,6 +221,18 @@
   void setPathInfo(String pathInfo) {
   
   this.pathInfo = pathInfo;
  +
  +}
  +
  +
  +/**
  + * Set the translated path info for this request.
  + *
  + * @param pathTranslated The new translated path info
  + */
  +void setPathTranslated(String pathTranslated) {
  +
  +this.pathTranslated = pathTranslated;
   
   }
   
  
  
  
  1.15  +10 -6 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java
  
  Index: InvokerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- InvokerServlet.java   20 Sep 2001 23:34:42 -  1.14
  +++ InvokerServlet.java   16 Feb 2002 01:07:11 -  1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
 1.14 2001/09/20 23:34:42 remm Exp $
  - * $Revision: 1.14 $
  - * $Date: 2001/09/20 23:34:42 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
 1.15 2002/02/16 01:07:11 craigmcc Exp $
  + * $Revision: 1.15 $
  + * $Date: 2002/02/16 01:07:11 $
*
* 
*
  @@ -87,7 +87,7 @@
* in the web application deployment descriptor.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.14 $ $Date: 2001/09/20 23:34:42 $
  + * @version $Revision: 1.15 $ $Date: 2002/02/16 01:07:11 $
*/
   
   public final class InvokerServlet
  @@ -384,10 +384,14 @@
   sb.append(/);
   sb.append(servletClass);
   wrequest.setServletPath(sb.toString());
  -if ((pathInfo == null) || (pathInfo.length()  1))
  +if ((pathInfo == null) || (pathInfo.length()  1)) {
   wrequest.setPathInfo(null

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets InvokerHttpRequest.java InvokerServlet.java

2002-02-15 Thread craigmcc

craigmcc02/02/15 17:09:51

  Modified:catalina/src/share/org/apache/catalina/servlets Tag:
tomcat_40_branch InvokerHttpRequest.java
InvokerServlet.java
  Log:
  Port fix for 6480.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.3.2.1   +34 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java
  
  Index: InvokerHttpRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- InvokerHttpRequest.java   22 Jul 2001 20:25:11 -  1.3
  +++ InvokerHttpRequest.java   16 Feb 2002 01:09:51 -  1.3.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java,v
 1.3 2001/07/22 20:25:11 pier Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/07/22 20:25:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java,v
 1.3.2.1 2002/02/16 01:09:51 craigmcc Exp $
  + * $Revision: 1.3.2.1 $
  + * $Date: 2002/02/16 01:09:51 $
*
* 
*
  @@ -88,7 +88,7 @@
* to the servlet, because a new servlet mapping will have been created.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/07/22 20:25:11 $
  + * @version $Revision: 1.3.2.1 $ $Date: 2002/02/16 01:09:51 $
*/
   
   class InvokerHttpRequest extends HttpServletRequestWrapper {
  @@ -106,6 +106,7 @@
   
   super(request);
   this.pathInfo = request.getPathInfo();
  +this.pathTranslated = request.getPathTranslated();
   this.requestURI = request.getRequestURI();
   this.servletPath = request.getServletPath();
   
  @@ -129,6 +130,12 @@
   
   
   /**
  + * The translated path information for this request.
  + */
  +protected String pathTranslated = null;
  +
  +
  +/**
* The request URI for this request.
*/
   protected String requestURI = null;
  @@ -161,6 +168,17 @@
   
   
   /**
  + * Override the codegetPathTranslated()/code method of the
  + * wrapped request.
  + */
  +public String getPathTranslated() {
  +
  +return (this.pathTranslated);
  +
  +}
  +
  +
  +/**
* Override the codegetRequestURI()/code method of the wrapped request.
*/
   public String getRequestURI() {
  @@ -203,6 +221,18 @@
   void setPathInfo(String pathInfo) {
   
   this.pathInfo = pathInfo;
  +
  +}
  +
  +
  +/**
  + * Set the translated path info for this request.
  + *
  + * @param pathTranslated The new translated path info
  + */
  +void setPathTranslated(String pathTranslated) {
  +
  +this.pathTranslated = pathTranslated;
   
   }
   
  
  
  
  1.13.2.2  +10 -6 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java
  
  Index: InvokerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
  retrieving revision 1.13.2.1
  retrieving revision 1.13.2.2
  diff -u -r1.13.2.1 -r1.13.2.2
  --- InvokerServlet.java   22 Sep 2001 04:15:13 -  1.13.2.1
  +++ InvokerServlet.java   16 Feb 2002 01:09:51 -  1.13.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
 1.13.2.1 2001/09/22 04:15:13 remm Exp $
  - * $Revision: 1.13.2.1 $
  - * $Date: 2001/09/22 04:15:13 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
 1.13.2.2 2002/02/16 01:09:51 craigmcc Exp $
  + * $Revision: 1.13.2.2 $
  + * $Date: 2002/02/16 01:09:51 $
*
* 
*
  @@ -87,7 +87,7 @@
* in the web application deployment descriptor.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.13.2.1 $ $Date: 2001/09/22 04:15:13 $
  + * @version $Revision: 1.13.2.2 $ $Date: 2002/02/16 01:09:51 $
*/
   
   public final class InvokerServlet
  @@ -383,10 +383,14 @@
   sb.append(/);
   sb.append(servletClass);
   wrequest.setServletPath(sb.toString());
  -if ((pathInfo == null) || (pathInfo.length()  1))
  +if ((pathInfo == null) || (pathInfo.length()  1)) {
   wrequest.setPathInfo(null);
  -else
  +wrequest.setPathTranslated(null);
  +} else {
   wrequest.setPathInfo(pathInfo

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

2002-02-14 Thread craigmcc

craigmcc02/02/14 16:19:27

  Modified:catalina/src/share/org/apache/catalina/mbeans
mbeans-descriptors.xml
  Log:
  Add a descriptor for CertificatesValve.
  
  Revision  ChangesPath
  1.31  +20 -1 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- mbeans-descriptors.xml14 Feb 2002 07:47:14 -  1.30
  +++ mbeans-descriptors.xml15 Feb 2002 00:19:27 -  1.31
  @@ -6,7 +6,7 @@
   !--
Descriptions of JMX MBeans for Catalina
   
  - $Id: mbeans-descriptors.xml,v 1.30 2002/02/14 07:47:14 amyroh Exp $
  + $Id: mbeans-descriptors.xml,v 1.31 2002/02/15 00:19:27 craigmcc Exp $
--
   
   mbeans-descriptors
  @@ -148,6 +148,25 @@
   entropy of the initialization of our random number
   generator
type=java.lang.String/
  +  /mbean
  +
  +
  +  mbean name=CertificatesValve
  +className=org.apache.catalina.mbeans.ClassNameMBean
  +  description=Valve that exposes SSL certificate information
  +   domain=Catalina
  +group=Valve
  + type=org.apache.catalina.valves.CertificatesValve
  +
  +attribute   name=className
  +  description=Fully qualified class name of the managed object
  + type=java.lang.String
  +writeable=false/
  +
  +attribute   name=debug
  +  description=The debugging detail level for this component
  + type=int/
  +
 /mbean
   
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Bootstrap.java

2002-02-13 Thread craigmcc

craigmcc02/02/13 12:01:37

  Modified:catalina build.xml
   catalina/src/share/org/apache/catalina/startup
Bootstrap.java
  Log:
  Modify the way that the Common class loader is created to include the
  following contents:
Unpacked classes in $CATALINA_HOME/common/classes
All JAR files in $CATALINA_HOME/common/endorsed
All JAR files in $CATALINA_HOME/common/lib
  and move the Xerces parser we install from common/lib to common/endorsed.
  
  Background:  JDK 1.4, among many other changes, packages a version of Xerces
  and makes it accessible via the JAXP APIs.  However, because these are now
  classes in the Java runtime, you cannot normally override this with your
  own parser.  However, a mechanism is provided (setting the system property
  java.endorsed.dirs to point at a particular directory -- which we'll set
  to $CATALINA_HOME/common/endorsed in the startup scripts -- that replaces
  the embedded parser with the new one (such as Xerces 2.0).
  
  TODO:  Update the shell scripts to set the endorsed directory.
  
  TODO:  Update the class-loader-howto doc to describe all of this.
  
  Revision  ChangesPath
  1.104 +7 -3  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.103
  retrieving revision 1.104
  diff -u -r1.103 -r1.104
  --- build.xml 8 Feb 2002 07:03:25 -   1.103
  +++ build.xml 13 Feb 2002 20:01:37 -  1.104
  @@ -689,11 +689,11 @@
   copy todir=${catalina.build}/common/lib file=../lib/tyrex.license/
 /target
 target name=copy-xerces.jar if=copy.xerces.jar
  -copy todir=${catalina.build}/common/lib file=${xerces.jar}/
  +copy todir=${catalina.build}/common/endorsed file=${xerces.jar}/
 /target
 target name=copy-xerces2.jars if=copy.xerces2.jars
  -copy todir=${catalina.build}/common/lib file=${xercesImpl.jar}/
  -copy todir=${catalina.build}/common/lib file=${xmlParserAPIs.jar}/
  +copy todir=${catalina.build}/common/endorsed file=${xercesImpl.jar}/
  +copy todir=${catalina.build}/common/endorsed file=${xmlParserAPIs.jar}/
 /target
   
   
  @@ -970,6 +970,7 @@
   mkdir dir=${catalina.deploy}/conf/
   mkdir dir=${catalina.deploy}/logs/
   mkdir dir=${catalina.deploy}/common/classes/
  +mkdir dir=${catalina.deploy}/common/endorsed/
   mkdir dir=${catalina.deploy}/common/lib/
   mkdir dir=${catalina.deploy}/server/classes/
   mkdir dir=${catalina.deploy}/server/lib/
  @@ -994,6 +995,9 @@
   chmod perm=+x file=${catalina.deploy}/bin/tool-wrapper.sh/
   
   !-- Common Extensions --
  +copy todir=${catalina.deploy}/common/endorsed
  +  fileset dir=${catalina.build}/common/endorsed /
  +/copy
   copy todir=${catalina.deploy}/common/lib
 fileset dir=${catalina.build}/common/lib /
   /copy
  
  
  
  1.34  +10 -7 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java
  
  Index: Bootstrap.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Bootstrap.java30 Dec 2001 01:58:20 -  1.33
  +++ Bootstrap.java13 Feb 2002 20:01:37 -  1.34
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
 1.33 2001/12/30 01:58:20 glenn Exp $
  - * $Revision: 1.33 $
  - * $Date: 2001/12/30 01:58:20 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
 1.34 2002/02/13 20:01:37 craigmcc Exp $
  + * $Revision: 1.34 $
  + * $Date: 2002/02/13 20:01:37 $
*
* 
*
  @@ -85,7 +85,7 @@
* class path and therefore not visible to application level classes.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.33 $ $Date: 2001/12/30 01:58:20 $
  + * @version $Revision: 1.34 $ $Date: 2002/02/13 20:01:37 $
*/
   
   public final class Bootstrap {
  @@ -128,14 +128,17 @@
   
   File unpacked[] = new File[1];
   File packed[] = new File[1];
  +File packed2[] = new File[2];
   ClassLoaderFactory.setDebug(debug);
   
   unpacked[0] = new File(getCatalinaHome(),
  common + File.separator + classes);
  -packed[0] = new File(getCatalinaHome(),
  - common + File.separator + lib);
  +packed2[0] = new File(getCatalinaHome(),
  +  common + File.separator + endorsed);
  +packed2[1] = new File

cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/appdev build.xml.txt

2002-02-13 Thread craigmcc

craigmcc02/02/13 23:06:36

  Modified:webapps/tomcat-docs class-loader-howto.xml manager-howto.xml
   webapps/tomcat-docs/appdev build.xml.txt
  Log:
  Miscellaneous typo corrections to the documentation and sample build.xml file.
  
  Revision  ChangesPath
  1.6   +35 -2 jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- class-loader-howto.xml29 Jan 2002 15:23:50 -  1.5
  +++ class-loader-howto.xml14 Feb 2002 07:06:35 -  1.6
  @@ -105,8 +105,10 @@
   applications.  Normally, application classes should strongNOT/strong
   be placed here.  All unpacked classes and resources in
   code$CATALINA_HOME/common/classes/code, as well as classes and
  -resources in JAR files under
  -code$CATALINA_HOME/common/lib/code, are made visible through this
  +resources in JAR files under the
  +code$CATALINA_HOME/commons/endorsed/code and
  +code$CATALINA_HOME/common/lib/code directories,
  +are made visible through this
   class loader.  By default, that includes the following:
   ul
   liemjndi.jar/em - The Java Naming and Directory Interface API
  @@ -203,12 +205,43 @@
   liBootstrap classes of your JVM/li
   liSystem class loader classses (described above)/li
   liem$CATALINA_HOME/common/classes/em/li
  +liem$CATALINA_HOME/common/endorsed/*.jar/em/li
   liem$CATALINA_HOME/common/lib/*.jar/em/li
   liem$CATALINA_HOME/shared/classes/em/li
   liem$CATALINA_HOME/shared/lib/*.jar/em/li
   /ul
   
   /section
  +
  +
  +section name=XML Parsers and JDK 1.4
  +
  +pAmong many other changes, the JDK 1.4 release packages the JAXP APIs, and
  +a version of Xerces, inside the JDK.  This has impacts on applications that
  +wish to use their own XML parser./p
  +
  +pIn previous versions of Tomcat 4, you could simply replace the XML parser
  +in the code$CATALINA_HOME/common/lib/code directory to change the parser
  +used by all web applications.  However, this technique will not be effective
  +when you are running on JDK 1.4, because the usual class loader delegation
  +process will always choose the implementation inside the JDK in preference
  +to this one./p
  +
  +pJDK 1.4 supports a mechanism called the Endorsed Standards Override
  +Mechanism to allow replacement of APIs created outside of the JCP (i.e.
  +DOM and SAX from W3C).  It can also be used to update the XML parser
  +implementation.  For more information, see:
  +a href=http://java.sun.com/j2se/1.4/docs/guide/standards/index.html;
  +http://java.sun.com/j2se/1.4/docs/guide/standards/index.html/a./p
  +
  +pTomcat utilizes this mechanism by including the system property setting
  +code-Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed/code in the
  +command line that starts the container.  Therefore, you can replace the
  +parser that is installed in this directory, and it will get used even on a
  +JDK 1.4 system./p
  +
  +/section
  +
   
   
   /body
  
  
  
  1.9   +6 -6  jakarta-tomcat-4.0/webapps/tomcat-docs/manager-howto.xml
  
  Index: manager-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/manager-howto.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- manager-howto.xml 12 Feb 2002 22:14:02 -  1.8
  +++ manager-howto.xml 14 Feb 2002 07:06:35 -  1.9
  @@ -642,20 +642,20 @@
   ... construct web application in ${build} subdirectory ...
 lt;/targetgt;
   
  -  lt;target name=deploy description=Deploy web application
  +  lt;target name=install description=Install web application
 depends=compilegt;
  -lt;deploy url=${url} username=${username} password=${password}
  +lt;install url=${url} username=${username} password=${password}
   path=${path} war=file://${build}/gt;
 lt;/targetgt;
   
 lt;target name=reload description=Reload web application
 depends=compilegt;
   lt;reload  url=${url} username=${username} password=${password}
  -path=${path} war=file://${build}/gt;
  +path=${path}/gt;
 lt;/targetgt;
   
  -  lt;target name=undeploy description=Undeploy and delete web applicationgt;
  -lt;deploy url=${url} username=${username} password=${password}
  +  lt;target name=remove description=Remove web applicationgt;
  +lt;remove url=${url} username=${username} password=${password}
   path=${path}/gt;
 lt;/targetgt;
   
  @@ -663,7 +663,7 @@
   /pre/td/tr
   /table
   
  -pNow, you can execute commands like codeant deploy/code to deploy the
  +pNow, you can execute commands like codeant install/code to install th

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

2002-02-12 Thread craigmcc

craigmcc02/02/12 10:54:03

  Modified:catalina/src/share/org/apache/catalina/mbeans
MBeanUtils.java
  Log:
  Update MBean Name creation for Ajp13Connector so that the corresponding
  MBean can be created.
  
  Revision  ChangesPath
  1.23  +30 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- MBeanUtils.java   7 Feb 2002 23:59:50 -   1.22
  +++ MBeanUtils.java   12 Feb 2002 18:54:02 -  1.23
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.22 2002/02/07 23:59:50 amyroh Exp $
  - * $Revision: 1.22 $
  - * $Date: 2002/02/07 23:59:50 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.23 2002/02/12 18:54:02 craigmcc Exp $
  + * $Revision: 1.23 $
  + * $Date: 2002/02/12 18:54:02 $
*
* 
*
  @@ -99,6 +99,7 @@
   import org.apache.catalina.connector.http.HttpConnector;
   import org.apache.catalina.core.StandardService;
   import org.apache.catalina.valves.ValveBase;
  +import org.apache.commons.beanutils.PropertyUtils;
   import org.apache.commons.modeler.ManagedBean;
   import org.apache.commons.modeler.Registry;
   
  @@ -108,7 +109,7 @@
*
* @author Craig R. McClanahan
* @author Amy Roh
  - * @version $Revision: 1.22 $ $Date: 2002/02/07 23:59:50 $
  + * @version $Revision: 1.23 $ $Date: 2002/02/12 18:54:02 $
*/
   
   public class MBeanUtils {
  @@ -123,6 +124,8 @@
* is a class name, and the second element is the managed bean name.
*/
   private static String exceptions[][] = {
  +{ org.apache.ajp.tomcat4.Ajp13Connector,
  +  Ajp13Connector },
   { org.apache.catalina.core.StandardDefaultContext,
 DefaultContext },
   { org.apache.catalina.connector.http10.HttpConnector,
  @@ -172,14 +175,19 @@
   // Deal with exceptions to the standard rule
   String className = component.getClass().getName();
   for (int i = 0; i  exceptions.length; i++) {
  -if (className.equals(exceptions[i][0]))
  +if (className.equals(exceptions[i][0])) {
  +System.out.println(EXC  + className +  --  +
  +   exceptions[i][1]);
   return (exceptions[i][1]);
  +}
   }
   
   // Perform the standard transformation
   int period = className.lastIndexOf('.');
   if (period = 0)
   className = className.substring(period + 1);
  +System.out.println(STD  + component.getClass().getName() +  --  +
  +   className);
   return (className);
   
   }
  @@ -707,6 +715,23 @@
 ,port= + httpConnector.getPort() +
 ,address= + httpConnector.getAddress());
   return (name);
  +} else if (org.apache.ajp.tomcat4.Ajp13Connector.equals
  +   (connector.getClass().getName())) {
  +try {
  +String address = (String)
  +PropertyUtils.getSimpleProperty(connector, address);
  +Integer port = (Integer)
  +PropertyUtils.getSimpleProperty(connector, port);
  +name = new ObjectName(domain + :type=Connector +
  +  ,service= +
  +  connector.getService().getName() +
  +  ,port= + port +
  +  ,address= + address);
  +return (name);
  +} catch (Exception e) {
  +throw new MalformedObjectNameException
  +(Cannot create object name for  + connector);
  +}
   } else {
   throw new MalformedObjectNameException
   (Cannot create object name for  + connector);
  
  
  

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




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

2002-02-12 Thread craigmcc

craigmcc02/02/12 11:05:25

  Modified:catalina/src/share/org/apache/catalina/mbeans
MBeanUtils.java
  Log:
  Remove debugging statements.
  
  Revision  ChangesPath
  1.24  +4 -8  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- MBeanUtils.java   12 Feb 2002 18:54:02 -  1.23
  +++ MBeanUtils.java   12 Feb 2002 19:05:25 -  1.24
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.23 2002/02/12 18:54:02 craigmcc Exp $
  - * $Revision: 1.23 $
  - * $Date: 2002/02/12 18:54:02 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.24 2002/02/12 19:05:25 craigmcc Exp $
  + * $Revision: 1.24 $
  + * $Date: 2002/02/12 19:05:25 $
*
* 
*
  @@ -109,7 +109,7 @@
*
* @author Craig R. McClanahan
* @author Amy Roh
  - * @version $Revision: 1.23 $ $Date: 2002/02/12 18:54:02 $
  + * @version $Revision: 1.24 $ $Date: 2002/02/12 19:05:25 $
*/
   
   public class MBeanUtils {
  @@ -176,8 +176,6 @@
   String className = component.getClass().getName();
   for (int i = 0; i  exceptions.length; i++) {
   if (className.equals(exceptions[i][0])) {
  -System.out.println(EXC  + className +  --  +
  -   exceptions[i][1]);
   return (exceptions[i][1]);
   }
   }
  @@ -186,8 +184,6 @@
   int period = className.lastIndexOf('.');
   if (period = 0)
   className = className.substring(period + 1);
  -System.out.println(STD  + component.getClass().getName() +  --  +
  -   className);
   return (className);
   
   }
  
  
  

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




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs manager-howto.xml

2002-02-12 Thread craigmcc

craigmcc02/02/12 14:14:02

  Modified:catalina/src/share/org/apache/catalina/ant
AbstractCatalinaTask.java InstallTask.java
ListTask.java ReloadTask.java StartTask.java
StopTask.java
   catalina/src/share/org/apache/catalina/servlets
LocalStrings.properties ManagerServlet.java
   webapps/tomcat-docs manager-howto.xml
  Added:   catalina/src/share/org/apache/catalina/ant DeployTask.java
UndeployTask.java
  Log:
  Enhance the Manager webapp to support two new facilities:
  
  * Deploy a new application (optionally to a Tomcat instance running
on a different server) by uploading the WAR file to it.
  
  * Undeploy an existing application and remove its document base directory
from webapps.
  
  * Support these commands with new custom Ant tasks, typically named
deploy and undeploy.
  
  The first of these commands is useful only within tools, becasue it requires
  an HTTP put.  However, it is supported by an Ant task for use in build
  scripts.
  
  If you want to do application development in place, inside the context
  root directory of a running webapp, you will probably want to use the
  install command rather than the deploy command.
  
  Revision  ChangesPath
  1.2   +81 -15
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/AbstractCatalinaTask.java
  
  Index: AbstractCatalinaTask.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/AbstractCatalinaTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractCatalinaTask.java 11 Jan 2002 00:37:30 -  1.1
  +++ AbstractCatalinaTask.java 12 Feb 2002 22:14:01 -  1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/AbstractCatalinaTask.java,v
 1.1 2002/01/11 00:37:30 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/01/11 00:37:30 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/ant/AbstractCatalinaTask.java,v
 1.2 2002/02/12 22:14:01 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/02/12 22:14:01 $
*
* 
*
  @@ -63,8 +63,10 @@
   package org.apache.catalina.ant;
   
   
  +import java.io.BufferedOutputStream;
   import java.io.InputStream;
   import java.io.InputStreamReader;
  +import java.net.HttpURLConnection;
   import java.net.URL;
   import java.net.URLConnection;
   import org.apache.catalina.util.Base64;
  @@ -79,7 +81,8 @@
* undeploying applications.  These tasks require Ant 1.4 or later.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2002/01/11 00:37:30 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/12 22:14:01 $
  + * @since 4.1
*/
   
   public abstract class AbstractCatalinaTask extends Task {
  @@ -165,30 +168,84 @@
*/
   public void execute(String command) throws BuildException {
   
  +execute(command, null, null, -1);
  +
  +}
  +
  +
  +/**
  + * Execute the specified command, based on the configured properties.
  + * The input stream will be closed upon completion of this task, whether
  + * it was executed successfully or not.
  + *
  + * @param command Command to be executed
  + * @param istream InputStream to include in an HTTP PUT, if any
  + * @param contentType Content type to specify for the input, if any
  + * @param contentLength Content length to specify for the input, if any
  + *
  + * @exception BuildException if an error occurs
  + */
  +public void execute(String command, InputStream istream,
  +String contentType, int contentLength)
  +throws BuildException {
  +
   URLConnection conn = null;
   InputStreamReader reader = null;
   try {
   
   // Create a connection for this command
   conn = (new URL(url + command)).openConnection();
  +HttpURLConnection hconn = (HttpURLConnection) conn;
   
   // Set up standard connection characteristics
  -conn.setAllowUserInteraction(false);
  -conn.setDoInput(true);
  -conn.setDoOutput(false);
  -conn.setUseCaches(false);
  -conn.setRequestProperty(User-Agent,
  -Catalina-Ant-Task/1.0);
  +hconn.setAllowUserInteraction(false);
  +hconn.setDoInput(true);
  +hconn.setUseCaches(false);
  +if (istream != null) {
  +hconn.setDoOutput(true);
  +hconn.setRequestMethod(PUT);
  +if (contentType != null

cvs commit: jakarta-tomcat-4.0/tester/web/golden JspDoc01.txt

2002-02-10 Thread craigmcc

craigmcc02/02/10 18:25:39

  Modified:tester/web/golden JspDoc01.txt
  Log:
  Update golden file to reflect corrected JSP parsing behavior.
  
  Revision  ChangesPath
  1.2   +1 -1  jakarta-tomcat-4.0/tester/web/golden/JspDoc01.txt
  
  Index: JspDoc01.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/golden/JspDoc01.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JspDoc01.txt  12 Sep 2001 20:26:31 -  1.1
  +++ JspDoc01.txt  11 Feb 2002 02:25:39 -  1.2
  @@ -1 +1 @@
  -a textb /b/aa textb /b/ac d text/d/cc d text/d/ce 
f /ftextf /f/ee f /ftextf /f/e
  \ No newline at end of file
  
+atextb/b/aatextb/b/acdtext/d/ccdtext/d/cef/ftextf/f/eef/ftextf/f/e
  
  
  

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




cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin ApplicationResources_en.properties

2002-02-09 Thread craigmcc

craigmcc02/02/09 19:14:11

  Modified:webapps/admin/WEB-INF struts-config.xml web.xml
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin
ApplicationResources_en.properties
  Removed: webapps/admin listGroups.jsp listUsers.jsp user.jsp
  Log:
  Update struts-config.xml, web.xml, and the message resources for the move
  of user database administration stuff to users subdirectories, and remove
  the JSP pages that have been migrated.  Subsequent commits will catch up on
  the new pages and classes.
  
  Revision  ChangesPath
  1.25  +107 -46   jakarta-tomcat-4.0/webapps/admin/WEB-INF/struts-config.xml
  
  Index: struts-config.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/struts-config.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- struts-config.xml 8 Feb 2002 21:30:34 -   1.24
  +++ struts-config.xml 10 Feb 2002 03:14:11 -  1.25
  @@ -51,18 +51,6 @@
   form-bean  name=setLocaleForm
   type=org.apache.webapp.admin.SetLocaleForm/
   
  -!-- List Groups form bean --
  -form-bean  name=listGroupsForm
  -type=org.apache.webapp.admin.ListGroupsForm/
  -
  -!-- List Users form bean --
  -form-bean  name=listUsersForm
  -type=org.apache.webapp.admin.ListUsersForm/
  -
  -!-- User form bean --
  -form-bean  name=userForm
  -type=org.apache.webapp.admin.UserForm/
  -
   !-- JDBC Realm form bean --
   form-bean  name=jdbcRealmForm
   type=org.apache.webapp.admin.realm.JDBCRealmForm/
  @@ -71,10 +59,28 @@
   form-bean  name=memoryRealmForm
   type=org.apache.webapp.admin.realm.MemoryRealmForm/
   
  -   !-- UserDB Realm form bean --
  +!-- UserDB Realm form bean --
   form-bean  name=userdbRealmForm
   type=org.apache.webapp.admin.realm.UserDBRealmForm/
   
  +!-- == User Database Module == --
  +
  +form-bean  name=databaseForm
  +type=org.apache.webapp.admin.users.BaseForm/
  +
  +form-bean  name=groupForm
  +type=org.apache.webapp.admin.users.GroupForm/
  +
  +form-bean  name=roleForm
  +type=org.apache.webapp.admin.users.RoleForm/
  +
  +form-bean  name=userForm
  +type=org.apache.webapp.admin.users.UserForm/
  +
  +
  +!-- ==  == --
  +
  +
 /form-beans
   
   
  @@ -134,18 +140,6 @@
   path=/blank.jsp
   redirect=false/
   
  -forwardname=Groups List
  -path=/listGroups.jsp
  -redirect=false/
  -
  -forwardname=Users List
  -path=/listUsers.jsp
  -redirect=false/
  -
  -forwardname=Users List Setup
  -path=/listUsers.do
  -redirect=false/
  -
   forwardname=Logger
   path=/logger.jsp
   redirect=false/
  @@ -166,6 +160,46 @@
   path=/userDBRealm.jsp
   redirect=false/
   
  +!-- == User Database Module == --
  +
  +forwardname=Group
  +path=/users/group.jsp
  +redirect=false/
  +
  +forwardname=Groups List
  +path=/users/listGroups.jsp
  +redirect=false/
  +
  +forwardname=Groups List Setup
  +path=/users/listGroups.do
  +redirect=false/
  +
  +forwardname=Role
  +path=/users/role.jsp
  +redirect=false/
  +
  +forwardname=Roles List
  +path=/users/listRoles.jsp
  +redirect=false/
  +
  +forwardname=Roles List Setup
  +path=/users/listRoles.do
  +redirect=false/
  +
  +forwardname=User
  +path=/users/user.jsp
  +redirect=false/
  +
  +forwardname=Users List
  +path=/users/listUsers.jsp
  +redirect=false/
  +
  +forwardname=Users List Setup
  +path=/users/listUsers.do
  +redirect=false/
  +
  +!-- ==  == --
  +
 /global-forwards
   
   
  @@ -355,27 +389,6 @@
   actionpath=/treeControlTest
  type=org.apache.webapp.admin.TreeControlTestAction/
   
  -!-- Set up groups list action --
  -actionpath=/listGroups
  -   name=listGroupsForm
  -   type=org.apache.webapp.admin.ListGroupsAction/
  -
  -!-- Set up users list

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

2002-02-09 Thread craigmcc

craigmcc02/02/09 19:14:16

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

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




cvs commit: jakarta-tomcat-4.0/webapps/admin/users footer.jsp group.jsp header.jsp listGroups.jsp listRoles.jsp listUsers.jsp role.jsp roles.jspf user.jsp

2002-02-09 Thread craigmcc

craigmcc02/02/09 19:15:04

  Added:   webapps/admin/users footer.jsp group.jsp header.jsp
listGroups.jsp listRoles.jsp listUsers.jsp role.jsp
roles.jspf user.jsp
  Log:
  Migrated (and new) JSP pages for listing and editing groups, roles, and
  users.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-4.0/webapps/admin/users/footer.jsp
  
Binary file
  
  
  1.1  jakarta-tomcat-4.0/webapps/admin/users/group.jsp
  
  Index: group.jsp
  ===
  !-- Standard Struts Entries --
  
  %@ page language=java %
  %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
  %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
  %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
  %@ taglib uri=/WEB-INF/controls.tld prefix=controls %
  
  html:html locale=true
  
  %@ include file=header.jsp %
  
  !-- Body --
  body bgcolor=white
  
  !--Form --
  
  html:errors/
  
  html:form method=POST action=/users/saveGroup focus=groupname
  
html:hidden property=databaseName/
html:hidden property=objectName/
  
table width=100% border=0 cellspacing=0 cellpadding=0
  tr class=page-title-row
td align=left nowrap
  div class=page-title-text
bean:write name=groupForm property=nodeLabel/
  /div
/td
td align=right nowrap 
  div class=page-title-text
controls:actions
  controls:action selected=true
bean:message key=actions.available.actions/
  /controls:action
  controls:action
-
  /controls:action
  !-- will add the urls later once those screens get implemented --
  %--
  controls:action url=
bean:message key=users.actions.group.create/
  /controls:action
  controls:action url=
bean:message key=users.actions.group.delete/
  /controls:action
  --%
/controls:actions
  /div
/td
  /tr
/table
  
%@ include file=../buttons.jsp %
  br
  
table class=back-table border=0 cellspacing=0 cellpadding=1
   width=100%
  tr 
td 
  
  controls:table tableStyle=front-table lineStyle=line-row
  
controls:row header=true 
  labelStyle=table-header-text dataStyle=table-header-text
  controls:label
bean:message key=users.group.properties/
  /controls:label
  controls:data
nbsp;
  /controls:data
/controls:row
  
controls:row labelStyle=table-label-text
   dataStyle=table-normal-text
  controls:label
bean:message key=users.prompt.groupname/
  /controls:label
  controls:data
logic:present name=groupForm property=objectName
  bean:write name=groupForm property=groupname/
  html:hidden property=groupname/
/logic:present
logic:notPresent name=groupForm property=objectName
  html:text property=groupname size=24 maxlength=32/
/logic:notPresent
  /controls:data
/controls:row
  
controls:row labelStyle=table-label-text
   dataStyle=table-normal-text
  controls:label
bean:message key=users.prompt.description/
  /controls:label
  controls:data
html:text property=description size=24 maxlength=128/
  /controls:data
/controls:row
  
  /controls:table
  
/td
  
  /tr
  
/table
  
%@ include file=../buttons.jsp %
  
  /html:form
  
  !-- Standard Footer --
  
  %@ include file=footer.jsp %
  
  /body
  
  /html:html
  
  
  
  1.1  jakarta-tomcat-4.0/webapps/admin/users/header.jsp
  
  Index: header.jsp
  ===
  !--
Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
reserved.
  --
  
  head
titlebean:message key=application.title//title
html:base/
link rel=stylesheet type=text/css href=../tree-control-test.css
link rel=stylesheet type=text/css href=../admin.css
  /head
  
  
  
  1.1  jakarta-tomcat-4.0/webapps/admin/users/listGroups.jsp
  
  Index: listGroups.jsp
  ===
  !-- Standard Struts Entries --
  %@ page language=java import=java.net.URLEncoder %
  %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
  %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
  %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
  %@ taglib uri=/WEB-INF/controls.tld prefix

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

2002-02-09 Thread craigmcc

craigmcc02/02/09 19:17:15

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

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




cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin ListGroupsAction.java ListGroupsForm.java ListUsersAction.java ListUsersForm.java SaveUserAction.java SetUpUserAction.java UserForm.java UsersTreeBuilder.java

2002-02-09 Thread craigmcc

craigmcc02/02/09 19:17:12

  Removed: webapps/admin/WEB-INF/classes/org/apache/webapp/admin
ListGroupsAction.java ListGroupsForm.java
ListUsersAction.java ListUsersForm.java
SaveUserAction.java SetUpUserAction.java
UserForm.java UsersTreeBuilder.java
  Log:
  Remove user administration classes that have migrated to the users
  sub-package.

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users MemoryGroup.java MemoryRole.java MemoryUser.java MemoryUserDatabase.java

2002-02-09 Thread craigmcc

craigmcc02/02/09 19:20:17

  Modified:catalina/src/share/org/apache/catalina/mbeans
MemoryUserDatabaseMBean.java mbeans-descriptors.xml
   catalina/src/share/org/apache/catalina/users
MemoryGroup.java MemoryRole.java MemoryUser.java
MemoryUserDatabase.java
  Log:
  Synch up the server-side changes required by the new admin functionality.
  
  Revision  ChangesPath
  1.4   +10 -9 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java
  
  Index: MemoryUserDatabaseMBean.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MemoryUserDatabaseMBean.java  3 Feb 2002 00:56:57 -   1.3
  +++ MemoryUserDatabaseMBean.java  10 Feb 2002 03:20:17 -  1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java,v
 1.3 2002/02/03 00:56:57 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/02/03 00:56:57 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java,v
 1.4 2002/02/10 03:20:17 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/02/10 03:20:17 $
*
* 
*
  @@ -85,7 +85,7 @@
* codeorg.apache.catalina.users.MemoryUserDatabase/code component./p
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2002/02/03 00:56:57 $
  + * @version $Revision: 1.4 $ $Date: 2002/02/10 03:20:17 $
*/
   
   public class MemoryUserDatabaseMBean extends BaseModelMBean {
  @@ -216,13 +216,12 @@
*
* @param groupname Group name of the new group
* @param description Description of the new group
  - * @param roles Roles list for the new group
*/
  -public String createGroup(String groupname, String description,
  -  String roles[]) {
  +public String createGroup(String groupname, String description) {
   
   UserDatabase database = (UserDatabase) this.resource;
   Group group = database.createGroup(groupname, description);
  +/*
   if (roles != null) {
   for (int i = 0; i  roles.length; i++) {
   Role role = database.findRole(roles[i]);
  @@ -233,6 +232,7 @@
   group.addRole(role);
   }
   }
  +*/
   try {
   MBeanUtils.createMBean(group);
   } catch (Exception e) {
  @@ -271,13 +271,13 @@
* @param username User name of the new user
* @param password Password for the new user
* @param fullName Full name for the new user
  - * @param roles Roles list for the new user
*/
   public String createUser(String username, String password,
  - String fullName, String roles[]) {
  + String fullName) {
   
   UserDatabase database = (UserDatabase) this.resource;
   User user = database.createUser(username, password, fullName);
  +/*
   if (roles != null) {
   for (int i = 0; i  roles.length; i++) {
   Role role = database.findRole(roles[i]);
  @@ -288,6 +288,7 @@
   user.addRole(role);
   }
   }
  +*/
   try {
   MBeanUtils.createMBean(user);
   } catch (Exception e) {
  
  
  
  1.27  +2 -8  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- mbeans-descriptors.xml3 Feb 2002 00:56:57 -   1.26
  +++ mbeans-descriptors.xml10 Feb 2002 03:20:17 -  1.27
  @@ -6,7 +6,7 @@
   !--
Descriptions of JMX MBeans for Catalina
   
  - $Id: mbeans-descriptors.xml,v 1.26 2002/02/03 00:56:57 craigmcc Exp $
  + $Id: mbeans-descriptors.xml,v 1.27 2002/02/10 03:20:17 craigmcc Exp $
--
   
   mbeans-descriptors
  @@ -700,9 +700,6 @@
 parameter name=description
 description=Description of the new group
type=java.lang.String/
  -  parameter name=roles
  -  description=Roles list for the new group
  - type=java.lang.String[]/
   /operation
   
   operation   name=createRole
  @@ -722,7 +719,7 @@
  impact=ACTION

cvs commit: jakarta-tomcat-4.0/webapps/admin/users deleteGroups.jsp deleteRoles.jsp deleteUsers.jsp groups.jspf listGroups.jspf listRoles.jspf listUsers.jspf users.jspf listGroups.jsp listRoles.jsp listUsers.jsp roles.jspf

2002-02-09 Thread craigmcc

craigmcc02/02/09 21:48:58

  Modified:webapps/admin/WEB-INF struts-config.xml
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin
ApplicationResources_en.properties
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users
ListGroupsAction.java ListRolesAction.java
ListUsersAction.java SaveGroupAction.java
SaveRoleAction.java SaveUserAction.java
UsersTreeBuilder.java
   webapps/admin/users listGroups.jsp listRoles.jsp
listUsers.jsp roles.jspf
  Added:   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users
DeleteGroupsAction.java DeleteRolesAction.java
DeleteUsersAction.java GroupsForm.java
RolesForm.java UsersForm.java
   webapps/admin/users deleteGroups.jsp deleteRoles.jsp
deleteUsers.jsp groups.jspf listGroups.jspf
listRoles.jspf listUsers.jspf users.jspf
  Log:
  Implement delete functionality for groups, roles, and users.
  
  Revision  ChangesPath
  1.26  +44 -6 jakarta-tomcat-4.0/webapps/admin/WEB-INF/struts-config.xml
  
  Index: struts-config.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/struts-config.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- struts-config.xml 10 Feb 2002 03:14:11 -  1.25
  +++ struts-config.xml 10 Feb 2002 05:48:57 -  1.26
  @@ -63,6 +63,7 @@
   form-bean  name=userdbRealmForm
   type=org.apache.webapp.admin.realm.UserDBRealmForm/
   
  +
   !-- == User Database Module == --
   
   form-bean  name=databaseForm
  @@ -71,12 +72,20 @@
   form-bean  name=groupForm
   type=org.apache.webapp.admin.users.GroupForm/
   
  +form-bean  name=groupsForm
  +type=org.apache.webapp.admin.users.GroupsForm/
  +
   form-bean  name=roleForm
   type=org.apache.webapp.admin.users.RoleForm/
   
  +form-bean  name=rolesForm
  +type=org.apache.webapp.admin.users.RolesForm/
  +
   form-bean  name=userForm
   type=org.apache.webapp.admin.users.UserForm/
   
  +form-bean  name=usersForm
  +type=org.apache.webapp.admin.users.UsersForm/
   
   !-- ==  == --
   
  @@ -160,46 +169,60 @@
   path=/userDBRealm.jsp
   redirect=false/
   
  +
   !-- == User Database Module == --
   
   forwardname=Group
   path=/users/group.jsp
   redirect=false/
   
  +forwardname=Groups Delete List
  +path=/users/deleteGroups.jsp
  +redirect=false/
  +
   forwardname=Groups List
   path=/users/listGroups.jsp
   redirect=false/
   
   forwardname=Groups List Setup
  -path=/users/listGroups.do
  +path=/users/listGroups.do?forward=Groups+List
   redirect=false/
   
   forwardname=Role
   path=/users/role.jsp
   redirect=false/
   
  +forwardname=Roles Delete List
  +path=/users/deleteRoles.jsp
  +redirect=false/
  +
   forwardname=Roles List
   path=/users/listRoles.jsp
   redirect=false/
   
   forwardname=Roles List Setup
  -path=/users/listRoles.do
  +path=/users/listRoles.do?forward=Roles+List
   redirect=false/
   
   forwardname=User
   path=/users/user.jsp
   redirect=false/
   
  +forwardname=Users Delete List
  +path=/users/deleteUsers.jsp
  +redirect=false/
  +
   forwardname=Users List
   path=/users/listUsers.jsp
   redirect=false/
   
   forwardname=Users List Setup
  -path=/users/listUsers.do
  +path=/users/listUsers.do?forward=Users+List
   redirect=false/
   
   !-- ==  == --
   
  +
 /global-forwards
   
   
  @@ -427,18 +450,33 @@
   
   !-- == User Database Module == --
   
  +actionpath=/users/deleteGroups
  +   name=groupsForm
  +  scope=request
  +   type=org.apache.webapp.admin.users.DeleteGroupsAction/
  +
  +actionpath=/users/deleteRoles

cvs commit: jakarta-tomcat-4.0/webapps/admin/users group.jsp groups.jspf role.jsp roles.jspf user.jsp users.jspf

2002-02-09 Thread craigmcc

craigmcc02/02/10 00:06:21

  Modified:catalina/src/share/org/apache/catalina Group.java User.java
   catalina/src/share/org/apache/catalina/mbeans
mbeans-descriptors.xml
   catalina/src/share/org/apache/catalina/users
AbstractGroup.java AbstractUser.java
MemoryGroup.java MemoryUser.java
   webapps/admin/WEB-INF struts-config.xml
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users
GroupForm.java ListGroupsAction.java
ListRolesAction.java ListUsersAction.java
SaveGroupAction.java SaveRoleAction.java
SaveUserAction.java SetUpGroupAction.java
SetUpRoleAction.java SetUpUserAction.java
UserForm.java
   webapps/admin/users group.jsp groups.jspf role.jsp
roles.jspf user.jsp users.jspf
  Added:   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users
UserUtils.java
  Log:
  Complete full support for associating roles with users and groups, and
  associating groups with users.  Modulo any remaining bugs, the User
  and Group Administration section of the admin app should be fully
  functional.
  
  Revision  ChangesPath
  1.5   +10 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java
  
  Index: Group.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Group.java3 Feb 2002 00:56:57 -   1.4
  +++ Group.java10 Feb 2002 08:06:19 -  1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java,v 1.4 
2002/02/03 00:56:57 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2002/02/03 00:56:57 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java,v 1.5 
2002/02/10 08:06:19 craigmcc Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/02/10 08:06:19 $
*
* 
* The Apache Software License, Version 1.1
  @@ -74,7 +74,7 @@
* inherits the {@link Role}s assigned to the group./p
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2002/02/03 00:56:57 $
  + * @version $Revision: 1.5 $ $Date: 2002/02/10 08:06:19 $
* @since 4.1
*/
   
  @@ -157,6 +157,12 @@
* @param role The old role
*/
   public void removeRole(Role role);
  +
  +
  +/**
  + * Remove all {@link Role}s from those assigned to this group.
  + */
  +public void removeRoles();
   
   
   }
  
  
  
  1.5   +16 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/User.java
  
  Index: User.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/User.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- User.java 3 Feb 2002 00:56:57 -   1.4
  +++ User.java 10 Feb 2002 08:06:19 -  1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/User.java,v 1.4 
2002/02/03 00:56:57 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2002/02/03 00:56:57 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/User.java,v 1.5 
2002/02/10 08:06:19 craigmcc Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/02/10 08:06:19 $
*
* 
* The Apache Software License, Version 1.1
  @@ -75,7 +75,7 @@
* of specific {@link Role}s./p
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2002/02/03 00:56:57 $
  + * @version $Revision: 1.5 $ $Date: 2002/02/10 08:06:19 $
* @since 4.1
*/
   
  @@ -197,11 +197,23 @@
   
   
   /**
  + * Remove all {@link Group}s from those this user belongs to.
  + */
  +public void removeGroups();
  +
  +
  +/**
* Remove a {@link Role} from those assigned to this user.
*
* @param role The old role
*/
   public void removeRole(Role role);
  +
  +
  +/**
  + * Remove all {@link Role}s from those assigned to this user.
  + */
  +public void removeRoles();
   
   
   }
  
  
  
  1.28  +19 -1 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm MemoryRuleSet.java

2002-02-08 Thread craigmcc

craigmcc02/02/08 08:19:57

  Modified:catalina/src/share/org/apache/catalina/realm
MemoryRuleSet.java
  Log:
  Make MemoryRealm robust in terms of reading users with a username attribute
  (as is written by UserDatabase) *or* a name attribute.
  
  Revision  ChangesPath
  1.2   +7 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/MemoryRuleSet.java
  
  Index: MemoryRuleSet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/MemoryRuleSet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MemoryRuleSet.java17 Oct 2001 00:44:02 -  1.1
  +++ MemoryRuleSet.java8 Feb 2002 16:19:57 -   1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/MemoryRuleSet.java,v
 1.1 2001/10/17 00:44:02 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/10/17 00:44:02 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/MemoryRuleSet.java,v
 1.2 2002/02/08 16:19:57 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/02/08 16:19:57 $
*
* 
*
  @@ -74,7 +74,7 @@
* XML file processed by codeMemoryRealm/code./p
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/10/17 00:44:02 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/08 16:19:57 $
*/
   
   public class MemoryRuleSet extends RuleSetBase {
  @@ -169,6 +169,9 @@
   public void begin(Attributes attributes) throws Exception {
   
   String username = attributes.getValue(name);
  +if (username == null) {
  +username = attributes.getValue(username);
  +}
   String password = attributes.getValue(password);
   String roles = attributes.getValue(roles);
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm UserDatabaseRealm.java

2002-02-08 Thread craigmcc

craigmcc02/02/08 09:07:42

  Modified:catalina/src/conf server.xml
   catalina/src/share/org/apache/catalina/realm
UserDatabaseRealm.java
  Log:
  Stop playing games with the resourceName property setter.  (Manveen, you
  will want to add a validation on the java: prefix in the admin app.)
  
  Revision  ChangesPath
  1.53  +1 -1  jakarta-tomcat-4.0/catalina/src/conf/server.xml
  
  Index: server.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/server.xml,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- server.xml23 Jan 2002 17:42:19 -  1.52
  +++ server.xml8 Feb 2002 17:07:42 -   1.53
  @@ -164,7 +164,7 @@
  that are performed against this UserDatabase are immediately
  available for use by the Realm.  --
 Realm className=org.apache.catalina.realm.UserDatabaseRealm
  - debug=0 resourceName=UserDatabase/
  + debug=0 resourceName=java:UserDatabase/
   
 !-- Comment out the old realm but leave here for now in case we
  need to go back quickly --
  
  
  
  1.6   +6 -6  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java
  
  Index: UserDatabaseRealm.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- UserDatabaseRealm.java3 Feb 2002 00:56:58 -   1.5
  +++ UserDatabaseRealm.java8 Feb 2002 17:07:42 -   1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java,v
 1.5 2002/02/03 00:56:58 craigmcc Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/02/03 00:56:58 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java,v
 1.6 2002/02/08 17:07:42 craigmcc Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/02/08 17:07:42 $
*
* 
*
  @@ -96,7 +96,7 @@
* of codeUserDatabase/code that we should consult./p
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2002/02/03 00:56:58 $
  + * @version $Revision: 1.6 $ $Date: 2002/02/08 17:07:42 $
* @since 4.1
*/
   
  @@ -131,7 +131,7 @@
* The global JNDI name of the codeUserDatabase/code resource
* we will be utilizing.
*/
  -protected String resourceName = java:/UserDatabase;
  +protected String resourceName = java:UserDatabase;
   
   
   /**
  @@ -175,7 +175,7 @@
*/
   public void setResourceName(String resourceName) {
   
  -this.resourceName = java: + resourceName;
  +this.resourceName = resourceName;
   
   }
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/users AbstractRole.java MemoryRole.java AbstractGroup.java AbstractUser.java MemoryGroup.java MemoryUser.java MemoryUserDatabase.java MemoryUserDatabaseFactory.java BasicRole.java

2002-02-02 Thread craigmcc

craigmcc02/02/02 16:56:58

  Modified:catalina/src/share/org/apache/catalina Group.java Role.java
User.java UserDatabase.java
   catalina/src/share/org/apache/catalina/mbeans
GlobalResourcesLifecycleListener.java
GroupMBean.java MBeanUtils.java
MemoryUserDatabaseMBean.java UserMBean.java
mbeans-descriptors.xml
   catalina/src/share/org/apache/catalina/realm
UserDatabaseRealm.java
   catalina/src/share/org/apache/catalina/users
AbstractGroup.java AbstractUser.java
MemoryGroup.java MemoryUser.java
MemoryUserDatabase.java
MemoryUserDatabaseFactory.java
  Added:   catalina/src/share/org/apache/catalina/mbeans RoleMBean.java
   catalina/src/share/org/apache/catalina/users
AbstractRole.java MemoryRole.java
  Removed: catalina/src/share/org/apache/catalina/users BasicRole.java
  Log:
  Updates to the UserDatabase and related interfaces (and
  implementations) to make Role a first-class object in the
  user database.  This will allow the user interface for
  editing groups and users to list all the currently defined
  roles and let the user pick them with checkboxes, instead
  of having to type a comma-delimited list of names.
  
  Currently, the user and group admin screens are out-of-date
  with respect to the changes in the underlying MBeans.  That
  will be the next commit.
  
  Revision  ChangesPath
  1.4   +12 -16
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java
  
  Index: Group.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Group.java24 Jan 2002 22:45:54 -  1.3
  +++ Group.java3 Feb 2002 00:56:57 -   1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java,v 1.3 
2002/01/24 22:45:54 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/01/24 22:45:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Group.java,v 1.4 
2002/02/03 00:56:57 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/02/03 00:56:57 $
*
* 
* The Apache Software License, Version 1.1
  @@ -71,10 +71,10 @@
   /**
* pAbstract representation of a group of {@link User}s in a
* {@link UserDatabase}.  Each user that is a member of this group
  - * inherits the security roles assigned to the group./p
  + * inherits the {@link Role}s assigned to the group./p
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2002/01/24 22:45:54 $
  + * @version $Revision: 1.4 $ $Date: 2002/02/03 00:56:57 $
* @since 4.1
*/
   
  @@ -115,8 +115,7 @@
   
   
   /**
  - * Return the set of security roles assigned specifically to this group,
  - * as Strings.
  + * Return the set of {@link Role}s assigned specifically to this group.
*/
   public Iterator getRoles();
   
  @@ -137,30 +136,27 @@
   
   
   /**
  - * Add a new security role to those assigned specifically to this group.
  + * Add a new {@link Role} to those assigned specifically to this group.
*
* @param role The new role
*/
  -public void addRole(String role);
  +public void addRole(Role role);
   
   
   /**
  - * Is this group specifically assigned the specified role?
  + * Is this group specifically assigned the specified {@link Role}?
*
* @param role The role to check
*/
  -public boolean isInRole(String role);
  +public boolean isInRole(Role role);
   
   
   /**
  - * Remove a security role from those assigned to this group.
  + * Remove a {@link Role} from those assigned to this group.
*
* @param role The old role
*/
  -public void removeRole(String role);
  -
  -
  -
  +public void removeRole(Role role);
   
   
   }
  
  
  
  1.2   +41 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Role.java
  
  Index: Role.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Role.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Role.java 24 Jan 2002 22:45:54 -  1.1
  +++ Role.java 3 Feb 2002 00:56:57 -   1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Role.java,v 1.1 
2002/01/24 22:45:54 craigmcc Exp

  1   2   3   4   5   6   7   >