Mail Delivery (failure tomcat-dev@jakarta.apache.org)

2005-09-19 Thread remm
Dangerous Attachment has been Removed.  The file "" has been removed because of 
a virus.  It was infected with the "HTML/FileDownload.E" virus.  File 
quarantined as: "". 
http://www.fortinet.com/VirusEncyclopedia/search/encyclopediaSearch.do?method=quickSearchDirectly&virusName=HTML%2FFileDownload.EPotentially Dangerous Attachment Removed. The file "message.scr" has been 
blocked.  File quarantined as: "".

cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml

2005-09-19 Thread remm
remm2005/09/19 04:35:50

  Modified:catalina/src/share/org/apache/catalina/session
StandardSession.java
   webapps/docs changelog.xml
  Log:
  - 36541: Full syncs using a Hashtable for session attributes, as mandated in
the next specification.
  
  Revision  ChangesPath
  1.61  +11 -20
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java
  
  Index: StandardSession.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- StandardSession.java  16 Jun 2005 09:50:12 -  1.60
  +++ StandardSession.java  19 Sep 2005 11:35:49 -  1.61
  @@ -31,7 +31,9 @@
   import java.util.ArrayList;
   import java.util.Enumeration;
   import java.util.HashMap;
  +import java.util.Hashtable;
   import java.util.Iterator;
  +import java.util.Map;
   
   import javax.servlet.ServletContext;
   import javax.servlet.http.HttpSession;
  @@ -115,7 +117,7 @@
   /**
* The collection of user data attributes associated with this Session.
*/
  -protected HashMap attributes = new HashMap();
  +protected Map attributes = new Hashtable();
   
   
   /**
  @@ -229,7 +231,7 @@
* and event listeners.  IMPLEMENTATION NOTE: This object is
* not saved and restored across session serializations!
*/
  -protected transient HashMap notes = new HashMap();
  +protected transient Map notes = new Hashtable();
   
   
   /**
  @@ -1266,10 +1268,7 @@
   }
   
   // Replace or add this attribute
  -Object unbound = null;
  -synchronized (attributes) {
  -unbound = attributes.put(name, value);
  -}
  +Object unbound = attributes.put(name, value);
   
   // Call the valueUnbound() method if necessary
   if ((unbound != null) && (unbound != value) &&
  @@ -1376,7 +1375,7 @@
   
   // Deserialize the attribute count and attribute values
   if (attributes == null)
  -attributes = new HashMap();
  +attributes = new Hashtable();
   int n = ((Integer) stream.readObject()).intValue();
   boolean isValidSave = isValid;
   isValid = true;
  @@ -1388,9 +1387,7 @@
   if (manager.getContainer().getLogger().isDebugEnabled())
   manager.getContainer().getLogger().debug("  loading 
attribute '" + name +
   "' with value '" + value + "'");
  -synchronized (attributes) {
  -attributes.put(name, value);
  -}
  +attributes.put(name, value);
   }
   isValid = isValidSave;
   
  @@ -1399,7 +1396,7 @@
   }
   
   if (notes == null) {
  -notes = new HashMap();
  +notes = new Hashtable();
   }
   }
   
  @@ -1442,10 +1439,7 @@
   ArrayList saveNames = new ArrayList();
   ArrayList saveValues = new ArrayList();
   for (int i = 0; i < keys.length; i++) {
  -Object value = null;
  -synchronized (attributes) {
  -value = attributes.get(keys[i]);
  -}
  +Object value = attributes.get(keys[i]);
   if (value == null)
   continue;
   else if ( (value instanceof Serializable) 
  @@ -1599,10 +1593,7 @@
   protected void removeAttributeInternal(String name, boolean notify) {
   
   // Remove this attribute from our collection
  -Object value = null;
  -synchronized (attributes) {
  -value = attributes.remove(name);
  -}
  +Object value = attributes.remove(name);
   
   // Do we need to do valueUnbound() and attributeRemoved() 
notification?
   if (!notify || (value == null)) {
  
  
  
  1.374 +3 -0  jakarta-tomcat-catalina/webapps/docs/changelog.xml
  
  Index: changelog.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
  retrieving revision 1.373
  retrieving revision 1.374
  diff -u -r1.373 -r1.374
  --- changelog.xml 14 Sep 2005 15:05:49 -  1.373
  +++ changelog.xml 19 Sep 2005 11:35:50 -  1.374
  @@ -63,6 +63,9 @@
   36113: Session persistence for objects with primitive 
types could fail in
   some rare cases (remm)
 
  +  
  +36541: Full synchronization for session objects 
attributes collections (remm)
  +  
   
 
 
  
  
  

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



cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/tagplugins/jstl/core - New directory

2005-09-20 Thread remm
remm2005/09/20 03:56:41

  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/tagplugins/jstl/core 
- New directory

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



cvs commit: jakarta-tomcat-5 build.xml

2005-09-22 Thread remm
remm2005/09/22 03:39:37

  Modified:.build.xml
  Log:
  - Fix build by excluding tagPlugins.xml.
  - This file shouldn't be in the standard examples, but rather copied there
before precompiling (once it works again, of course).
  
  Revision  ChangesPath
  1.238 +3 -1  jakarta-tomcat-5/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v
  retrieving revision 1.237
  retrieving revision 1.238
  diff -u -r1.237 -r1.238
  --- build.xml 1 Sep 2005 18:28:24 -   1.237
  +++ build.xml 22 Sep 2005 10:39:37 -  1.238
  @@ -779,7 +779,9 @@
   
   
   
  -  
  +  
  +
  +  
   
   
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector CoyoteAdapter.java

2005-09-22 Thread remm
remm2005/09/22 10:20:21

  Modified:webapps/docs changelog.xml
   catalina/src/share/org/apache/catalina/connector
CoyoteAdapter.java
  Log:
  - 34749: jsessionid dropped on trailing slash (/) redirect.
  
  Revision  ChangesPath
  1.379 +3 -0  jakarta-tomcat-catalina/webapps/docs/changelog.xml
  
  Index: changelog.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
  retrieving revision 1.378
  retrieving revision 1.379
  diff -u -r1.378 -r1.379
  --- changelog.xml 22 Sep 2005 14:21:18 -  1.378
  +++ changelog.xml 22 Sep 2005 17:20:21 -  1.379
  @@ -70,6 +70,9 @@
   35609: service.bat echo command when wrong arguments 
given [patch by Robert
   Longson] (yoavs)
 
  +  
  +34749: jsessionid dropped on trailing slash (/) redirect 
(remm)
  +  
   
 
 
  
  
  
  1.10  +7 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java
  
  Index: CoyoteAdapter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CoyoteAdapter.java30 Apr 2005 03:32:43 -  1.9
  +++ CoyoteAdapter.java22 Sep 2005 17:20:21 -  1.10
  @@ -305,6 +305,12 @@
   if (!redirectPathMB.isNull()) {
   String redirectPath = redirectPathMB.toString();
   String query = request.getQueryString();
  +if (request.isRequestedSessionIdFromURL()) {
  +// This is not optimal, but as this is not very common, it
  +// shouldn't matter
  +redirectPath = redirectPath + ";jsessionid=" 
  ++ request.getRequestedSessionId();
  +}
   if (query != null) {
   // This is not optimal, but as this is not very common, it
   // shouldn't matter
  
  
  

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



svn commit: r307071 - /tomcat/build/tc5.5.x/build.properties.default

2005-10-07 Thread remm
Author: remm
Date: Fri Oct  7 03:13:20 2005
New Revision: 307071

URL: http://svn.apache.org/viewcvs?rev=307071&view=rev
Log:
- Update to Eclipse JDT 3.1.1 (ok, it's a test commit).

Modified:
tomcat/build/tc5.5.x/build.properties.default

Modified: tomcat/build/tc5.5.x/build.properties.default
URL: 
http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/build.properties.default?rev=307071&r1=307070&r2=307071&view=diff
==
--- tomcat/build/tc5.5.x/build.properties.default (original)
+++ tomcat/build/tc5.5.x/build.properties.default Fri Oct  7 03:13:20 2005
@@ -142,11 +142,11 @@
 xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.7.1.tar.gz
 
 
-# - Eclipse JDT, version 3.1.0 or later -
+# - Eclipse JDT, version 3.1.1 or later -
 jdt.home=${base.path}/eclipse/plugins
 jdt.lib=${jdt.home}
-jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.0.jar
-jdt.loc=http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.1-200506271435/eclipse-JDT-3.1.zip
+jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.1.jar
+jdt.loc=http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.1.1-200509290840/eclipse-JDT-3.1.1.zip
 
 
 # - Tomcat native library -



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



svn commit: r307085 - /tomcat/build/tc5.5.x/build.xml

2005-10-07 Thread remm
Author: remm
Date: Fri Oct  7 03:59:01 2005
New Revision: 307085

URL: http://svn.apache.org/viewcvs?rev=307085&view=rev
Log:
- Update source locations.

Modified:
tomcat/build/tc5.5.x/build.xml

Modified: tomcat/build/tc5.5.x/build.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/build.xml?rev=307085&r1=307084&r2=307085&view=diff
==
--- tomcat/build/tc5.5.x/build.xml (original)
+++ tomcat/build/tc5.5.x/build.xml Fri Oct  7 03:59:01 2005
@@ -25,11 +25,11 @@
   
 
   
-  
-  
-  
-  
-  
+  
+  
+  
+  
+  
   
   
   



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



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java

2001-04-20 Thread remm

remm01/04/21 00:02:21

  Modified:catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java
  Log:
  - Manifest could be null, which raised a NPE. The fix I had put in before was 
incorrect.
Bug reported by Sun-Gu Park and Donnchadh Donnabhn
  
  Revision  ChangesPath
  1.14  +14 -12
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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- StandardClassLoader.java  2001/04/07 23:08:45 1.13
  +++ StandardClassLoader.java  2001/04/21 07:02:20 1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.13 2001/04/07 23:08:45 craigmcc Exp $
  - * $Revision: 1.13 $
  - * $Date: 2001/04/07 23:08:45 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.14 2001/04/21 07:02:20 remm Exp $
  + * $Revision: 1.14 $
  + * $Date: 2001/04/21 07:02:20 $
*
* 
*
  @@ -110,7 +110,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.13 $ $Date: 2001/04/07 23:08:45 $
  + * @version $Revision: 1.14 $ $Date: 2001/04/21 07:02:20 $
*/
   
   public class StandardClassLoader
  @@ -1169,14 +1169,16 @@
   if (!((manifest == null) && (jarFile == null))) {
   if ((manifest == null) && (jarFile != null))
   manifest = jarFile.getManifest();
  -Iterator extensions =
  -Extension.getAvailable(manifest).iterator();
  -while (extensions.hasNext())
  -available.add(extensions.next());
  -extensions =
  -Extension.getRequired(manifest).iterator();
  -while (extensions.hasNext())
  -required.add(extensions.next());
  +if (manifest != null) {
  +Iterator extensions =
  +Extension.getAvailable(manifest).iterator();
  +while (extensions.hasNext())
  +available.add(extensions.next());
  +extensions =
  +Extension.getRequired(manifest).iterator();
  +while (extensions.hasNext())
  +required.add(extensions.next());
  +}
   }
   if (jarFile != null)
   jarFile.close();
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources DirContextURLConnection.java

2001-04-27 Thread remm

remm01/04/27 12:21:05

  Modified:catalina/src/share/org/apache/naming/resources
DirContextURLConnection.java
  Log:
  - Some NPE could happen when calling getLastModified() or getHeaderField().
  
  Revision  ChangesPath
  1.8   +15 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java
  
  Index: DirContextURLConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DirContextURLConnection.java  2001/04/25 04:15:38 1.7
  +++ DirContextURLConnection.java  2001/04/27 19:21:04 1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.7 2001/04/25 04:15:38 glenn Exp $
  - * $Revision: 1.7 $
  - * $Date: 2001/04/25 04:15:38 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.8 2001/04/27 19:21:04 remm Exp $
  + * $Revision: 1.8 $
  + * $Date: 2001/04/27 19:21:04 $
*
* 
*
  @@ -91,7 +91,7 @@
* content is directly returned.
* 
* @author mailto:[EMAIL PROTECTED]";>Remy Maucherat
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
*/
   public class DirContextURLConnection 
   extends URLConnection {
  @@ -236,6 +236,7 @@
* Return the last modified date.
*/
   public long getLastModified() {
  +
   if (!connected) {
   // Try to connect (silently)
   try {
  @@ -243,6 +244,10 @@
   } catch (IOException e) {
   }
   }
  +
  +if (attributes == null)
  +return 0;
  +
   Attribute lastModified = 
   attributes.get(ResourceAttributes.LAST_MODIFIED);
   if (lastModified != null) {
  @@ -252,6 +257,7 @@
   } catch (Exception e) {
   }
   }
  +
   return 0;
   }
   
  @@ -260,6 +266,7 @@
* Returns the name of the specified header field.
*/
   public String getHeaderField(String name) {
  +
   if (!connected) {
   // Try to connect (silently)
   try {
  @@ -268,12 +275,16 @@
   }
   }
   
  +if (attributes == null)
  +return (null);
  +
   Attribute attribute = attributes.get(name);
   try {
   return attribute.get().toString();
   } catch (Exception e) {
   // Shouldn't happen, unless the attribute has no value
   }
  +
   return (null);
   
   }
  
  
  



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

2001-04-27 Thread remm

remm01/04/27 12:57:39

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - Should address bug 1469. There was name conflicts in the
access controller of the naming context.
  
  Revision  ChangesPath
  1.55  +21 -8 
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.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- StandardContext.java  2001/04/17 19:27:14 1.54
  +++ StandardContext.java  2001/04/27 19:57:38 1.55
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.54 2001/04/17 19:27:14 craigmcc Exp $
  - * $Revision: 1.54 $
  - * $Date: 2001/04/17 19:27:14 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.55 2001/04/27 19:57:38 remm Exp $
  + * $Revision: 1.55 $
  + * $Date: 2001/04/27 19:57:38 $
*
* 
*
  @@ -141,7 +141,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.54 $ $Date: 2001/04/17 19:27:14 $
  + * @version $Revision: 1.55 $ $Date: 2001/04/27 19:57:38 $
*/
   
   public class StandardContext
  @@ -3439,13 +3439,13 @@
   
   Hashtable contextEnv = new Hashtable();
   javax.naming.Context namingContext = 
  -new NamingContext(contextEnv, getName());
  -ContextAccessController.setSecurityToken(getName(), this);
  +new NamingContext(contextEnv, getNamingContextName());
  +ContextAccessController.setSecurityToken(getNamingContextName(), this);
   ContextBindings.bindContext(this, namingContext, this);
   ContextBindings.bindThread(this, this);
   
   // Setting the context in read/write mode
  -ContextAccessController.setWritable(getName(), this);
  +ContextAccessController.setWritable(getNamingContextName(), this);
   
   // Creating the comp subcontext
   javax.naming.Context compCtx = namingContext.createSubcontext("comp");
  @@ -3576,7 +3576,7 @@
   }
   
   // Setting the context in read only mode
  -ContextAccessController.setReadOnly(getName());
  +ContextAccessController.setReadOnly(getNamingContextName());
   
   ContextBindings.unbindThread(this, this);
   
  @@ -3584,6 +3584,19 @@
   ContextBindings.bindClassLoader
   (this, this, getLoader().getClassLoader());
   
  +}
  +
  +
  +/**
  + * Get naming context full name.
  + */
  +private String getNamingContextName() {
  +Container parent = getParent();
  +if (parent != null) {
  +return  "/" + parent.getName() + getName();
  +} else {
  +return getName();
  +}
   }
   
   
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources DirContextURLStreamHandler.java

2001-05-03 Thread remm

remm01/05/03 17:30:02

  Modified:catalina/src/share/org/apache/naming/resources
DirContextURLStreamHandler.java
  Log:
  - Add possibility to bind threads in addition to classloaders.
  
  Revision  ChangesPath
  1.4   +37 -6 
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLStreamHandler.java
  
  Index: DirContextURLStreamHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLStreamHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DirContextURLStreamHandler.java   2001/03/21 05:05:44 1.3
  +++ DirContextURLStreamHandler.java   2001/05/04 00:30:01 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLStreamHandler.java,v
 1.3 2001/03/21 05:05:44 remm Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/03/21 05:05:44 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLStreamHandler.java,v
 1.4 2001/05/04 00:30:01 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/05/04 00:30:01 $
*
* 
*
  @@ -75,7 +75,7 @@
* Stream handler to a JNDI directory context.
* 
* @author mailto:[EMAIL PROTECTED]";>Remy Maucherat
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
*/
   public class DirContextURLStreamHandler 
   extends URLStreamHandler {
  @@ -102,6 +102,12 @@
   private static Hashtable clBindings = new Hashtable();
   
   
  +/**
  + * Bindings thread - directory context. Keyed by thread id.
  + */
  +private static Hashtable threadBindings = new Hashtable();
  +
  +
   // - Instance Variables
   
   
  @@ -156,12 +162,29 @@
   
   
   /**
  + * Binds a directory context to a thread.
  + */
  +public static void bindThread(DirContext dirContext) {
  +threadBindings.put(Thread.currentThread(), dirContext);
  +}
  +
  +
  +/**
  + * Unbinds a directory context to a thread.
  + */
  +public static void unbindThread() {
  +threadBindings.remove(Thread.currentThread());
  +}
  +
  +
  +/**
* Get the bound context.
*/
   public static DirContext get() {
  -ClassLoader currentCL = 
  -Thread.currentThread().getContextClassLoader();
   DirContext result = null;
  +Thread currentThread = Thread.currentThread();
  +result = (DirContext) threadBindings.get(currentThread);
  +ClassLoader currentCL = currentThread.getContextClassLoader();
   while ((result == null) && (currentCL != null)) {
   result = (DirContext) clBindings.get(currentCL);
   if (result == null)
  @@ -194,6 +217,14 @@
*/
   public static DirContext get(ClassLoader cl) {
   return (DirContext) clBindings.get(cl);
  +}
  +
  +
  +/**
  + * Get the bound context.
  + */
  +public static DirContext get(Thread thread) {
  +return (DirContext) threadBindings.get(thread);
   }
   
   
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader StandardLoader.java

2001-05-03 Thread remm

remm01/05/03 17:57:07

  Modified:catalina/src/share/org/apache/catalina/loader
StandardLoader.java
  Log:
  - Bind the thread in charge of checking for a modified class.
  
  Revision  ChangesPath
  1.24  +11 -6 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java
  
  Index: StandardLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- StandardLoader.java   2001/04/25 04:15:03 1.23
  +++ StandardLoader.java   2001/05/04 00:57:06 1.24
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
 1.23 2001/04/25 04:15:03 glenn Exp $
  - * $Revision: 1.23 $
  - * $Date: 2001/04/25 04:15:03 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
 1.24 2001/05/04 00:57:06 remm Exp $
  + * $Revision: 1.24 $
  + * $Date: 2001/05/04 00:57:06 $
*
* 
*
  @@ -116,7 +116,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.23 $ $Date: 2001/04/25 04:15:03 $
  + * @version $Revision: 1.24 $ $Date: 2001/05/04 00:57:06 $
*/
   
   public final class StandardLoader
  @@ -592,9 +592,10 @@
started = true;
   
   // Register a stream handler factory for the JNDI protocol
  +URLStreamHandlerFactory streamHandlerFactory = 
  +new DirContextURLStreamHandlerFactory();
   try {
  -URL.setURLStreamHandlerFactory
  -(new DirContextURLStreamHandlerFactory());
  +URL.setURLStreamHandlerFactory(streamHandlerFactory);
   } catch (Throwable t) {
   // Ignore the error here.
   }
  @@ -1283,6 +1284,8 @@
if (debug >= 1)
log("BACKGROUND THREAD Starting");
   
  +DirContextURLStreamHandler.bindThread(this.container.getResources());
  +
// Loop until the termination semaphore is set
while (!threadDone) {
   
  @@ -1298,6 +1301,8 @@
break;
   
}
  +
  +DirContextURLStreamHandler.unbindThread();
   
if (debug >= 1)
log("BACKGROUND THREAD Stopping");
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java

2001-05-03 Thread remm

remm01/05/03 19:01:13

  Modified:catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java
  Log:
  - Correctly register repositories based on non file protocols.
  - That fixes class reloading, which before could only handle file based URLs.
  
  Revision  ChangesPath
  1.16  +70 -25
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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- StandardClassLoader.java  2001/04/25 04:14:47 1.15
  +++ StandardClassLoader.java  2001/05/04 02:01:13 1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.15 2001/04/25 04:14:47 glenn Exp $
  - * $Revision: 1.15 $
  - * $Date: 2001/04/25 04:14:47 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.16 2001/05/04 02:01:13 remm Exp $
  + * $Revision: 1.16 $
  + * $Date: 2001/05/04 02:01:13 $
*
* 
*
  @@ -110,7 +110,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.15 $ $Date: 2001/04/25 04:14:47 $
  + * @version $Revision: 1.16 $ $Date: 2001/05/04 02:01:13 $
*/
   
   public class StandardClassLoader
  @@ -561,8 +561,8 @@
   return (true);
   }
   } else if (entries[i].origin instanceof URL) {
  +URL url = (URL) entries[i].origin;
   try {
  -URL url = (URL) entries[i].origin;
   URLConnection urlConn = url.openConnection();
   if (entries[i].lastModified != urlConn.getLastModified()) {
   if (debug >= 2)
  @@ -572,6 +572,7 @@
   return (true);
   }
   } catch (IOException e) {
  +log("Failed tracking modifications of '" + url + "'");
   }
   }
   }
  @@ -687,27 +688,71 @@
   repositories[i].substring(0, repositories[i].length() - 1);
if (debug >= 4)
log("  Checking repository " + pathname);
  -if (pathname.startsWith("file://"))
  -pathname = pathname.substring(7);
  -else if (pathname.startsWith("file:"))
  -pathname = pathname.substring(5);
  -pathname += File.separatorChar +
  -name.replace('.', File.separatorChar) + ".class";
  - try {
  -File file = new File(pathname);
  -if (file.exists() && file.canRead()) {
  -if (debug >= 3)
  -log("Caching from '" + file.getAbsolutePath() +
  +if ((pathname.startsWith("file://")) 
  +|| (pathname.startsWith("file:"))) {
  +
  +if (pathname.startsWith("file://")) {
  +pathname = pathname.substring(7);
  +} else if (pathname.startsWith("file:")) {
  +pathname = pathname.substring(5);
  +}
  +pathname += File.separatorChar 
  ++ name.replace('.', File.separatorChar) + ".class";
  +
  +try {
  +File file = new File(pathname);
  +if (file.exists() && file.canRead()) {
  +if (debug >= 3)
  +log("Caching from '" + file.getAbsolutePath() +
  +"' modified '" +
  +(new java.sql.Timestamp(file.lastModified())) +
  +"'");
  +classCache.put(name, new ClassCacheEntry
  +(clazz, file, file.lastModified()));
  +}
  +
  +} catch(AccessControlException ace) {
  +// Don't worry about caching the class last modified
  +// if ClassLoader doesn't have permission to read file
  +}
  +
  +} else {
  +
  +pathname += "/" + name.replace('.', '/') + ".class";
  +
  +try {
  +

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java

2001-05-03 Thread remm

remm01/05/03 20:49:57

  Modified:catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java
  Log:
  - Log a message about tracking changes only if debug level >= 4.
  
  Revision  ChangesPath
  1.17  +10 -9 
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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- StandardClassLoader.java  2001/05/04 02:01:13 1.16
  +++ StandardClassLoader.java  2001/05/04 03:49:56 1.17
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.16 2001/05/04 02:01:13 remm Exp $
  - * $Revision: 1.16 $
  - * $Date: 2001/05/04 02:01:13 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.17 2001/05/04 03:49:56 remm Exp $
  + * $Revision: 1.17 $
  + * $Date: 2001/05/04 03:49:56 $
*
* 
*
  @@ -110,7 +110,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.16 $ $Date: 2001/05/04 02:01:13 $
  + * @version $Revision: 1.17 $ $Date: 2001/05/04 03:49:56 $
*/
   
   public class StandardClassLoader
  @@ -730,11 +730,12 @@
   try {
   URLConnection classUrlConnection =
   classUrl.openConnection();
  -log("Caching from '" + classUrl.toString() +
  -"' modified '" +
  -(new java.sql.Timestamp
  -(classUrlConnection.getLastModified())) +
  -"'");
  +if (debug >= 4)
  +log("Caching from '" + classUrl.toString() +
  +"' modified '" +
  +(new java.sql.Timestamp
  +(classUrlConnection.getLastModified())) +
  +"'");
   classCache.put(name, new ClassCacheEntry
   (clazz, classUrl, 
classUrlConnection.getLastModified()));
  
  
  



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

2001-05-08 Thread remm

remm01/05/08 23:56:16

  Modified:catalina/src/share/org/apache/catalina/core
StandardWrapper.java
  Log:
  - Set context class loader during init / destroy.
Based on a patch submitted by Kyle F. Downey 
  
  Revision  ChangesPath
  1.20  +21 -7 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
  
  Index: StandardWrapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- StandardWrapper.java  2001/04/25 02:20:48 1.19
  +++ StandardWrapper.java  2001/05/09 06:56:14 1.20
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.19 2001/04/25 02:20:48 craigmcc Exp $
  - * $Revision: 1.19 $
  - * $Date: 2001/04/25 02:20:48 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.20 2001/05/09 06:56:14 remm Exp $
  + * $Revision: 1.20 $
  + * $Date: 2001/05/09 06:56:14 $
*
* 
*
  @@ -104,7 +104,7 @@
* make them efficient are counter-productive.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.19 $ $Date: 2001/04/25 02:20:48 $
  + * @version $Revision: 1.20 $ $Date: 2001/05/09 06:56:14 $
*/
   
   public final class StandardWrapper
  @@ -759,6 +759,9 @@
throw new ServletException
(sm.getString("standardWrapper.missingLoader", getName()));
}
  +
  +ClassLoader oldCtxClassLoader = 
  +Thread.currentThread().getContextClassLoader();
ClassLoader classLoader = loader.getClassLoader();
   
   // Special case class loader for a Catalina internal servlet
  @@ -811,6 +814,7 @@
try {
instanceSupport.fireInstanceEvent(InstanceEvent.BEFORE_INIT_EVENT,
  servlet);
  +Thread.currentThread().setContextClassLoader(classLoader);
servlet.init((ServletConfig) this);
instanceSupport.fireInstanceEvent(InstanceEvent.AFTER_INIT_EVENT,
  servlet);
  @@ -832,7 +836,10 @@
// said so, so do not call unavailable(null).
throw new ServletException
(sm.getString("standardWrapper.initException", getName()), f);
  - }
  + } finally {
  +// restore the context ClassLoader
  +Thread.currentThread().setContextClassLoader(oldCtxClassLoader);
  +}
   
// Register our newly initialized instance
instance = servlet;
  @@ -959,12 +966,16 @@
   }
   }
   }
  -  
  +
  +ClassLoader oldCtxClassLoader = 
  +Thread.currentThread().getContextClassLoader();
  +ClassLoader classLoader = loader.getClassLoader();
   
// Call the servlet destroy() method
try {
instanceSupport.fireInstanceEvent
  (InstanceEvent.BEFORE_DESTROY_EVENT, instance);
  +Thread.currentThread().setContextClassLoader(classLoader);
instance.destroy();
instanceSupport.fireInstanceEvent
  (InstanceEvent.AFTER_DESTROY_EVENT, instance);
  @@ -977,7 +988,10 @@
throw new ServletException
(sm.getString("standardWrapper.destroyException", getName()),
 t);
  - }
  + } finally {
  +// restore the context ClassLoader
  +Thread.currentThread().setContextClassLoader(oldCtxClassLoader);
  +}
   
// Deregister the destroyed instance
instance = null;
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java

2001-05-11 Thread remm

remm01/05/11 11:19:53

  Modified:catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java
  Log:
  - The resource existence check was incorrect when using a URL, which
was breaking reloading in some cases.
  
  Revision  ChangesPath
  1.18  +7 -6  
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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- StandardClassLoader.java  2001/05/04 03:49:56 1.17
  +++ StandardClassLoader.java  2001/05/11 18:19:40 1.18
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.17 2001/05/04 03:49:56 remm Exp $
  - * $Revision: 1.17 $
  - * $Date: 2001/05/04 03:49:56 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.18 2001/05/11 18:19:40 remm Exp $
  + * $Revision: 1.18 $
  + * $Date: 2001/05/11 18:19:40 $
*
* 
*
  @@ -110,7 +110,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.17 $ $Date: 2001/05/04 03:49:56 $
  + * @version $Revision: 1.18 $ $Date: 2001/05/11 18:19:40 $
*/
   
   public class StandardClassLoader
  @@ -730,6 +730,9 @@
   try {
   URLConnection classUrlConnection =
   classUrl.openConnection();
  +// Check for existence
  +InputStream is = classUrlConnection.getInputStream();
  +is.close();
   if (debug >= 4)
   log("Caching from '" + classUrl.toString() +
   "' modified '" +
  @@ -740,8 +743,6 @@
   (clazz, classUrl, 
classUrlConnection.getLastModified()));
   } catch (IOException e) {
  -log("Failed tracking modifications of '" 
  -+ classUrl.toString() + "'");
   }
   
   } catch(MalformedURLException ex) {
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources DirContextURLConnection.java

2001-05-11 Thread remm

remm01/05/11 11:20:42

  Modified:catalina/src/share/org/apache/naming/resources
DirContextURLConnection.java
  Log:
  - The resource existence check was incorrect when using a URL, which
was breaking reloading in some cases.
  
  Revision  ChangesPath
  1.9   +5 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java
  
  Index: DirContextURLConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DirContextURLConnection.java  2001/04/27 19:21:04 1.8
  +++ DirContextURLConnection.java  2001/05/11 18:20:34 1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.8 2001/04/27 19:21:04 remm Exp $
  - * $Revision: 1.8 $
  - * $Date: 2001/04/27 19:21:04 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.9 2001/05/11 18:20:34 remm Exp $
  + * $Revision: 1.9 $
  + * $Date: 2001/05/11 18:20:34 $
*
* 
*
  @@ -91,7 +91,7 @@
* content is directly returned.
* 
* @author mailto:[EMAIL PROTECTED]";>Remy Maucherat
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
*/
   public class DirContextURLConnection 
   extends URLConnection {
  @@ -199,6 +199,7 @@
   collection = (DirContext) object;
   } catch (NamingException e) {
   // Object not found
  +throw new IOException("Resource not found");
   }
   
   connected = true;
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources DirContextURLConnection.java

2001-05-11 Thread remm

remm01/05/11 11:24:41

  Modified:catalina/src/share/org/apache/naming/resources
DirContextURLConnection.java
  Log:
  - Revert the commit on URL connection.
  
  Revision  ChangesPath
  1.10  +4 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java
  
  Index: DirContextURLConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DirContextURLConnection.java  2001/05/11 18:20:34 1.9
  +++ DirContextURLConnection.java  2001/05/11 18:24:33 1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.9 2001/05/11 18:20:34 remm Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/05/11 18:20:34 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.10 2001/05/11 18:24:33 remm Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/05/11 18:24:33 $
*
* 
*
  @@ -91,7 +91,7 @@
* content is directly returned.
* 
* @author mailto:[EMAIL PROTECTED]";>Remy Maucherat
  - * @version $Revision: 1.9 $
  + * @version $Revision: 1.10 $
*/
   public class DirContextURLConnection 
   extends URLConnection {
  @@ -199,7 +199,6 @@
   collection = (DirContext) object;
   } catch (NamingException e) {
   // Object not found
  -throw new IOException("Resource not found");
   }
   
   connected = true;
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector HttpRequestFacade.java HttpResponseFacade.java RequestFacade.java ResponseFacade.java

2001-05-13 Thread remm

remm01/05/13 21:06:46

  Added:   catalina/src/share/org/apache/catalina/connector
HttpRequestFacade.java HttpResponseFacade.java
RequestFacade.java ResponseFacade.java
  Log:
  - Add request and response facades.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestFacade.java
  
  Index: HttpRequestFacade.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestFacade.java,v
 1.1 2001/05/14 04:06:45 remm Exp $
   * $Revision: 1.1 $
   * $Date: 2001/05/14 04:06:45 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  
  
  package org.apache.catalina.connector;
  
  
  import java.security.Principal;
  import java.util.Locale;
  import java.util.Enumeration;
  import javax.servlet.RequestDispatcher;
  import javax.servlet.ServletContext;
  import javax.servlet.ServletException;
  import javax.servlet.ServletInputStream;
  import javax.servlet.ServletRequest;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.Cookie;
  import javax.servlet.http.HttpSession;
  import org.apache.catalina.HttpRequest;
  import org.apache.catalina.session.StandardSessionFacade;
  
  
  /**
   * Facade class that wraps a Catalina-internal HttpRequest
   * object.  All methods are delegated to the wrapped request.
   *
   * @author Remy Maucherat
   * @version $Revision: 1.1 $ $Date: 2001/05/14 04:06:45 $
   */
  
  public final class HttpRequestFacade
  extends RequestFacade
  implements HttpServletRequest {
  
  
  // --- Constructors
  
  
  /**
   * Construct a wrapper for the specified request.
   *
   * @param request The request to be wrapped
   */
  public HttpRequestFacade(HttpRequest request) {
super(request);
  }
  
  
  // - HttpServletRequest Methods
  
  
  

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

2001-05-13 Thread remm

remm01/05/13 21:07:32

  Added:   catalina/src/share/org/apache/catalina/core
ApplicationContextFacade.java
StandardWrapperFacade.java
  Log:
  - Add facade for the wrapper (servlet config).
  - Add facade for the application context (servlet context)
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java
  
  Index: ApplicationContextFacade.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java,v
 1.1 2001/05/14 04:07:31 remm Exp $
   * $Revision: 1.1 $
   * $Date: 2001/05/14 04:07:31 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  
  
  package org.apache.catalina.core;
  
  
  import java.io.InputStream;
  import java.io.File;
  import java.net.MalformedURLException;
  import java.net.URL;
  import java.security.AccessController;
  import java.security.PrivilegedAction;
  import java.security.PrivilegedExceptionAction;
  import java.security.PrivilegedActionException;
  import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.Enumeration;
  import java.util.HashMap;
  import java.util.HashSet;
  import java.util.Set;
  import javax.naming.NamingException;
  import javax.naming.Binding;
  import javax.naming.directory.DirContext;
  import javax.servlet.RequestDispatcher;
  import javax.servlet.Servlet;
  import javax.servlet.ServletContext;
  import javax.servlet.ServletException;
  import javax.servlet.ServletContextAttributeEvent;
  import javax.servlet.ServletContextAttributeListener;
  import javax.servlet.http.HttpServletRequest;
  
  
  /**
   * Facade object which masks the internal ApplicationContext
   * object from the web application.
   *
   * @author Remy Maucherat
   * @version $Revision: 1.1 $ $Date: 2001/05/14 04:07:31 $
   */
  
  public final class ApplicationContextFacade
  implements ServletContext {
  
  
  // -

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

2001-05-13 Thread remm

remm01/05/13 21:07:56

  Added:   catalina/src/share/org/apache/catalina/session
StandardSessionFacade.java
  Log:
  - Add facade for the standard session object.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSessionFacade.java
  
  Index: StandardSessionFacade.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSessionFacade.java,v
 1.1 2001/05/14 04:07:55 remm Exp $
   * $Revision: 1.1 $
   * $Date: 2001/05/14 04:07:55 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  
  
  package org.apache.catalina.session;
  
  
  import java.io.IOException;
  import java.io.NotSerializableException;
  import java.io.ObjectInputStream;
  import java.io.ObjectOutputStream;
  import java.io.Serializable;
  import java.security.Principal;
  import java.util.ArrayList;
  import java.util.Enumeration;
  import java.util.HashMap;
  import java.util.Iterator;
  import javax.servlet.ServletContext;
  import javax.servlet.ServletException;
  import javax.servlet.http.HttpSession;
  import javax.servlet.http.HttpSessionActivationListener;
  import javax.servlet.http.HttpSessionAttributeListener;
  import javax.servlet.http.HttpSessionBindingEvent;
  import javax.servlet.http.HttpSessionBindingListener;
  import javax.servlet.http.HttpSessionContext;
  import javax.servlet.http.HttpSessionEvent;
  import javax.servlet.http.HttpSessionListener;
  
  
  /**
   * Facade for the StandardSession object.
   *
   * @author Remy Maucherat
   * @version $Revision: 1.1 $ $Date: 2001/05/14 04:07:55 $
   */
  
  public class StandardSessionFacade
  implements HttpSession {
  
  
  // --- Constructors
  
  
  /**
   * Construct a new session facade.
   */
  public StandardSessionFacade(StandardSession session) {
  super();
  this.session = (HttpSession) session;
  }
  

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

2001-05-13 Thread remm

remm01/05/13 21:08:52

  Modified:catalina/src/share/org/apache/catalina/core
StandardWrapper.java
  Log:
  - Use a facade for servlet config.
  
  Revision  ChangesPath
  1.23  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
  
  Index: StandardWrapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- StandardWrapper.java  2001/05/14 00:02:32 1.22
  +++ StandardWrapper.java  2001/05/14 04:08:50 1.23
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.22 2001/05/14 00:02:32 craigmcc Exp $
  - * $Revision: 1.22 $
  - * $Date: 2001/05/14 00:02:32 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.23 2001/05/14 04:08:50 remm Exp $
  + * $Revision: 1.23 $
  + * $Date: 2001/05/14 04:08:50 $
*
* 
*
  @@ -105,7 +105,7 @@
* make them efficient are counter-productive.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.22 $ $Date: 2001/05/14 00:02:32 $
  + * @version $Revision: 1.23 $ $Date: 2001/05/14 04:08:50 $
*/
   
   public final class StandardWrapper
  @@ -823,7 +823,7 @@
instanceSupport.fireInstanceEvent(InstanceEvent.BEFORE_INIT_EVENT,
  servlet);
   Thread.currentThread().setContextClassLoader(classLoader);
  - servlet.init((ServletConfig) this);
  + servlet.init(new StandardWrapperFacade(this));
instanceSupport.fireInstanceEvent(InstanceEvent.AFTER_INIT_EVENT,
  servlet);
} catch (UnavailableException f) {
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core ApplicationHttpRequest.java ApplicationHttpResponse.java ApplicationRequest.java ApplicationResponse.java

2001-05-13 Thread remm

remm01/05/13 21:10:09

  Modified:catalina/src/share/org/apache/catalina/core
ApplicationHttpRequest.java
ApplicationHttpResponse.java
ApplicationRequest.java ApplicationResponse.java
  Log:
  - The request and response objects had to be modified be able to use facades.
They will now handled the facade as the parent "internal" request / response.
  
  Revision  ChangesPath
  1.7   +10 -8 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpRequest.java
  
  Index: ApplicationHttpRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpRequest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ApplicationHttpRequest.java   2001/05/12 04:56:54 1.6
  +++ ApplicationHttpRequest.java   2001/05/14 04:10:04 1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpRequest.java,v
 1.6 2001/05/12 04:56:54 craigmcc Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/05/12 04:56:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpRequest.java,v
 1.7 2001/05/14 04:10:04 remm Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/05/14 04:10:04 $
*
* 
*
  @@ -75,6 +75,7 @@
   import javax.servlet.http.HttpServletRequestWrapper;
   import org.apache.catalina.Globals;
   import org.apache.catalina.HttpRequest;
  +import org.apache.catalina.connector.HttpRequestFacade;
   import org.apache.catalina.util.Enumerator;
   import org.apache.catalina.util.RequestUtil;
   import org.apache.catalina.util.StringManager;
  @@ -93,7 +94,7 @@
* keep these two classes in synchronization when making changes!
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2001/05/12 04:56:54 $
  + * @version $Revision: 1.7 $ $Date: 2001/05/14 04:10:04 $
*/
   
   class ApplicationHttpRequest extends HttpServletRequestWrapper {
  @@ -160,7 +161,7 @@
   /**
* The parent object that is actually an internal request object.
*/
  -protected HttpRequest parent = null;
  +protected HttpServletRequest parent = null;
   
   
   /**
  @@ -419,7 +420,8 @@
return;
}
while (request != null) {
  - if (request instanceof HttpRequest)
  + if ((request instanceof HttpRequest) 
  +|| (request instanceof HttpRequestFacade))
break;
if (!(request instanceof HttpServletRequestWrapper)) {
throw new IllegalArgumentException
  @@ -432,7 +434,7 @@
throw new IllegalArgumentException
(sm.getString("applicationRequest.badParent"));
}
  - this.parent = (HttpRequest) request;
  + this.parent = request;
   
   }
   
  @@ -463,7 +465,7 @@
* Get the parent of the wrapped servlet request that is actually an
* internal Request implementation.
*/
  -HttpRequest getParent() {
  +HttpServletRequest getParent() {
   
return (this.parent);
   
  
  
  
  1.3   +10 -8 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpResponse.java
  
  Index: ApplicationHttpResponse.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpResponse.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ApplicationHttpResponse.java  2001/05/12 04:56:55 1.2
  +++ ApplicationHttpResponse.java  2001/05/14 04:10:05 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpResponse.java,v
 1.2 2001/05/12 04:56:55 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/05/12 04:56:55 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpResponse.java,v
 1.3 2001/05/14 04:10:05 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/05/14 04:10:05 $
*
* 
*
  @@ -70,6 +70,7 @@
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpServletResponseWrapper;
   import org.apache.catalina.HttpResponse;
  +import org.apache.catalina.connector.HttpResponseFacade;
   import org.apache.catalina.util.StringManager;
   
   
  @@ -86,7 +87,7 @@
* keep these two classes in synchronization when making changes!
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/05/12 04:56:55 $
  + * @version $Revisio

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector HttpRequestBase.java HttpResponseBase.java RequestBase.java ResponseBase.java

2001-05-13 Thread remm

remm01/05/13 21:12:35

  Modified:catalina/src/share/org/apache/catalina/connector
HttpRequestBase.java HttpResponseBase.java
RequestBase.java ResponseBase.java
  Log:
  - Return facade objects instead of the unsafe internal request / response
objects.
  
  Revision  ChangesPath
  1.23  +16 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java
  
  Index: HttpRequestBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- HttpRequestBase.java  2001/05/03 19:15:05 1.22
  +++ HttpRequestBase.java  2001/05/14 04:12:30 1.23
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
 1.22 2001/05/03 19:15:05 craigmcc Exp $
  - * $Revision: 1.22 $
  - * $Date: 2001/05/03 19:15:05 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
 1.23 2001/05/14 04:12:30 remm Exp $
  + * $Revision: 1.23 $
  + * $Date: 2001/05/14 04:12:30 $
*
* 
*
  @@ -79,6 +79,7 @@
   import java.util.Locale;
   import java.util.Map;
   import javax.servlet.RequestDispatcher;
  +import javax.servlet.ServletRequest;
   import javax.servlet.ServletInputStream;
   import javax.servlet.http.Cookie;
   import javax.servlet.http.HttpServletRequest;
  @@ -100,7 +101,7 @@
* be implemented.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.22 $ $Date: 2001/05/03 19:15:05 $
  + * @version $Revision: 1.23 $ $Date: 2001/05/14 04:12:30 $
*/
   
   public class HttpRequestBase
  @@ -258,6 +259,17 @@
   public String getInfo() {
   
return (info);
  +
  +}
  +
  +
  +/**
  + * Return the ServletRequest for which this object
  + * is the facade.  This method must be implemented by a subclass.
  + */
  +public ServletRequest getRequest() {
  +
  +return new HttpRequestFacade(this);
   
   }
   
  
  
  
  1.31  +19 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java
  
  Index: HttpResponseBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- HttpResponseBase.java 2001/04/18 20:40:30 1.30
  +++ HttpResponseBase.java 2001/05/14 04:12:31 1.31
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
 1.30 2001/04/18 20:40:30 craigmcc Exp $
  - * $Revision: 1.30 $
  - * $Date: 2001/04/18 20:40:30 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
 1.31 2001/05/14 04:12:31 remm Exp $
  + * $Revision: 1.31 $
  + * $Date: 2001/05/14 04:12:31 $
*
* 
*
  @@ -79,6 +79,7 @@
   import java.util.Iterator;
   import java.util.Locale;
   import java.util.TimeZone;
  +import javax.servlet.ServletResponse;
   import javax.servlet.http.Cookie;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
  @@ -99,7 +100,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.30 $ $Date: 2001/04/18 20:40:30 $
  + * @version $Revision: 1.31 $ $Date: 2001/05/14 04:12:31 $
*/
   
   public class HttpResponseBase
  @@ -158,6 +159,20 @@
* The time zone with which to construct date headers.
*/
   protected static final TimeZone zone = TimeZone.getTimeZone("GMT");
  +
  +
  +// - Properties
  +
  +
  +/**
  + * Return the ServletResponse for which this object
  + * is the facade.
  + */
  +public ServletResponse getResponse() {
  +
  +return new HttpResponseFacade(this);
  +
  +}
   
   
   // - Public Methods
  
  
  
  1.12  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/RequestBase.java
  
  Index: RequestBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/RequestBase.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- RequestBase.java  2001/04/26 17:23:3

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

2001-05-15 Thread remm

remm01/05/15 22:57:44

  Modified:catalina/src/share/org/apache/naming/resources
ProxyDirContext.java
  Log:
  - Remove normalization of '\\' into '/'. That was a hack which was introduced
for Jasper, but conflicts with what DirCOntextURLConnection is doing.
  
  Revision  ChangesPath
  1.4   +5 -7  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java
  
  Index: ProxyDirContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProxyDirContext.java  2001/04/06 19:32:00 1.3
  +++ ProxyDirContext.java  2001/05/16 05:57:44 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v
 1.3 2001/04/06 19:32:00 remm Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/04/06 19:32:00 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v
 1.4 2001/05/16 05:57:44 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/05/16 05:57:44 $
*
* 
*
  @@ -84,7 +84,7 @@
* Proxy Directory Context implementation.
*
* @author Remy Maucherat
  - * @version $Revision: 1.3 $ $Date: 2001/04/06 19:32:00 $
  + * @version $Revision: 1.4 $ $Date: 2001/05/16 05:57:44 $
*/
   
   public class ProxyDirContext implements DirContext {
  @@ -1302,7 +1302,7 @@
*/
   protected String parseName(String name) 
   throws NamingException {
  -return name.replace('\\', '/');
  +return name;
   }
   
   
  @@ -1313,9 +1313,7 @@
*/
   protected Name parseName(Name name) 
   throws NamingException {
  -
   return name;
  -
   }
   
   
  
  
  



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

2001-05-15 Thread remm

remm01/05/15 23:02:48

  Modified:jasper/src/share/org/apache/jasper/compiler JspCompiler.java
  Log:
  - JspCompiler shouldn't use a File here. Under Windows, it converts '/' to
'\\' which makes the URL connection class fail.
  
  Revision  ChangesPath
  1.6   +6 -6  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspCompiler.java
  
  Index: JspCompiler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspCompiler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JspCompiler.java  2001/03/22 03:40:02 1.5
  +++ JspCompiler.java  2001/05/16 06:02:48 1.6
  @@ -82,7 +82,7 @@
   String javaFileName, classFileName;
   String realClassName;
   
  -File jsp;
  +String jsp;
   String outputDir;
   
   //ClassFileData cfd;
  @@ -93,7 +93,7 @@
   public JspCompiler(JspCompilationContext ctxt) throws JasperException {
   super(ctxt);
   
  -this.jsp = new File(ctxt.getJspFile());
  +this.jsp = ctxt.getJspFile();
   this.outputDir = ctxt.getOutputDir();
   this.outDated = false;
   setMangler(this);
  @@ -125,10 +125,10 @@
   private final String getBaseClassName() {
String className;
   
  -if (jsp.getName().endsWith(".jsp"))
  -className = jsp.getName().substring(0, jsp.getName().length() - 4);
  +if (jsp.endsWith(".jsp"))
  +className = jsp.substring(0, jsp.length() - 4);
   else
  -className = jsp.getName();
  +className = jsp;
   

// Fix for invalid characters. If you think of more add to the list.
  @@ -167,7 +167,7 @@
   long jspRealLastModified = 0;
   
   try {
  -URL jspUrl = ctxt.getResource(jsp.getPath());
  +URL jspUrl = ctxt.getResource(jsp);
   if (jspUrl == null)
   return true;
   jspRealLastModified = jspUrl.openConnection().getLastModified();
  
  
  



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

2001-05-16 Thread remm

remm01/05/16 10:52:26

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpRequestLine.java
  Log:
  - The array allocated for the protocol was too big (the wrong constant was used).
Patch submitted by Martijn Koster 
  
  Revision  ChangesPath
  1.3   +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestLine.java
  
  Index: HttpRequestLine.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestLine.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpRequestLine.java  2000/11/24 19:55:20 1.2
  +++ HttpRequestLine.java  2001/05/16 17:52:17 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestLine.java,v
 1.2 2000/11/24 19:55:20 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/11/24 19:55:20 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestLine.java,v
 1.3 2001/05/16 17:52:17 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/05/16 17:52:17 $
*
* 
*
  @@ -75,7 +75,7 @@
* HTTP request line enum type.
*
* @author Remy Maucherat
  - * @version $Revision: 1.2 $ $Date: 2000/11/24 19:55:20 $
  + * @version $Revision: 1.3 $ $Date: 2001/05/16 17:52:17 $
*/
   
   final class HttpRequestLine {
  @@ -98,7 +98,7 @@
   public HttpRequestLine() {
   
   this(new char[INITIAL_METHOD_SIZE], 0, new char[INITIAL_URI_SIZE], 0, 
  - new char[INITIAL_URI_SIZE], 0);
  + new char[INITIAL_PROTOCOL_SIZE], 0);
   
   }
   
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves RequestFilterValve.java

2001-05-16 Thread remm

remm01/05/16 10:57:28

  Modified:catalina/src/share/org/apache/catalina/connector
HttpRequestBase.java HttpResponseBase.java
RequestBase.java ResponseBase.java
   catalina/src/share/org/apache/catalina/connector/http
HttpProcessor.java
   catalina/src/share/org/apache/catalina/connector/http10
HttpProcessor.java
   catalina/src/share/org/apache/catalina/core
ApplicationContext.java
ApplicationFilterConfig.java StandardContext.java
StandardContextMapper.java StandardHost.java
StandardWrapperValve.java
   catalina/src/share/org/apache/catalina/loader Extension.java
   catalina/src/share/org/apache/catalina/realm
MemoryRealm.java
   catalina/src/share/org/apache/catalina/servlets
DefaultServlet.java InvokerServlet.java
SsiInvokerServlet.java WebdavServlet.java
   catalina/src/share/org/apache/catalina/util RequestUtil.java
   catalina/src/share/org/apache/catalina/util/ssi
SsiMediator.java
   catalina/src/share/org/apache/catalina/valves
RequestFilterValve.java
  Log:
  - Replace calls to indexOf("x") by indexOf('x'), and lastIndexOf("x") by 
lastIndexOf('x').
Patch submitted by Martijn Koster 
  
  Revision  ChangesPath
  1.25  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java
  
  Index: HttpRequestBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- HttpRequestBase.java  2001/05/14 04:51:16 1.24
  +++ HttpRequestBase.java  2001/05/16 17:55:21 1.25
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
 1.24 2001/05/14 04:51:16 craigmcc Exp $
  - * $Revision: 1.24 $
  - * $Date: 2001/05/14 04:51:16 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpRequestBase.java,v
 1.25 2001/05/16 17:55:21 remm Exp $
  + * $Revision: 1.25 $
  + * $Date: 2001/05/16 17:55:21 $
*
* 
*
  @@ -101,7 +101,7 @@
* be implemented.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.24 $ $Date: 2001/05/14 04:51:16 $
  + * @version $Revision: 1.25 $ $Date: 2001/05/16 17:55:21 $
*/
   
   public class HttpRequestBase
  @@ -612,7 +612,7 @@
   String contentType = getContentType();
   if (contentType == null)
   contentType = "";
  -int semicolon = contentType.indexOf(";");
  +int semicolon = contentType.indexOf(';');
   if (semicolon >= 0)
   contentType = contentType.substring(0, semicolon).trim();
if ("POST".equals(getMethod()) && (getContentLength() > 0) 
  
  
  
  1.33  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java
  
  Index: HttpResponseBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- HttpResponseBase.java 2001/05/14 04:51:16 1.32
  +++ HttpResponseBase.java 2001/05/16 17:55:25 1.33
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
 1.32 2001/05/14 04:51:16 craigmcc Exp $
  - * $Revision: 1.32 $
  - * $Date: 2001/05/14 04:51:16 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
 1.33 2001/05/16 17:55:25 remm Exp $
  + * $Revision: 1.33 $
  + * $Date: 2001/05/16 17:55:25 $
*
* 
*
  @@ -100,7 +100,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.32 $ $Date: 2001/05/14 04:51:16 $
  + * @version $Revision: 1.33 $ $Date: 2001/05/16 17:55:25 $
*/
   
   public class HttpResponseBase
  @@ -692,7 +692,7 @@
   
String path = url;
String query = "";
  - int question = url.indexOf("?");
  + int question = url.indexOf('?');
if (question >= 0) {
path

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves RequestDumperValve.java

2001-05-17 Thread remm

remm01/05/17 01:38:32

  Modified:catalina/src/share/org/apache/catalina/valves
RequestDumperValve.java
  Log:
  - getCookies() will return null now if no cookies are set.
  
  Revision  ChangesPath
  1.3   +9 -7  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java
  
  Index: RequestDumperValve.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RequestDumperValve.java   2001/01/23 02:53:03 1.2
  +++ RequestDumperValve.java   2001/05/17 08:38:30 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v
 1.2 2001/01/23 02:53:03 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/01/23 02:53:03 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v
 1.3 2001/05/17 08:38:30 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/05/17 08:38:30 $
*
* 
*
  @@ -97,7 +97,7 @@
* of the logging you wish to perform.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/01/23 02:53:03 $
  + * @version $Revision: 1.3 $ $Date: 2001/05/17 08:38:30 $
*/
   
   public class RequestDumperValve
  @@ -174,9 +174,11 @@
   log("   contentType=" + hreq.getContentType());
   log("   contextPath=" + hreq.getContextPath());
   Cookie cookies[] = hreq.getCookies();
  -for (int i = 0; i < cookies.length; i++)
  -log("cookie=" + cookies[i].getName() + "=" +
  -cookies[i].getValue());
  +if (cookies != null) {
  +for (int i = 0; i < cookies.length; i++)
  +log("cookie=" + cookies[i].getName() + "=" +
  +cookies[i].getValue());
  +}
   Enumeration hnames = hreq.getHeaderNames();
   while (hnames.hasMoreElements()) {
   String hname = (String) hnames.nextElement();
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming ContextBindings.java

2001-05-22 Thread remm

remm01/05/22 13:10:42

  Modified:catalina/src/share/org/apache/naming ContextBindings.java
  Log:
  - unbindThread(name) was inappropriately calling itself, instead of calling
unbindThread(Object name, Object token).
Patch submitted by Michael Amster (mamster at webeasy.com)
  
  Revision  ChangesPath
  1.4   +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ContextBindings.java
  
  Index: ContextBindings.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ContextBindings.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContextBindings.java  2001/01/25 18:35:15 1.3
  +++ ContextBindings.java  2001/05/22 20:10:36 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ContextBindings.java,v
 1.3 2001/01/25 18:35:15 remm Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/01/25 18:35:15 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ContextBindings.java,v
 1.4 2001/05/22 20:10:36 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/05/22 20:10:36 $
*
* 
*
  @@ -76,7 +76,7 @@
* 
*
* @author Remy Maucherat
  - * @version $Revision: 1.3 $ $Date: 2001/01/25 18:35:15 $
  + * @version $Revision: 1.4 $ $Date: 2001/05/22 20:10:36 $
*/
   
   public class ContextBindings {
  @@ -218,7 +218,7 @@
* @param name Name of the context
*/
   public static void unbindThread(Object name) {
  -unbindThread(null);
  +unbindThread(name, null);
   }
   
   
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader StandardLoader.java

2001-05-30 Thread remm

remm01/05/30 20:27:58

  Modified:catalina/src/share/org/apache/catalina/loader
StandardLoader.java
  Log:
  - Remove useless thread binding / unbinding during the creation of the loader.
  
  Revision  ChangesPath
  1.25  +6 -12 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java
  
  Index: StandardLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- StandardLoader.java   2001/05/04 00:57:06 1.24
  +++ StandardLoader.java   2001/05/31 03:27:57 1.25
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
 1.24 2001/05/04 00:57:06 remm Exp $
  - * $Revision: 1.24 $
  - * $Date: 2001/05/04 00:57:06 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
 1.25 2001/05/31 03:27:57 remm Exp $
  + * $Revision: 1.25 $
  + * $Date: 2001/05/31 03:27:57 $
*
* 
*
  @@ -116,7 +116,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.24 $ $Date: 2001/05/04 00:57:06 $
  + * @version $Revision: 1.25 $ $Date: 2001/05/31 03:27:57 $
*/
   
   public final class StandardLoader
  @@ -600,10 +600,6 @@
   // Ignore the error here.
   }
   
  -// Temporarily bind the current Catalina classloader to the directory
  -// context
  -DirContextURLStreamHandler.bind(this.container.getResources());
  -
   // Configure our context repositories if appropriate
   setRepositories();
   
  @@ -625,7 +621,8 @@
if( contextURL != null ) {
((StandardClassLoader)classLoader).setPermissions
   (contextURL);
  -String jarUrl = "jar:" + contextURL.toString() + 
"WEB-INF/lib/";
  +String jarUrl = "jar:" + contextURL.toString() 
  ++ "WEB-INF/lib/";
   ((StandardClassLoader)classLoader).setPermissions
   (jarUrl);  
   }
  @@ -648,9 +645,6 @@
} catch (Throwable t) {
throw new LifecycleException("start: ", t);
}
  -
  -// Unbind Catalina classloader
  -DirContextURLStreamHandler.unbind();
   
   // Validate that all required packages are actually available
   validatePackages();
  
  
  



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

2001-05-30 Thread remm

remm01/05/30 20:53:58

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - The manager should be able to load classes from /WEB-INF/lib during start(),
stop() and reload().
  - Filters will also be able to load classes from /WEB-INF/lib during stop().
  
  Revision  ChangesPath
  1.60  +55 -56
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.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- StandardContext.java  2001/05/16 17:56:04 1.59
  +++ StandardContext.java  2001/05/31 03:53:49 1.60
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.59 2001/05/16 17:56:04 remm Exp $
  - * $Revision: 1.59 $
  - * $Date: 2001/05/16 17:56:04 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.60 2001/05/31 03:53:49 remm Exp $
  + * $Revision: 1.60 $
  + * $Date: 2001/05/31 03:53:49 $
*
* 
*
  @@ -141,7 +141,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.59 $ $Date: 2001/05/16 17:56:04 $
  + * @version $Revision: 1.60 $ $Date: 2001/05/31 03:53:49 $
*/
   
   public class StandardContext
  @@ -2280,12 +2280,8 @@
// Stop accepting requests temporarily
setPaused(true);
   
  -if (isUseNaming()) {
  -try {
  -ContextBindings.bindThread(this, this);
  -} catch (NamingException e) {
  -}
  -}
  +// Binding thread
  +bindThread();
   
// Shut down the current version of all active servlets
Container children[] = findChildren();
  @@ -2350,8 +2346,6 @@
   }
   }
   
  -DirContextURLStreamHandler.bind(getResources());
  -
   // Restart our session manager (AFTER naming context recreated/bound)
   if ((manager != null) && (manager instanceof Lifecycle)) {
   try {
  @@ -2375,16 +2369,6 @@
   }
   }
   
  -if (isUseNaming()) {
  -try {
  -ContextBindings.bindThread(this, this);
  -} catch (NamingException e) {
  -log(sm.getString("standardContext.namingInitFailed",
  - getName()));
  -ok = false;
  -}
  -}
  -
   // Restart our currently defined servlets
for (int i = 0; i < children.length; i++) {
   if (!ok)
  @@ -2402,12 +2386,9 @@
}
}
   
  -if (isUseNaming()) {
  -ContextBindings.unbindThread(this, this);
  -}
  +// Unbinding thread
  +unbindThread();
   
  -DirContextURLStreamHandler.unbind();
  -
// Start accepting requests again
   if (ok) {
   setPaused(false);
  @@ -3177,6 +3158,8 @@
   setManager(new StandardManager());
   }
   
  +DirContextURLStreamHandler.bind(getResources());
  +
   // Initialize character set mapper
   getCharsetMapper();
   
  @@ -3211,7 +3194,8 @@
   getServletContext().setAttribute
   (Globals.RESOURCES_ATTR, getResources());
   
  -DirContextURLStreamHandler.bind(getResources());
  +// Binding thread
  +bindThread();
   
   // Configure and call application event listeners and filters
   if (ok) {
  @@ -3251,16 +3235,6 @@
   list.add(wrapper);
   }
   
  -if (isUseNaming()) {
  -try {
  -ContextBindings.bindThread(this, this);
  -} catch (NamingException e) {
  -log(sm.getString("standardContext.namingInitFailed",
  - getName()));
  -ok = false;
  -}
  -}
  -
   // Load the collected "load on startup" servlets
   if (debug >= 1)
   log("Loading " + map.size() + " load-on-startup servlets");
  @@ -3284,12 +3258,9 @@
   }
   }
   }
  -
  -if (isUseNaming()) {
  -ContextBindings.unbindThread(this, this);
  -}
   
  -DirContextURLStreamHandler.unbind();
  +// Unbinding thread
  +unbindThread();
   
   if (ok) {
   if (debug >= 1)
  @@ -3316,19 +3287,13 @@
   // Mark this application as unavailable while we shut do

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

2001-05-30 Thread remm

remm01/05/30 20:56:16

  Modified:catalina/src/share/org/apache/catalina/startup
ContextConfig.java
  Log:
  - Remove useless thread bind / unbind (which are now all done in StandardContext).
  
  Revision  ChangesPath
  1.46  +4 -10 
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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- ContextConfig.java2001/05/08 21:22:36 1.45
  +++ ContextConfig.java2001/05/31 03:56:11 1.46
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.45 2001/05/08 21:22:36 craigmcc Exp $
  - * $Revision: 1.45 $
  - * $Date: 2001/05/08 21:22:36 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.46 2001/05/31 03:56:11 remm Exp $
  + * $Revision: 1.46 $
  + * $Date: 2001/05/31 03:56:11 $
*
* 
*
  @@ -87,7 +87,6 @@
   import javax.naming.NameClassPair;
   import javax.naming.NamingEnumeration;
   import javax.naming.directory.DirContext;
  -import org.apache.naming.resources.DirContextURLStreamHandler;
   import org.apache.catalina.Authenticator;
   import org.apache.catalina.Container;
   import org.apache.catalina.Context;
  @@ -121,7 +120,7 @@
* of that Context, and the associated defined servlets.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.45 $ $Date: 2001/05/08 21:22:36 $
  + * @version $Revision: 1.46 $ $Date: 2001/05/31 03:56:11 $
*/
   
   public final class ContextConfig
  @@ -818,7 +817,6 @@
XmlMapper mapper = createWebMapper();
defaultConfig(mapper);
applicationConfig(mapper);
  -//DirContextURLStreamHandlerFactory.bind(context.getResources());
   
   // Scan tag library descriptor files for additional listener classes
   if (ok)
  @@ -855,8 +853,6 @@
   context.setAvailable(false);
   }
   
  -//DirContextURLStreamHandlerFactory.unbind();
  -
   }
   
   
  @@ -950,12 +946,10 @@
   URL url = context.getServletContext().getResource(resourcePath);
   if (url == null)
   return (false);
  -DirContextURLStreamHandler.bind(context.getResources());
   url = new URL("jar:" + url.toString() + "!/");
   JarURLConnection conn =
   (JarURLConnection) url.openConnection();
   jarFile = conn.getJarFile();
  -DirContextURLStreamHandler.unbind();
   boolean found = false;
   Enumeration entries = jarFile.entries();
   while (entries.hasMoreElements()) {
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader StandardLoader.java

2001-06-02 Thread remm

remm01/06/02 00:34:28

  Modified:catalina/src/share/org/apache/catalina/loader
StandardLoader.java
  Log:
  - Should create the /WEB-INF/lib in the work dir IF not filesystem based
(and not the opposite).
  
  Revision  ChangesPath
  1.27  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java
  
  Index: StandardLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- StandardLoader.java   2001/05/31 22:10:45 1.26
  +++ StandardLoader.java   2001/06/02 07:34:27 1.27
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
 1.26 2001/05/31 22:10:45 craigmcc Exp $
  - * $Revision: 1.26 $
  - * $Date: 2001/05/31 22:10:45 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
 1.27 2001/06/02 07:34:27 remm Exp $
  + * $Revision: 1.27 $
  + * $Date: 2001/06/02 07:34:27 $
*
* 
*
  @@ -116,7 +116,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.26 $ $Date: 2001/05/31 22:10:45 $
  + * @version $Revision: 1.27 $ $Date: 2001/06/02 07:34:27 $
*/
   
   public final class StandardLoader
  @@ -992,7 +992,7 @@
   String libName = "/WEB-INF/lib";
   
   File destDir = new File(workDir, libName);
  -if (servletContext.getRealPath(libName) != null)
  +if (servletContext.getRealPath(libName) == null)
   destDir.mkdirs();
   
   DirContext libDir = null;
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/jndi - New directory

2001-06-02 Thread remm

remm01/06/02 11:19:09

  jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/jndi - New 
directory



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspReader.java Parser.java ParserController.java

2001-06-02 Thread remm

remm01/06/02 11:44:45

  Modified:jasper/src/share/org/apache/jasper/compiler JspReader.java
Parser.java ParserController.java
  Log:
  - When testing with unpackWARs=false, I found areas in Jasper code
which still used File object, and were broken when Jasper is ran under
Windows. This patch simplifies the code a bit, and replaces the File objects
with String objects (the File object was only used to hold the filename).
  - Tested with tester and various JSP examples.
  
  Revision  ChangesPath
  1.6   +3 -7  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspReader.java
  
  Index: JspReader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspReader.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JspReader.java2001/03/21 00:08:51 1.5
  +++ JspReader.java2001/06/02 18:44:45 1.6
  @@ -240,16 +240,12 @@
   }
   */
   
  -private void pushFile2(File file, String encoding, 
  +private void pushFile2(String file, String encoding, 
   InputStreamReader reader) 
throws ParseException, FileNotFoundException 
   {
// Register the file
  - String longName = (context == null)
  - ? file.getAbsolutePath()
  - : context.getRealPath(file.toString());
  -if (longName == null)
  -longName = file.toString();
  + String longName = file;
   
int fileid = registerSourceFile(longName);
   
  @@ -312,7 +308,7 @@
   }

   protected JspReader(JspCompilationContext ctx,
  - File file,
  + String file,
String encoding, InputStreamReader reader) 
throws ParseException, FileNotFoundException
   {
  
  
  
  1.11  +1 -1  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Parser.java   2001/04/27 01:32:47 1.10
  +++ Parser.java   2001/06/02 18:44:45 1.11
  @@ -129,7 +129,7 @@
   }
   
   // new constructor for JSP1.2
  -public Parser(JspCompilationContext ctxt, File file, 
  +public Parser(JspCompilationContext ctxt, String file, 
  String encoding, InputStreamReader inReader, 
  final ParseEventListener lnr) 
throws ParseException, java.io.FileNotFoundException
  
  
  
  1.15  +16 -31
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ParserController.java 2001/04/09 23:38:12 1.14
  +++ ParserController.java 2001/06/02 18:44:45 1.15
  @@ -183,22 +183,16 @@
throws FileNotFoundException, JasperException
   {
   //p("parse(" + inFileName + ")");
  +
   String absFileName = resolveFileName(inFileName);
  -File file = new File(absFileName);
  - String filePath = (ctxt == null) 
  - ? file.getAbsolutePath()
  - : ctxt.getRealPath(file.toString());
  -if (filePath == null) {
  -filePath = file.toString();
  -}
//p("filePath: " + filePath);
   
String encoding = topFileEncoding;
   InputStreamReader reader = null;
   try {
   // Figure out what type of JSP document we are dealing with
  -reader = getReader(file, encoding, absFileName);
  -figureOutJspDocument(file, encoding, reader);
  +reader = getReader(absFileName, encoding);
  +figureOutJspDocument(absFileName, encoding, reader);
   //p("isXml = " + isXml + "   hasTaglib = " + hasTaglib);
encoding = (newEncoding!=null) ? newEncoding : encoding;
if (isTopFile) {
  @@ -213,11 +207,11 @@
   
   // dispatch to the proper parser

  -reader = getReader(file, encoding, absFileName);
  +reader = getReader(absFileName, encoding);
   if (isXml) {
  -(new ParserXJspSax(filePath, reader, jspHandler)).parse();
  +(new ParserXJspSax(absFileName, reader, jspHandler)).parse();
   } else {
  -(new Parser(ctxt, file, encoding, reader, jspHandler)).parse();
  + 

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

2001-06-02 Thread remm

remm01/06/02 13:18:23

  Modified:jasper/src/share/org/apache/jasper/compiler
TldLocationsCache.java
  Log:
  - Update the TLD parsing code so that it doesn't try to directly access the
filesystem. Instead, it uses the new getResourcePaths call of the
Servlet API 2.3.
  - Based on a patch submitted by Robert Petersen 
  
  Revision  ChangesPath
  1.9   +13 -31
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TldLocationsCache.java
  
  Index: TldLocationsCache.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TldLocationsCache.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TldLocationsCache.java2001/03/22 17:20:08 1.8
  +++ TldLocationsCache.java2001/06/02 20:18:23 1.9
  @@ -61,6 +61,7 @@
   import java.util.Hashtable;
   import java.util.Enumeration;
   import java.util.Iterator;
  +import java.util.Set;
   import java.util.jar.*;
   import java.net.JarURLConnection;
   import java.net.*;
  @@ -197,22 +198,15 @@
   private void processJars(ServletContext ctxt)
   throws JasperException
   {
  -URL libURL = null;
  -try {
  -libURL = ctxt.getResource("/WEB-INF/lib");
  -} catch (MalformedURLException e) {}
   
  -if ((libURL != null) && "file".equals(libURL.getProtocol())) {
  -File libFile = new File(libURL.getFile());
  -if (libFile.exists() && libFile.canRead() &&
  -libFile.isDirectory()) {
  -String filenames[] = libFile.list();
  -for (int i=0; i 1) {
  -Constants.message("jsp.error.more.than.one.taglib",
  -  new Object[] {resourcePath},
  -  Logger.ERROR);
  -return null;
  -}
  -TreeNode taglib = (TreeNode) taglibs.next();
  -TreeNode uri = taglib.findChild("uri");
  -if (uri != null) {
  -String body = uri.getBody();
  -if (body != null)
  -return body;
  -}
  +TreeNode uri = tld.findChild("uri");
  +if (uri != null) {
  +String body = uri.getBody();
  +if (body != null)
  +return body;
   }
   return null; // No  element is present
   
  
  
  



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

2001-06-02 Thread remm

remm01/06/02 13:22:19

  Modified:jasper/src/share/org/apache/jasper/servlet JasperLoader.java
  Log:
  - Experimental patch : Jasper will use the context classloader as the parent
classloader. I didn't notice any problems, so I'm committing the patch (which
will be very easy to revert if there are problems).
  - This makes the Jasper specific classpath request attribute obsolete. The code
can probably be removed once testing shows that this patch doesn't break
anything.
  
  Revision  ChangesPath
  1.4   +3 -2  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JasperLoader.java
  
  Index: JasperLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JasperLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JasperLoader.java 2001/02/08 13:38:24 1.3
  +++ JasperLoader.java 2001/06/02 20:22:19 1.4
  @@ -171,9 +171,10 @@
   }  
   }
   
  - // Class is in a package, delegate to parent
  + // Class is in a package, delegate to thread context class loader
if( !name.startsWith(Constants.JSP_PACKAGE_NAME) ) {
  - clazz = parent.loadClass(name);
  + clazz = Thread.currentThread().getContextClassLoader()
  +.loadClass(name);
if( resolve )
resolveClass(clazz);
return clazz;
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/jndi Handler.java

2001-06-02 Thread remm

remm01/06/02 13:23:07

  Added:   catalina/src/share/org/apache/naming/resources/jndi
Handler.java
  Log:
  - Add a stream handler which would respect the package naming conventions
used by the JDK.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/jndi/Handler.java
  
  Index: Handler.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/jndi/Handler.java,v
 1.1 2001/06/02 20:23:07 remm Exp $
   * $Revision: 1.1 $
   * $Date: 2001/06/02 20:23:07 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:  
   *   "This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  
  package org.apache.naming.resources.jndi;
  
  import java.net.URL;
  import java.net.URLConnection;
  import java.net.URLStreamHandler;
  import java.io.IOException;
  import java.util.Hashtable;
  import javax.naming.NamingException;
  import javax.naming.directory.DirContext;
  
  import org.apache.naming.resources.DirContextURLStreamHandler;
  
  /**
   * Stream handler to a JNDI directory context.
   * 
   * @author mailto:[EMAIL PROTECTED]";>Remy Maucherat
   * @version $Revision: 1.1 $
   */
  public class Handler 
  extends DirContextURLStreamHandler {
  
  
  // --- Constructors
  
  
  public Handler() {
  }
  
  
  }
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources Constants.java DirContextURLStreamHandler.java

2001-06-02 Thread remm

remm01/06/02 13:24:27

  Modified:catalina/src/share/org/apache/naming/resources
Constants.java DirContextURLStreamHandler.java
  Log:
  - Two utility methods :
- The first one sets the package sys env valiable for stream handlers
- The second one is a check to see if the current thread is bound (either
  directly or through its context CL)
  
  Revision  ChangesPath
  1.2   +5 -2  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/Constants.java
  
  Index: Constants.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/Constants.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Constants.java2001/01/23 03:41:28 1.1
  +++ Constants.java2001/06/02 20:24:27 1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/Constants.java,v
 1.1 2001/01/23 03:41:28 remm Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/01/23 03:41:28 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/Constants.java,v
 1.2 2001/06/02 20:24:27 remm Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/06/02 20:24:27 $
*
* 
*
  @@ -70,6 +70,9 @@
*/
   
   public final class Constants {
  +
  +public static final String PROTOCOL_HANDLER_VARIABLE = 
  +"java.protocol.handler.pkgs";
   
   public static final String Package = "org.apache.naming.resources";
   
  
  
  
  1.5   +30 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLStreamHandler.java
  
  Index: DirContextURLStreamHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLStreamHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DirContextURLStreamHandler.java   2001/05/04 00:30:01 1.4
  +++ DirContextURLStreamHandler.java   2001/06/02 20:24:27 1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLStreamHandler.java,v
 1.4 2001/05/04 00:30:01 remm Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/05/04 00:30:01 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLStreamHandler.java,v
 1.5 2001/06/02 20:24:27 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/06/02 20:24:27 $
*
* 
*
  @@ -75,7 +75,7 @@
* Stream handler to a JNDI directory context.
* 
* @author mailto:[EMAIL PROTECTED]";>Remy Maucherat
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
*/
   public class DirContextURLStreamHandler 
   extends URLStreamHandler {
  @@ -137,6 +137,32 @@
   
   
   // - Public Methods
  +
  +
  +/**
  + * Set the java.protocol.handler.pkgs system property.
  + */
  +public static void setProtocolHandler() {
  +String value = System.getProperty(Constants.PROTOCOL_HANDLER_VARIABLE);
  +if (value == null) {
  +value = Constants.Package;
  +System.setProperty(Constants.PROTOCOL_HANDLER_VARIABLE, value);
  +} else if (value.indexOf(Constants.Package) == -1) {
  +value += "|" + Constants.Package;
  +System.setProperty(Constants.PROTOCOL_HANDLER_VARIABLE, value);
  +}
  +}
  +
  +
  +/**
  + * Returns true if the thread or the context class loader of the current 
  + * thread is bound.
  + */
  +public static boolean isBound() {
  +return (clBindings.containsKey
  +(Thread.currentThread().getContextClassLoader()))
  +|| (threadBindings.containsKey(Thread.currentThread()));
  +}
   
   
   /**
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources DirContextURLConnection.java

2001-06-03 Thread remm

remm01/06/03 12:52:00

  Modified:catalina/src/share/org/apache/naming/resources
DirContextURLConnection.java
  Log:
  - Possible workaround for the perf problem reported by Jon : don't create
a FilePermission is there is no security manager defined.
  
  Revision  ChangesPath
  1.11  +6 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java
  
  Index: DirContextURLConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DirContextURLConnection.java  2001/05/11 18:24:33 1.10
  +++ DirContextURLConnection.java  2001/06/03 19:52:00 1.11
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.10 2001/05/11 18:24:33 remm Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/05/11 18:24:33 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.11 2001/06/03 19:52:00 remm Exp $
  + * $Revision: 1.11 $
  + * $Date: 2001/06/03 19:52:00 $
*
* 
*
  @@ -91,7 +91,7 @@
* content is directly returned.
* 
* @author mailto:[EMAIL PROTECTED]";>Remy Maucherat
  - * @version $Revision: 1.10 $
  + * @version $Revision: 1.11 $
*/
   public class DirContextURLConnection 
   extends URLConnection {
  @@ -105,7 +105,8 @@
   if (context == null)
   throw new IllegalArgumentException
   ("Directory context can't be null");
  -this.permission = new FilePermission(url.toString(), "read");
  +if (System.getSecurityManager() != null)
  +this.permission = new FilePermission(url.toString(), "read");
   this.context = context;
   }
   
  
  
  



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

2001-06-05 Thread remm

remm01/06/05 00:55:29

  Modified:catalina/src/share/org/apache/catalina/core
StandardContextValve.java
  Log:
  - Will now bind/unbind the thread (in addition to the CL), which should make
the classloading more robust. This *may* fix the problems with jBoss and
optimized VM local RMI servers which may replace the context CL of the thread
(like jBoss does). The fix is totally untested, but after reading some code in 
jBoss,
I think it should fix the issue.
The ultimate fix for this would still be to write a specialized CL which would 
directly
access the directory context, instead of going through URLs (which of course is
quite convinient, since the URLClassLoader takes care of the management of the
JARs files containing the classes.
  
  Revision  ChangesPath
  1.10  +11 -21
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java
  
  Index: StandardContextValve.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StandardContextValve.java 2001/03/30 19:33:37 1.9
  +++ StandardContextValve.java 2001/06/05 07:55:27 1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java,v
 1.9 2001/03/30 19:33:37 craigmcc Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/03/30 19:33:37 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContextValve.java,v
 1.10 2001/06/05 07:55:27 remm Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/06/05 07:55:27 $
*
* 
*
  @@ -72,6 +72,7 @@
   import javax.servlet.http.HttpServletResponse;
   import javax.naming.NamingException;
   import org.apache.naming.ContextBindings;
  +import org.apache.naming.resources.DirContextURLStreamHandler;
   import org.apache.catalina.Container;
   import org.apache.catalina.Manager;
   import org.apache.catalina.Request;
  @@ -92,7 +93,7 @@
* when processing HTTP requests.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.9 $ $Date: 2001/03/30 19:33:37 $
  + * @version $Revision: 1.10 $ $Date: 2001/06/05 07:55:27 $
*/
   
   final class StandardContextValve
  @@ -211,25 +212,14 @@
// Ask this Wrapper to process this Request
response.setContext(context);
   
  -/*
  -if (context.isUseNaming()) {
  -try {
  -// Bind the thread to the context
  -ContextBindings.bindThread(context, context);
  -} catch (NamingException e) {
  -e.printStackTrace();
  -}
  -}
  -*/
  +// Bind current thread with the resources
  +DirContextURLStreamHandler.bindThread(context.getResources());
   
  - wrapper.invoke(request, response);
  -
  -/*
  -if (context.isUseNaming()) {
  -// Unbind the thread to the context
  -ContextBindings.unbindThread(context, context);
  +try {
  +wrapper.invoke(request, response);
  +} finally {
  +DirContextURLStreamHandler.unbindThread();
   }
  -*/
   
   }
   
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming ContextAccessController.java

2001-06-11 Thread remm

remm01/06/11 15:44:05

  Modified:catalina/src/share/org/apache/naming
ContextAccessController.java
  Log:
  - Untested fix for a bug when stopping and restarting a context later with
the access controller of the JNDI ENC. The read only flag must be unset
when stopping the context.
Bug reported by Ulf Jaehrig 
  
  Revision  ChangesPath
  1.3   +17 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ContextAccessController.java
  
  Index: ContextAccessController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ContextAccessController.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ContextAccessController.java  2001/01/25 18:35:10 1.2
  +++ ContextAccessController.java  2001/06/11 22:44:03 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ContextAccessController.java,v
 1.2 2001/01/25 18:35:10 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/01/25 18:35:10 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/ContextAccessController.java,v
 1.3 2001/06/11 22:44:03 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/06/11 22:44:03 $
*
* 
*
  @@ -71,7 +71,7 @@
* Handles the access control on the JNDI contexts.
*
* @author Remy Maucherat
  - * @version $Revision: 1.2 $ $Date: 2001/01/25 18:35:10 $
  + * @version $Revision: 1.3 $ $Date: 2001/06/11 22:44:03 $
*/
   
   public class ContextAccessController {
  @@ -104,6 +104,19 @@
   public static void setSecurityToken(Object name, Object token) {
   if ((!securityTokens.containsKey(name)) && (token != null)) {
   securityTokens.put(name, token);
  +}
  +}
  +
  +
  +/**
  + * Remove a security token for a context.
  + * 
  + * @param name Name of the context
  + * @param context Security token
  + */
  +public static void unsetSecurityToken(Object name, Object token) {
  +if (checkSecurityToken(name, token)) {
  +securityTokens.remove(name);
   }
   }
   
  
  
  



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

2001-06-11 Thread remm

remm01/06/11 15:44:18

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - Untested fix for a bug when stopping and restarting a context later with
the access controller of the JNDI ENC. The read only flag must be unset
when stopping the context.
Bug reported by Ulf Jaehrig 
  
  Revision  ChangesPath
  1.61  +11 -4 
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.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- StandardContext.java  2001/05/31 03:53:49 1.60
  +++ StandardContext.java  2001/06/11 22:44:15 1.61
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.60 2001/05/31 03:53:49 remm Exp $
  - * $Revision: 1.60 $
  - * $Date: 2001/05/31 03:53:49 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.61 2001/06/11 22:44:15 remm Exp $
  + * $Revision: 1.61 $
  + * $Date: 2001/06/11 22:44:15 $
*
* 
*
  @@ -141,7 +141,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.60 $ $Date: 2001/05/31 03:53:49 $
  + * @version $Revision: 1.61 $ $Date: 2001/06/11 22:44:15 $
*/
   
   public class StandardContext
  @@ -3296,6 +3296,13 @@
   
   // Finalize our character set mapper
   setCharsetMapper(null);
  +
  +// Create and register the associated naming context, if internal 
  +// naming is used
  +if (isUseNaming()) {
  +ContextAccessController.unsetSecurityToken
  +(getNamingContextName(), this);
  +}
   
   // Normal container shutdown processing
   if (debug >= 1)
  
  
  



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

2001-06-11 Thread remm

remm01/06/11 18:20:41

  Modified:catalina/src/share/org/apache/catalina/core
StandardHost.java
  Log:
  - The new aliases list for a host wasn't correctly set after calling addAlias.
Patch submitted by Deacon Marcus 
  
  Revision  ChangesPath
  1.15  +6 -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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- StandardHost.java 2001/05/16 17:56:09 1.14
  +++ StandardHost.java 2001/06/12 01:20:39 1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
 1.14 2001/05/16 17:56:09 remm Exp $
  - * $Revision: 1.14 $
  - * $Date: 2001/05/16 17:56:09 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
 1.15 2001/06/12 01:20:39 remm Exp $
  + * $Revision: 1.15 $
  + * $Date: 2001/06/12 01:20:39 $
*
* 
*
  @@ -100,7 +100,7 @@
* requests directed to a particular web application.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.14 $ $Date: 2001/05/16 17:56:09 $
  + * @version $Revision: 1.15 $ $Date: 2001/06/12 01:20:39 $
*/
   
   public class StandardHost
  @@ -392,6 +392,8 @@
for (int i = 0; i < aliases.length; i++)
newAliases[i] = aliases[i];
newAliases[aliases.length] = alias;
  +
  +aliases = newAliases;
   
// Inform interested listeners
fireContainerEvent(ADD_ALIAS_EVENT, alias);
  
  
  



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

2001-06-12 Thread remm

remm01/06/12 02:08:27

  Modified:jasper/src/share/org/apache/jasper/servlet JspServlet.java
  Log:
  - Don't use the class loader attribute to retrieve the webapp CL. Instead, use
the thread context class loader.
  
  Revision  ChangesPath
  1.18  +1 -1  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java
  
  Index: JspServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- JspServlet.java   2001/04/25 04:16:06 1.17
  +++ JspServlet.java   2001/06/12 09:08:25 1.18
  @@ -264,7 +264,7 @@
   
// Get the parent class loader
parentClassLoader =
  - (URLClassLoader)context.getAttribute(Constants.SERVLET_CLASS_LOADER);
  + (URLClassLoader) Thread.currentThread().getContextClassLoader();
   if (parentClassLoader == null)
   parentClassLoader = (URLClassLoader)this.getClass().getClassLoader();
   if (parentClassLoader != null) {
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources ResourceAttributes.java

2001-06-12 Thread remm

remm01/06/12 17:59:11

  Modified:catalina/src/share/org/apache/naming/resources
ResourceAttributes.java
  Log:
  - Made the setters public, which makes it possible to actually plug a directory
context external to Catalina without having to reimplement something like
ResourceAttributes, or having to use BaseAttributes, which would be slower.
  
  Revision  ChangesPath
  1.2   +9 -9  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ResourceAttributes.java
  
  Index: ResourceAttributes.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ResourceAttributes.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResourceAttributes.java   2001/01/23 03:41:29 1.1
  +++ ResourceAttributes.java   2001/06/13 00:59:10 1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ResourceAttributes.java,v
 1.1 2001/01/23 03:41:29 remm Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/01/23 03:41:29 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ResourceAttributes.java,v
 1.2 2001/06/13 00:59:10 remm Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/06/13 00:59:10 $
*
* 
*
  @@ -83,7 +83,7 @@
* Attributes implementation.
* 
* @author mailto:[EMAIL PROTECTED]";>Remy Maucherat
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
*/
   public final class ResourceAttributes extends BasicAttributes {
   
  @@ -472,7 +472,7 @@
* 
* @param creationDate New creation date
*/
  -void setCreationDate(Date creationDate) {
  +public void setCreationDate(Date creationDate) {
   setProtectedAttribute(CREATION_DATE, creationDate);
   }
   
  @@ -482,7 +482,7 @@
* 
* @param lastModified New last modified date
*/
  -void setLastModified(Date lastModified) {
  +public void setLastModified(Date lastModified) {
   setProtectedAttribute(LAST_MODIFIED, lastModified);
   }
   
  @@ -492,7 +492,7 @@
* 
* @param contentLength New content length
*/
  -void setContentLength(long contentLength) {
  +public void setContentLength(long contentLength) {
   setProtectedAttribute(CONTENT_LENGTH, new Long(contentLength));
   }
   
  @@ -502,7 +502,7 @@
* 
* @param name New name
*/
  -void setName(String name) {
  +public void setName(String name) {
   setProtectedAttribute(NAME, name);
   }
   
  @@ -512,7 +512,7 @@
* 
* @param resourceType New resource type
*/
  -void setResourceType(String resourceType) {
  +public void setResourceType(String resourceType) {
   setProtectedAttribute(TYPE, resourceType);
   }
   
  
  
  



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

2001-06-12 Thread remm

remm01/06/12 19:32:02

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - Make the naming context name really unique.
Before, there were conflicts when using multiple engines with the same
host and context names.
Note : The URL generation in the resources should be modified too, otherwise
there could be clashes between JARs residing in different engines.
  
  Revision  ChangesPath
  1.62  +13 -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.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- StandardContext.java  2001/06/11 22:44:15 1.61
  +++ StandardContext.java  2001/06/13 02:32:01 1.62
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.61 2001/06/11 22:44:15 remm Exp $
  - * $Revision: 1.61 $
  - * $Date: 2001/06/11 22:44:15 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.62 2001/06/13 02:32:01 remm Exp $
  + * $Revision: 1.62 $
  + * $Date: 2001/06/13 02:32:01 $
*
* 
*
  @@ -141,7 +141,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.61 $ $Date: 2001/06/11 22:44:15 $
  + * @version $Revision: 1.62 $ $Date: 2001/06/13 02:32:01 $
*/
   
   public class StandardContext
  @@ -1191,6 +1191,7 @@
   (sm.getString("standardContext.wrapper.error", jspFile));
   }
   }
  +
super.addChild(child);
   
   }
  @@ -3632,7 +3633,14 @@
   private String getNamingContextName() {
   Container parent = getParent();
   if (parent != null) {
  -return  "/" + parent.getName() + getName();
  +StringBuffer buf = new StringBuffer();
  +buf.append("/").append(parent.getName()).append(getName());
  +parent = parent.getParent();
  +while (parent != null) {
  +buf.append("/").append(parent.getName());
  +parent = parent.getParent();
  +}
  +return buf.toString();
   } else {
   return getName();
   }
  
  
  



cvs commit: jakarta-tomcat-connectors/coyote - Imported sources

2001-06-13 Thread remm

remm01/06/13 18:08:04

  Log:
  Coyote is a proposal for a "new" connector API for Tomcat. It actually isn't
  that new, because it is derived from some of the components which are at the
  core of Tomcat 3.3.Those components were significantly simplified.
  
  This API can't be considered a final proposal yet, mainly because it didn't
  get any real world testing nor feedback.
  
  As a test case, I plan to port the current HTTP/1.1 connector which is part of
  Catalina to this API, and then write a Catalina adapter for Coyote.
  
  Dependencies :
  - j-t-c/util
  
  Status:
  
  Vendor Tag:   asf
  Release Tags: first
  
  N jakarta-tomcat-connectors/coyote/.cvsignore
  N jakarta-tomcat-connectors/coyote/build.properties.sample
  N jakarta-tomcat-connectors/coyote/build.xml
  N jakarta-tomcat-connectors/coyote/src/conf/MANIFEST.MF
  N jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Adapter.java
  N jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/AdapterEventCode.java
  N jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/AdapterListener.java
  N jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Connector.java
  N jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Constants.java
  N jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/InputBuffer.java
  N jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Note.java
  N jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/OutputBuffer.java
  N jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java
  N jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java
  N jakarta-tomcat-connectors/coyote/src/test/org/apache/coyote/SimpleAdapter.java
  
  No conflicts created by this import



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

2001-06-14 Thread remm

remm01/06/14 07:45:56

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpConnector.java
  Log:
  - Set TCP no delay to true on the accepted connection. In HTTP/1.1, not
setting it caused unnecessary delays in the TCP stack, since the connection
was usually not closed after processing the request.
Change suggested by Dylan Schell 
  
  Revision  ChangesPath
  1.16  +34 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java
  
  Index: HttpConnector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- HttpConnector.java2001/05/09 23:42:12 1.15
  +++ HttpConnector.java2001/06/14 14:45:55 1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
 1.15 2001/05/09 23:42:12 craigmcc Exp $
  - * $Revision: 1.15 $
  - * $Date: 2001/05/09 23:42:12 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
 1.16 2001/06/14 14:45:55 remm Exp $
  + * $Revision: 1.16 $
  + * $Date: 2001/06/14 14:45:55 $
*
* 
*
  @@ -95,7 +95,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.15 $ $Date: 2001/05/09 23:42:12 $
  + * @version $Revision: 1.16 $ $Date: 2001/06/14 14:45:55 $
*/
   
   
  @@ -293,6 +293,12 @@
   private boolean allowChunking = true;
   
   
  +/**
  + * Use TCP no delay ?
  + */
  +private boolean tcpNoDelay = true;
  +
  +
   // - Properties
   
   
  @@ -713,6 +719,29 @@
   }
   
   
  +/**
  + * Return the TCP no delay flag value.
  + */
  +public boolean getTcpNoDelay() {
  +
  +return (this.tcpNoDelay);
  +
  +}
  +
  +
  +/**
  + * Set the TCP no delay flag which will be set on the socket after 
  + * accepting a connection.
  + * 
  + * @param tcpNoDelay The new TCP no delay flag
  + */
  +public void setTcpNoDelay(boolean tcpNoDelay) {
  +
  +this.tcpNoDelay = tcpNoDelay;
  +
  +}
  +
  +
   // - Public Methods
   
   
  @@ -905,6 +934,7 @@
   //log("run: Returned from 
serverSocket.accept()");
   if (connectionTimeout > 0)
   socket.setSoTimeout(connectionTimeout);
  +setTcpNoDelay(tcpNoDelay);
   } catch (AccessControlException ace) {
   log("socket accept security exception", ace);
   continue;
  
  
  



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

2001-06-16 Thread remm

remm01/06/16 13:23:19

  Modified:catalina/src/share/org/apache/catalina/startup Catalina.java
  Log:
  - Add a rule for adding aliases (apparently, it had been forgotten).
The sytax is :

   foobar

Bug reported by Deacon Marcus 
  
  Revision  ChangesPath
  1.23  +7 -4  
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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Catalina.java 2001/05/23 22:06:31 1.22
  +++ Catalina.java 2001/06/16 20:23:19 1.23
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.22 2001/05/23 22:06:31 craigmcc Exp $
  - * $Revision: 1.22 $
  - * $Date: 2001/05/23 22:06:31 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.23 2001/06/16 20:23:19 remm Exp $
  + * $Revision: 1.23 $
  + * $Date: 2001/06/16 20:23:19 $
*
* 
*
  @@ -97,7 +97,7 @@
* 
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.22 $ $Date: 2001/05/23 22:06:31 $
  + * @version $Revision: 1.23 $ $Date: 2001/06/16 20:23:19 $
*/
   
   public class Catalina {
  @@ -349,6 +349,9 @@
   "configClass"));
   mapper.addRule("Server/Service/Engine/Host", mapper.addChild
  ("addChild", "org.apache.catalina.Container"));
  +
  +mapper.addRule("Server/Service/Engine/Host/Alias",
  +   mapper.methodSetter("addAlias", 0));
   
   mapper.addRule("Server/Service/Engine/Host/Cluster",
  mapper.objectCreate(null, "className"));
  
  
  



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

2001-06-17 Thread remm

remm01/06/17 17:14:44

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpProcessor.java
  Log:
  - Handle requests on absolute URIs.
  
  Revision  ChangesPath
  1.26  +15 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- HttpProcessor.java2001/05/16 17:55:42 1.25
  +++ HttpProcessor.java2001/06/18 00:14:44 1.26
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.25 2001/05/16 17:55:42 remm Exp $
  - * $Revision: 1.25 $
  - * $Date: 2001/05/16 17:55:42 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.26 2001/06/18 00:14:44 remm Exp $
  + * $Revision: 1.26 $
  + * $Date: 2001/06/18 00:14:44 $
*
* 
*
  @@ -107,7 +107,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.25 $ $Date: 2001/05/16 17:55:42 $
  + * @version $Revision: 1.26 $ $Date: 2001/06/18 00:14:44 $
*/
   
   final class HttpProcessor
  @@ -735,6 +735,17 @@
} else {
request.setQueryString(null);
uri = new String(requestLine.uri, 0, requestLine.uriEnd);
  +}
  +
  +// Checking for an absolute URI (with the HTTP protocol)
  +if (uri.startsWith("http://";)) {
  +// Parsing out protocol and host name
  +int pos = uri.indexOf('/', "http://".length());
  +if (pos == -1) {
  +uri = "";
  +} else {
  +uri = uri.substring(pos);
  +}
   }
   
// Parse any requested session ID out of the request URI
  
  
  



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

2001-06-17 Thread remm

remm01/06/17 17:21:58

  Modified:catalina/src/share/org/apache/catalina/connector/http
SocketInputStream.java
  Log:
  - Handle HTTP/0.9 requests.
  
  Revision  ChangesPath
  1.7   +8 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/SocketInputStream.java
  
  Index: SocketInputStream.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/SocketInputStream.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SocketInputStream.java2001/01/23 03:53:00 1.6
  +++ SocketInputStream.java2001/06/18 00:21:58 1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/SocketInputStream.java,v
 1.6 2001/01/23 03:53:00 remm Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/01/23 03:53:00 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/SocketInputStream.java,v
 1.7 2001/06/18 00:21:58 remm Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/06/18 00:21:58 $
*
* 
* 
  @@ -250,6 +250,8 @@
   
   space = false;
   
  +boolean eol = false;
  +
   while (!space) {
   // if the buffer is full, extend it
   if (readCount >= maxRead) {
  @@ -275,6 +277,10 @@
   }
   if (buf[pos] == SP) {
   space = true;
  +} else if ((buf[pos] == CR) || (buf[pos] == LF)) {
  +// HTTP/0.9 style request
  +eol = true;
  +space = true;
   }
   requestLine.uri[readCount] = (char) buf[pos];
   readCount++;
  @@ -288,8 +294,6 @@
   maxRead = requestLine.protocol.length;
   readStart = pos;
   readCount = 0;
  -
  -boolean eol = false;
   
   while (!eol) {
   // if the buffer is full, extend it
  
  
  



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

2001-06-17 Thread remm

remm01/06/17 23:03:39

  Modified:catalina/src/share/org/apache/catalina/connector
HttpResponseBase.java
  Log:
  - Don't send response header if HTTP/0.9.
  
  Revision  ChangesPath
  1.34  +9 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java
  
  Index: HttpResponseBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- HttpResponseBase.java 2001/05/16 17:55:25 1.33
  +++ HttpResponseBase.java 2001/06/18 06:03:36 1.34
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
 1.33 2001/05/16 17:55:25 remm Exp $
  - * $Revision: 1.33 $
  - * $Date: 2001/05/16 17:55:25 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
 1.34 2001/06/18 06:03:36 remm Exp $
  + * $Revision: 1.34 $
  + * $Date: 2001/06/18 06:03:36 $
*
* 
*
  @@ -100,7 +100,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.33 $ $Date: 2001/05/16 17:55:25 $
  + * @version $Revision: 1.34 $ $Date: 2001/06/18 06:03:36 $
*/
   
   public class HttpResponseBase
  @@ -547,6 +547,11 @@
   
if (isCommitted())
return;
  +
  +if ("HTTP/0.9".equals(request.getRequest().getProtocol())) {
  +committed = true;
  +return;
  +}
   
// Prepare a suitable output writer
OutputStreamWriter osr =
  
  
  



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

2001-06-17 Thread remm

remm01/06/17 23:22:32

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpProcessor.java
  Log:
  - Don't hardcode the protocol name when stripping out the protocol and
host name when the client submits a full URL.
  
  Revision  ChangesPath
  1.27  +13 -11
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- HttpProcessor.java2001/06/18 00:14:44 1.26
  +++ HttpProcessor.java2001/06/18 06:22:27 1.27
  @@ -1,7 +1,6 @@
  -/*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.26 2001/06/18 00:14:44 remm Exp $
  - * $Revision: 1.26 $
  - * $Date: 2001/06/18 00:14:44 $
  +/* * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.27 2001/06/18 06:22:27 remm Exp $
  + * $Revision: 1.27 $
  + * $Date: 2001/06/18 06:22:27 $
*
* 
*
  @@ -107,7 +106,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.26 $ $Date: 2001/06/18 00:14:44 $
  + * @version $Revision: 1.27 $ $Date: 2001/06/18 06:22:27 $
*/
   
   final class HttpProcessor
  @@ -738,13 +737,16 @@
   }
   
   // Checking for an absolute URI (with the HTTP protocol)
  -if (uri.startsWith("http://";)) {
  +if (!uri.startsWith("/")) {
  +int pos = uri.indexOf("://");
   // Parsing out protocol and host name
  -int pos = uri.indexOf('/', "http://".length());
  -if (pos == -1) {
  -uri = "";
  -} else {
  -uri = uri.substring(pos);
  +if (pos != -1) {
  +pos = uri.indexOf('/', pos + 3);
  +if (pos == -1) {
  +uri = "";
  +} else {
  +uri = uri.substring(pos);
  +}
   }
   }
   
  
  
  



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

2001-06-18 Thread remm

remm01/06/18 14:35:56

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpConnector.java
  Log:
  - Actually call setTcpNoDelay on the newly accepted socket.
  
  Revision  ChangesPath
  1.17  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java
  
  Index: HttpConnector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- HttpConnector.java2001/06/14 14:45:55 1.16
  +++ HttpConnector.java2001/06/18 21:35:54 1.17
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
 1.16 2001/06/14 14:45:55 remm Exp $
  - * $Revision: 1.16 $
  - * $Date: 2001/06/14 14:45:55 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
 1.17 2001/06/18 21:35:54 remm Exp $
  + * $Revision: 1.17 $
  + * $Date: 2001/06/18 21:35:54 $
*
* 
*
  @@ -95,7 +95,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.16 $ $Date: 2001/06/14 14:45:55 $
  + * @version $Revision: 1.17 $ $Date: 2001/06/18 21:35:54 $
*/
   
   
  @@ -934,7 +934,7 @@
   //log("run: Returned from 
serverSocket.accept()");
   if (connectionTimeout > 0)
   socket.setSoTimeout(connectionTimeout);
  -setTcpNoDelay(tcpNoDelay);
  +socket.setTcpNoDelay(tcpNoDelay);
   } catch (AccessControlException ace) {
   log("socket accept security exception", ace);
   continue;
  
  
  



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

2001-06-18 Thread remm

remm01/06/18 16:28:40

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpProcessor.java
  Log:
  - Skip leftover bytes before closing the socket.
  
  Revision  ChangesPath
  1.28  +19 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- HttpProcessor.java2001/06/18 06:22:27 1.27
  +++ HttpProcessor.java2001/06/18 23:28:39 1.28
  @@ -1,6 +1,6 @@
  -/* * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.27 2001/06/18 06:22:27 remm Exp $
  - * $Revision: 1.27 $
  - * $Date: 2001/06/18 06:22:27 $
  +/* * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.28 2001/06/18 23:28:39 remm Exp $
  + * $Revision: 1.28 $
  + * $Date: 2001/06/18 23:28:39 $
*
* 
*
  @@ -106,7 +106,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.27 $ $Date: 2001/06/18 06:22:27 $
  + * @version $Revision: 1.28 $ $Date: 2001/06/18 23:28:39 $
*/
   
   final class HttpProcessor
  @@ -935,12 +935,27 @@
   }
   
try {
  +shutdownInput(input);
   socket.close();
} catch (IOException e) {
;
}
socket = null;
   
  +}
  +
  +
  +protected void shutdownInput(InputStream input)
  +throws IOException {
  +try {
  +int available = input.available();
  +// skip any unread (bogus) bytes
  +if (available > 0) {
  +input.skip(available);
  +}
  +} catch (Exception e) {
  +;
  +}
   }
   
   
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2001-06-18 Thread remm

remm01/06/18 19:12:50

  Added:   catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  - New classloader implementation, used for web applications only.
  - Extends URLClassLoader (to preserve maximum compatibility).
  - Does not require dynamic bindings to work.
  - Supports reloading of classes in /WEB-INF/classes.
  - Supports reloading of JARs. This is untested, and is only a convinience
feature (for example, when you forgot a JAR required by a webapp). In many
cases, a stop / start of the context (which destroys it and recreates it from
scratch) will be needed to avoid getting JVM linkage errors and class casts.
  - Improved efficiency a lot : no more double tracking of the classes and
resources, unified loaded resources repository (classes + resources).
  - Fixed lookup path : first classes repository, then JARs. It was impossible
to control the order of the repositories by directly using URLClassLoader.
  - To the outside world (if getURLs() is called), it appears as a file-based
URLClassLoader.
  - All the JARs in /WEB-INF/lib are extracted and copied to the work directory,
even if the resources are filesystem based. Otherwise, it is not possible to
actually manipulate the JARs which are in the webapp while they're open, at
least under Windows. This operation is relatively fast anyway.
  - Tested with the examples webapp, Slide and Jasper.
  - Note : Jasper reloading of the classes may still be broken.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.1 2001/06/19 02:12:49 remm Exp $
   * $Revision: 1.1 $
   * $Date: 2001/06/19 02:12:49 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:  
   *   "This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  
  
  package org.apache.catalina.loader;
  
  
  import java.beans.PropertyChangeEvent;
  im

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

2001-06-18 Thread remm

remm01/06/18 19:14:49

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - Normalize the work directory path.
  - Use the new Webapp class loader instead of standard class loader.
Note : This is a one line change.
  
  Revision  ChangesPath
  1.63  +15 -8 
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.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- StandardContext.java  2001/06/13 02:32:01 1.62
  +++ StandardContext.java  2001/06/19 02:14:48 1.63
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.62 2001/06/13 02:32:01 remm Exp $
  - * $Revision: 1.62 $
  - * $Date: 2001/06/13 02:32:01 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.63 2001/06/19 02:14:48 remm Exp $
  + * $Revision: 1.63 $
  + * $Date: 2001/06/19 02:14:48 $
*
* 
*
  @@ -128,7 +128,7 @@
   import org.apache.catalina.deploy.SecurityCollection;
   import org.apache.catalina.deploy.SecurityConstraint;
   import org.apache.catalina.loader.StandardClassLoader;
  -import org.apache.catalina.loader.StandardLoader;
  +import org.apache.catalina.loader.WebappLoader;
   import org.apache.catalina.session.StandardManager;
   import org.apache.catalina.util.CharsetMapper;
   import org.apache.catalina.util.RequestUtil;
  @@ -141,7 +141,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.62 $ $Date: 2001/06/13 02:32:01 $
  + * @version $Revision: 1.63 $ $Date: 2001/06/19 02:14:48 $
*/
   
   public class StandardContext
  @@ -3151,7 +3151,7 @@
   if (getLoader() == null) {  // (2) Required by Manager
   if (debug >= 1)
   log("Configuring default Loader");
  -setLoader(new StandardLoader(getParentClassLoader()));
  +setLoader(new WebappLoader(getParentClassLoader()));
   }
   if (getManager() == null) { // (3) After prerequisites
   if (debug >= 1)
  @@ -3740,8 +3740,15 @@
   
// Create this directory if necessary
File dir = new File(workDir);
  - if (!dir.isAbsolute())
  - dir = new File(System.getProperty("catalina.home"), workDir);
  + if (!dir.isAbsolute()) {
  +File catalinaHome = new File(System.getProperty("catalina.home"));
  +String catalinaHomePath = null;
  +try {
  +catalinaHomePath = catalinaHome.getCanonicalPath();
  +dir = new File(catalinaHomePath, workDir);
  +} catch (IOException e) {
  +}
  +}
dir.mkdirs();
   
// Set the appropriate servlet context attribute
  
  
  



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

2001-06-18 Thread remm

remm01/06/18 19:20:32

  Modified:catalina/src/share/org/apache/catalina/startup
ContextConfig.java
  Log:
  - Stopping and starting any of the Catalina components is broken at the moment,
because the component is not reinitialized.
  - This fixes the problem (at least partially) for a Context.
  - I think this code should be moved to the container itself. I suggest adding
either a new Container.recycle() method or a new Lifecycle.recycle() method.
  
  Revision  ChangesPath
  1.47  +148 -5
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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- ContextConfig.java2001/05/31 03:56:11 1.46
  +++ ContextConfig.java2001/06/19 02:20:32 1.47
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.46 2001/05/31 03:56:11 remm Exp $
  - * $Revision: 1.46 $
  - * $Date: 2001/05/31 03:56:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.47 2001/06/19 02:20:32 remm Exp $
  + * $Revision: 1.47 $
  + * $Date: 2001/06/19 02:20:32 $
*
* 
*
  @@ -106,6 +106,14 @@
   import org.apache.catalina.core.StandardContext;
   import org.apache.catalina.deploy.LoginConfig;
   import org.apache.catalina.deploy.SecurityConstraint;
  +import org.apache.catalina.deploy.ApplicationParameter;
  +import org.apache.catalina.deploy.ContextEjb;
  +import org.apache.catalina.deploy.ContextEnvironment;
  +import org.apache.catalina.deploy.ErrorPage;
  +import org.apache.catalina.deploy.FilterDef;
  +import org.apache.catalina.deploy.FilterMap;
  +import org.apache.catalina.deploy.ContextLocalEjb;
  +import org.apache.catalina.deploy.ContextResource;
   import org.apache.catalina.loader.Extension;
   import org.apache.catalina.util.StringManager;
   import org.apache.catalina.util.xml.SaxContext;
  @@ -120,7 +128,7 @@
* of that Context, and the associated defined servlets.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.46 $ $Date: 2001/05/31 03:56:11 $
  + * @version $Revision: 1.47 $ $Date: 2001/06/19 02:20:32 $
*/
   
   public final class ContextConfig
  @@ -859,10 +867,145 @@
   /**
* Process a "stop" event for this Context.
*/
  -private void stop() {
  +private synchronized void stop() {
   
if (debug > 0)
log(sm.getString("contextConfig.stop"));
  +
  +int i;
  +
  +// Removing children
  +Container[] children = context.findChildren();
  +for (i = 0; i < children.length; i++) {
  +context.removeChild(children[i]);
  +}
  +
  +// FIXME : remove mappers ?
  +
  +// Removing application listeners
  +String[] applicationListeners = context.findApplicationListeners();
  +for (i = 0; i < applicationListeners.length; i++) {
  +context.removeApplicationListener(applicationListeners[i]);
  +}
  +
  +// Removing application parameters
  +ApplicationParameter[] applicationParameters = 
  +context.findApplicationParameters();
  +for (i = 0; i < applicationParameters.length; i++) {
  +context.removeApplicationParameter
  +(applicationParameters[i].getName());
  +}
  +
  +// Removing security constraints
  +SecurityConstraint[] securityConstraints = context.findConstraints();
  +for (i = 0; i < securityConstraints.length; i++) {
  +context.removeConstraint(securityConstraints[i]);
  +}
  +
  +// Removing Ejbs
  +ContextEjb[] contextEjbs = context.findEjbs();
  +for (i = 0; i < contextEjbs.length; i++) {
  +context.removeEjb(contextEjbs[i].getName());
  +}
  +
  +// Removing environments
  +ContextEnvironment[] contextEnvironments = context.findEnvironments();
  +for (i = 0; i < contextEnvironments.length; i++) {
  +context.removeEnvironment(contextEnvironments[i].getName());
  +}
  +
  +// Removing errors pages
  +ErrorPage[] errorPages = context.findErrorPages();
  +for (i = 0; i < errorPages.length; i++) {
  +context.removeErrorPage(errorPages[i]);
  +}
  +
  +// Removing filter defs
  +FilterDef[] filterDefs = context.findFilterDefs();
  +for (i = 0; i < filterDefs.length; i++) {
  +context.removeFilterDef(filterDe

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

2001-06-18 Thread remm

remm01/06/18 21:17:27

  Modified:jasper/src/share/org/apache/jasper JspEngineContext.java
  Log:
  - Make Jasper dynamically retrieve the classloader instead of sticking with the
same classloader, which was breaking reloading (since Jasper was using the
old classloader, it was never able to pick up changes).
  
  Revision  ChangesPath
  1.9   +4 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspEngineContext.java
  
  Index: JspEngineContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspEngineContext.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JspEngineContext.java 2001/03/22 16:39:27 1.8
  +++ JspEngineContext.java 2001/06/19 04:17:26 1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspEngineContext.java,v
 1.8 2001/03/22 16:39:27 glenn Exp $
  - * $Revision: 1.8 $
  - * $Date: 2001/03/22 16:39:27 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspEngineContext.java,v
 1.9 2001/06/19 04:17:26 remm Exp $
  + * $Revision: 1.9 $
  + * $Date: 2001/06/19 04:17:26 $
*
* 
* 
  @@ -190,7 +190,7 @@
* this JSP? I don't think this is used right now -- akv. 
*/
   public ClassLoader getClassLoader() {
  -return loader;
  +return Thread.currentThread().getContextClassLoader();
   }
   
   /**
  
  
  



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

2001-06-18 Thread remm

remm01/06/18 21:17:43

  Modified:jasper/src/share/org/apache/jasper/compiler
BeanRepository.java
  Log:
  - Make Jasper dynamically retrieve the classloader instead of sticking with the
same classloader, which was breaking reloading (since Jasper was using the
old classloader, it was never able to pick up changes).
  
  Revision  ChangesPath
  1.2   +9 -9  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/BeanRepository.java
  
  Index: BeanRepository.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/BeanRepository.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BeanRepository.java   2000/08/12 00:52:07 1.1
  +++ BeanRepository.java   2001/06/19 04:17:42 1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/BeanRepository.java,v
 1.1 2000/08/12 00:52:07 pierred Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/08/12 00:52:07 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/BeanRepository.java,v
 1.2 2001/06/19 04:17:42 remm Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/06/19 04:17:42 $
*
* 
* 
  @@ -84,7 +84,6 @@
   Vector appBeans;
   Vector requestBeans;
   Hashtable beanTypes;
  -ClassLoader loader;
   
   public BeanRepository (ClassLoader loader) {
sessionBeans = new Vector(11);
  @@ -92,7 +91,6 @@
appBeans = new Vector(11);
requestBeans= new Vector(11);
beanTypes= new Hashtable ();
  - this.loader = loader;
   }
   
   public boolean checkSessionBean (String s) {
  @@ -168,7 +166,8 @@
   throws ClassNotFoundException {
Class cls = null;
//try {
  - cls = loader.loadClass(clsname) ;
  + cls = Thread.currentThread().getContextClassLoader().loadClass
  +(clsname) ;
//} catch (ClassNotFoundException ex) {
//return false;
//}
  @@ -178,7 +177,8 @@
   public Class getBeanType (String bean) throws JasperException {
Class cls = null;
try {
  - cls = loader.loadClass((String)beanTypes.get(bean)) ;
  + cls = Thread.currentThread().getContextClassLoader().loadClass
  +((String)beanTypes.get(bean)) ;
} catch (ClassNotFoundException ex) {
throw new JasperException (ex);
}
  @@ -213,7 +213,7 @@
throws ClassNotFoundException {
Class cls = null;
if (clsname != null) {
  - cls =  loader.loadClass (clsname);
  + cls = Thread.currentThread().getContextClassLoader().loadClass 
(clsname);
}
return cls;
   }
  @@ -221,7 +221,7 @@
   public boolean beanFound (String beanName)
throws ClassNotFoundException {
try {
  - Beans.instantiate (loader, beanName);
  + Beans.instantiate(Thread.currentThread().getContextClassLoader(), 
beanName);
return true;
} catch (java.io.IOException ex) {
// Ignore it for the time being.
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2001-06-19 Thread remm

remm01/06/19 10:37:25

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Make the call to load resource as a privileged action (file access).
  - Fix the seal checking algorithm.
  
  Revision  ChangesPath
  1.2   +31 -20
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WebappClassLoader.java2001/06/19 02:12:39 1.1
  +++ WebappClassLoader.java2001/06/19 17:37:23 1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.1 2001/06/19 02:12:39 remm Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/06/19 02:12:39 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.2 2001/06/19 17:37:23 remm Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/06/19 17:37:23 $
*
* 
*
  @@ -78,7 +78,6 @@
   import java.net.URLStreamHandler;
   import java.security.AccessControlException;
   import java.security.PrivilegedAction;
  -import java.security.PrivilegedExceptionAction;
   import java.security.AccessController;
   import java.security.AccessControlContext;
   import java.security.CodeSource;
  @@ -118,7 +117,7 @@
*
* @author Remy Maucherat
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/06/19 02:12:39 $
  + * @version $Revision: 1.2 $ $Date: 2001/06/19 17:37:23 $
*/
   public class WebappClassLoader
   extends URLClassLoader
  @@ -139,6 +138,7 @@
this.parent = getParent();
system = getSystemClassLoader();
securityManager = System.getSecurityManager();
  +accessController = AccessController.getContext();
   
   }
   
  @@ -154,6 +154,7 @@
this.parent = getParent();
system = getSystemClassLoader();
securityManager = System.getSecurityManager();
  +accessController = AccessController.getContext();
   
   }
   
  @@ -310,6 +311,12 @@
   private ClassLoader system = null;
   
   
  +/**
  + * Access controller.
  + */
  +private AccessControlContext accessController;
  +
  +
   // - Properties
   
   
  @@ -1259,8 +1266,21 @@
   
   String tempPath = name.replace('.', '/');
   String classPath = tempPath + ".class";
  +
  +ResourceEntry entry = null;
   
  -ResourceEntry entry = findResourceInternal(name, classPath);
  +if (securityManager != null) {
  +final String fName = name;
  +final String fClassPath = classPath;
  +entry = (ResourceEntry) AccessController.doPrivileged
  +(new PrivilegedAction() {
  +public Object run() {
  +return findResourceInternal(fName, fClassPath);
  +}
  +}, accessController);
  +} else {
  +entry = findResourceInternal(name, classPath);
  +}
   
   if (entry == null)
   throw new ClassNotFoundException(name);
  @@ -1305,23 +1325,14 @@
   if (pkg.isSealed()) {
   sealCheck = pkg.isSealed(entry.source);
   } else {
  -if (entry.manifest != null)
  -sealCheck = isPackageSealed
  -(packageName, entry.manifest);
  +sealCheck = (entry.manifest == null) 
  +|| !isPackageSealed(packageName, entry.manifest);
   }
if (!sealCheck)
  - throw new SecurityException("sealing violation");
  + throw new SecurityException
  +("Sealing violation loading " + name + " : Package "
  + + packageName + " is sealed.");
   }
  -
  -/*
  -clazz = (Class)
  - AccessController.doPrivileged(new PrivilegedExceptionAction() {
  -public Object run() throws ClassNotFoundException {
  -return defineClass(name, entry.binaryContent, 0, 
  -entry.binaryContent.length, codeSource);
  -}
  -}, accessController);
  -*/
   
   }
   
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2001-06-19 Thread remm

remm01/06/19 10:38:02

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  - Add a permission for the work dir.
  
  Revision  ChangesPath
  1.2   +12 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WebappLoader.java 2001/06/19 02:12:49 1.1
  +++ WebappLoader.java 2001/06/19 17:38:00 1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.1 2001/06/19 02:12:49 remm Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/06/19 02:12:49 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.2 2001/06/19 17:38:00 remm Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/06/19 17:38:00 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.1 $ $Date: 2001/06/19 02:12:49 $
  + * @version $Revision: 1.2 $ $Date: 2001/06/19 17:38:00 $
*/
   
   public class WebappLoader
  @@ -643,6 +643,14 @@
   ((WebappClassLoader)classLoader).setPermissions
   (rootUrl);
}
  +File workDir = 
  +(File) servletContext.getAttribute
  +(Globals.WORK_DIR_ATTR);
  +if (workDir != null) {
  +File libDir = new File(workDir, "WEB-INF/lib/");
  +((WebappClassLoader)classLoader).setPermissions
  +(libDir.getAbsolutePath());
  +}
} catch (MalformedURLException e) {
}
}
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2001-06-19 Thread remm

remm01/06/19 16:03:33

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  - Use the local context notifier. Should fix build failure with Jikes reported
by Jon.
  
  Revision  ChangesPath
  1.3   +6 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WebappLoader.java 2001/06/19 17:38:00 1.2
  +++ WebappLoader.java 2001/06/19 23:03:30 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.2 2001/06/19 17:38:00 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/06/19 17:38:00 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.3 2001/06/19 23:03:30 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/06/19 23:03:30 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.2 $ $Date: 2001/06/19 17:38:00 $
  + * @version $Revision: 1.3 $ $Date: 2001/06/19 23:03:30 $
*/
   
   public class WebappLoader
  @@ -803,7 +803,8 @@
*/
   private void notifyContext() {
   
  - ContextNotifier notifier = new ContextNotifier((Context) container);
  + WebappContextNotifier notifier = 
  +new WebappContextNotifier((Context) container);
(new Thread(notifier)).start();
   
   }
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2001-06-19 Thread remm

remm01/06/19 19:29:14

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  - Add some temporary traces which could help debug the setup of the
repositories.
  
  Revision  ChangesPath
  1.4   +6 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WebappLoader.java 2001/06/19 23:03:30 1.3
  +++ WebappLoader.java 2001/06/20 02:29:13 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.3 2001/06/19 23:03:30 remm Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/06/19 23:03:30 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.4 2001/06/20 02:29:13 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/06/20 02:29:13 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.3 $ $Date: 2001/06/19 23:03:30 $
  + * @version $Revision: 1.4 $ $Date: 2001/06/20 02:29:13 $
*/
   
   public class WebappLoader
  @@ -936,7 +936,9 @@
   } catch (NamingException e) {
   // Silent catch: it's valid that no /WEB-INF/lib directory 
   //exists
  +e.printStackTrace();
   } catch (IOException e) {
  +e.printStackTrace();
   }
   
   }
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2001-06-20 Thread remm

remm01/06/20 16:31:30

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  - There appears to be some deployment problems in some rare cases, so the
paths generated will temporarily be printed out on the console for debug
purposes.
  
  Revision  ChangesPath
  1.5   +9 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WebappLoader.java 2001/06/20 02:29:13 1.4
  +++ WebappLoader.java 2001/06/20 23:31:29 1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.4 2001/06/20 02:29:13 remm Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/06/20 02:29:13 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.5 2001/06/20 23:31:29 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/06/20 23:31:29 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.4 $ $Date: 2001/06/20 02:29:13 $
  + * @version $Revision: 1.5 $ $Date: 2001/06/20 23:31:29 $
*/
   
   public class WebappLoader
  @@ -871,6 +871,8 @@
   classRepository.mkdirs();
   classpath.append(classRepository.getAbsolutePath());
   
  +System.out.println("Deploy class files: " + classesPath + " To: " + 
classRepository.getAbsolutePath());
  +
   copyDir(classes, classRepository);
   
   }
  @@ -919,6 +921,9 @@
   // would get locked otherwise, which would make it 
   // impossible to update it or remove it at runtime)
   File destFile = new File(destDir, binding.getName());
  +
  +System.out.println("Deploy JAR: " + filename + " To: " + 
destFile.getAbsolutePath());
  +
   Resource jarResource = (Resource) binding.getObject();
   if (copy(jarResource.streamContent(), 
new FileOutputStream(destFile))) {
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader LocalStrings.properties WebappLoader.java

2001-06-20 Thread remm

remm01/06/20 18:39:10

  Modified:catalina/src/share/org/apache/catalina/loader
LocalStrings.properties WebappLoader.java
  Log:
  - Add additional log info so that I can figure out what's up with Scarab
running on Jon's box. It's no longer displayed on the console, but instead
put in the log files.
  - Rename StandardLoader -> WebappLoader in the logs.
  - Add additional message strings.
  
  Revision  ChangesPath
  1.2   +14 -0 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/LocalStrings.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocalStrings.properties   2000/08/11 22:42:03 1.1
  +++ LocalStrings.properties   2001/06/21 01:39:07 1.2
  @@ -13,3 +13,17 @@
   standardLoader.removeRepository=Removing repository {0}
   standardLoader.starting=Starting this Loader
   standardLoader.stopping=Stopping this Loader
  +webappLoader.addRepository=Adding repository {0}
  +webappLoader.deploy=Deploying class repositories to work directory {0}
  +webappLoader.jarDeploy=Deploy JAR {0} to {1}
  +webappLoader.classDeploy=Deploy class files {0} to {1}
  +webappLoader.alreadyStarted=Loader has already been started
  +webappLoader.checkInterval=Cannot set reload check interval to {0} seconds
  +webappLoader.notContext=Cannot auto-reload unless our Container is a Context
  +webappLoader.notReloadabe=Reloadable property is set to false
  +webappLoader.notStarted=Loader has not yet been started
  +webappLoader.reloadable=Cannot set reloadable property to {0}
  +webappLoader.reloading=Reloading checks are enabled for this Context
  +webappLoader.removeRepository=Removing repository {0}
  +webappLoader.starting=Starting this Loader
  +webappLoader.stopping=Stopping this Loader
  
  
  
  1.6   +27 -23
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WebappLoader.java 2001/06/20 23:31:29 1.5
  +++ WebappLoader.java 2001/06/21 01:39:08 1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.5 2001/06/20 23:31:29 remm Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/06/20 23:31:29 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.6 2001/06/21 01:39:08 remm Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/06/21 01:39:08 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.5 $ $Date: 2001/06/20 23:31:29 $
  + * @version $Revision: 1.6 $ $Date: 2001/06/21 01:39:08 $
*/
   
   public class WebappLoader
  @@ -130,7 +130,7 @@
   
   
   /**
  - * Construct a new StandardLoader with no defined parent class loader
  + * Construct a new WebappLoader with no defined parent class loader
* (so that the actual parent will be the system class loader).
*/
   public WebappLoader() {
  @@ -141,7 +141,7 @@
   
   
   /**
  - * Construct a new StandardLoader with the specified class loader
  + * Construct a new WebappLoader with the specified class loader
* to be defined as the parent of the ClassLoader we ultimately create.
*
* @param parent The parent class loader
  @@ -264,7 +264,7 @@
   /**
* Name to register for the background thread.
*/
  -private String threadName = "StandardLoader";
  +private String threadName = "WebappLoader";
   
   
   /**
  @@ -492,7 +492,7 @@
   public void addRepository(String repository) {
   
   if (debug >= 1)
  - log(sm.getString("standardLoader.addRepository", repository));
  + log(sm.getString("webappLoader.addRepository", repository));
   for (int i = 0; i < repositories.length; i++) {
   if (repository.equals(repositories[i]))
   return;
  @@ -591,9 +591,9 @@
// Validate and update our current component state
if (started)
throw new LifecycleException
  - (sm.getString("standardLoader.alreadyStarted"));
  + (sm.getString("webappLoader.alreadyStarted"));
if (debug >= 1)
  - log(sm.get

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

2001-06-20 Thread remm

remm01/06/20 20:42:35

  Modified:catalina/src/share/org/apache/catalina/startup Catalina.java
  Log:
  - Whenever a Loader element was specified in a Context, a StandardLoader
was created, regardless on whether or not a className attribute was specified.
This is now fixed, and the className attribute now works correctly.
  - The class implementing the loader interface must have a constructor accepting
as parameter the parent class loader of the loader.
  - If no class name is specified, it will create a WebappLoader.
  - Thanks to Jon and his patience for helping me locate and fix that bug :)
  
  Revision  ChangesPath
  1.24  +51 -13
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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Catalina.java 2001/06/16 20:23:19 1.23
  +++ Catalina.java 2001/06/21 03:42:35 1.24
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.23 2001/06/16 20:23:19 remm Exp $
  - * $Revision: 1.23 $
  - * $Date: 2001/06/16 20:23:19 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.24 2001/06/21 03:42:35 remm Exp $
  + * $Revision: 1.24 $
  + * $Date: 2001/06/21 03:42:35 $
*
* 
*
  @@ -69,6 +69,7 @@
   import java.io.IOException;
   import java.io.OutputStream;
   import java.lang.reflect.InvocationTargetException;
  +import java.lang.reflect.Constructor;
   import java.net.Socket;
   import java.security.Security;
   import java.util.Stack;
  @@ -77,7 +78,7 @@
   import org.apache.catalina.LifecycleException;
   import org.apache.catalina.LifecycleListener;
   import org.apache.catalina.Server;
  -import org.apache.catalina.loader.StandardLoader;
  +import org.apache.catalina.Loader;
   import org.apache.catalina.util.xml.SaxContext;
   import org.apache.catalina.util.xml.XmlAction;
   import org.apache.catalina.util.xml.XmlMapper;
  @@ -97,7 +98,7 @@
* 
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.23 $ $Date: 2001/06/16 20:23:19 $
  + * @version $Revision: 1.24 $ $Date: 2001/06/21 03:42:35 $
*/
   
   public class Catalina {
  @@ -358,12 +359,12 @@
   mapper.addRule("Server/Service/Engine/Host/Cluster",
  mapper.setProperties());
   mapper.addRule("Server/Service/Engine/Host/Cluster",
  -   mapper.addChild("setCluster", 
"org.apache.catalina.Cluster"));
  +   mapper.addChild("setCluster", 
  +   "org.apache.catalina.Cluster"));
   
   createStartMapperContext("Server/Service/Engine/Host/Context", mapper);
  -createStartMapperDefaultContext(
  -"Server/Service/Engine/Host/DefaultContext",
  -mapper);
  +createStartMapperDefaultContext
  +("Server/Service/Engine/Host/DefaultContext", mapper);
   
   mapper.addRule("Server/Service/Engine/Host/Context/Manager/Store",
  mapper.objectCreate(null, "className"));
  @@ -536,8 +537,8 @@
   ("addLifecycleListener",
"org.apache.catalina.LifecycleListener"));
   
  -mapper.addRule(prefix + "/Loader",
  -   new CreateLoaderAction());
  +mapper.addRule(prefix + "/Loader", new CreateLoaderAction
  +("org.apache.catalina.WebappLoader", "className"));
mapper.addRule(prefix + "/Loader",
   mapper.setProperties());
mapper.addRule(prefix + "/Loader", mapper.addChild
  @@ -863,12 +864,38 @@
   /**
* Construct a new action.
*/
  -public CreateLoaderAction() {
  +public CreateLoaderAction(String loaderClass) {
  +
  +this(loaderClass, null);
  +
  +}
  +
  +
  +/**
  + * Construct a new action.
  + */
  +public CreateLoaderAction(String loaderClass, String attributeName) {
  +
   super();
  +this.loaderClass = loaderClass;
  +this.attributeName = attributeName;
  +
   }
   
   
   /**
  + * Classname of the loader.
  + */
  +protected String loaderClass;
  +
  +
  +/**
  + * The attribute name of the optional override class (if any).
  + */
  +protected String attributeName;

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

2001-06-20 Thread remm

remm01/06/20 21:18:53

  Modified:catalina/src/share/org/apache/catalina/startup Catalina.java
  Log:
  - Set the javaURLContextFactory as the JNDI IC factory. That feature was
present some time ago, but was removed because of fear of conflicts (which
turns out not to be a problem at all).
  
  Revision  ChangesPath
  1.25  +6 -4  
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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Catalina.java 2001/06/21 03:42:35 1.24
  +++ Catalina.java 2001/06/21 04:18:50 1.25
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.24 2001/06/21 03:42:35 remm Exp $
  - * $Revision: 1.24 $
  - * $Date: 2001/06/21 03:42:35 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.25 2001/06/21 04:18:50 remm Exp $
  + * $Revision: 1.25 $
  + * $Date: 2001/06/21 04:18:50 $
*
* 
*
  @@ -98,7 +98,7 @@
* 
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.24 $ $Date: 2001/06/21 03:42:35 $
  + * @version $Revision: 1.25 $ $Date: 2001/06/21 04:18:50 $
*/
   
   public class Catalina {
  @@ -706,6 +706,8 @@
   value = value + ":" + oldValue;
   }
   System.setProperty(javax.naming.Context.URL_PKG_PREFIXES, value);
  +System.setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
  +   "org.apache.naming.java.javaURLContextFactory");
   }
   
// If a SecurityManager is being used, set properties for
  
  
  



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

2001-06-21 Thread remm

remm01/06/21 19:03:00

  Modified:catalina/src/share/org/apache/catalina/startup Catalina.java
  Log:
  - Remove the StandardLoader classname from the comments.
  
  Revision  ChangesPath
  1.26  +5 -5  
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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- Catalina.java 2001/06/21 04:18:50 1.25
  +++ Catalina.java 2001/06/22 02:02:59 1.26
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.25 2001/06/21 04:18:50 remm Exp $
  - * $Revision: 1.25 $
  - * $Date: 2001/06/21 04:18:50 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.26 2001/06/22 02:02:59 remm Exp $
  + * $Revision: 1.26 $
  + * $Date: 2001/06/22 02:02:59 $
*
* 
*
  @@ -98,7 +98,7 @@
* 
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.25 $ $Date: 2001/06/21 04:18:50 $
  + * @version $Revision: 1.26 $ $Date: 2001/06/22 02:02:59 $
*/
   
   public class Catalina {
  @@ -855,7 +855,7 @@
   
   
   /**
  - * Class that creates a new StandardLoader instance, with the parent class
  + * Class that creates a new loader instance, with the parent class
* loader associated with the top object on the stack (which must be a
* Container), and pushes it on to the stack.
*/
  
  
  



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

2001-06-21 Thread remm

remm01/06/21 19:03:44

  Modified:catalina/src/share/org/apache/catalina/startup Embedded.java
  Log:
  - Embedded createLoader method will now create instances of
WebappLoader, instead of StandardLoader.
  
  Revision  ChangesPath
  1.8   +6 -6  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java
  
  Index: Embedded.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Embedded.java 2000/12/19 03:23:12 1.7
  +++ Embedded.java 2001/06/22 02:03:43 1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v
 1.7 2000/12/19 03:23:12 craigmcc Exp $
  - * $Revision: 1.7 $
  - * $Date: 2000/12/19 03:23:12 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v
 1.8 2001/06/22 02:03:43 remm Exp $
  + * $Revision: 1.8 $
  + * $Date: 2001/06/22 02:03:43 $
*
* 
*
  @@ -86,7 +86,7 @@
   import org.apache.catalina.core.StandardContext;
   import org.apache.catalina.core.StandardEngine;
   import org.apache.catalina.core.StandardHost;
  -import org.apache.catalina.loader.StandardLoader;
  +import org.apache.catalina.loader.WebappLoader;
   import org.apache.catalina.logger.FileLogger;
   import org.apache.catalina.logger.SystemOutLogger;
   import org.apache.catalina.net.SSLServerSocketFactory;
  @@ -148,7 +148,7 @@
* 
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.7 $ $Date: 2000/12/19 03:23:12 $
  + * @version $Revision: 1.8 $ $Date: 2001/06/22 02:03:43 $
*/
   
   public class Embedded implements Lifecycle {
  @@ -639,7 +639,7 @@
   logger.log("Creating Loader with parent class loader '" +
  parent + "'");
   
  -StandardLoader loader = new StandardLoader(parent);
  +WebappLoader loader = new WebappLoader(parent);
   return (loader);
   
   }
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader Reloader.java StandardClassLoader.java

2001-06-21 Thread remm

remm01/06/21 19:04:12

  Modified:catalina/src/share/org/apache/catalina/loader Reloader.java
StandardClassLoader.java
  Log:
  - Remove the StandardLoader classname from the comments.
  
  Revision  ChangesPath
  1.4   +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Reloader.java
  
  Index: Reloader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Reloader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Reloader.java 2001/01/23 22:12:32 1.3
  +++ Reloader.java 2001/06/22 02:04:09 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Reloader.java,v
 1.3 2001/01/23 22:12:32 glenn Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/01/23 22:12:32 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Reloader.java,v
 1.4 2001/06/22 02:04:09 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/06/22 02:04:09 $
*
* 
*
  @@ -68,10 +68,10 @@
   /**
* Internal interface that ClassLoader implementations may
* optionally implement to support the auto-reload functionality of
  - * StandardLoader.
  + * the classloader associated with the context.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/01/23 22:12:32 $
  + * @version $Revision: 1.4 $ $Date: 2001/06/22 02:04:09 $
*/
   
   public interface Reloader {
  
  
  
  1.20  +5 -5  
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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- StandardClassLoader.java  2001/06/12 03:53:26 1.19
  +++ StandardClassLoader.java  2001/06/22 02:04:11 1.20
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.19 2001/06/12 03:53:26 craigmcc Exp $
  - * $Revision: 1.19 $
  - * $Date: 2001/06/12 03:53:26 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.20 2001/06/22 02:04:11 remm Exp $
  + * $Revision: 1.20 $
  + * $Date: 2001/06/22 02:04:11 $
*
* 
*
  @@ -93,7 +93,7 @@
* Subclass implementation of java.net.URLClassLoader that knows how
* to load classes from disk directories, as well as local and remote JAR
* files.  It also implements the Reloader interface, to provide
  - * automatic reloading support to StandardLoader.
  + * automatic reloading support to the associated loader.
* 
* In all cases, URLs must conform to the contract specified by
* URLClassLoader - any URL that ends with a "/" character is
  @@ -110,7 +110,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.19 $ $Date: 2001/06/12 03:53:26 $
  + * @version $Revision: 1.20 $ $Date: 2001/06/22 02:04:11 $
*/
   
   public class StandardClassLoader
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2001-06-22 Thread remm

remm01/06/22 10:29:22

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Forgot to rename StandardClassLoader -> WebappClassLoader.
  
  Revision  ChangesPath
  1.3   +12 -12
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WebappClassLoader.java2001/06/19 17:37:23 1.2
  +++ WebappClassLoader.java2001/06/22 17:29:22 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.2 2001/06/19 17:37:23 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/06/19 17:37:23 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.3 2001/06/22 17:29:22 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/06/22 17:29:22 $
*
* 
*
  @@ -117,7 +117,7 @@
*
* @author Remy Maucherat
* @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/06/19 17:37:23 $
  + * @version $Revision: 1.3 $ $Date: 2001/06/22 17:29:22 $
*/
   public class WebappClassLoader
   extends URLClassLoader
  @@ -576,10 +576,10 @@
loader = loader.getParent();
if (loader == null)
break;
  - if (!(loader instanceof StandardClassLoader))
  + if (!(loader instanceof WebappClassLoader))
continue;
   Extension extensions[] =
  -((StandardClassLoader) loader).findAvailable();
  +((WebappClassLoader) loader).findAvailable();
   for (int i = 0; i < extensions.length; i++)
   results.add(extensions[i]);
   }
  @@ -623,10 +623,10 @@
loader = loader.getParent();
   if (loader == null)
   break;
  -if (!(loader instanceof StandardClassLoader))
  +if (!(loader instanceof WebappClassLoader))
   continue;
   Extension extensions[] =
  -((StandardClassLoader) loader).findRequired();
  +((WebappClassLoader) loader).findRequired();
   for (int i = 0; i < extensions.length; i++)
   results.add(extensions[i]);
   }
  @@ -717,7 +717,7 @@
*/
   public String toString() {
   
  -StringBuffer sb = new StringBuffer("StandardClassLoader\r\n");
  +StringBuffer sb = new StringBuffer("WebappClassLoader\r\n");
   sb.append("  available:\r\n");
   Iterator available = this.available.iterator();
   while (available.hasNext()) {
  @@ -1187,7 +1187,7 @@
   
   /**
* Get the Permissions for a CodeSource.  If this instance
  - * of StandardClassLoader is for a web application context,
  + * of WebappClassLoader is for a web application context,
* add read FilePermissions for the base directory (if unpacked),
* the context URL, and jar file resources.
*
  @@ -1556,7 +1556,7 @@
*/
   private void log(String message) {
   
  - System.out.println("StandardClassLoader: " + message);
  + System.out.println("WebappClassLoader: " + message);
   
   }
   
  @@ -1569,7 +1569,7 @@
*/
   private void log(String message, Throwable throwable) {
   
  - System.out.println("StandardClassLoader: " + message);
  + System.out.println("WebappClassLoader: " + message);
throwable.printStackTrace(System.out);
   
   }
  
  
  



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

2001-06-23 Thread remm

remm01/06/23 14:55:39

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - Reset the Jasper class loader when reloading, so that a new one will be
created. Jasper was always using the old (destroyed) CL before.
  - Make the work directory attribute a protected attribute (since its value will
never have to change). That protects it when clearing the attributes during a
reload (before, the CL setup was failing after a reload because it couldn't find
the work attribute).
  - Cleaned up a bit the binding / unbing order. Before, the old CL was still
bound when reloading the classes for the listeners. This shouldn't have
any real world effect, but it still is more correct this way.
  
  Revision  ChangesPath
  1.66  +36 -7 
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.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- StandardContext.java  2001/06/23 19:50:30 1.65
  +++ StandardContext.java  2001/06/23 21:55:39 1.66
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.65 2001/06/23 19:50:30 craigmcc Exp $
  - * $Revision: 1.65 $
  - * $Date: 2001/06/23 19:50:30 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.66 2001/06/23 21:55:39 remm Exp $
  + * $Revision: 1.66 $
  + * $Date: 2001/06/23 21:55:39 $
*
* 
*
  @@ -141,7 +141,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.65 $ $Date: 2001/06/23 19:50:30 $
  + * @version $Revision: 1.66 $ $Date: 2001/06/23 21:55:39 $
*/
   
   public class StandardContext
  @@ -2305,8 +2305,8 @@
   }
   
   // Clear all application-originated servlet context attributes
  -//if (context != null)
  -//context.clearAttributes();
  +if (context != null)
  +context.clearAttributes();
   
   // Shut down filters and application event listeners
   filterStop();
  @@ -2321,6 +2321,12 @@
}
}
   
  +// Binding thread
  +unbindThread();
  +
  +// Dump the old Jasper loader
  +jasperLoader = null;
  +
   // Shut down our application class loader
if ((loader != null) && (loader instanceof Lifecycle)) {
try {
  @@ -2352,6 +2358,18 @@
   }
   }
   
  +// Binding thread
  +bindThread();
  +
  +ClassLoader oldCtxClassLoader = 
  +Thread.currentThread().getContextClassLoader();
  + ClassLoader classLoader = loader.getClassLoader();
  +
  +// Set the context class loader
  +if (classLoader != null) {
  +Thread.currentThread().setContextClassLoader(classLoader);
  +}
  +
   // Restart our session manager (AFTER naming context recreated/bound)
   if ((manager != null) && (manager instanceof Lifecycle)) {
   try {
  @@ -2375,6 +2393,11 @@
   }
   }
   
  +// Set the context class loader to the old class loader
  +if (classLoader != null) {
  +Thread.currentThread().setContextClassLoader(oldCtxClassLoader);
  +}
  +
   // Restart our currently defined servlets
for (int i = 0; i < children.length; i++) {
   if (!ok)
  @@ -3329,6 +3352,9 @@
   // Unbinding thread
   unbindThread();
   
  +// Dump the old Jasper loader
  +jasperLoader = null;
  +
   if (debug >= 1)
   log("Stopping complete");
   
  @@ -3769,7 +3795,10 @@
   
// Set the appropriate servlet context attribute
getServletContext().setAttribute(Globals.WORK_DIR_ATTR, dir);
  -
  +if (getServletContext() instanceof ApplicationContext)
  +((ApplicationContext) getServletContext()).setAttributeReadOnly
  +(Globals.WORK_DIR_ATTR);
  +
   }
   
   
  
  
  



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

2001-06-23 Thread remm

remm01/06/23 14:56:38

  Modified:catalina/src/share/org/apache/catalina/core
StandardWrapper.java
  Log:
  - Make sure the old CL is bound after loading the servlet class. If there was
an exception, the new CL could remain bound.
  
  Revision  ChangesPath
  1.25  +40 -13
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
  
  Index: StandardWrapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- StandardWrapper.java  2001/05/14 04:51:19 1.24
  +++ StandardWrapper.java  2001/06/23 21:56:38 1.25
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.24 2001/05/14 04:51:19 craigmcc Exp $
  - * $Revision: 1.24 $
  - * $Date: 2001/05/14 04:51:19 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.25 2001/06/23 21:56:38 remm Exp $
  + * $Revision: 1.25 $
  + * $Date: 2001/06/23 21:56:38 $
*
* 
*
  @@ -105,7 +105,7 @@
* make them efficient are counter-productive.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.24 $ $Date: 2001/05/14 04:51:19 $
  + * @version $Revision: 1.25 $ $Date: 2001/06/23 21:56:38 $
*/
   
   public final class StandardWrapper
  @@ -785,24 +785,39 @@
   log(sm.getString("standardWrapper.jasperLoader", getName()));
   }
   
  +// Set the context class loader
  +if (classLoader != null) {
  +Thread.currentThread().setContextClassLoader(classLoader);
  +}
  +
// Load the specified servlet class from the appropriate class loader
Class classClass = null;
try {
  - if (classLoader != null)
  + if (classLoader != null) {
classClass = classLoader.loadClass(actualClass);
  - else
  + } else {
classClass = Class.forName(actualClass);
  +}
} catch (ClassNotFoundException e) {
unavailable(null);
  +// Restore the context ClassLoader
  + if (classLoader != null) {
  +Thread.currentThread().setContextClassLoader
  +(oldCtxClassLoader);
  +}
throw new ServletException
(sm.getString("standardWrapper.missingClass", actualClass),
 e);
}
if (classClass == null) {
  - unavailable(null);
  - throw new ServletException
  - (sm.getString("standardWrapper.missingClass", actualClass));
  - }
  +unavailable(null);
  +if (classLoader != null) {
  +Thread.currentThread().setContextClassLoader
  +(oldCtxClassLoader);
  +}
  +throw new ServletException
  +(sm.getString("standardWrapper.missingClass", actualClass));
  +}
   
// Instantiate and initialize an instance of the servlet class itself
Servlet servlet = null;
  @@ -810,10 +825,20 @@
servlet = (Servlet) classClass.newInstance();
} catch (ClassCastException e) {
unavailable(null);
  +// Restore the context ClassLoader
  + if (classLoader != null) {
  +Thread.currentThread().setContextClassLoader
  +(oldCtxClassLoader);
  +}
throw new ServletException
(sm.getString("standardWrapper.notServlet", actualClass), e);
} catch (Throwable e) {
unavailable(null);
  +// Restore the context ClassLoader
  + if (classLoader != null) {
  +Thread.currentThread().setContextClassLoader
  +(oldCtxClassLoader);
  +}
throw new ServletException
(sm.getString("standardWrapper.instantiate", actualClass), e);
}
  @@ -829,7 +854,6 @@
try {
instanceSupport.fireInstanceEvent(InstanceEvent.BEFORE_INIT_EVENT,
  servlet);
  -Thread.currentThread().setContextClassLoader(classLoader);
servlet.init(facade);
instanceSupport.fireInstanceEvent(InstanceEvent.AFTER_INIT_EVENT,
  servlet);
  @@ -852,8 +876,11 @@
throw new ServletException
(sm.getString("standardWrapper.initException", getName()), f);
} finally {
  -// restore the context ClassLoader
  -

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2001-06-23 Thread remm

remm01/06/23 15:30:05

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  - Don't copy the JARs to the work directory if filesystem based.
  
  Revision  ChangesPath
  1.7   +34 -20
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WebappLoader.java 2001/06/21 01:39:08 1.6
  +++ WebappLoader.java 2001/06/23 22:30:04 1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.6 2001/06/21 01:39:08 remm Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/06/21 01:39:08 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.7 2001/06/23 22:30:04 remm Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/06/23 22:30:04 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.6 $ $Date: 2001/06/21 01:39:08 $
  + * @version $Revision: 1.7 $ $Date: 2001/06/23 22:30:04 $
*/
   
   public class WebappLoader
  @@ -608,12 +608,13 @@
   
// Construct a class loader based on our current repositories list
try {
  - if (parentClassLoader == null)
  - classLoader = new WebappClassLoader(container.getResources());
  - else
  - classLoader = new WebappClassLoader
  -(parentClassLoader, container.getResources());
   
  +if (parentClassLoader == null) {
  +classLoader = new WebappClassLoader(container.getResources());
  +} else {
  +classLoader = new WebappClassLoader
  +(parentClassLoader, container.getResources());
  +}
   classLoader.setDebug(this.debug);
   classLoader.setDelegate(this.delegate);
   
  @@ -907,8 +908,18 @@
   
   if (libDir != null) {
   
  -File destDir = new File(workDir, libPath);
  -destDir.mkdirs();
  +boolean copyJars = false;
  +String absoluteLibPath = servletContext.getRealPath(libPath);
  +
  +File destDir = null;
  +
  +if (absoluteLibPath != null) {
  +destDir = new File(absoluteLibPath);
  +} else {
  +copyJars = true;
  +destDir = new File(workDir, libPath);
  +destDir.mkdirs();
  +}
   
   // Looking up directory /WEB-INF/lib in the context
   try {
  @@ -929,18 +940,21 @@
destFile.getAbsolutePath()));
   
   Resource jarResource = (Resource) binding.getObject();
  -if (copy(jarResource.streamContent(), 
  - new FileOutputStream(destFile))) {
  -if (classpath.length() != 0)
  -classpath.append(File.pathSeparator);
  -classpath.append(destFile.getAbsolutePath());
  +if (copyJars) {
  +if (!copy(jarResource.streamContent(), 
  +  new FileOutputStream(destFile)))
  +continue;
   }
  -
  +
  +if (classpath.length() != 0)
  +classpath.append(File.pathSeparator);
  +classpath.append(destFile.getAbsolutePath());
  +
   JarFile jarFile = new JarFile(destFile);
  -
  +
   classLoader.addJar(filename, jarFile, destFile);
   addRepository(filename);
  -
  +
   }
   } catch (NamingException e) {
   // Silent catch: it's valid that no /WEB-INF/lib directory 
  @@ -1255,7 +1269,7 @@
*/
   public void run() {
   
  - context.reload();
  +context.reload();
   
   }
   
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2001-06-23 Thread remm

remm01/06/23 15:38:04

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - The webapp CL now implements lifecycle.
  - The CL will clear all its repositories, and release all JAR file objects after
being shut down.
  - The CL will always throw CNF exception after being stopped.
  
  Revision  ChangesPath
  1.5   +108 -17   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WebappClassLoader.java2001/06/22 20:11:01 1.4
  +++ WebappClassLoader.java2001/06/23 22:38:03 1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.4 2001/06/22 20:11:01 glenn Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/06/22 20:11:01 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.5 2001/06/23 22:38:03 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/06/23 22:38:03 $
*
* 
*
  @@ -101,6 +101,11 @@
   import javax.naming.NamingEnumeration;
   import javax.naming.NameClassPair;
   
  +import org.apache.catalina.Lifecycle;
  +import org.apache.catalina.LifecycleEvent;
  +import org.apache.catalina.LifecycleException;
  +import org.apache.catalina.LifecycleListener;
  +
   import org.apache.naming.JndiPermission;
   import org.apache.naming.resources.ResourceAttributes;
   import org.apache.naming.resources.Resource;
  @@ -119,11 +124,11 @@
*
* @author Remy Maucherat
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/06/22 20:11:01 $
  + * @version $Revision: 1.5 $ $Date: 2001/06/23 22:38:03 $
*/
   public class WebappClassLoader
   extends URLClassLoader
  -implements Reloader {
  +implements Reloader, Lifecycle {
   
   
   // --- Constructors
  @@ -319,6 +324,12 @@
   private AccessControlContext accessController;
   
   
  +/**
  + * Has this component been started?
  + */
  +protected boolean started = false;
  +
  +
   // - Properties
   
   
  @@ -662,8 +673,7 @@
   ((ResourceAttributes) resources.getAttributes(paths[i]))
   .getLastModified().getTime();
   if (lastModified != lastModifiedDates[i]) {
  -if (debug > 2)
  -log("  Resource '" + paths[i] + "' was modified");
  +log("  Resource '" + paths[i] + "' was modified");
   return (true);
   }
   } catch (NamingException e) {
  @@ -684,25 +694,22 @@
   NameClassPair ncPair = (NameClassPair) enum.nextElement();
   if (!ncPair.getName().equals(jarNames[i])) {
   // Missing JAR
  -if (debug > 2)
  -log("Additional JARs have been added : '"
  -+ ncPair.getName() + "'");
  +log("Additional JARs have been added : '"
  ++ ncPair.getName() + "'");
   return (true);
   }
   }
   if (enum.hasMoreElements()) {
   // There was more JARs
  -if (debug > 2)
  -log("Additional JARs have been added");
  +log("Additional JARs have been added");
   return (true);
   } else if (i < jarNames.length) {
   // There was less JARs
  -if (debug > 2)
  -log("Additional JARs have been added");
  +log("Additional JARs have been added");
   return (true);
   }
   } catch (NamingException e) {
  -if (debug >= 2)
  +if (debug > 2)
   log("Failed tracking modifications of '" 
   + getJarPath() + "'");
   } catch (ClassCastException e) {
  @@ -1078,6 +1085,12 @@
   log("loadClass(" + name + ", " + resolve + &

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2001-06-23 Thread remm

remm01/06/23 18:16:07

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - The call to findResourceInternal should be wrapped in a privileged action.
Bug reported by Craig R. McClanahan
  
  Revision  ChangesPath
  1.6   +15 -6 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WebappClassLoader.java2001/06/23 22:38:03 1.5
  +++ WebappClassLoader.java2001/06/24 01:16:06 1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.5 2001/06/23 22:38:03 remm Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/06/23 22:38:03 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.6 2001/06/24 01:16:06 remm Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/06/24 01:16:06 $
*
* 
*
  @@ -124,7 +124,7 @@
*
* @author Remy Maucherat
* @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2001/06/23 22:38:03 $
  + * @version $Revision: 1.6 $ $Date: 2001/06/24 01:16:06 $
*/
   public class WebappClassLoader
   extends URLClassLoader
  @@ -840,7 +840,7 @@
*
* @param name Name of the resource to be found
*/
  -public URL findResource(String name) {
  +public URL findResource(final String name) {
   
   if (debug >= 3)
   log("findResource(" + name + ")");
  @@ -849,7 +849,16 @@
   
   ResourceEntry entry = (ResourceEntry) resourceEntries.get(name);
   if (entry == null) {
  -entry = findResourceInternal(name, name);
  +if (securityManager != null) {
  +entry = (ResourceEntry) AccessController.doPrivileged
  +(new PrivilegedAction() {
  +public Object run() {
  +return findResourceInternal(name, name);
  +}
  +}, accessController);
  +} else {
  +entry = findResourceInternal(name, name);
  +}
   }
   if (entry != null) {
   url = entry.source;
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/conf catalina.policy

2001-06-29 Thread remm

remm01/06/29 14:53:45

  Modified:catalina/src/conf catalina.policy
  Log:
  - Package name typo fix.
Patch submitted by Gennis Emerson 
  
  Revision  ChangesPath
  1.14  +2 -2  jakarta-tomcat-4.0/catalina/src/conf/catalina.policy
  
  Index: catalina.policy
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/catalina.policy,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- catalina.policy   2001/06/29 18:01:09 1.13
  +++ catalina.policy   2001/06/29 21:53:43 1.14
  @@ -8,7 +8,7 @@
   //
   // * Read access to the document root directory
   //
  -// $Id: catalina.policy,v 1.13 2001/06/29 18:01:09 glenn Exp $
  +// $Id: catalina.policy,v 1.14 2001/06/29 21:53:43 remm Exp $
   // 
   
   
  @@ -85,7 +85,7 @@
   grant { 
   // Required for JNDI lookup of named JDBC DataSource's and
   // javamail named MimePart DataSource used to send mail
  -permission java.utim.PropertyPermission "java.home", "read";
  +permission java.util.PropertyPermission "java.home", "read";
   permission java.util.PropertyPermission "java.naming.*", "read";
   permission java.util.PropertyPermission "javax.sql.*", "read";
   
  
  
  



cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java ActionHook.java OutputBuffer.java Request.java Response.java AdapterEventCode.java AdapterListener.java Note.java

2001-07-09 Thread remm

remm01/07/09 19:55:05

  Modified:coyote/src/java/org/apache/coyote OutputBuffer.java
Request.java Response.java
  Added:   coyote/src/java/org/apache/coyote ActionCode.java
ActionHook.java
  Removed: coyote/src/java/org/apache/coyote AdapterEventCode.java
AdapterListener.java Note.java
  Log:
  - Various updates to the Coyote API.
Note: The API can't be considered frozen until the port of at least one
connector is complete.
  - Status update : I have started porting the Java HTTP/1.1 connector.
I will patially rewrite it for more memory efficiency and a few additional
features.
  - On the adapter side, I'll write a simple adapter which will output the full
request information back to the client, and then I'll write an adapter
for Catalina.
  
  Revision  ChangesPath
  1.2   +0 -6  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/OutputBuffer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OutputBuffer.java 2001/06/14 01:07:57 1.1
  +++ OutputBuffer.java 2001/07/10 02:55:01 1.2
  @@ -73,10 +73,4 @@
   throws IOException;
   
   
  -public void reset();
  -
  -
  -public void close();
  -
  -
   }
  
  
  
  1.2   +3 -8  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java
  
  Index: Request.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Request.java  2001/06/14 01:07:57 1.1
  +++ Request.java  2001/07/10 02:55:02 1.2
  @@ -153,7 +153,7 @@
   /**
* Notes.
*/
  -protected Note notes[] = new Note[Constants.MAX_NOTES];
  +protected Object notes[] = new Object[Constants.MAX_NOTES];
   
   
   /**
  @@ -349,12 +349,12 @@
   //  Per-Request "notes" 
   
   
  -public final void setNote(int pos, Note value) {
  +public final void setNote(int pos, Object value) {
notes[pos] = value;
   }
   
   
  -public final Note getNote(int pos) {
  +public final Object getNote(int pos) {
return notes[pos];
   }
   
  @@ -378,11 +378,6 @@
   serverPort=-1;

scookies.recycle();
  -
  -for (int i=0; i < Constants.MAX_NOTES; i++) {
  -if (notes[i] != null)
  -notes[i].recycle();
  -}
   
   unparsedURIMB.recycle();
   uriMB.recycle();
  
  
  
  1.2   +21 -23
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java
  
  Index: Response.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Response.java 2001/06/14 01:07:57 1.1
  +++ Response.java 2001/07/10 02:55:02 1.2
  @@ -111,7 +111,7 @@
   /**
* Notes.
*/
  -protected Note notes[] = new Note[Constants.MAX_NOTES];
  +protected Object notes[] = new Object[Constants.MAX_NOTES];
   
   
   /**
  @@ -136,9 +136,9 @@
   
   
   /**
  - * Adapter listener.
  + * Action hook.
*/
  -public AdapterListener listener;
  +public ActionHook hook;
   
   
   // - Properties
  @@ -159,35 +159,35 @@
   }
   
   
  -public AdapterListener getListener() {
  -return listener;
  +public ActionHook getHook() {
  +return hook;
   }
   
   
  -public void setAdapterListener(AdapterListener listener) {
  -this.listener = listener;
  +public void setHook(ActionHook hook) {
  +this.hook = hook;
   }
   
   
   //  Per-Response "notes" 
   
   
  -public final void setNote(int pos, Note value) {
  +public final void setNote(int pos, Object value) {
notes[pos] = value;
   }
   
   
  -public final Note getNote(int pos) {
  +public final Object getNote(int pos) {
return notes[pos];
   }
   
   
  -//  Events 
  +//  Actions 
   
   
  -public void sendEvent(AdapterEventCode eventCode, Object param) {
  -if (listener != null) {
  -listener.event(eventCode, param);
  +public void action(ActionCode actionCode, Objec

cvs commit: jakarta-tomcat-4.0/catalina/src/bin catalina.bat

2001-07-10 Thread remm

remm01/07/10 00:35:46

  Modified:catalina/src/bin catalina.bat
  Log:
  - Syntax fix.
Patch submitted by Sergey A. Lipnevich 
  
  Revision  ChangesPath
  1.15  +2 -2  jakarta-tomcat-4.0/catalina/src/bin/catalina.bat
  
  Index: catalina.bat
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.bat,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- catalina.bat  2001/01/03 19:55:45 1.14
  +++ catalina.bat  2001/07/10 07:35:43 1.15
  @@ -12,7 +12,7 @@
   rem
   rem   JAVA_HOME Must point at your Java Development Kit installation.
   rem
  -rem $Id: catalina.bat,v 1.14 2001/01/03 19:55:45 craigmcc Exp $
  +rem $Id: catalina.bat,v 1.15 2001/07/10 07:35:43 remm Exp $
   rem ---
   
   
  @@ -68,7 +68,7 @@
   if "%1" == "stop" goto doStop
   
   :doUsage
  -echo Usage:  catalina ( env | run | start | stop )
  +echo Usage:  catalina ( env ^| run ^| start ^| stop )
   echo Commands:
   echo   env -   Set up environment variables that Catalina would use
   echo   run -   Start Catalina in the current window
  
  
  



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

2001-07-10 Thread remm

remm01/07/10 00:36:44

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpConnector.java
  Log:
  - Negative value for maxProcessors means unlimited number of processors.
Bug reported by Kumar Mettu 
  
  Revision  ChangesPath
  1.18  +17 -11
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java
  
  Index: HttpConnector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- HttpConnector.java2001/06/18 21:35:54 1.17
  +++ HttpConnector.java2001/07/10 07:36:42 1.18
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
 1.17 2001/06/18 21:35:54 remm Exp $
  - * $Revision: 1.17 $
  - * $Date: 2001/06/18 21:35:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
 1.18 2001/07/10 07:36:42 remm Exp $
  + * $Revision: 1.18 $
  + * $Date: 2001/07/10 07:36:42 $
*
* 
*
  @@ -95,7 +95,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.17 $ $Date: 2001/06/18 21:35:54 $
  + * @version $Revision: 1.18 $ $Date: 2001/07/10 07:36:42 $
*/
   
   
  @@ -805,18 +805,24 @@
   
synchronized (processors) {
if (processors.size() > 0) {
  -//if (debug >= 2)
  -//log("createProcessor: Reusing existing 
processor");
  +// if (debug >= 2)
  +// log("createProcessor: Reusing existing processor");
return ((HttpProcessor) processors.pop());
   }
if ((maxProcessors > 0) && (curProcessors < maxProcessors)) {
  -//if (debug >= 2)
  -//log("createProcessor: Creating new 
processor");
  +// if (debug >= 2)
  +// log("createProcessor: Creating new processor");
return (newProcessor());
   } else {
  -//if (debug >= 2)
  -//log("createProcessor: Cannot create new 
processor");
  - return (null);
  +if (maxProcessors < 0) {
  +// if (debug >= 2)
  +// log("createProcessor: Creating new processor");
  +return (newProcessor());
  + } else {
  +// if (debug >= 2)
  +// log("createProcessor: Cannot create new processor");
  +return (null);
  +}
   }
}
   
  
  
  



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

2001-07-10 Thread remm

remm01/07/10 00:37:08

  Modified:catalina/src/share/org/apache/catalina/connector/http10
HttpConnector.java
  Log:
  - Negative value for maxProcessors means unlimited number of processors.
Bug reported by Kumar Mettu 
  
  Revision  ChangesPath
  1.7   +12 -7 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpConnector.java
  
  Index: HttpConnector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpConnector.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HttpConnector.java2001/05/09 23:42:14 1.6
  +++ HttpConnector.java2001/07/10 07:37:05 1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpConnector.java,v
 1.6 2001/05/09 23:42:14 craigmcc Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/05/09 23:42:14 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpConnector.java,v
 1.7 2001/07/10 07:37:05 remm Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/07/10 07:37:05 $
*
* 
*
  @@ -94,7 +94,7 @@
* purposes.  Not intended to be the final solution.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2001/05/09 23:42:14 $
  + * @version $Revision: 1.7 $ $Date: 2001/07/10 07:37:05 $
*/
   
   
  @@ -742,10 +742,15 @@
synchronized (processors) {
if (processors.size() > 0)
return ((HttpProcessor) processors.pop());
  - if ((maxProcessors > 0) && (curProcessors < maxProcessors))
  + if ((maxProcessors > 0) && (curProcessors < maxProcessors)) {
return (newProcessor());
  - else
  - return (null);
  + } else {
  +if (maxProcessors < 0) {
  +return (newProcessor());
  +} else {
  +return (null);
  +}
  +}
}
   
   }
  
  
  



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

2001-07-10 Thread remm

remm01/07/10 15:08:30

  Modified:catalina/src/share/org/apache/catalina/session
LocalStrings.properties StandardSession.java
  Log:
  - Specifying a null name will result in a illegal arg exception being thrown.
Bug reported by Kumar Mettu 
  
  Revision  ChangesPath
  1.8   +1 -0  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/LocalStrings.properties,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- LocalStrings.properties   2001/04/26 01:40:55 1.7
  +++ LocalStrings.properties   2001/07/10 22:08:25 1.8
  @@ -42,6 +42,7 @@
   standardSession.sessionEvent=Session event listener threw exception
   standardSession.setAttribute.ise=setAttribute: Non-serializable attribute
   standardSession.setAttribute.ise=setAttribute: Session already invalidated
  +standardSession.setAttribute.namenull=setAttribute: name parameter cannot be null
   standardSession.sessionCreated=Created Session id = {0}
   persistentManager.loading=Loading {0} persisted sessions
   persistentManager.unloading=Saving {0} persisted sessions
  
  
  
  1.22  +9 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java
  
  Index: StandardSession.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- StandardSession.java  2001/07/10 03:18:57 1.21
  +++ StandardSession.java  2001/07/10 22:08:27 1.22
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
 1.21 2001/07/10 03:18:57 jon Exp $
  - * $Revision: 1.21 $
  - * $Date: 2001/07/10 03:18:57 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
 1.22 2001/07/10 22:08:27 remm Exp $
  + * $Revision: 1.22 $
  + * $Date: 2001/07/10 22:08:27 $
*
* 
*
  @@ -111,7 +111,7 @@
* @author Craig R. McClanahan
* @author Sean Legassick
* @author mailto:[EMAIL PROTECTED]";>Jon S. Stevens
  - * @version $Revision: 1.21 $ $Date: 2001/07/10 03:18:57 $
  + * @version $Revision: 1.22 $ $Date: 2001/07/10 22:08:27 $
*/
   
   class StandardSession
  @@ -1021,6 +1021,11 @@
*  invalidated session
*/
   public void setAttribute(String name, Object value) {
  +
  +// Name cannot be null
  +if (name == null)
  +throw new IllegalArgumentException
  +(sm.getString("standardSession.setAttribute.namenull"));
   
   // Null value is the same as removeAttribute()
   if (value == null) {
  
  
  



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

2001-07-11 Thread remm

remm01/07/11 15:51:43

  Modified:jasper/src/share/org/apache/jasper/runtime
PageContextImpl.java
  Log:
  - Fix infinite looping bug when doing an include followed by a forward.
The included attribute is now unset before forwarding, so that the JSP we
forward to doesn't think it's been included.
Bug reported by Eduardo Pelegri-Llopart.
  
  Revision  ChangesPath
  1.12  +13 -4 
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- PageContextImpl.java  2001/07/10 20:20:02 1.11
  +++ PageContextImpl.java  2001/07/11 22:51:40 1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
 1.11 2001/07/10 20:20:02 horwat Exp $
  - * $Revision: 1.11 $
  - * $Date: 2001/07/10 20:20:02 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
 1.12 2001/07/11 22:51:40 remm Exp $
  + * $Revision: 1.12 $
  + * $Date: 2001/07/11 22:51:40 $
*
* 
*
  @@ -396,7 +396,16 @@
   throws ServletException, IOException
   {
   String path = getAbsolutePathRelativeToContext(relativeUrlPath);
  -context.getRequestDispatcher(path).forward(request, response);
  +String includeUri 
  += (String) request.getAttribute(Constants.INC_SERVLET_PATH);
  +if (includeUri != null)
  +request.removeAttribute(Constants.INC_SERVLET_PATH);
  +try {
  +context.getRequestDispatcher(path).forward(request, response);
  +} finally {
  +if (includeUri != null)
  +request.setAttribute(Constants.INC_SERVLET_PATH, includeUri);
  +}
   }
   
   Stack writerStack = new Stack();
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/factory TyrexDataSourceFactory.java

2001-07-12 Thread remm

remm01/07/12 01:07:33

  Modified:catalina/src/share/org/apache/naming/factory
TyrexDataSourceFactory.java
  Log:
  - Support for Tyrex 0.9.7, which doesn't register the JDBC
driver automatically.
  
  Revision  ChangesPath
  1.3   +16 -10
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/factory/TyrexDataSourceFactory.java
  
  Index: TyrexDataSourceFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/factory/TyrexDataSourceFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TyrexDataSourceFactory.java   2000/11/04 22:27:06 1.2
  +++ TyrexDataSourceFactory.java   2001/07/12 08:07:27 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/factory/TyrexDataSourceFactory.java,v
 1.2 2000/11/04 22:27:06 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/11/04 22:27:06 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/factory/TyrexDataSourceFactory.java,v
 1.3 2001/07/12 08:07:27 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/07/12 08:07:27 $
*
* 
*
  @@ -65,6 +65,8 @@
   package org.apache.naming.factory;
   
   import java.util.Hashtable;
  +import java.sql.Driver;
  +import java.sql.DriverManager;
   import javax.naming.Name;
   import javax.naming.Context;
   import javax.naming.NamingException;
  @@ -100,7 +102,7 @@
* 
* 
* @author Remy Maucherat
  - * @version $Revision: 1.2 $ $Date: 2000/11/04 22:27:06 $
  + * @version $Revision: 1.3 $ $Date: 2001/07/12 08:07:27 $
*/
   
   public class TyrexDataSourceFactory
  @@ -195,12 +197,19 @@
   ds.setDriverName(DEFAULT_DRIVER_NAME);
   }
   currentRefAddr = ref.get(DRIVER_CLASS_NAME);
  +String driverClassName = null;
   if (currentRefAddr != null) {
  -ds.setDriverClassName
  -(currentRefAddr.getContent().toString());
  +driverClassName = 
  +currentRefAddr.getContent().toString();
   } else {
  -ds.setDriverName(DEFAULT_DRIVER_CLASS_NAME);
  +driverClassName = DEFAULT_DRIVER_CLASS_NAME;
   }
  +ds.setDriverClassName(driverClassName);
  +
  +// Loading and registering JDBC driver
  +Class driverClass = Class.forName(driverClassName);
  +Driver databaseDriver = (Driver) driverClass.newInstance();
  +DriverManager.registerDriver(databaseDriver);
   
   if (ref.getClassName().equals
   ("tyrex.jdbc.ServerDataSource")) {
  @@ -220,9 +229,6 @@
   return ds;
   
   } catch (Throwable t) {
  -// TEMP
  -t.printStackTrace();
  -// END TEMP
   // Another factory could handle this, so just give up
   return null;
   }
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina build.xml

2001-07-12 Thread remm

remm01/07/12 01:35:14

  Modified:catalina build.xml
  Log:
  - Don't skip building the standard object factories (they had been modified to
dynamically load the other factories, instead of relying on static linking).
  
  Revision  ChangesPath
  1.47  +0 -5  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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- build.xml 2001/06/22 20:08:40 1.46
  +++ build.xml 2001/07/12 08:35:06 1.47
  @@ -15,7 +15,6 @@
 
   
 
  -  
   
 
 
  @@ -138,10 +137,6 @@
excludes="**/CVS/**">
 
  -  
  -  
 
 


cvs commit: jakarta-tomcat-4.0/webapps/examples/jsp index.html

2001-07-12 Thread remm

remm01/07/12 02:25:02

  Modified:webapps/examples/jsp index.html
  Log:
  - Fix links in the jsp examples HTML page.
Patch submitted by Hiten Pandya 
  
  Revision  ChangesPath
  1.2   +3 -3  jakarta-tomcat-4.0/webapps/examples/jsp/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/examples/jsp/index.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.html2000/08/17 00:58:03 1.1
  +++ index.html2001/07/12 09:24:54 1.2
  @@ -88,15 +88,15 @@
   
   Checkbox 
   
  -Execute
  +Execute
   
  -Source
  +Source
   
   
   
   Color 
   
  -Execute
  +Execute
   
   Source
   
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2001-07-12 Thread remm

remm01/07/12 14:22:32

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - The addRepository call will now add the specified repository (if it's a valid URL)
to the superclass (URLClassLoader) so that repositories which are not
standard webapp class repositories can be added to the classloader.
  - If the internal class loading fails, WebappClassLoader will now call
super.findClass.
  - Implementation note : class and JAR reloading is not supported in non standard
class repositories.
  - WebappClassLoader should now behave the same way StandardClassLoader
did.
  - Should fix integration issues with the J2EE RI.
  
  Revision  ChangesPath
  1.8   +37 -10
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WebappClassLoader.java2001/06/26 21:02:18 1.7
  +++ WebappClassLoader.java2001/07/12 21:22:25 1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.7 2001/06/26 21:02:18 glenn Exp $
  - * $Revision: 1.7 $
  - * $Date: 2001/06/26 21:02:18 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.8 2001/07/12 21:22:25 remm Exp $
  + * $Revision: 1.8 $
  + * $Date: 2001/07/12 21:22:25 $
*
* 
*
  @@ -123,7 +123,7 @@
*
* @author Remy Maucherat
* @author Craig R. McClanahan
  - * @version $Revision: 1.7 $ $Date: 2001/06/26 21:02:18 $
  + * @version $Revision: 1.8 $ $Date: 2001/07/12 21:22:25 $
*/
   public class WebappClassLoader
   extends URLClassLoader
  @@ -448,7 +448,19 @@
*/
   public void addRepository(String repository) {
   
  -addRepository(repository, new File(repository));
  +// Ignore any of the standard repositories, as they are set up using 
  +// either addJar or addRepository
  +if (repository.startsWith("/WEB-INF/lib")
  +|| repository.startsWith("/WEB-INF/classes"))
  +return;
  +
  +// Add this repository to our underlying class loader
  +try {
  +URL url = new URL(repository);
  +super.addURL(url);
  +} catch (MalformedURLException e) {
  +throw new IllegalArgumentException(e.toString());
  +}
   
   }
   
  @@ -463,7 +475,7 @@
* @exception IllegalArgumentException if the specified repository is
*  invalid or does not exist
*/
  -public synchronized void addRepository(String repository, File file) {
  +synchronized void addRepository(String repository, File file) {
   
   // Note : There should be only one (of course), but I think we should 
   // keep this a bit generic
  @@ -495,7 +507,7 @@
   }
   
   
  -public synchronized void addJar(String jar, JarFile jarFile, File file)
  +synchronized void addJar(String jar, JarFile jarFile, File file)
   throws IOException {
   
   if (jar == null)
  @@ -809,7 +821,7 @@
   Class clazz = null;
   try {
if (debug >= 4)
  - log("  super.findClass(" + name + ")");
  + log("  findClassInternal(" + name + ")");
try {
clazz = findClassInternal(name);
   } catch(AccessControlException ace) {
  @@ -821,6 +833,17 @@
throw e;
}
   if (clazz == null) {
  +try {
  +clazz = super.findClass(name);
  +} catch(AccessControlException ace) {
  +throw new ClassNotFoundException(name);
  +} catch (RuntimeException e) {
  +if (debug >= 4)
  +log("  -->RuntimeException Rethrown", e);
  +throw e;
  +}
  +}
  +if (clazz == null) {
   if (debug >= 3)
   log("--> Returning ClassNotFoundException");
   throw new ClassNotFoundException(name);
  @@ -1262,9 +1285,11 @@
*/
   public URL[] getURLs() {
   
  +URL[] external = super.getURLs();
  +
   int filesLength = files.length;
   int jarFilesLength = jarRealFiles.length;
  -int length = filesLength + jarFilesLength;
  +int length = filesLength + jarFilesLength + external.length;
 

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2001-07-12 Thread remm

remm01/07/12 14:24:15

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  - Cleanup of the classpath generation.
  - Implemented addRepository the way it was implemented in StandardLoader.
  - Should fix integration issues with the J2EE RI.
  
  Revision  ChangesPath
  1.8   +25 -36
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WebappLoader.java 2001/06/23 22:30:04 1.7
  +++ WebappLoader.java 2001/07/12 21:24:09 1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.7 2001/06/23 22:30:04 remm Exp $
  - * $Revision: 1.7 $
  - * $Date: 2001/06/23 22:30:04 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.8 2001/07/12 21:24:09 remm Exp $
  + * $Revision: 1.8 $
  + * $Date: 2001/07/12 21:24:09 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.7 $ $Date: 2001/06/23 22:30:04 $
  + * @version $Revision: 1.8 $ $Date: 2001/07/12 21:24:09 $
*/
   
   public class WebappLoader
  @@ -267,13 +267,6 @@
   private String threadName = "WebappLoader";
   
   
  -/**
  - * Classpath (which can be used by any webapp which would need to compile
  - * classes, like a JSP engine.
  - */
  -protected StringBuffer classpath = new StringBuffer();
  -
  -
   // - Properties
   
   
  @@ -493,6 +486,7 @@
   
   if (debug >= 1)
log(sm.getString("webappLoader.addRepository", repository));
  +
   for (int i = 0; i < repositories.length; i++) {
   if (repository.equals(repositories[i]))
   return;
  @@ -503,6 +497,11 @@
results[repositories.length] = repository;
repositories = results;
   
  + if (started && (classLoader != null)) {
  + classLoader.addRepository(repository);
  + setClassPath();
  + }
  +
   }
   
   
  @@ -618,9 +617,13 @@
   classLoader.setDebug(this.debug);
   classLoader.setDelegate(this.delegate);
   
  +for (int i = 0; i < repositories.length; i++) {
  +classLoader.addRepository(repositories[i]);
  +}
  +
   // Configure our repositories
  -setClassPath();
   setRepositories();
  +setClassPath();
   
if (container instanceof Context) {
// Tell the class loader the root of the context
  @@ -832,9 +835,6 @@
   
   log(sm.getString("webappLoader.deploy", workDir.getAbsolutePath()));
   
  -// Reset repositories
  -repositories = new String[0];
  -
   DirContext resources = container.getResources();
   
   // Setting up the class repository (/WEB-INF/classes), if it exists
  @@ -861,18 +861,12 @@
   
   if (absoluteClassesPath != null) {
   
  -if (classpath.length() != 0)
  -classpath.append(File.pathSeparator);
  -classpath.append(absoluteClassesPath);
   classRepository = new File(absoluteClassesPath);
   
   } else {
   
  -if (classpath.length() != 0)
  -classpath.append(File.pathSeparator);
   classRepository = new File(workDir, classesPath);
   classRepository.mkdirs();
  -classpath.append(classRepository.getAbsolutePath());
   
   log(sm.getString("webappLoader.classDeploy", classesPath,
classRepository.getAbsolutePath()));
  @@ -884,9 +878,6 @@
   // Adding the repository to the class loader
   classLoader.addRepository(classesPath + "/", classRepository);
   
  -// Add to the local repository list
  -addRepository(classesPath + "/");
  -
   }
   
   // Setting up the JAR repository (/WEB-INF/lib), if it exists
  @@ -946,30 +937,20 @@
   continue;
   }
   
  -if (classpath.length() != 0)
  -classpath.append(File.pathSeparator);
  -classpath.append(destFile.getAbsolutePath());
  -
   JarFile jarFile = new JarFi

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2001-07-12 Thread remm

remm01/07/12 16:42:59

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  - Fix classpath generation problem on Unix.
  
  Revision  ChangesPath
  1.9   +4 -6  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- WebappLoader.java 2001/07/12 21:24:09 1.8
  +++ WebappLoader.java 2001/07/12 23:42:57 1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.8 2001/07/12 21:24:09 remm Exp $
  - * $Revision: 1.8 $
  - * $Date: 2001/07/12 21:24:09 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.9 2001/07/12 23:42:57 remm Exp $
  + * $Revision: 1.9 $
  + * $Date: 2001/07/12 23:42:57 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.8 $ $Date: 2001/07/12 21:24:09 $
  + * @version $Revision: 1.9 $ $Date: 2001/07/12 23:42:57 $
*/
   
   public class WebappLoader
  @@ -983,8 +983,6 @@
   String repository = repositories[i].toString();
   if (repository.startsWith("file://"))
   repository = repository.substring(7);
  -else if (repository.startsWith("file:/"))
  -repository = repository.substring(6);
   else if (repository.startsWith("file:"))
   repository = repository.substring(5);
   else if (repository.startsWith("jndi:"))
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2001-07-12 Thread remm

remm01/07/12 18:47:50

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  - Cleanup of the permission generation in the new WebappLoader.
  
  Revision  ChangesPath
  1.10  +85 -37
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- WebappLoader.java 2001/07/12 23:42:57 1.9
  +++ WebappLoader.java 2001/07/13 01:47:47 1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.9 2001/07/12 23:42:57 remm Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/07/12 23:42:57 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
 1.10 2001/07/13 01:47:47 remm Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/07/13 01:47:47 $
*
* 
*
  @@ -119,7 +119,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.9 $ $Date: 2001/07/12 23:42:57 $
  + * @version $Revision: 1.10 $ $Date: 2001/07/13 01:47:47 $
*/
   
   public class WebappLoader
  @@ -625,44 +625,15 @@
   setRepositories();
   setClassPath();
   
  - if (container instanceof Context) {
  - // Tell the class loader the root of the context
  - ServletContext servletContext = 
  -((Context) container).getServletContext();
  - try {
  - URL contextURL = servletContext.getResource("/");
  - if( contextURL != null ) {
  - ((WebappClassLoader)classLoader).setPermissions
  -(contextURL);
  -String jarUrl = "jar:" + contextURL.toString() 
  -+ "WEB-INF/lib/";
  -((WebappClassLoader)classLoader).setPermissions
  -(jarUrl);  
  -}
  -String contextRoot = servletContext.getRealPath("/");
  -if (contextRoot != null) {
  -((WebappClassLoader)classLoader).setPermissions
  -(contextRoot);
  -String rootUrl = "file:" + contextRoot;
  -((WebappClassLoader)classLoader).setPermissions
  -(rootUrl);
  - }
  -File workDir = 
  -(File) servletContext.getAttribute
  -(Globals.WORK_DIR_ATTR);
  -if (workDir != null) {
  -File libDir = new File(workDir, "WEB-INF/lib/");
  -((WebappClassLoader)classLoader).setPermissions
  -(libDir.getAbsolutePath());
  -}
  - } catch (MalformedURLException e) {
  - }
  - }
  +setPermissions();
  +
if (classLoader instanceof Lifecycle)
((Lifecycle) classLoader).start();
  +
   // Binding the Webapp class loader to the directory context
   DirContextURLStreamHandler.bind
   ((ClassLoader) classLoader, this.container.getResources());
  +
} catch (Throwable t) {
throw new LifecycleException("start: ", t);
}
  @@ -811,6 +782,83 @@
   new WebappContextNotifier((Context) container);
(new Thread(notifier)).start();
   
  +}
  +
  +
  +/**
  + * Configure associated class loader permissions.
  + */
  +private void setPermissions() {
  +
  +if (System.getSecurityManager() == null)
  +return;
  +if (!(container instanceof Context))
  +return;
  +
  +// Tell the class loader the root of the context
  +ServletContext servletContext = 
  +((Context) container).getServletContext();
  +
  +try {
  +
  +URL classesURL = 
  +servletContext.getResource("/WEB-INF/classes/");
  +if (classesURL != null)
  +classLoader.setPermissions(classesURL);
  +
  +URL libURL = servletContext.getResource("/WEB-INF/lib/");
  +if (libURL != null) {
  +classLoader.setPermissions(libURL);
  +}
  +
  +String contextRoot = servletContext.getRealPath("/");

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

2001-07-12 Thread remm

remm01/07/12 18:49:32

  Added:   jasper/src/share/org/apache/jasper/runtime JspException.java
  Log:
  - Add new runtime JspException, which extends JasperException, to allow
setting tougher security restrictions.
  - (Justy, if it's not ok to do that, let me know)
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspException.java
  
  Index: JspException.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspException.java,v
 1.1 2001/07/13 01:49:31 remm Exp $
   * $Revision: 1.1 $
   * $Date: 2001/07/13 01:49:31 $
   *
   * 
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:  
   *   "This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */ 
  
  package org.apache.jasper.runtime;
  
  /**
   * Base class for all exceptions generated by the JSP engine. Makes it
   * convienient to catch just this at the top-level. 
   *
   * @author Anil K. Vijendran
   */
  public class JspException extends org.apache.jasper.JasperException {
  
  public JspException(String reason) {
super(reason);
  }
  
  /**
   * Creates a JasperException with the embedded exception and the reason for
   * throwing a JasperException
   */
  public JspException (String reason, Throwable exception) {
super(reason, exception);
  }
  
  /**
   * Creates a JasperException with the embedded exception
   */
  public JspException (Throwable exception) {
super(exception);
  }
  }
  
  
  



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

2001-07-12 Thread remm

remm01/07/12 18:50:57

  Modified:jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java
  Log:
  - Generate code with JspException instead of JasperException, which fixes
an instantiation problem when running with a security manager.
  
  Revision  ChangesPath
  1.32  +4 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- JspParseEventListener.java2001/07/10 23:50:26 1.31
  +++ JspParseEventListener.java2001/07/13 01:50:55 1.32
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.31 2001/07/10 23:50:26 horwat Exp $
  - * $Revision: 1.31 $
  - * $Date: 2001/07/10 23:50:26 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.32 2001/07/13 01:50:55 remm Exp $
  + * $Revision: 1.32 $
  + * $Date: 2001/07/13 01:50:55 $
*
* 
*
  @@ -296,7 +296,7 @@
   writer.println("private static boolean _jspx_inited = false;");
   writer.println();
   
  -writer.println("public final void _jspx_init() throws 
org.apache.jasper.JasperException {");
  +writer.println("public final void _jspx_init() throws 
org.apache.jasper.runtime.JspException {");
   writer.pushIndent();
generateAll(InitMethodPhase.class);
   writer.popIndent();
  
  
  



cvs commit: jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes SnoopServlet.java

2001-07-12 Thread remm

remm01/07/12 22:06:02

  Modified:webapps/examples/WEB-INF/classes SnoopServlet.java
  Log:
  - If there are no cookies, getCookies will return null.
  
  Revision  ChangesPath
  1.2   +7 -4  
jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/SnoopServlet.java
  
  Index: SnoopServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/SnoopServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SnoopServlet.java 2000/08/17 00:57:53 1.1
  +++ SnoopServlet.java 2001/07/13 05:05:58 1.2
  @@ -1,4 +1,4 @@
  -/* $Id: SnoopServlet.java,v 1.1 2000/08/17 00:57:53 horwat Exp $
  +/* $Id: SnoopServlet.java,v 1.2 2001/07/13 05:05:58 remm Exp $
*
*/
   
  @@ -97,9 +97,12 @@
   out.println();  
   out.println("Cookies in this request:");
   Cookie[] cookies = request.getCookies();
  -for (int i = 0; i < cookies.length; i++) {
  -Cookie cookie = cookies[i];
  -out.println("   " + cookie.getName() + " = " + cookie.getValue());
  +if (cookies != null) {
  +for (int i = 0; i < cookies.length; i++) {
  +Cookie cookie = cookies[i];
  +out.println("   " + cookie.getName() + " = " 
  ++ cookie.getValue());
  +}
   }
   out.println();
   
  
  
  



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

2001-07-12 Thread remm

remm01/07/12 22:09:38

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpRequestLine.java
  Log:
  - Raise the maximum size of the buffers, which was a bit too restrictive.
  
  Revision  ChangesPath
  1.4   +7 -7  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestLine.java
  
  Index: HttpRequestLine.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestLine.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HttpRequestLine.java  2001/05/16 17:52:17 1.3
  +++ HttpRequestLine.java  2001/07/13 05:09:32 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestLine.java,v
 1.3 2001/05/16 17:52:17 remm Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/05/16 17:52:17 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestLine.java,v
 1.4 2001/07/13 05:09:32 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/07/13 05:09:32 $
*
* 
*
  @@ -75,7 +75,7 @@
* HTTP request line enum type.
*
* @author Remy Maucherat
  - * @version $Revision: 1.3 $ $Date: 2001/05/16 17:52:17 $
  + * @version $Revision: 1.4 $ $Date: 2001/07/13 05:09:32 $
*/
   
   final class HttpRequestLine {
  @@ -87,9 +87,9 @@
   public static final int INITIAL_METHOD_SIZE = 8;
   public static final int INITIAL_URI_SIZE = 64;
   public static final int INITIAL_PROTOCOL_SIZE = 8;
  -public static final int MAX_METHOD_SIZE = 128;
  -public static final int MAX_URI_SIZE = 4096;
  -public static final int MAX_PROTOCOL_SIZE = 32;
  +public static final int MAX_METHOD_SIZE = 1024;
  +public static final int MAX_URI_SIZE = 32768;
  +public static final int MAX_PROTOCOL_SIZE = 1024;
   
   
   // --- Constructors
  
  
  



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

2001-07-13 Thread remm

remm01/07/13 12:17:13

  Modified:jasper/src/share/org/apache/jasper/compiler
CharDataGenerator.java MappedCharDataGenerator.java
  Log:
  - With Jasper's ServletWriter, println(String) != print(String) followed by 
println(),
because it adds the indentation. I think println(String) shouldn't do the 
identation,
but we'll keep that fix for later :)
  
  Revision  ChangesPath
  1.3   +5 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/CharDataGenerator.java
  
  Index: CharDataGenerator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/CharDataGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CharDataGenerator.java2001/07/12 21:41:08 1.2
  +++ CharDataGenerator.java2001/07/13 19:17:07 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/CharDataGenerator.java,v
 1.2 2001/07/12 21:41:08 horwat Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/07/12 21:41:08 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/CharDataGenerator.java,v
 1.3 2001/07/13 19:17:07 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/07/13 19:17:07 $
*
* 
* 
  @@ -126,7 +126,8 @@
}
}
writer.print(sb.toString());
  - writer.println("\");");
  +writer.print("\");");
  +writer.println();
   }
   
   
  
  
  
  1.3   +5 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/MappedCharDataGenerator.java
  
  Index: MappedCharDataGenerator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/MappedCharDataGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MappedCharDataGenerator.java  2001/07/12 21:41:06 1.2
  +++ MappedCharDataGenerator.java  2001/07/13 19:17:08 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/MappedCharDataGenerator.java,v
 1.2 2001/07/12 21:41:06 horwat Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/07/12 21:41:06 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/MappedCharDataGenerator.java,v
 1.3 2001/07/13 19:17:08 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/07/13 19:17:08 $
*
* 
* 
  @@ -116,6 +116,7 @@
}
}
writer.print(sb.toString());
  - writer.println("\");");
  +writer.print("\");");
  +writer.println();
   }
   }
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/bin catalina.bat

2001-07-13 Thread remm

remm01/07/13 15:37:21

  Modified:catalina/src/bin catalina.bat
  Log:
  - Need quotes if CATALINA_HOME contains spaces.
  
  Revision  ChangesPath
  1.16  +2 -2  jakarta-tomcat-4.0/catalina/src/bin/catalina.bat
  
  Index: catalina.bat
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.bat,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- catalina.bat  2001/07/10 07:35:43 1.15
  +++ catalina.bat  2001/07/13 22:37:20 1.16
  @@ -12,7 +12,7 @@
   rem
   rem   JAVA_HOME Must point at your Java Development Kit installation.
   rem
  -rem $Id: catalina.bat,v 1.15 2001/07/10 07:35:43 remm Exp $
  +rem $Id: catalina.bat,v 1.16 2001/07/13 22:37:20 remm Exp $
   rem ---
   
   
  @@ -97,7 +97,7 @@
   goto cleanup
   
   :doStop
  -%_RUNJAVA% %CATALINA_OPTS% -Dcatalina.home=%CATALINA_HOME% 
org.apache.catalina.startup.Bootstrap %2 %3 %4 %5 %6 %7 %8 %9 stop
  +%_RUNJAVA% %CATALINA_OPTS% -Dcatalina.home="%CATALINA_HOME%" 
org.apache.catalina.startup.Bootstrap %2 %3 %4 %5 %6 %7 %8 %9 stop
   goto cleanup
   
   
  
  
  



cvs commit: jakarta-tomcat-4.0 tomcat.nsi tomcat.ico build.xml

2001-07-13 Thread remm

remm01/07/13 16:15:28

  Modified:.build.xml
  Added:   .tomcat.nsi tomcat.ico
  Log:
  - Add an experimental installer based on Nullsoft Installer. I just
started toying with it a couple hours ago, but it's so easy to use I was able
to generate an install script for Tomcat in no time.
  - It's Windows-only, sorry. I like native installers a lot better. The main advantage
of using Nullsoft's is that :
- It's free (open source)
- It's easy to use
- It's small and fast
  - The installer will only be able to set CATALINA_HOME under Win2k or WinXP.
Under older versions of Windows, you may have to set it manually. You need
to log off and back on before you can use Tomcat 4.0.
  - The uninstaller won't remove the CATALINA_HOME env variable it creates
(attempting to do it wiped out all my user env variables on my setup, so
I removed it until I figure out how to do it right).
  - I'll upload (if I have enough karma) a generated installer to the
Tomcat 4 nightly directory, so that people can easily try it (and complain :))
  - Comments are welcome :)
  - Download Nullsoft Installer (only needed to generate the installer) at
http://www.winamp.com/nsdn/superpimp
  - Thanks to Henri for suggesting we should have a look at it.
  
  Revision  ChangesPath
  1.24  +13 -0 jakarta-tomcat-4.0/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/build.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- build.xml 2001/05/22 01:59:04 1.23
  +++ build.xml 2001/07/13 23:15:28 1.24
  @@ -162,6 +162,19 @@
 
   
   
  +  
  +  
  +
  +
  +
  +
  +
  +
  +  
  +
  +  
  +
  +
 
 
   
  
  
  
  1.1  jakarta-tomcat-4.0/tomcat.nsi
  
  Index: tomcat.nsi
  ===
  
  ; Tomcat 4 script for Nullsoft Installer
  
  !ifdef NO_COMPRESSION
  SetCompress off
  SetDatablockOptimize off
  !endif
  
  !ifdef NO_CRC
  CRCCheck off
  !endif
  
  Name "NSIS"
  Caption "Jakarta Tomcat 4.0"
  OutFile tomcat4.exe
  
  #BGGradient 00 80 FF
  #InstallColors FF8080 00
  
  LicenseText "You must read the following license before installing:"
  LicenseData LICENSE
  ComponentText "This will install the Jakarta Tomcat 4.0 servlet container on your 
computer:"
  InstType Normal
  InstType "Full (w/ Source Code)"
  AutoCloseWindow false
  ShowInstDetails show
  DirText "Please select a location to install Tomcat 4.0 (or use the default):"
  SetOverwrite on
  SetDateSave on
  !ifdef HAVE_UPX
!packhdr tmp.dat "upx\upx --best --compress-icons=1 tmp.dat"
  !endif
  
  InstallDir "$PROGRAMFILES\Jakarta Tomcat 4.0"
  InstallDirRegKey HKLM "SOFTWARE\Apache\Jakarta\Tomcat 4.0" ""
  
  Section "Tomcat 4.0 (required)"
SectionIn 1 2
SetOutPath $INSTDIR
File tomcat.ico
File LICENSE
File README.txt
File /r bin
File /r common
File /r conf
File /r jasper
File /r lib
File /r logs
File /r server
File /r webapps
File /r work
  SectionEnd
  
  Section "JSP Development Shell Extensions"
SectionIn 1 2
  
; back up old value of .nsi
ReadRegStr $1 HKCR ".jsp" ""
StrCmp $1 "" Label1
  StrCmp $1 "JSPFile" Label1
  WriteRegStr HKCR ".jsp" "backup_val" $1
  Label1:
  
WriteRegStr HKCR ".jsp" "" "JSPFile"
WriteRegStr HKCR "JSPFile" "" "Java Server Pages source"
WriteRegStr HKCR "JSPFile\shell" "" "open"
WriteRegStr HKCR "JSPFile\DefaultIcon" "" $INSTDIR\tomcat.ico
WriteRegStr HKCR "JSPFile\shell\open\command" "" 'notepad.exe "%1"'
WriteRegStr HKCR "JSPFile\shell\compile" "" "Compile JSP"
WriteRegStr HKCR "JSPFile\shell\compile\command" "" '"$INSTDIR\bin\jspc.bat" "%1"'
  SectionEnd
  
  Section "Tomcat 4.0 Start Menu Group"
SectionIn 1 2
SetOutPath "$SMPROGRAMS\Tomcat 4.0"
CreateShortCut "$SMPROGRAMS\Tomcat 4.0\Tomcat Home Page.lnk" \
   "http://jakarta.apache.org/tomcat";
CreateShortCut "$SMPROGRAMS\Tomcat 4.0\Uninstall Tomcat 4.0.lnk" \
   "$INSTDIR\uninst-tomcat4.exe"
CreateShortCut "$SMPROGRAMS\Tomcat 4.0\Tomcat 4.0 Documentation.lnk" \
   "http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html";
CreateShortCut

  1   2   3   4   5   6   7   8   9   10   >