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

2005-09-27 Thread jfarcand
jfarcand2005/09/27 16:42:53

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Port fix from SJSAS.
  
  Patch submitted by: Jan Luehe
  
  Revision  ChangesPath
  1.51  +16 -3 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- WebappClassLoader.java8 Sep 2005 15:00:54 -   1.50
  +++ WebappClassLoader.java27 Sep 2005 23:42:53 -  1.51
  @@ -1470,6 +1470,21 @@
*/
   public void stop() throws LifecycleException {
   
  +/*
  + * Clear the IntrospectionUtils cache.
  + *
  + * Implementation note:
  + * Any reference to IntrospectionUtils which may cause the static
  + * initalizer of that class to be invoked must occur prior to setting
  + * the started flag to FALSE, because the static initializer of
  + * IntrospectionUtils makes a call to
  + * org.apache.commons.logging.LogFactory.getLog(), which ultimately
  + * calls the loadClass() method of the thread context classloader,
  + * which is the same as this classloader, whose impl throws a
  + * ThreadDeath if the started flag has been set to FALSE.
  + */
  +IntrospectionUtils.clear();
  +
   started = false;
   
   int length = files.length;
  @@ -1515,8 +1530,6 @@
   org.apache.commons.logging.LogFactory.release(this);
   // Clear the classloader reference in the VM's bean introspector
   java.beans.Introspector.flushCaches();
  -// Clear the IntrospectionUtils cache
  -IntrospectionUtils.clear();
   
   }
   
  
  
  

-
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 OutputBuffer.java

2005-06-22 Thread jfarcand
jfarcand2005/06/22 09:24:39

  Modified:catalina/src/share/org/apache/catalina/connector
OutputBuffer.java
  Log:
  Fix typo. When the security manager is used, we always needs to execute under 
a doPrivileged block.
  
  Revision  ChangesPath
  1.7   +1 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/OutputBuffer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- OutputBuffer.java 19 May 2005 14:14:41 -  1.6
  +++ OutputBuffer.java 22 Jun 2005 16:24:39 -  1.7
  @@ -559,7 +559,7 @@
   conv = (C2BConverter) encoders.get(enc);
   if (conv == null) {
   
  -if (SecurityUtil.isPackageProtectionEnabled()){
  +if (System.getSecurityManager() != null){
   try{
   conv = (C2BConverter)AccessController.doPrivileged(
   new PrivilegedExceptionAction(){
  
  
  

-
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 OutputBuffer.java

2005-05-19 Thread jfarcand
jfarcand2005/05/19 07:14:41

  Modified:catalina/src/share/org/apache/catalina/connector
OutputBuffer.java
  Log:
  Invoking APIs such as response.sendError or response.resetBuffer, results in 
a call to OutputBuffer.reset in the corresponding method in 
org.apache.coyote.tomcat5.CoyoteResponse.java.
  
  org.apache.coyote.tomcat5.OutputBuffer.reset clears all the data in the 
buffer but does not reset its 'state' member variable to INITIAL_STATE.
  
  This leads to an inconsistency in the value of the state variable when 
response.finishResponse() is invoked.
  
  Revision  ChangesPath
  1.6   +1 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/OutputBuffer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- OutputBuffer.java 27 Feb 2005 18:18:35 -  1.5
  +++ OutputBuffer.java 19 May 2005 14:14:41 -  1.6
  @@ -639,7 +639,7 @@
   charsWritten = 0;
   gotEnc = false;
   enc = null;
  -
  +state = INITIAL_STATE;
   }
   
   
  
  
  

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



Hier sind wir Lehrer die einzigen Auslaender

2005-05-15 Thread jfarcand
Lese selbst:
http://www.deutschlandchronik.de/multikulti_perfekt.htm

http://www.leverkusener-aufbruch.com/content/pt5.html

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



cvs commit: jakarta-servletapi-5/jsr152/examples/snp snoop.jsp

2005-01-18 Thread jfarcand
jfarcand2005/01/18 07:30:42

  Modified:jsr152/examples/jsp2/el functions.jsp implicit-objects.jsp
   jsr152/examples/jsp2/jspx textRotate.jspx
   jsr152/examples/snp snoop.jsp
  Log:
  FIx for bug: SERVLETAPI: XSS Issues
  
  Patch submitted by Mark Thomas at apache dot org
  
  Revision  ChangesPath
  1.5   +6 -5  
jakarta-servletapi-5/jsr152/examples/jsp2/el/functions.jsp
  
  Index: functions.jsp
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/functions.jsp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- functions.jsp 18 Mar 2004 16:40:30 -  1.4
  +++ functions.jsp 18 Jan 2005 15:30:42 -  1.5
  @@ -13,6 +13,7 @@
 See the License for the specific language governing permissions and
 limitations under the License.
   --
  +%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %
   %@ taglib prefix=my 
uri=http://jakarta.apache.org/tomcat/jsp2-example-taglib%
   
   html
  @@ -30,7 +31,7 @@
   blockquote
 ubChange Parameter/b/u
 form action=functions.jsp method=GET
  -   foo = input type=text name=foo value=${param['foo']}
  +   foo = input type=text name=foo 
value=${fn:escapeXml(param[foo])}
 input type=submit
 /form
 br
  @@ -42,19 +43,19 @@
  /thead
  tr
td\${param[foo]}/td
  - td${param[foo]}nbsp;/td
  + td${fn:escapeXml(param[foo])}nbsp;/td
  /tr
  tr
td\${my:reverse(param[foo])}/td
  - td${my:reverse(param[foo])}nbsp;/td
  + td${my:reverse(fn:escapeXml(param[foo]))}nbsp;/td
  /tr
  tr
td\${my:reverse(my:reverse(param[foo]))}/td
  - td${my:reverse(my:reverse(param[foo]))}nbsp;/td
  + td${my:reverse(my:reverse(fn:escapeXml(param[foo])))}nbsp;/td
  /tr
  tr
td\${my:countVowels(param[foo])}/td
  - td${my:countVowels(param[foo])}nbsp;/td
  + td${my:countVowels(fn:escapeXml(param[foo]))}nbsp;/td
  /tr
/table
 /code
  
  
  
  1.4   +5 -3  
jakarta-servletapi-5/jsr152/examples/jsp2/el/implicit-objects.jsp
  
  Index: implicit-objects.jsp
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/implicit-objects.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- implicit-objects.jsp  18 Mar 2004 16:40:30 -  1.3
  +++ implicit-objects.jsp  18 Jan 2005 15:30:42 -  1.4
  @@ -13,6 +13,8 @@
 See the License for the specific language governing permissions and
 limitations under the License.
   --
  +%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %
  +
   html
 head
   titleJSP 2.0 Expression Language - Implicit Objects/title
  @@ -49,7 +51,7 @@
   blockquote
 ubChange Parameter/b/u
 form action=implicit-objects.jsp method=GET
  -   foo = input type=text name=foo value=${param[foo]}
  +   foo = input type=text name=foo 
value=${fn:escapeXml(param[foo])}
 input type=submit
 /form
 br
  @@ -61,11 +63,11 @@
  /thead
  tr
td\${param.foo}/td
  - td${param.foo}nbsp;/td
  + td${fn:escapeXml(param[foo])}nbsp;/td
  /tr
  tr
td\${param[foo]}/td
  - td${param[foo]}nbsp;/td
  + td${fn:escapeXml(param[foo])}nbsp;/td
  /tr
  tr
td\${header[host]}/td
  
  
  
  1.4   +2 -1  
jakarta-servletapi-5/jsr152/examples/jsp2/jspx/textRotate.jspx
  
  Index: textRotate.jspx
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/jspx/textRotate.jspx,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- textRotate.jspx   21 Nov 2003 22:06:02 -  1.3
  +++ textRotate.jspx   18 Jan 2005 15:30:42 -  1.4
  @@ -6,11 +6,12 @@
   svg xmlns=http://www.w3.org/2000/svg;
width=450 height=500 viewBox=0 0 450 500
xmlns:c=http://java.sun.com/jsp/jstl/core;
  + xmlns:fn=http://java.sun.com/jsp/jstl/functions;
xmlns:jsp=http://java.sun.com/JSP/Page;
 jsp:directive.page contentType=image/svg+xml /
 titleJSP 2.0 JSPX/title
 !-- select name parameter, or default to JSPX --
  -  c:set var=name value='${empty param[name] ? JSPX : param[name]}'/
  +  c:set var=name value='${empty fn:escapeXml(param[name]) ? JSPX : 
fn:escapeXml(param[name])}'/
 g id=testContent
   text class=title x=50% y=10% font-size=15 text-anchor=middle 
   JSP 2.0 XML Syntax (.jspx) Demo/text
  
  
  
  1.3   +2 -2  jakarta-servletapi-5/jsr152/examples/snp/snoop.jsp
  
  Index: snoop.jsp

cvs commit: jakarta-servletapi-5/jsr152/examples/snp snoop.jsp

2005-01-18 Thread jfarcand
jfarcand2005/01/18 07:39:24

  Modified:jsr152/examples/jsp2/el Tag: TOMCAT_5_0 functions.jsp
implicit-objects.jsp
   jsr152/examples/jsp2/jspx Tag: TOMCAT_5_0 textRotate.jspx
   jsr152/examples/snp Tag: TOMCAT_5_0 snoop.jsp
  Log:
  Port patch.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.4.2.1   +6 -5  
jakarta-servletapi-5/jsr152/examples/jsp2/el/functions.jsp
  
  Index: functions.jsp
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/functions.jsp,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- functions.jsp 18 Mar 2004 16:40:30 -  1.4
  +++ functions.jsp 18 Jan 2005 15:39:24 -  1.4.2.1
  @@ -13,6 +13,7 @@
 See the License for the specific language governing permissions and
 limitations under the License.
   --
  +%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %
   %@ taglib prefix=my 
uri=http://jakarta.apache.org/tomcat/jsp2-example-taglib%
   
   html
  @@ -30,7 +31,7 @@
   blockquote
 ubChange Parameter/b/u
 form action=functions.jsp method=GET
  -   foo = input type=text name=foo value=${param['foo']}
  +   foo = input type=text name=foo 
value=${fn:escapeXml(param[foo])}
 input type=submit
 /form
 br
  @@ -42,19 +43,19 @@
  /thead
  tr
td\${param[foo]}/td
  - td${param[foo]}nbsp;/td
  + td${fn:escapeXml(param[foo])}nbsp;/td
  /tr
  tr
td\${my:reverse(param[foo])}/td
  - td${my:reverse(param[foo])}nbsp;/td
  + td${my:reverse(fn:escapeXml(param[foo]))}nbsp;/td
  /tr
  tr
td\${my:reverse(my:reverse(param[foo]))}/td
  - td${my:reverse(my:reverse(param[foo]))}nbsp;/td
  + td${my:reverse(my:reverse(fn:escapeXml(param[foo])))}nbsp;/td
  /tr
  tr
td\${my:countVowels(param[foo])}/td
  - td${my:countVowels(param[foo])}nbsp;/td
  + td${my:countVowels(fn:escapeXml(param[foo]))}nbsp;/td
  /tr
/table
 /code
  
  
  
  1.3.2.1   +5 -3  
jakarta-servletapi-5/jsr152/examples/jsp2/el/implicit-objects.jsp
  
  Index: implicit-objects.jsp
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/el/implicit-objects.jsp,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- implicit-objects.jsp  18 Mar 2004 16:40:30 -  1.3
  +++ implicit-objects.jsp  18 Jan 2005 15:39:24 -  1.3.2.1
  @@ -13,6 +13,8 @@
 See the License for the specific language governing permissions and
 limitations under the License.
   --
  +%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; %
  +
   html
 head
   titleJSP 2.0 Expression Language - Implicit Objects/title
  @@ -49,7 +51,7 @@
   blockquote
 ubChange Parameter/b/u
 form action=implicit-objects.jsp method=GET
  -   foo = input type=text name=foo value=${param[foo]}
  +   foo = input type=text name=foo 
value=${fn:escapeXml(param[foo])}
 input type=submit
 /form
 br
  @@ -61,11 +63,11 @@
  /thead
  tr
td\${param.foo}/td
  - td${param.foo}nbsp;/td
  + td${fn:escapeXml(param[foo])}nbsp;/td
  /tr
  tr
td\${param[foo]}/td
  - td${param[foo]}nbsp;/td
  + td${fn:escapeXml(param[foo])}nbsp;/td
  /tr
  tr
td\${header[host]}/td
  
  
  
  No   revision
  No   revision
  1.3.2.1   +2 -1  
jakarta-servletapi-5/jsr152/examples/jsp2/jspx/textRotate.jspx
  
  Index: textRotate.jspx
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/jspx/textRotate.jspx,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- textRotate.jspx   21 Nov 2003 22:06:02 -  1.3
  +++ textRotate.jspx   18 Jan 2005 15:39:24 -  1.3.2.1
  @@ -6,11 +6,12 @@
   svg xmlns=http://www.w3.org/2000/svg;
width=450 height=500 viewBox=0 0 450 500
xmlns:c=http://java.sun.com/jsp/jstl/core;
  + xmlns:fn=http://java.sun.com/jsp/jstl/functions;
xmlns:jsp=http://java.sun.com/JSP/Page;
 jsp:directive.page contentType=image/svg+xml /
 titleJSP 2.0 JSPX/title
 !-- select name parameter, or default to JSPX --
  -  c:set var=name value='${empty param[name] ? JSPX : param[name]}'/
  +  c:set var=name value='${empty fn:escapeXml(param[name]) ? JSPX : 
fn:escapeXml(param[name])}'/
 g id=testContent
   text class=title x=50% y=10% font-size=15 text-anchor=middle

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

2005-01-18 Thread jfarcand
jfarcand2005/01/18 07:45:58

  Modified:webapps/docs changelog.xml
  Log:
  Add fix.
  
  Revision  ChangesPath
  1.223 +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.222
  retrieving revision 1.223
  diff -u -r1.222 -r1.223
  --- changelog.xml 15 Jan 2005 20:31:21 -  1.222
  +++ changelog.xml 18 Jan 2005 15:45:57 -  1.223
  @@ -40,6 +40,9 @@
   bug32081/bug: Remove the JDK requirement from the Unix scripts, 
submitted
   by Ben Souther (remm)
 /update
  +  fix
  +bug32953/bug: SERVLETAPI: XSS Issues, submitted by Mark Thomas 
(jfarcand)
  +  /fix
   /changelog
 /subsection
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/webapps/admin/images Context.gif Host.gif

2005-01-11 Thread jfarcand
jfarcand2005/01/11 11:41:57

  Modified:webapps/admin/images Context.gif Host.gif
  Log:
  As pointed by Remy, remove Sun Copyright on those two files.
  
  Revision  ChangesPath
  1.2   +2 -5  jakarta-tomcat-catalina/webapps/admin/images/Context.gif
  
Binary file
  
  
  1.2   +1 -4  jakarta-tomcat-catalina/webapps/admin/images/Host.gif
  
Binary file
  
  

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



cvs commit: jakarta-tomcat-catalina/webapps/admin/images Context.gif Host.gif

2005-01-11 Thread jfarcand
jfarcand2005/01/11 11:44:38

  Modified:webapps/admin/images Tag: TOMCAT_5_0 Context.gif Host.gif
  Log:
  As pointed by Remy, remove Sun Copyright on those two files.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.1.1.1.2.1 +2 -5  
jakarta-tomcat-catalina/webapps/admin/images/Context.gif
  
Binary file
  
  
  1.1.1.1.2.1 +1 -4  jakarta-tomcat-catalina/webapps/admin/images/Host.gif
  
Binary file
  
  

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



cvs commit: jakarta-tomcat-4.0/webapps/admin/images Context.gif Host.gif

2005-01-11 Thread jfarcand
jfarcand2005/01/11 11:46:02

  Modified:webapps/admin/images Context.gif Host.gif
  Log:
  As pointed by Remy, remove Sun Copyright on those two files.
  
  Revision  ChangesPath
  1.2   +2 -5  jakarta-tomcat-4.0/webapps/admin/images/Context.gif
  
Binary file
  
  
  1.2   +1 -4  jakarta-tomcat-4.0/webapps/admin/images/Host.gif
  
Binary file
  
  

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



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

2004-11-24 Thread jfarcand
jfarcand2004/11/24 07:38:46

  Modified:webapps/docs Tag: TOMCAT_5_0 changelog.xml
  Log:
  Fix typo.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.70.2.82 +1 -1  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.70.2.81
  retrieving revision 1.70.2.82
  diff -u -r1.70.2.81 -r1.70.2.82
  --- changelog.xml 22 Nov 2004 15:02:55 -  1.70.2.81
  +++ changelog.xml 24 Nov 2004 15:38:46 -  1.70.2.82
  @@ -30,7 +30,7 @@
   bug22679/bug: Added misc note on accessing session ID to 
SSL-HowTo. (yoavs) 
 /update 
 update 
  -   When the package protection is not used, do not create the 
doPrivileged objects so we don't suffer the performance hit.
  +   When the package protection is not used, do not create the 
doPrivileged objects so we don't suffer the performance hit (jfarcand)
 /update 
 update
   bug32282/bug: Modify Windows Uninstaller to remove webapps and 
webapps/ROOT only if user asks to remove everything. (yoavs)
  
  
  

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



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

2004-11-22 Thread jfarcand
jfarcand2004/11/22 07:16:24

  Modified:catalina/src/share/org/apache/catalina/valves
ByteBufferAccessLogValve.java
  Log:
  Remove wrong copyright.
  
  Revision  ChangesPath
  1.3   +0 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ByteBufferAccessLogValve.java
  
  Index: ByteBufferAccessLogValve.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ByteBufferAccessLogValve.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ByteBufferAccessLogValve.java 19 Nov 2004 20:06:07 -  1.2
  +++ ByteBufferAccessLogValve.java 22 Nov 2004 15:16:24 -  1.3
  @@ -1,9 +1,4 @@
   /*
  - * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  - * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  - */
  -
  -/*
* Copyright 1999-2001,2004 The Apache Software Foundation.
* 
* Licensed under the Apache License, Version 2.0 (the License);
  
  
  

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



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

2004-11-22 Thread jfarcand
jfarcand2004/11/22 08:31:04

  Modified:catalina/src/share/org/apache/catalina/valves
ByteBufferAccessLogValve.java
  Log:
  Re-add the writer thread since the valve doesn't work properly without it. 
This is temporary.
  
  Revision  ChangesPath
  1.4   +105 -3
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ByteBufferAccessLogValve.java
  
  Index: ByteBufferAccessLogValve.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ByteBufferAccessLogValve.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ByteBufferAccessLogValve.java 22 Nov 2004 15:16:24 -  1.3
  +++ ByteBufferAccessLogValve.java 22 Nov 2004 16:31:04 -  1.4
  @@ -62,7 +62,7 @@
   
   public final class ByteBufferAccessLogValve
   extends ValveBase
  -implements Lifecycle {
  +implements Lifecycle, Runnable {
   
   
   // --- 
Constructors
  @@ -111,7 +111,7 @@
* The descriptive information about this implementation.
*/
   protected static final String info =
  -org.apache.catalina.valves.ByteBufferAccessLogValve/1.0;
  +org.apache.catalina.valves.AccessLogValve/1.0;
   
   
   /**
  @@ -277,6 +277,12 @@
   
   
   /**
  + * The background writerThread.
  + */
  +private Thread writerThread = null;   
  +
  +
  +/**
* The background writerThread completion semaphore.
*/
   private boolean threadDone = false;
  @@ -314,6 +320,12 @@
   
   
   /**
  + * The interval (in seconds) between writting the log.
  + */
  +private int writeInterval = 5 * 60;
  +
  +
  +/**
* Per-Thread codeStringBuffer/code used to store the log.
*/
   static private ThreadLocal stringBufferThreadLocal = new ThreadLocal(){
  @@ -355,6 +367,21 @@
   }
   
   
  +/**
  + * Return writerThread interval (seconds)
  + */
  +public int getWriterInterval() {
  +return this.writeInterval; 
  +}
  +
  +
  +/**
  + * Set writerthread interval (seconds)
  + */
  +public void setWriterInterval(int t) {
  +this.writeInterval = t;
  +}
  +
   // - 
Properties
   
   
  @@ -953,6 +980,8 @@
   dateStamp = dateFormatter.format(new Date());
   
   open();
  +
  +threadStart();
   
   }
   
  @@ -975,6 +1004,9 @@
   started = false;
   
   close();
  +
  +threadStop();
  +
   }
   
   
  @@ -984,6 +1016,76 @@
* throwables will be caught and logged.
*/
   public void backgroundProcess() {
  -log();
  +// log();
  +}
  +
  +
  +/**
  + * The background writerThread that checks for write the log.
  + */
  +public void run() {
  +
  +// Loop until the termination semaphore is set
  +while (!threadDone) {
  +threadWait();
  +log();
  +}
   }
  +
  +
  +/**
  + * Sleep for the duration specified by the codewriteInterval/code
  + * property.
  + */
  +private void threadWait() {
  +
  +synchronized(lock){
  +try {
  +lock.wait(writeInterval * 1000L);
  +} catch (InterruptedException e) {
  +;
  +}
  +}
  +
  +}
  +
  +
  +   /**
  + * Start the background writerThread that will periodically write access 
log
  + */
  +private void threadStart() {
  +
  +if (writerThread != null)
  +return;
  +
  +threadDone = false;
  +String threadName = AccessLogWriter;
  +writerThread = new Thread(this, threadName);
  +writerThread.setDaemon(true);
  +writerThread.start();
  +
  +}
  +
  +
  +/**
  + * Stop the background writerThread that is periodically write logs
  + */
  +private void threadStop() {
  +
  +if (writerThread == null)
  +return;
  +
  +threadDone = true;
  +writerThread.interrupt();
  +try {
  +writerThread.join();
  +} catch (InterruptedException e) {
  +;
  +}
  +
  +writerThread = null;
  +
  +}
  +
  +
   }
  
  
  

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



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

2004-11-22 Thread jfarcand
jfarcand2004/11/22 08:40:53

  Removed: catalina/src/share/org/apache/catalina/valves
ByteBufferAccessLogValve.java
  Log:
  Remove experimental works.

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session PersistentManagerBase.java StandardManager.java StandardSession.java

2004-11-22 Thread jfarcand
jfarcand2004/11/22 08:35:18

  Modified:catalina/src/share/org/apache/catalina/connector
CoyoteInputStream.java InputBuffer.java
OutputBuffer.java RequestFacade.java Response.java
ResponseFacade.java
   catalina/src/share/org/apache/catalina/core
ApplicationContextFacade.java
ApplicationDispatcher.java
ApplicationFilterChain.java StandardWrapper.java
   catalina/src/share/org/apache/catalina/security
SecurityUtil.java
   catalina/src/share/org/apache/catalina/session
PersistentManagerBase.java StandardManager.java
StandardSession.java
  Log:
  Port patch from Tomcat 5.0: When the package protection is not used, do not 
create the doPrivileged objects .
  
  Revision  ChangesPath
  1.2   +6 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/CoyoteInputStream.java
  
  Index: CoyoteInputStream.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/CoyoteInputStream.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CoyoteInputStream.java23 Jun 2004 08:24:57 -  1.1
  +++ CoyoteInputStream.java22 Nov 2004 16:35:17 -  1.2
  @@ -24,6 +24,7 @@
   
   import javax.servlet.ServletInputStream;
   
  +import org.apache.catalina.security.SecurityUtil;
   
   /**
* This class handles reading bytes.
  @@ -65,7 +66,7 @@
   
   public int read()
   throws IOException {
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   
   try{
   Integer result = 
  @@ -94,7 +95,7 @@
   
   public int available() throws IOException {
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   try{
   Integer result = 
   (Integer)AccessController.doPrivileged(
  @@ -122,7 +123,7 @@
   
   public int read(final byte[] b) throws IOException {
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   try{
   Integer result = 
   (Integer)AccessController.doPrivileged(
  @@ -153,7 +154,7 @@
   public int read(final byte[] b, final int off, final int len)
   throws IOException {
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   try{
   Integer result = 
   (Integer)AccessController.doPrivileged(
  @@ -193,7 +194,7 @@
*/
   public void close() throws IOException {
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   try{
   AccessController.doPrivileged(
   new PrivilegedExceptionAction(){
  
  
  
  1.4   +2 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/InputBuffer.java
  
  Index: InputBuffer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/InputBuffer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InputBuffer.java  29 Aug 2004 16:46:09 -  1.3
  +++ InputBuffer.java  22 Nov 2004 16:35:17 -  1.4
  @@ -23,6 +23,7 @@
   import java.security.PrivilegedExceptionAction;
   import java.util.HashMap;
   
  +import org.apache.catalina.security.SecurityUtil;
   import org.apache.coyote.Request;
   import org.apache.tomcat.util.buf.B2CConverter;
   import org.apache.tomcat.util.buf.ByteChunk;
  @@ -465,7 +466,7 @@
   enc = DEFAULT_ENCODING;
   conv = (B2CConverter) encoders.get(enc);
   if (conv == null) {
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   try{
   conv = (B2CConverter)AccessController.doPrivileged(
   new PrivilegedExceptionAction(){
  
  
  
  1.4   +2 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/OutputBuffer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OutputBuffer.java 25

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

2004-11-19 Thread jfarcand
jfarcand2004/11/19 08:46:27

  Modified:catalina/src/conf server.xml
   catalina/src/share/org/apache/catalina/valves
mbeans-descriptors.xml
  Added:   catalina/src/share/org/apache/catalina/valves
ByteBufferAccessLogValve.java
  Log:
  Add an asynchronous byte buffer based access log valve. The valve use a 
direct byte buffer to store and save the log. I didn't use the 
backgroundProcess since it's affect all components, but this should be 
revisited.
  
  Benchmarking this valve using jservlet (scalabilty) and trade2 (throughput) 
demonstrated a 13% improvement over the current access log valves. Increasing 
the writerInterval improve performance too.
  
  Note: I've tried to use a direct CharBuffer instead of a StringBuffer, and 
its slower that the current approach (and the log contains garbage, thank to a 
bug in NIO).
  
  Revision  ChangesPath
  1.43  +16 -0 jakarta-tomcat-catalina/catalina/src/conf/server.xml
  
  Index: server.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/server.xml,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- server.xml29 Oct 2004 18:49:24 -  1.42
  +++ server.xml19 Nov 2004 16:46:26 -  1.43
  @@ -351,6 +351,22 @@
directory=logs  prefix=localhost_access_log. 
suffix=.txt
pattern=common resolveHosts=false/
   --
  +!-- Access log processes all requests for this virtual host.  By
  + default, log files are created in the logs directory relative 
to
  + $CATALINA_HOME.  If you wish, you can specify a different
  + directory with the directory attribute.  Specify either a 
relative
  + (to $CATALINA_HOME) or absolute path to the desired directory.
  + This access log implementation is optimized for maximum 
performance,
  + but is hardcoded to support only the common and combined 
patterns.
  +
  + This valve use NIO direct Byte Buffer to asynchornously store 
the
  + log.
  +--
  +!--
  +Valve 
className=org.apache.catalina.valves.ByteBufferAccessLogValve
  + directory=logs  prefix=localhost_access_log. 
suffix=.txt
  + pattern=common resolveHosts=false/
  +--
   
 /Host
   
  
  
  
  1.8   +61 -0 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/mbeans-descriptors.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- mbeans-descriptors.xml25 Oct 2004 15:29:12 -  1.7
  +++ mbeans-descriptors.xml19 Nov 2004 16:46:26 -  1.8
  @@ -51,6 +51,67 @@
  type=java.lang.String/
 /mbean
   
  +  mbean name=ByteBufferAccessLogValve
  +   description=Valve that generates asynchronously web server 
access log
  +   domain=Catalina
  +   group=Valve
  +   type=org.apache.catalina.valves.ByteBufferAccessLogValve
  +  
  +  attribute name=className
  + description=Fully qualified class name of the managed 
object
  + type=java.lang.String
  + writeable=false/
  +  
  +  attribute name=containerName
  + description=Object name of the container
  + type=javax.management.ObjectName/
  +  
  +  attribute name=directory
  + description=The directory in which log files are created
  + type=java.lang.String/
  +  
  +  attribute   name=pattern
  + description=The pattern used to format our access log 
lines, which must be either common or combined
  + type=java.lang.String/
  +  
  +  attribute name=prefix
  + description=The prefix that is added to log file filenames
  + type=java.lang.String/
  +  
  +  attribute name=resolveHosts
  + description=Resolve hosts
  + is=true
  + type=boolean/
  +  
  +  attribute name=rotatable
  + description=Flag to indicate automatic log rotation.
  + is=true
  + type=boolean/
  +  
  +  attribute name=suffix
  + description=The suffix that is added to log file filenames
  + type=java.lang.String/
  +  
  +  attribute name=condition
  + description=The value to look for conditional logging.
  + type=java.lang.String/
  +  
  +  attribute name=fileDateFormat

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

2004-11-19 Thread jfarcand
jfarcand2004/11/19 08:58:11

  Modified:webapps/docs changelog.xml
  Log:
  Add new valve.
  
  Revision  ChangesPath
  1.176 +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.175
  retrieving revision 1.176
  diff -u -r1.175 -r1.176
  --- changelog.xml 19 Nov 2004 15:38:36 -  1.175
  +++ changelog.xml 19 Nov 2004 16:58:11 -  1.176
  @@ -39,6 +39,9 @@
   bug22679/bug: Added misc note on accessing session ID to 
SSL-HowTo. (yoavs)
 /update
 update
  +Add an asynchrounous access log valve based on NIO (jfarcand) 
  +  /update
  +  update
   bug32249/bug: Updated logging documentation. (yoavs)
 /update
   /changelog
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session PersistentManagerBase.java StandardManager.java StandardSession.java

2004-11-18 Thread jfarcand
jfarcand2004/11/18 14:13:36

  Modified:catalina/src/share/org/apache/catalina/core Tag: TOMCAT_5_0
ApplicationContextFacade.java
ApplicationDispatcher.java
ApplicationFilterChain.java StandardWrapper.java
   catalina/src/share/org/apache/catalina/security Tag:
TOMCAT_5_0 SecurityUtil.java
   catalina/src/share/org/apache/catalina/session Tag:
TOMCAT_5_0 PersistentManagerBase.java
StandardManager.java StandardSession.java
  Log:
  When the package protection is not used, do not create the doPrivileged 
objects so we don't suffer the performance hit (15% faster with trade2 and this 
change). Also fixed a memory leak when security manager is turned on.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.10.2.3  +32 -25
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java
  
  Index: ApplicationContextFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java,v
  retrieving revision 1.10.2.2
  retrieving revision 1.10.2.3
  diff -u -r1.10.2.2 -r1.10.2.3
  --- ApplicationContextFacade.java 1 Oct 2004 01:10:17 -   1.10.2.2
  +++ ApplicationContextFacade.java 18 Nov 2004 22:13:36 -  1.10.2.3
  @@ -35,6 +35,8 @@
   import javax.servlet.ServletContext;
   import javax.servlet.ServletException;
   
  +import org.apache.catalina.security.SecurityUtil;
  +
   
   /**
* Facade object which masks the internal codeApplicationContext/code
  @@ -118,7 +120,7 @@
   
   public ServletContext getContext(String uripath) {
   ServletContext theContext = null;
  -if (System.getSecurityManager() != null) {
  +if (SecurityUtil.isPackageProtectionEnabled()) {
   theContext = (ServletContext)
   doPrivileged(getContext, new Object[]{uripath});
   } else {
  @@ -143,7 +145,7 @@
   
   
   public String getMimeType(String file) {
  -if (System.getSecurityManager() != null) {
  +if (SecurityUtil.isPackageProtectionEnabled()) {
   return (String)doPrivileged(getMimeType, new Object[]{file});
   } else {
   return context.getMimeType(file);
  @@ -152,7 +154,7 @@
   
   
   public Set getResourcePaths(String path) {
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   return (Set)doPrivileged(getResourcePaths, new Object[]{path});
   } else {
   return context.getResourcePaths(path);
  @@ -179,7 +181,7 @@
   
   
   public InputStream getResourceAsStream(String path) {
  -if (System.getSecurityManager() != null) {
  +if (SecurityUtil.isPackageProtectionEnabled()) {
   return (InputStream) doPrivileged(getResourceAsStream, 
 new Object[]{path});
   } else {
  @@ -189,7 +191,7 @@
   
   
   public RequestDispatcher getRequestDispatcher(final String path) {
  -if (System.getSecurityManager() != null) {
  +if (SecurityUtil.isPackageProtectionEnabled()) {
   return (RequestDispatcher) doPrivileged(getRequestDispatcher, 
   new Object[]{path});
   } else {
  @@ -199,7 +201,7 @@
   
   
   public RequestDispatcher getNamedDispatcher(String name) {
  -if (System.getSecurityManager() != null) {
  +if (SecurityUtil.isPackageProtectionEnabled()) {
   return (RequestDispatcher) doPrivileged(getNamedDispatcher, 
   new Object[]{name});
   } else {
  @@ -210,7 +212,7 @@
   
   public Servlet getServlet(String name)
   throws ServletException {
  -if (System.getSecurityManager() != null) {
  +if (SecurityUtil.isPackageProtectionEnabled()) {
   try {
   return (Servlet) invokeMethod(context, getServlet, 
 new Object[]{name});
  @@ -227,7 +229,7 @@
   
   
   public Enumeration getServlets() {
  -if (System.getSecurityManager() != null) {
  +if (SecurityUtil.isPackageProtectionEnabled()) {
   return (Enumeration) doPrivileged(getServlets, null);
   } else {
   return context.getServlets();
  @@ -236,7 +238,7 @@
   
   
   public Enumeration getServletNames() {
  -if (System.getSecurityManager() != null) {
  +if (SecurityUtil.isPackageProtectionEnabled()) {
   return (Enumeration) doPrivileged(getServletNames, null);
   } else {
   return

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteInputStream.java CoyoteRequestFacade.java CoyoteResponse.java CoyoteResponseFacade.java InputBuffer.java OutputBuffer.java

2004-11-18 Thread jfarcand
jfarcand2004/11/18 14:14:25

  Modified:catalina/src/share/org/apache/coyote/tomcat5 Tag: TOMCAT_5_0
CoyoteInputStream.java CoyoteRequestFacade.java
CoyoteResponse.java CoyoteResponseFacade.java
InputBuffer.java OutputBuffer.java
  Log:
  When the package protection is not used, do not create the doPrivileged 
objects so we don't suffer the performance hit (15% faster with trade2 and this 
change). Also fixed a memory leak when security manager is turned on.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.5.2.1   +6 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/Attic/CoyoteInputStream.java
  
  Index: CoyoteInputStream.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/Attic/CoyoteInputStream.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- CoyoteInputStream.java14 Apr 2004 00:14:22 -  1.5
  +++ CoyoteInputStream.java18 Nov 2004 22:14:24 -  1.5.2.1
  @@ -24,6 +24,7 @@
   
   import javax.servlet.ServletInputStream;
   
  +import org.apache.catalina.security.SecurityUtil;
   
   /**
* This class handles reading bytes.
  @@ -65,7 +66,7 @@
   
   public int read()
   throws IOException {
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   
   try{
   Integer result = 
  @@ -94,7 +95,7 @@
   
   public int available() throws IOException {
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   try{
   Integer result = 
   (Integer)AccessController.doPrivileged(
  @@ -122,7 +123,7 @@
   
   public int read(final byte[] b) throws IOException {
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   try{
   Integer result = 
   (Integer)AccessController.doPrivileged(
  @@ -153,7 +154,7 @@
   public int read(final byte[] b, final int off, final int len)
   throws IOException {
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   try{
   Integer result = 
   (Integer)AccessController.doPrivileged(
  @@ -193,7 +194,7 @@
*/
   public void close() throws IOException {
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   try{
   AccessController.doPrivileged(
   new PrivilegedExceptionAction(){
  
  
  
  1.7.2.1   +16 -14
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/Attic/CoyoteRequestFacade.java
  
  Index: CoyoteRequestFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/Attic/CoyoteRequestFacade.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- CoyoteRequestFacade.java  2 Mar 2004 17:36:55 -   1.7
  +++ CoyoteRequestFacade.java  18 Nov 2004 22:14:24 -  1.7.2.1
  @@ -33,6 +33,8 @@
   
   import org.apache.catalina.connector.RequestFacade;
   
  +import org.apache.catalina.security.SecurityUtil;
  +
   /**
* Facade class that wraps a Coyote request object.  
* All methods are delegated to the wrapped request.
  @@ -216,7 +218,7 @@
   
   
   public Enumeration getAttributeNames() {
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   return (Enumeration)AccessController.doPrivileged(
   new GetAttributePrivilegedAction());
   } else {
  @@ -226,7 +228,7 @@
   
   
   public String getCharacterEncoding() {
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   return (String)AccessController.doPrivileged(
   new GetCharacterEncodingPrivilegedAction());
   } else {
  @@ -258,7 +260,7 @@
   
   
   public String getParameter(String name) {
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   return (String)AccessController.doPrivileged(
   new GetParameterPrivilegedAction(name));
   } else {
  @@ -268,7 +270,7 @@
   
   
   public Enumeration getParameterNames() {
  -if (System.getSecurityManager() != null

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

2004-11-18 Thread jfarcand
jfarcand2004/11/18 14:14:42

  Modified:jasper2/src/share/org/apache/jasper/runtime Tag: TOMCAT_5_0
JspWriterImpl.java PageContextImpl.java
ProtectedFunctionMapper.java
   jasper2/src/share/org/apache/jasper/servlet Tag: TOMCAT_5_0
JasperLoader.java
  Added:   jasper2/src/share/org/apache/jasper/security Tag: TOMCAT_5_0
SecurityUtil.java
  Log:
  When the package protection is not used, do not create the doPrivileged 
objects so we don't suffer the performance hit (15% faster with trade2 and this 
change). Also fixed a memory leak when security manager is turned on.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.12.2.2  +2 -1  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspWriterImpl.java
  
  Index: JspWriterImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspWriterImpl.java,v
  retrieving revision 1.12.2.1
  retrieving revision 1.12.2.2
  diff -u -r1.12.2.1 -r1.12.2.2
  --- JspWriterImpl.java5 Oct 2004 14:49:43 -   1.12.2.1
  +++ JspWriterImpl.java18 Nov 2004 22:14:41 -  1.12.2.2
  @@ -26,6 +26,7 @@
   
   import org.apache.jasper.Constants;
   import org.apache.jasper.compiler.Localizer;
  +import org.apache.jasper.security.SecurityUtil;
   
   /**
* Write text to a character-output stream, buffering characters so as
  @@ -125,7 +126,7 @@
   }

   private String getLocalizeMessage(final String message){
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
  return (String)AccessController.doPrivileged(new 
PrivilegedAction(){
   public Object run(){
   return Localizer.getMessage(message); 
  
  
  
  1.60.2.2  +14 -13
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.60.2.1
  retrieving revision 1.60.2.2
  diff -u -r1.60.2.1 -r1.60.2.2
  --- PageContextImpl.java  20 Sep 2004 18:07:22 -  1.60.2.1
  +++ PageContextImpl.java  18 Nov 2004 22:14:41 -  1.60.2.2
  @@ -49,6 +49,7 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.jasper.Constants;
   import org.apache.jasper.compiler.Localizer;
  +import org.apache.jasper.security.SecurityUtil;
   
   /**
* Implementation of the PageContext class from the JSP spec.
  @@ -216,7 +217,7 @@
   Localizer.getMessage(jsp.error.attribute.null_name));
   }
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   return AccessController.doPrivileged(new PrivilegedAction(){
   public Object run(){
   return doGetAttribute(name);
  @@ -239,7 +240,7 @@
   Localizer.getMessage(jsp.error.attribute.null_name));
   }
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   return AccessController.doPrivileged(new PrivilegedAction(){
   public Object run(){
   return doGetAttribute(name, scope);
  @@ -281,7 +282,7 @@
   Localizer.getMessage(jsp.error.attribute.null_name));
   }
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   AccessController.doPrivileged(new PrivilegedAction(){
   public Object run(){
   doSetAttribute(name, attribute);
  @@ -308,7 +309,7 @@
   Localizer.getMessage(jsp.error.attribute.null_name));
   }
   
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   AccessController.doPrivileged(new PrivilegedAction(){
   public Object run(){
   doSetAttribute(name, o, scope);
  @@ -358,7 +359,7 @@
   throw new NullPointerException(
   Localizer.getMessage(jsp.error.attribute.null_name));
   }
  -if (System.getSecurityManager() != null){
  +if (SecurityUtil.isPackageProtectionEnabled()){
   AccessController.doPrivileged(new PrivilegedAction(){
   public Object run(){
   doRemoveAttribute(name, scope);
  @@ -404,7 +405,7 @@
   Localizer.getMessage(jsp.error.attribute.null_name

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

2004-11-18 Thread jfarcand
jfarcand2004/11/18 14:22:03

  Modified:webapps/docs Tag: TOMCAT_5_0 changelog.xml
  Log:
  Add fix.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.70.2.75 +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.70.2.74
  retrieving revision 1.70.2.75
  diff -u -r1.70.2.74 -r1.70.2.75
  --- changelog.xml 18 Nov 2004 15:01:03 -  1.70.2.74
  +++ changelog.xml 18 Nov 2004 22:22:02 -  1.70.2.75
  @@ -29,6 +29,9 @@
 update 
   bug22679/bug: Added misc note on accessing session ID to 
SSL-HowTo. (yoavs) 
 /update 
  +  update 
  +   When the package protection is not used, do not create the 
doPrivileged objects so we don't suffer the performance hit.
  +  /update 
   /changelog
 /subsection
   
  
  
  

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



Tomcat-dev@jakarta.apache.org

2004-10-22 Thread jfarcand
Your message could not be delivered


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

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

2004-09-30 Thread jfarcand
jfarcand2004/09/30 08:26:21

  Modified:catalina/src/share/org/apache/catalina/core
ApplicationContextFacade.java
ApplicationFilterChain.java StandardWrapper.java
  Log:
  Avoid creating objects on every call since it clearly produces a memory leak when 
the SecurityManager is turned on. All Tcks passed except there is two jsp regressions:
  
  com/sun/ts/tests/jsp/spec/i18n/URLClient.java#i18nEncodingMismatchTest: Failed. Test 
case throws exception: [BaseUrlClient] null failed!  Check output for cause of failure.
  Test finished: 
com/sun/ts/tests/jsp/spec/configuration/encoding/URLClient.java#jspConfigurationDifferentEncodingTest:
 Failed. Test case throws exception: [BaseUrlClient] null failed!  Check output for 
cause of failure.
  
  The same exceptions occurs when the SecurityManager is turned off.
  
  Revision  ChangesPath
  1.11  +55 -28
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java
  
  Index: ApplicationContextFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ApplicationContextFacade.java 26 May 2004 15:36:14 -  1.10
  +++ ApplicationContextFacade.java 30 Sep 2004 15:26:20 -  1.11
  @@ -52,8 +52,13 @@
   /**
* Cache Class object used for reflection.
*/
  -private HashMap classCache;
  +private static HashMap classCache = new HashMap();
   
  +static {
  +if (System.getSecurityManager() != null) {
  +initClassCache();
  +}
  +}
   
   /**
* Cache method object.
  @@ -64,7 +69,13 @@
   private static org.apache.commons.logging.Log sysLog=
   org.apache.commons.logging.LogFactory.getLog( 
ApplicationContextFacade.class );
   
  -
  +
  +/**
  + * Object repository used when the SecurityManager is turned on and
  + * Filter.doFilter is invoked.
  + */
  +private Object[] objectArg = new Object[1];
  +private Object[] objectArgs = new Object[2];
   // --- Constructors
   
   
  @@ -78,13 +89,12 @@
   super();
   this.context = context;
   
  -classCache = new HashMap();
   objectCache = new HashMap();
  -initClassCache();
  +
   }
   
   
  -private void initClassCache(){
  +private static void initClassCache(){
   Class[] clazz = new Class[]{String.class};
   classCache.put(getContext, clazz);
   classCache.put(getMimeType, clazz);
  @@ -119,8 +129,8 @@
   public ServletContext getContext(String uripath) {
   ServletContext theContext = null;
   if (System.getSecurityManager() != null) {
  -theContext = (ServletContext)
  -doPrivileged(getContext, new Object[]{uripath});
  +objectArg[0] = uripath; 
  +theContext = (ServletContext)doPrivileged(getContext, objectArg);
   } else {
   theContext = context.getContext(uripath);
   }
  @@ -144,7 +154,8 @@
   
   public String getMimeType(String file) {
   if (System.getSecurityManager() != null) {
  -return (String)doPrivileged(getMimeType, new Object[]{file});
  +objectArg[0] = file;
  +return (String)doPrivileged(getMimeType, objectArg);
   } else {
   return context.getMimeType(file);
   }
  @@ -153,7 +164,8 @@
   
   public Set getResourcePaths(String path) {
   if (System.getSecurityManager() != null){
  -return (Set)doPrivileged(getResourcePaths, new Object[]{path});
  +objectArg[0] = path;
  +return (Set)doPrivileged(getResourcePaths, objectArg);
   } else {
   return context.getResourcePaths(path);
   }
  @@ -164,8 +176,9 @@
   throws MalformedURLException {
   if (System.getSecurityManager() != null) {
   try {
  +objectArg[0] = path;
   return (URL) invokeMethod(context, getResource, 
  -  new Object[]{path});
  +  objectArg);
   } catch(Throwable t) {
   if (t instanceof MalformedURLException){
   throw (MalformedURLException)t;
  @@ -180,8 +193,9 @@
   
   public InputStream getResourceAsStream(String path) {
   if (System.getSecurityManager() != null) {
  +objectArg[0] = path;
   return (InputStream) doPrivileged(getResourceAsStream, 
  -  new Object[]{path

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

2004-09-30 Thread jfarcand
jfarcand2004/09/30 08:28:13

  Modified:webapps/docs changelog.xml
  Log:
  Add memory leak info.
  
  Revision  ChangesPath
  1.122 +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.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- changelog.xml 29 Sep 2004 19:06:53 -  1.121
  +++ changelog.xml 30 Sep 2004 15:28:12 -  1.122
  @@ -36,6 +36,9 @@
 subsection name=Catalina
   changelog
 fix
  +Fix memory leak when Security Manager is turned on. (jfarcand)
  +  /fix
  +  fix
   When checking status codes for error handling, only check if
   Response.isError() is true. This way, users may use setStatus() to set 
their own
   error status without having the error page invoked. (in which case, the 
user should've
  
  
  

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



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

2004-09-30 Thread jfarcand
jfarcand2004/09/30 08:53:31

  Modified:catalina/src/share/org/apache/catalina/core Tag: TOMCAT_5_0
ApplicationContextFacade.java
ApplicationFilterChain.java StandardWrapper.java
  Log:
  Port patch.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.10.2.1  +55 -28
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java
  
  Index: ApplicationContextFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java,v
  retrieving revision 1.10
  retrieving revision 1.10.2.1
  diff -u -r1.10 -r1.10.2.1
  --- ApplicationContextFacade.java 26 May 2004 15:36:14 -  1.10
  +++ ApplicationContextFacade.java 30 Sep 2004 15:53:31 -  1.10.2.1
  @@ -52,8 +52,13 @@
   /**
* Cache Class object used for reflection.
*/
  -private HashMap classCache;
  +private static HashMap classCache = new HashMap();
   
  +static {
  +if (System.getSecurityManager() != null) {
  +initClassCache();
  +}
  +}
   
   /**
* Cache method object.
  @@ -64,7 +69,13 @@
   private static org.apache.commons.logging.Log sysLog=
   org.apache.commons.logging.LogFactory.getLog( 
ApplicationContextFacade.class );
   
  -
  +
  +/**
  + * Object repository used when the SecurityManager is turned on and
  + * Filter.doFilter is invoked.
  + */
  +private Object[] objectArg = new Object[1];
  +private Object[] objectArgs = new Object[2];
   // --- Constructors
   
   
  @@ -78,13 +89,12 @@
   super();
   this.context = context;
   
  -classCache = new HashMap();
   objectCache = new HashMap();
  -initClassCache();
  +
   }
   
   
  -private void initClassCache(){
  +private static void initClassCache(){
   Class[] clazz = new Class[]{String.class};
   classCache.put(getContext, clazz);
   classCache.put(getMimeType, clazz);
  @@ -119,8 +129,8 @@
   public ServletContext getContext(String uripath) {
   ServletContext theContext = null;
   if (System.getSecurityManager() != null) {
  -theContext = (ServletContext)
  -doPrivileged(getContext, new Object[]{uripath});
  +objectArg[0] = uripath; 
  +theContext = (ServletContext)doPrivileged(getContext, objectArg);
   } else {
   theContext = context.getContext(uripath);
   }
  @@ -144,7 +154,8 @@
   
   public String getMimeType(String file) {
   if (System.getSecurityManager() != null) {
  -return (String)doPrivileged(getMimeType, new Object[]{file});
  +objectArg[0] = file;
  +return (String)doPrivileged(getMimeType, objectArg);
   } else {
   return context.getMimeType(file);
   }
  @@ -153,7 +164,8 @@
   
   public Set getResourcePaths(String path) {
   if (System.getSecurityManager() != null){
  -return (Set)doPrivileged(getResourcePaths, new Object[]{path});
  +objectArg[0] = path;
  +return (Set)doPrivileged(getResourcePaths, objectArg);
   } else {
   return context.getResourcePaths(path);
   }
  @@ -164,8 +176,9 @@
   throws MalformedURLException {
   if (System.getSecurityManager() != null) {
   try {
  +objectArg[0] = path;
   return (URL) invokeMethod(context, getResource, 
  -  new Object[]{path});
  +  objectArg);
   } catch(Throwable t) {
   if (t instanceof MalformedURLException){
   throw (MalformedURLException)t;
  @@ -180,8 +193,9 @@
   
   public InputStream getResourceAsStream(String path) {
   if (System.getSecurityManager() != null) {
  +objectArg[0] = path;
   return (InputStream) doPrivileged(getResourceAsStream, 
  -  new Object[]{path});
  +  objectArg);
   } else {
   return context.getResourceAsStream(path);
   }
  @@ -190,8 +204,9 @@
   
   public RequestDispatcher getRequestDispatcher(final String path) {
   if (System.getSecurityManager() != null) {
  +objectArg[0] = path;
   return (RequestDispatcher) doPrivileged(getRequestDispatcher, 
  -new Object[]{path

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

2004-09-30 Thread jfarcand
jfarcand2004/09/30 09:02:36

  Modified:webapps/docs Tag: TOMCAT_5_0 changelog.xml
  Log:
  Port patch
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.70.2.46 +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.70.2.45
  retrieving revision 1.70.2.46
  diff -u -r1.70.2.45 -r1.70.2.46
  --- changelog.xml 29 Sep 2004 18:02:21 -  1.70.2.45
  +++ changelog.xml 30 Sep 2004 16:02:36 -  1.70.2.46
  @@ -38,6 +38,9 @@
   configure the port. (funkman)
 /update
 fix
  +Fix memory leak when Security Manager is turned on. (jfarcand)
  +  /fix
  +  fix
   bug28914/bug: threadPriority attribute ignored. (yoavs)
 /fix
 fix
  
  
  

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



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

2004-09-30 Thread jfarcand
jfarcand2004/09/30 18:10:17

  Modified:catalina/src/share/org/apache/catalina/core Tag: TOMCAT_5_0
ApplicationContextFacade.java
ApplicationFilterChain.java StandardWrapper.java
  Log:
  Rollback wrong logic.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.10.2.2  +28 -55
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java
  
  Index: ApplicationContextFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java,v
  retrieving revision 1.10.2.1
  retrieving revision 1.10.2.2
  diff -u -r1.10.2.1 -r1.10.2.2
  --- ApplicationContextFacade.java 30 Sep 2004 15:53:31 -  1.10.2.1
  +++ ApplicationContextFacade.java 1 Oct 2004 01:10:17 -   1.10.2.2
  @@ -52,13 +52,8 @@
   /**
* Cache Class object used for reflection.
*/
  -private static HashMap classCache = new HashMap();
  +private HashMap classCache;
   
  -static {
  -if (System.getSecurityManager() != null) {
  -initClassCache();
  -}
  -}
   
   /**
* Cache method object.
  @@ -69,13 +64,7 @@
   private static org.apache.commons.logging.Log sysLog=
   org.apache.commons.logging.LogFactory.getLog( 
ApplicationContextFacade.class );
   
  -
  -/**
  - * Object repository used when the SecurityManager is turned on and
  - * Filter.doFilter is invoked.
  - */
  -private Object[] objectArg = new Object[1];
  -private Object[] objectArgs = new Object[2];
  +
   // --- Constructors
   
   
  @@ -89,12 +78,13 @@
   super();
   this.context = context;
   
  +classCache = new HashMap();
   objectCache = new HashMap();
  -
  +initClassCache();
   }
   
   
  -private static void initClassCache(){
  +private void initClassCache(){
   Class[] clazz = new Class[]{String.class};
   classCache.put(getContext, clazz);
   classCache.put(getMimeType, clazz);
  @@ -129,8 +119,8 @@
   public ServletContext getContext(String uripath) {
   ServletContext theContext = null;
   if (System.getSecurityManager() != null) {
  -objectArg[0] = uripath; 
  -theContext = (ServletContext)doPrivileged(getContext, objectArg);
  +theContext = (ServletContext)
  +doPrivileged(getContext, new Object[]{uripath});
   } else {
   theContext = context.getContext(uripath);
   }
  @@ -154,8 +144,7 @@
   
   public String getMimeType(String file) {
   if (System.getSecurityManager() != null) {
  -objectArg[0] = file;
  -return (String)doPrivileged(getMimeType, objectArg);
  +return (String)doPrivileged(getMimeType, new Object[]{file});
   } else {
   return context.getMimeType(file);
   }
  @@ -164,8 +153,7 @@
   
   public Set getResourcePaths(String path) {
   if (System.getSecurityManager() != null){
  -objectArg[0] = path;
  -return (Set)doPrivileged(getResourcePaths, objectArg);
  +return (Set)doPrivileged(getResourcePaths, new Object[]{path});
   } else {
   return context.getResourcePaths(path);
   }
  @@ -176,9 +164,8 @@
   throws MalformedURLException {
   if (System.getSecurityManager() != null) {
   try {
  -objectArg[0] = path;
   return (URL) invokeMethod(context, getResource, 
  -  objectArg);
  +  new Object[]{path});
   } catch(Throwable t) {
   if (t instanceof MalformedURLException){
   throw (MalformedURLException)t;
  @@ -193,9 +180,8 @@
   
   public InputStream getResourceAsStream(String path) {
   if (System.getSecurityManager() != null) {
  -objectArg[0] = path;
   return (InputStream) doPrivileged(getResourceAsStream, 
  -  objectArg);
  +  new Object[]{path});
   } else {
   return context.getResourceAsStream(path);
   }
  @@ -204,9 +190,8 @@
   
   public RequestDispatcher getRequestDispatcher(final String path) {
   if (System.getSecurityManager() != null) {
  -objectArg[0] = path;
   return (RequestDispatcher) doPrivileged(getRequestDispatcher, 
  -objectArg

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

2004-09-30 Thread jfarcand
jfarcand2004/09/30 18:18:12

  Modified:catalina/src/share/org/apache/catalina/core
ApplicationContextFacade.java
ApplicationFilterChain.java StandardWrapper.java
  Log:
  Rollback wrong logic.
  
  Revision  ChangesPath
  1.12  +28 -55
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java
  
  Index: ApplicationContextFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ApplicationContextFacade.java 30 Sep 2004 15:26:20 -  1.11
  +++ ApplicationContextFacade.java 1 Oct 2004 01:18:12 -   1.12
  @@ -52,13 +52,8 @@
   /**
* Cache Class object used for reflection.
*/
  -private static HashMap classCache = new HashMap();
  +private HashMap classCache;
   
  -static {
  -if (System.getSecurityManager() != null) {
  -initClassCache();
  -}
  -}
   
   /**
* Cache method object.
  @@ -69,13 +64,7 @@
   private static org.apache.commons.logging.Log sysLog=
   org.apache.commons.logging.LogFactory.getLog( 
ApplicationContextFacade.class );
   
  -
  -/**
  - * Object repository used when the SecurityManager is turned on and
  - * Filter.doFilter is invoked.
  - */
  -private Object[] objectArg = new Object[1];
  -private Object[] objectArgs = new Object[2];
  +
   // --- Constructors
   
   
  @@ -89,12 +78,13 @@
   super();
   this.context = context;
   
  +classCache = new HashMap();
   objectCache = new HashMap();
  -
  +initClassCache();
   }
   
   
  -private static void initClassCache(){
  +private void initClassCache(){
   Class[] clazz = new Class[]{String.class};
   classCache.put(getContext, clazz);
   classCache.put(getMimeType, clazz);
  @@ -129,8 +119,8 @@
   public ServletContext getContext(String uripath) {
   ServletContext theContext = null;
   if (System.getSecurityManager() != null) {
  -objectArg[0] = uripath; 
  -theContext = (ServletContext)doPrivileged(getContext, objectArg);
  +theContext = (ServletContext)
  +doPrivileged(getContext, new Object[]{uripath});
   } else {
   theContext = context.getContext(uripath);
   }
  @@ -154,8 +144,7 @@
   
   public String getMimeType(String file) {
   if (System.getSecurityManager() != null) {
  -objectArg[0] = file;
  -return (String)doPrivileged(getMimeType, objectArg);
  +return (String)doPrivileged(getMimeType, new Object[]{file});
   } else {
   return context.getMimeType(file);
   }
  @@ -164,8 +153,7 @@
   
   public Set getResourcePaths(String path) {
   if (System.getSecurityManager() != null){
  -objectArg[0] = path;
  -return (Set)doPrivileged(getResourcePaths, objectArg);
  +return (Set)doPrivileged(getResourcePaths, new Object[]{path});
   } else {
   return context.getResourcePaths(path);
   }
  @@ -176,9 +164,8 @@
   throws MalformedURLException {
   if (System.getSecurityManager() != null) {
   try {
  -objectArg[0] = path;
   return (URL) invokeMethod(context, getResource, 
  -  objectArg);
  +  new Object[]{path});
   } catch(Throwable t) {
   if (t instanceof MalformedURLException){
   throw (MalformedURLException)t;
  @@ -193,9 +180,8 @@
   
   public InputStream getResourceAsStream(String path) {
   if (System.getSecurityManager() != null) {
  -objectArg[0] = path;
   return (InputStream) doPrivileged(getResourceAsStream, 
  -  objectArg);
  +  new Object[]{path});
   } else {
   return context.getResourceAsStream(path);
   }
  @@ -204,9 +190,8 @@
   
   public RequestDispatcher getRequestDispatcher(final String path) {
   if (System.getSecurityManager() != null) {
  -objectArg[0] = path;
   return (RequestDispatcher) doPrivileged(getRequestDispatcher, 
  -objectArg);
  +new Object[]{path});
   } else {
   return

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

2004-09-15 Thread jfarcand
jfarcand2004/09/15 11:57:41

  Modified:catalina/src/conf catalina.policy
  Log:
  Give proper permission to the balancer app when running under the security manager.
  
  Revision  ChangesPath
  1.12  +6 -1  jakarta-tomcat-catalina/catalina/src/conf/catalina.policy
  
  Index: catalina.policy
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/catalina.policy,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- catalina.policy   2 Mar 2004 12:36:22 -   1.11
  +++ catalina.policy   15 Sep 2004 18:57:41 -  1.12
  @@ -78,6 +78,11 @@
   permission java.security.AllPermission;
   };
   
  +// The permissions granted to the balancer WEB-INF/classes directory
  +grant codeBase file:${catalina.home}/webapps/balancer/WEB-INF/classes/- {
  +permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.tomcat.util.digester;
  +permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.tomcat.util.digester.*;
  +};
   // == WEB APPLICATION PERMISSIONS =
   
   
  
  
  

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



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

2004-09-15 Thread jfarcand
jfarcand2004/09/15 12:00:14

  Modified:webapps/docs changelog.xml
  Log:
  Add security fix.
  
  Revision  ChangesPath
  1.105 +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.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- changelog.xml 15 Sep 2004 12:59:46 -  1.104
  +++ changelog.xml 15 Sep 2004 19:00:14 -  1.105
  @@ -31,6 +31,9 @@
 /subsection
   
 subsection name=Catalina
  +  update
  +Give proper permission to the balancer app when running under the security 
manager. (jfarcand)
  +  /update
 /subsection
   
 subsection name=Coyote
  
  
  

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



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

2004-09-15 Thread jfarcand
jfarcand2004/09/15 12:20:15

  Modified:catalina/src/share/org/apache/catalina/startup
DigesterFactory.java
  Log:
  Remove xerces specific workaround. The Digester is now able to find which parser it 
uses and configure it appropriately (long time ago I did that in Digester but never 
took the time to fix Tomcat).
  
  Revision  ChangesPath
  1.9   +5 -58 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/DigesterFactory.java
  
  Index: DigesterFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/DigesterFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DigesterFactory.java  2 Sep 2004 14:20:22 -   1.8
  +++ DigesterFactory.java  15 Sep 2004 19:20:15 -  1.9
  @@ -76,22 +76,11 @@
   digester.setValidating(xmlValidation);
   digester.setUseContextClassLoader(true);
   
  -String parserName = 
  -digester.getFactory().getClass().getName();
  -if (parserName.indexOf(xerces)!=-1) {
  -digester = patchXerces(digester);
  +if (xmlValidation || xmlNamespaceAware){
  +configureSchema(digester);
   }
   
   schemaResolver = new SchemaResolver(digester);
  -if (xmlValidation) {
  -// Xerces 2.3 and up has a special way to turn on validation
  -// for both DTD and Schema
  -if (parserName.indexOf(xerces)!=-1) {
  -turnOnXercesValidation(digester);
  -} else {
  -turnOnValidation(digester);
  -}
  -}
   registerLocalSchema();
   
   digester.setEntityResolver(schemaResolver);
  @@ -104,28 +93,6 @@
   
   
   /**
  - * Patch Xerces for backward compatibility.
  - */
  -private static Digester patchXerces(Digester digester){
  -// This feature is needed for backward compatibility with old DDs
  -// which used Java encoding names such as ISO8859_1 etc.
  -// with Crimson (bug 4701993). By default, Xerces does not
  -// support ISO8859_1.
  -try{
  -digester.setFeature(
  -http://apache.org/xml/features/allow-java-encodings;, true);
  -} catch(ParserConfigurationException e){
  -// log(contextConfig.registerLocalSchema, e);
  -} catch(SAXNotRecognizedException e){
  -// log(contextConfig.registerLocalSchema, e);
  -} catch(SAXNotSupportedException e){
  -// log(contextConfig.registerLocalSchema, e);
  -}
  -return digester;
  -}
  -
  -
  -/**
* Utilities used to force the parser to use local schema, when available,
* instead of the codeschemaLocation/code XML element.
*/
  @@ -186,35 +153,15 @@
   /**
* Turn on DTD and/or validation (based on the parser implementation)
*/
  -protected static void turnOnValidation(Digester digester){
  +protected static void configureSchema(Digester digester){
   URL url = DigesterFactory.class
   .getResource(Constants.WebSchemaResourcePath_24);
 
   if(url == null) {
  -log.error(Could not get url for  + 
Constants.WebSchemaResourcePath_24);
  +log.error(Could not get url for  
  ++ Constants.WebSchemaResourcePath_24);
   } else {
   digester.setSchema(url.toString()); 
  -}
  -}
  -
  -
  -/** 
  - * Turn on schema AND DTD validation on Xerces parser.
  - */
  -protected static void turnOnXercesValidation(Digester digester){
  -try{
  -digester.setFeature(
  -http://apache.org/xml/features/validation/dynamic;,
  -true);
  -digester.setFeature(
  -http://apache.org/xml/features/validation/schema;,
  -true);
  -} catch(ParserConfigurationException e){
  -// log(contextConfig.registerLocalSchema, e);
  -} catch(SAXNotRecognizedException e){
  -// log(contextConfig.registerLocalSchema, e);
  -} catch(SAXNotSupportedException e){
  -// log(contextConfig.registerLocalSchema, e);
   }
   }
   }
  
  
  

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



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

2004-09-15 Thread jfarcand
jfarcand2004/09/15 12:23:45

  Modified:webapps/docs changelog.xml
  Log:
  Update for Digester's cleanup.
  
  Revision  ChangesPath
  1.106 +4 -1  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.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- changelog.xml 15 Sep 2004 19:00:14 -  1.105
  +++ changelog.xml 15 Sep 2004 19:23:45 -  1.106
  @@ -32,8 +32,11 @@
   
 subsection name=Catalina
 update
  -Give proper permission to the balancer app when running under the security 
manager. (jfarcand)
  +Remove Digester code for Xerces workaround. (jfarcand)
 /update
  +  fix
  +Give proper permission to the balancer app when running under the security 
manager. (jfarcand)
  +  /fix
 /subsection
   
 subsection name=Coyote
  
  
  

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



cvs commit: jakarta-servletapi-4/src/share/javax/servlet/jsp/tagext BodyContent.java BodyTag.java BodyTagSupport.java IterationTag.java PageData.java Tag.java TagAttributeInfo.java TagData.java TagExtraInfo.java TagInfo.java TagLibraryInfo.java TagLibraryValidator.java TagSupport.java TagVariableInfo.java TryCatchFinally.java ValidationMessage.java VariableInfo.java

2004-08-31 Thread jfarcand
jfarcand2004/08/31 12:10:54

  Modified:.LICENSE
   src/share/javax/servlet Filter.java FilterChain.java
FilterConfig.java GenericServlet.java
RequestDispatcher.java Servlet.java
ServletConfig.java ServletContext.java
ServletContextAttributeEvent.java
ServletContextAttributeListener.java
ServletContextEvent.java
ServletContextListener.java ServletException.java
ServletInputStream.java ServletOutputStream.java
ServletRequest.java ServletRequestWrapper.java
ServletResponse.java ServletResponseWrapper.java
SingleThreadModel.java UnavailableException.java
   src/share/javax/servlet/http Cookie.java HttpServlet.java
HttpServletRequest.java
HttpServletRequestWrapper.java
HttpServletResponse.java
HttpServletResponseWrapper.java HttpSession.java
HttpSessionActivationListener.java
HttpSessionAttributeListener.java
HttpSessionBindingEvent.java
HttpSessionBindingListener.java
HttpSessionContext.java HttpSessionEvent.java
HttpSessionListener.java HttpUtils.java
   src/share/javax/servlet/jsp HttpJspPage.java
JspEngineInfo.java JspException.java
JspFactory.java JspPage.java JspTagException.java
JspWriter.java PageContext.java
   src/share/javax/servlet/jsp/tagext BodyContent.java
BodyTag.java BodyTagSupport.java IterationTag.java
PageData.java Tag.java TagAttributeInfo.java
TagData.java TagExtraInfo.java TagInfo.java
TagLibraryInfo.java TagLibraryValidator.java
TagSupport.java TagVariableInfo.java
TryCatchFinally.java ValidationMessage.java
VariableInfo.java
  Log:
  Update licence to Apache 2.0
  
  patch submitted by Mark Thomas
  
  Revision  ChangesPath
  1.3   +197 -60   jakarta-servletapi-4/LICENSE
  
  http://cvs.apache.org/viewcvs/jakarta-servletapi-4/LICENSE.diff?r1=1.2r2=1.3
  
  
  1.4   +13 -57jakarta-servletapi-4/src/share/javax/servlet/Filter.java
  
  
http://cvs.apache.org/viewcvs/jakarta-servletapi-4/src/share/javax/servlet/Filter.java.diff?r1=1.3r2=1.4
  
  
  1.2   +13 -57jakarta-servletapi-4/src/share/javax/servlet/FilterChain.java
  
  
http://cvs.apache.org/viewcvs/jakarta-servletapi-4/src/share/javax/servlet/FilterChain.java.diff?r1=1.1r2=1.2
  
  
  1.2   +13 -57jakarta-servletapi-4/src/share/javax/servlet/FilterConfig.java
  
  
http://cvs.apache.org/viewcvs/jakarta-servletapi-4/src/share/javax/servlet/FilterConfig.java.diff?r1=1.1r2=1.2
  
  
  1.4   +13 -57jakarta-servletapi-4/src/share/javax/servlet/GenericServlet.java
  
  
http://cvs.apache.org/viewcvs/jakarta-servletapi-4/src/share/javax/servlet/GenericServlet.java.diff?r1=1.3r2=1.4
  
  
  1.2   +13 -57
jakarta-servletapi-4/src/share/javax/servlet/RequestDispatcher.java
  
  
http://cvs.apache.org/viewcvs/jakarta-servletapi-4/src/share/javax/servlet/RequestDispatcher.java.diff?r1=1.1r2=1.2
  
  
  1.2   +13 -57jakarta-servletapi-4/src/share/javax/servlet/Servlet.java
  
  
http://cvs.apache.org/viewcvs/jakarta-servletapi-4/src/share/javax/servlet/Servlet.java.diff?r1=1.1r2=1.2
  
  
  1.2   +13 -57jakarta-servletapi-4/src/share/javax/servlet/ServletConfig.java
  
  
http://cvs.apache.org/viewcvs/jakarta-servletapi-4/src/share/javax/servlet/ServletConfig.java.diff?r1=1.1r2=1.2
  
  
  1.5   +13 -57jakarta-servletapi-4/src/share/javax/servlet/ServletContext.java
  
  
http://cvs.apache.org/viewcvs/jakarta-servletapi-4/src/share/javax/servlet/ServletContext.java.diff?r1=1.4r2=1.5
  
  
  1.4   +13 -57
jakarta-servletapi-4/src/share/javax/servlet/ServletContextAttributeEvent.java
  
  
http://cvs.apache.org/viewcvs/jakarta-servletapi-4/src/share/javax/servlet/ServletContextAttributeEvent.java.diff?r1=1.3r2=1.4
  
  
  1.2   +16 -0 
jakarta-servletapi-4/src/share/javax/servlet/ServletContextAttributeListener.java
  
  
http://cvs.apache.org/viewcvs/jakarta-servletapi-4/src/share/javax/servlet/ServletContextAttributeListener.java.diff?r1=1.1r2=1.2
  
  
  1.2   +13 -57
jakarta-servletapi-4/src/share/javax/servlet/ServletContextEvent.java
  
  
http://cvs.apache.org/viewcvs/jakarta-servletapi-4/src/share/javax/servlet/ServletContextEvent.java.diff?r1=1.1r2=1.2
  
  
  1.2   +13 -57
jakarta-servletapi-4/src/share/javax/servlet

cvs commit: jakarta-servletapi-5/jsr154/src/share/dtd web-app_2_4.xsd

2004-08-25 Thread jfarcand
jfarcand2004/08/25 09:50:35

  Modified:jsr154/src/share/dtd Tag: TOMCAT_5_0 web-app_2_4.xsd
  Log:
  Port patch from the HEAD.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.13.2.1  +2 -2  jakarta-servletapi-5/jsr154/src/share/dtd/web-app_2_4.xsd
  
  Index: web-app_2_4.xsd
  ===
  RCS file: /home/cvs/jakarta-servletapi-5/jsr154/src/share/dtd/web-app_2_4.xsd,v
  retrieving revision 1.13
  retrieving revision 1.13.2.1
  diff -u -r1.13 -r1.13.2.1
  --- web-app_2_4.xsd   18 Mar 2004 16:40:34 -  1.13
  +++ web-app_2_4.xsd   25 Aug 2004 16:50:34 -  1.13.2.1
  @@ -30,7 +30,7 @@
 xsd:annotation
   xsd:documentation
   
  -  Copyright 2002 Sun Microsystems, Inc., 901 San Antonio
  +  Copyright 2004 Sun Microsystems, Inc., 901 San Antonio
 Road, Palo Alto, California 94303, U.S.A. All rights
 reserved.
   
  @@ -804,7 +804,7 @@
   
   xsd:simpleContent
 xsd:restriction base=j2ee:string
  - xsd:pattern value=[\p{L}\-\p{Nd}]+/[\p{L}\-\p{Nd}\.]+/
  +  xsd:pattern value=[^\p{Cc}^\s]+/[^\p{Cc}^\s]+/
 /xsd:restriction
   /xsd:simpleContent
 /xsd:complexType
  
  
  

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



cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper Mapper.java

2004-08-25 Thread jfarcand
jfarcand2004/08/25 12:25:46

  Modified:util/java/org/apache/tomcat/util/http/mapper Mapper.java
  Log:
  Add missing case to support the following web.xml:
  
  servlet
  display-nameServletTest/display-name
  servlet-nameServletTest/servlet-name
  servlet-classtest.ServletTest/servlet-class
  /servlet
  servlet-mapping
  servlet-nameServletTest/servlet-name
  url-pattern*.screen/url-pattern
  /servlet-mapping
  welcome-file-list
 welcome-filewelcome.screen/welcome-file
  /welcome-file-list
  
  All Servlet TCKs passed. Please review (I recall some discussion on welcome file but 
can't find those emails).
  
  Revision  ChangesPath
  1.41  +9 -0  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java
  
  Index: Mapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- Mapper.java   27 Jun 2004 23:56:23 -  1.40
  +++ Mapper.java   25 Aug 2004 19:25:46 -  1.41
  @@ -751,10 +751,19 @@
   }
   }
   }
  +
  +// Rule 4d -- Welcome resources that 
  +//are mapped to an extension.
  +if (mappingData.wrapper == null) {
  +internalMapExtensionWrapper(extensionWrappers, 
  +path, mappingData);
  +} 
   }
  +
   path.setOffset(servletPath);
   path.setEnd(pathEnd);
   }
  +
   }
   
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper Mapper.java

2004-08-25 Thread jfarcand
jfarcand2004/08/25 14:28:35

  Modified:util/java/org/apache/tomcat/util/http/mapper Mapper.java
  Log:
  Rollback this fix since it doesn't handle corrently all cases.
  
  Revision  ChangesPath
  1.42  +0 -7  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java
  
  Index: Mapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Mapper.java   25 Aug 2004 19:25:46 -  1.41
  +++ Mapper.java   25 Aug 2004 21:28:35 -  1.42
  @@ -751,13 +751,6 @@
   }
   }
   }
  -
  -// Rule 4d -- Welcome resources that 
  -//are mapped to an extension.
  -if (mappingData.wrapper == null) {
  -internalMapExtensionWrapper(extensionWrappers, 
  -path, mappingData);
  -} 
   }
   
   path.setOffset(servletPath);
  
  
  

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



cvs commit: jakarta-servletapi-5/jsr154/src/share/dtd web-app_2_4.xsd

2004-08-24 Thread jfarcand
jfarcand2004/08/24 10:01:34

  Modified:jsr154/src/share/dtd web-app_2_4.xsd
  Log:
  Update the web-app_2_4.xsd according
  to the JSR154 maintenance release.
  
o The restriction facet of mime-typeType should be updated
  from:-
  xsd:pattern value=[\p{L}\-\p{Nd}]+/[\p{L}\-\p{Nd}\.]+/
  to:-
  xsd:pattern value=[^\p{Cc}^\s]+/[^\p{Cc}^\s]+
  
  submitted by: Yutaka Yoshida at sun dot com
  
  Revision  ChangesPath
  1.14  +2 -2  jakarta-servletapi-5/jsr154/src/share/dtd/web-app_2_4.xsd
  
  Index: web-app_2_4.xsd
  ===
  RCS file: /home/cvs/jakarta-servletapi-5/jsr154/src/share/dtd/web-app_2_4.xsd,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- web-app_2_4.xsd   18 Mar 2004 16:40:34 -  1.13
  +++ web-app_2_4.xsd   24 Aug 2004 17:01:34 -  1.14
  @@ -30,7 +30,7 @@
 xsd:annotation
   xsd:documentation
   
  -  Copyright 2002 Sun Microsystems, Inc., 901 San Antonio
  +  Copyright 2004 Sun Microsystems, Inc., 901 San Antonio
 Road, Palo Alto, California 94303, U.S.A. All rights
 reserved.
   
  @@ -804,7 +804,7 @@
   
   xsd:simpleContent
 xsd:restriction base=j2ee:string
  - xsd:pattern value=[\p{L}\-\p{Nd}]+/[\p{L}\-\p{Nd}\.]+/
  +  xsd:pattern value=[^\p{Cc}^\s]+/[^\p{Cc}^\s]+/
 /xsd:restriction
   /xsd:simpleContent
 /xsd:complexType
  
  
  

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



cvs commit: jakarta-servletapi-5/jsr154/examples/WEB-INF/classes LocalStrings_pt.properties

2004-08-24 Thread jfarcand
jfarcand2004/08/24 11:38:35

  Added:   jsr154/examples/WEB-INF/classes LocalStrings_pt.properties
  Log:
  Fix for 29923 (added a localized Portuguese version)
  
  Submitted by Joao Medeiros (jmedeiros at freenet.co.uk)
  
  Revision  ChangesPath
  1.1  
jakarta-servletapi-5/jsr154/examples/WEB-INF/classes/LocalStrings_pt.properties
  
  Index: LocalStrings_pt.properties
  ===
  # Copyright 2004 The Apache Software Foundation
  #
  # Licensed under the Apache License, Version 2.0 (the License);
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  # http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an AS IS BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  # $Id: LocalStrings_pt.properties,v 1.1 2004/08/24 18:38:35 jfarcand Exp $
  
  # Default localized resources for example servlets
  # This locale is pt_PT
  
  helloworld.title=Ola Mundo!
  
  requestinfo.title=Exemplo da Informacao do Pedido
  requestinfo.label.method=Metodo:
  requestinfo.label.requesturi=URI do Pedido:
  requestinfo.label.protocol=Protocolo:
  requestinfo.label.pathinfo=Informacao do Caminho:
  requestinfo.label.remoteaddr=Endereco Remoto:
  
  requestheader.title=Exemplo da Cebeceira do Pedido
  
  requestparams.title=Examplo de Parametros do Pedido
  requestparams.params-in-req=Parametros neste pedido:
  requestparams.no-params=Sem Parametros, Por favor entre alguns
  requestparams.firstname=Primeiro Nome:
  requestparams.lastname=Apelido:
  
  cookies.title=CExamplo de Cookies
  cookies.cookies=O se browser esta a enviar os seguintes cookies:
  cookies.no-cookies=O seu browser nao esta a enviar nenhuns cookies
  cookies.make-cookie=Crie um cookie para enviar para o seu browser
  cookies.name=Nome:
  cookies.value=Valor:
  cookies.set=Acabou de enviar o seguinte cookie para o seu browser:
  
  sessions.title=Examplo de sessoes
  sessions.id=Identificador da Sessao:
  sessions.created=Criada:
  sessions.lastaccessed=Ultima vez acedida:
  sessions.data=Os seguintes dados fazem parte da sua sessao:
  sessions.adddata=Adicione data a sua sessao
  sessions.dataname=Nome do atributo da sessao:
  sessions.datavalue=Valor do atributo da Sessao:
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security SecurityUtil.java

2004-08-20 Thread jfarcand
jfarcand2004/08/20 07:28:38

  Modified:catalina/src/share/org/apache/catalina/security Tag:
TOMCAT_5_0 SecurityUtil.java
  Log:
  Fix for Bugzilla 30602: Subject is not available during the first call to the 
servlet which use the basic authentication.
  
  All Servlet TCKs passed with Security enabled
  
  Submitted by: Josip Jureta at videotron.ca
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.11.2.1  +9 -7  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityUtil.java
  
  Index: SecurityUtil.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityUtil.java,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- SecurityUtil.java 26 May 2004 15:53:20 -  1.11
  +++ SecurityUtil.java 20 Aug 2004 14:28:38 -  1.11.2.1
  @@ -251,16 +251,18 @@
   if (session != null){
   subject = 
   (Subject)session.getAttribute(Globals.SUBJECT_ATTR);
  +}
   
  -if (subject == null){
  -subject = new Subject();
  -
  -if (principal != null){
  -subject.getPrincipals().add(principal);
  -}
  -session.setAttribute(Globals.SUBJECT_ATTR, subject);
  +if (subject == null){
  +subject = new Subject();
  +
  +if (principal != null){
  +subject.getPrincipals().add(principal);
   }
   }
  +
  +if (session != null)
  +session.setAttribute(Globals.SUBJECT_ATTR, subject);
   }
   
   Subject.doAsPrivileged(subject, pea, null);   
  
  
  

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



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

2004-08-20 Thread jfarcand
jfarcand2004/08/20 07:29:12

  Modified:webapps/docs Tag: TOMCAT_5_0 changelog.xml
  Log:
  Update
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.70.2.3  +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.70.2.2
  retrieving revision 1.70.2.3
  diff -u -r1.70.2.2 -r1.70.2.3
  --- changelog.xml 11 Aug 2004 00:52:39 -  1.70.2.2
  +++ changelog.xml 20 Aug 2004 14:29:11 -  1.70.2.3
  @@ -22,6 +22,9 @@
   
 subsection name=Catalina
   changelog
  +  fix
  +bug30602/bug: Subject is not available during the first call to the 
servlet which use the basic authentication (jfarcand)
  +  /fix
   /changelog
 /subsection
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security SecurityUtil.java

2004-08-20 Thread jfarcand
jfarcand2004/08/20 07:43:17

  Modified:catalina/src/share/org/apache/catalina/security
SecurityUtil.java
  Log:
  Port fix for bug 30602
  
  Revision  ChangesPath
  1.12  +9 -7  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityUtil.java
  
  Index: SecurityUtil.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityUtil.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SecurityUtil.java 26 May 2004 15:53:20 -  1.11
  +++ SecurityUtil.java 20 Aug 2004 14:43:17 -  1.12
  @@ -251,16 +251,18 @@
   if (session != null){
   subject = 
   (Subject)session.getAttribute(Globals.SUBJECT_ATTR);
  +}
   
  -if (subject == null){
  -subject = new Subject();
  -
  -if (principal != null){
  -subject.getPrincipals().add(principal);
  -}
  -session.setAttribute(Globals.SUBJECT_ATTR, subject);
  +if (subject == null){
  +subject = new Subject();
  +
  +if (principal != null){
  +subject.getPrincipals().add(principal);
   }
   }
  +
  +if (session != null)
  +session.setAttribute(Globals.SUBJECT_ATTR, subject);
   }
   
   Subject.doAsPrivileged(subject, pea, null);   
  
  
  

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




cvs commit: jakarta-servletapi-5/jsr154/src/share/javax/servlet/http HttpServlet.java

2004-06-07 Thread jfarcand
jfarcand2004/06/07 18:28:52

  Modified:jsr154/src/share/javax/servlet/http HttpServlet.java
  Log:
  This fixes an ArrayIndexOutOfBoundsException when superclass does
  not declare any methods (see Bugtraq 4968841).
  
  Patch submitted by: Jan Luehe
  
  Revision  ChangesPath
  1.8   +16 -24
jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpServlet.java
  
  Index: HttpServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpServlet.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HttpServlet.java  18 Mar 2004 16:40:35 -  1.7
  +++ HttpServlet.java  8 Jun 2004 01:28:52 -   1.8
  @@ -465,36 +465,28 @@
   }
   
   
  +private static Method[] getAllDeclaredMethods(Class c) {
   
  +if (c.equals(javax.servlet.http.HttpServlet.class)) {
  +return null;
  +}
   
  -
  -private Method[] getAllDeclaredMethods(Class c) {
  - if (c.getName().equals(javax.servlet.http.HttpServlet))
  - return null;
  - 
  - int j=0;
  - Method[] parentMethods = getAllDeclaredMethods(c.getSuperclass());
  - Method[] thisMethods = c.getDeclaredMethods();
  +Method[] parentMethods = getAllDeclaredMethods(c.getSuperclass());
  +Method[] thisMethods = c.getDeclaredMethods();

  - if (parentMethods!=null) {
  - Method[] allMethods =
  - new Method[parentMethods.length + thisMethods.length];
  - for (int i=0; iparentMethods.length; i++) {
  - allMethods[i]=parentMethods[i];
  - j=i;
  - }
  - j++;
  - for (int i=j; ithisMethods.length+j; i++) {
  - allMethods[i] = thisMethods[i-j];
  - }
  - return allMethods;
  +if ((parentMethods != null)  (parentMethods.length  0)) {
  +Method[] allMethods =
  +new Method[parentMethods.length + thisMethods.length];
  + System.arraycopy(parentMethods, 0, allMethods, 0,
  + parentMethods.length);
  + System.arraycopy(thisMethods, 0, allMethods, parentMethods.length,
  + thisMethods.length);
  +
  + thisMethods = allMethods;
}
  +
return thisMethods;
   }
  -
  -
  -
  -
   
   
   /**
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy ApplicationParameter.java ContextEjb.java ContextEnvironment.java ContextLocalEjb.java ContextResource.java ContextResourceLink.java ErrorPage.java FilterDef.java FilterMap.java LoginConfig.java MessageDestination.java MessageDestinationRef.java NamingResources.java ResourceParams.java SecurityCollection.java SecurityConstraint.java

2004-05-13 Thread jfarcand
jfarcand2004/05/13 13:40:50

  Modified:catalina/src/share/org/apache/catalina/deploy
ApplicationParameter.java ContextEjb.java
ContextEnvironment.java ContextLocalEjb.java
ContextResource.java ContextResourceLink.java
ErrorPage.java FilterDef.java FilterMap.java
LoginConfig.java MessageDestination.java
MessageDestinationRef.java NamingResources.java
ResourceParams.java SecurityCollection.java
SecurityConstraint.java
  Log:
  Make those classes non final so it is possible to customized them.
  
  Revision  ChangesPath
  1.4   +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ApplicationParameter.java
  
  Index: ApplicationParameter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ApplicationParameter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ApplicationParameter.java 27 Feb 2004 14:58:43 -  1.3
  +++ ApplicationParameter.java 13 May 2004 20:40:49 -  1.4
  @@ -31,7 +31,7 @@
* @version $Revision$ $Date$
*/
   
  -public final class ApplicationParameter implements Serializable {
  +public class ApplicationParameter implements Serializable {
   
   
   // - Properties
  
  
  
  1.4   +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextEjb.java
  
  Index: ContextEjb.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextEjb.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContextEjb.java   27 Feb 2004 14:58:43 -  1.3
  +++ ContextEjb.java   13 May 2004 20:40:49 -  1.4
  @@ -29,7 +29,7 @@
* @version $Revision$ $Date$
*/
   
  -public final class ContextEjb implements Serializable {
  +public class ContextEjb implements Serializable {
   
   
   // - Properties
  
  
  
  1.4   +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextEnvironment.java
  
  Index: ContextEnvironment.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextEnvironment.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContextEnvironment.java   27 Feb 2004 14:58:43 -  1.3
  +++ ContextEnvironment.java   13 May 2004 20:40:49 -  1.4
  @@ -28,7 +28,7 @@
* @version $Revision$ $Date$
*/
   
  -public final class ContextEnvironment implements Serializable {
  +public class ContextEnvironment implements Serializable {
   
   
   // - Properties
  
  
  
  1.4   +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextLocalEjb.java
  
  Index: ContextLocalEjb.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextLocalEjb.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContextLocalEjb.java  27 Feb 2004 14:58:43 -  1.3
  +++ ContextLocalEjb.java  13 May 2004 20:40:49 -  1.4
  @@ -29,7 +29,7 @@
* @version $Revision$ $Date$
*/
   
  -public final class ContextLocalEjb implements Serializable {
  +public class ContextLocalEjb implements Serializable {
   
   
   // - Properties
  
  
  
  1.4   +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextResource.java
  
  Index: ContextResource.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextResource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContextResource.java  27 Feb 2004 14:58:43 -  1.3
  +++ ContextResource.java  13 May 2004 20:40:49 -  1.4
  @@ -29,7 +29,7 @@
* @version $Revision$ $Date$
*/
   
  -public final class ContextResource implements Serializable {
  +public class ContextResource implements Serializable {
   
   
   // - Properties
  
  
  
  1.4   +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/deploy/ContextResourceLink.java

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

2004-05-10 Thread jfarcand
jfarcand2004/05/10 08:43:09

  Modified:catalina/src/share/org/apache/catalina/startup
WebRuleSet.java
  Log:
  Fix documentation.
  
  Revision  ChangesPath
  1.12  +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/WebRuleSet.java
  
  Index: WebRuleSet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/WebRuleSet.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- WebRuleSet.java   7 May 2004 19:26:33 -   1.11
  +++ WebRuleSet.java   10 May 2004 15:43:09 -  1.12
  @@ -471,7 +471,7 @@
   
   
   /**
  - * Rule to check that the codejsp-config/code is occuring 
  + * Rule to check that the codesession-config/code is occuring 
* only 1 time within the web.xml
*/
   final class SetSessionConfig extends Rule {
  
  
  

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



Hi, it's me

2004-04-22 Thread jfarcand


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

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteAdapter.java CoyoteOutputStream.java CoyoteReader.java CoyoteRequest.java CoyoteWriter.java

2004-04-05 Thread jfarcand
jfarcand2004/04/05 17:55:07

  Modified:catalina/src/share/org/apache/coyote/tomcat5
CoyoteAdapter.java CoyoteOutputStream.java
CoyoteReader.java CoyoteRequest.java
CoyoteWriter.java
  Log:
  Add public method consistently. Currently some methods were private, some final
  and some public.
  
  Making such classes public allowed re-utilization of those classes as a base for new 
connector( ex: NSAPI)
  
  Revision  ChangesPath
  1.22  +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteAdapter.java
  
  Index: CoyoteAdapter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteAdapter.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- CoyoteAdapter.java4 Apr 2004 19:10:01 -   1.21
  +++ CoyoteAdapter.java6 Apr 2004 00:55:07 -   1.22
  @@ -49,7 +49,7 @@
* @version $Revision$ $Date$
*/
   
  -final class CoyoteAdapter
  +public class CoyoteAdapter
   implements Adapter 
{
   private static Log log = LogFactory.getLog(CoyoteAdapter.class);
  
  
  
  1.4   +1 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteOutputStream.java
  
  Index: CoyoteOutputStream.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteOutputStream.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CoyoteOutputStream.java   27 Feb 2004 14:58:52 -  1.3
  +++ CoyoteOutputStream.java   6 Apr 2004 00:55:07 -   1.4
  @@ -27,7 +27,7 @@
* @author Costin Manolache
* @author Remy Maucherat
*/
  -final class CoyoteOutputStream 
  +public class CoyoteOutputStream 
   extends ServletOutputStream {
   
   
  
  
  
  1.4   +1 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteReader.java
  
  Index: CoyoteReader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteReader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CoyoteReader.java 5 Mar 2004 13:02:30 -   1.3
  +++ CoyoteReader.java 6 Apr 2004 00:55:07 -   1.4
  @@ -26,7 +26,7 @@
* 
* @author Remy Maucherat
*/
  -final class CoyoteReader
  +public class CoyoteReader
   extends BufferedReader {
   
   
  
  
  
  1.33  +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- CoyoteRequest.java12 Mar 2004 19:45:43 -  1.32
  +++ CoyoteRequest.java6 Apr 2004 00:55:07 -   1.33
  @@ -254,7 +254,7 @@
   /**
* The Subject associated with the current AccessControllerContext
*/
  -protected Subject subject = null;
  +protected transient Subject subject = null;
   
   
   /**
  
  
  
  1.4   +1 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteWriter.java
  
  Index: CoyoteWriter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CoyoteWriter.java 27 Feb 2004 14:58:53 -  1.3
  +++ CoyoteWriter.java 6 Apr 2004 00:55:07 -   1.4
  @@ -25,7 +25,7 @@
* 
* @author Remy Maucherat
*/
  -final class CoyoteWriter
  +public class CoyoteWriter
   extends PrintWriter {
   
   
  
  
  

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



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

2004-04-01 Thread jfarcand
jfarcand2004/04/01 09:39:53

  Modified:catalina/src/share/org/apache/catalina Globals.java
   catalina/src/share/org/apache/catalina/session
StandardSession.java
  Log:
  Minor fixe. Instead of using an exclude list, make the variable transient.
  
  Revision  ChangesPath
  1.8   +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java
  
  Index: Globals.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Globals.java  27 Feb 2004 14:58:38 -  1.7
  +++ Globals.java  1 Apr 2004 17:39:53 -   1.8
  @@ -287,7 +287,7 @@
   /**
* The subject under which the AccessControlContext is running.
*/
  -public static final String SUBJECT_ATTR =
  +public static transient final String SUBJECT_ATTR =
   javax.security.auth.subject;
   
   
  
  
  
  1.42  +2 -26 
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.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- StandardSession.java  25 Mar 2004 22:17:54 -  1.41
  +++ StandardSession.java  1 Apr 2004 17:39:53 -   1.42
  @@ -160,14 +160,6 @@
   
   
   /**
  - * Set of attribute names which are not allowed to be persisted.
  - */
  -private static final String[] excludedAttributes = {
  -Globals.SUBJECT_ATTR
  -};
  -
  -
  -/**
* We are currently processing a session expiration, so bypass
* certain IllegalStateException tests.  NOTE:  This value is not
* included in the serialized version of this object.
  @@ -1393,8 +1385,7 @@
   }
   if (value == null)
   continue;
  -else if ( (value instanceof Serializable) 
  - (!exclude(keys[i]) )) {
  +else if ( (value instanceof Serializable) ) {
   saveNames.add(keys[i]);
   saveValues.add(value);
   } else {
  @@ -1422,21 +1413,6 @@
   }
   }
   
  -}
  -
  -
  -/**
  - * Exclude attribute that cannot be serialized.
  - * @param name the attribute's name
  - */
  -protected boolean exclude(String name){
  -
  -for (int i = 0; i  excludedAttributes.length; i++) {
  -if (name.equalsIgnoreCase(excludedAttributes[i]))
  -return true;
  -}
  -
  -return false;
   }
   
   
  
  
  

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



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

2004-04-01 Thread jfarcand
jfarcand2004/04/01 12:18:15

  Modified:catalina/src/share/org/apache/catalina Globals.java
   catalina/src/share/org/apache/catalina/session
StandardSession.java
  Log:
  Re-add initinal work since it doesn't seems to work (my bad)
  
  Thanks to daniel_andefors at hotmail.com
  
  Revision  ChangesPath
  1.9   +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java
  
  Index: Globals.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Globals.java  1 Apr 2004 17:39:53 -   1.8
  +++ Globals.java  1 Apr 2004 20:18:15 -   1.9
  @@ -287,7 +287,7 @@
   /**
* The subject under which the AccessControlContext is running.
*/
  -public static transient final String SUBJECT_ATTR =
  +public static final String SUBJECT_ATTR =
   javax.security.auth.subject;
   
   
  
  
  
  1.43  +25 -1 
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.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- StandardSession.java  1 Apr 2004 17:39:53 -   1.42
  +++ StandardSession.java  1 Apr 2004 20:18:15 -   1.43
  @@ -160,6 +160,14 @@
   
   
   /**
  + * Set of attribute names which are not allowed to be persisted.
  + */
  +private static final String[] excludedAttributes = {
  +Globals.SUBJECT_ATTR
  +};
  +
  +
  +/**
* We are currently processing a session expiration, so bypass
* certain IllegalStateException tests.  NOTE:  This value is not
* included in the serialized version of this object.
  @@ -1385,7 +1393,8 @@
   }
   if (value == null)
   continue;
  -else if ( (value instanceof Serializable) ) {
  +else if ( (value instanceof Serializable) 
  + (!exclude(keys[i]) )) {
   saveNames.add(keys[i]);
   saveValues.add(value);
   } else {
  @@ -1413,6 +1422,21 @@
   }
   }
   
  +}
  +
  +
  +/**
  + * Exclude attribute that cannot be serialized.
  + * @param name the attribute's name
  + */
  +protected boolean exclude(String name){
  +
  +for (int i = 0; i  excludedAttributes.length; i++) {
  +if (name.equalsIgnoreCase(excludedAttributes[i]))
  +return true;
  +}
  +
  +return false;
   }
   
   
  
  
  

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



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

2004-03-25 Thread jfarcand
jfarcand2004/03/25 14:31:46

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
   catalina/src/share/org/apache/catalina/startup
ContextConfig.java
  Log:
  Fix bugtraq : javax.naming.NamingException after a Stop/Start cycle of a web app
  
  Using jmx, if you stop/start the Context, listener and applicationListeners are 
removed when calling stop and never re-added.
  
  Revision  ChangesPath
  1.122 +4 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- StandardContext.java  24 Mar 2004 20:00:22 -  1.121
  +++ StandardContext.java  25 Mar 2004 22:31:46 -  1.122
  @@ -4542,6 +4542,9 @@
   broadcaster.sendNotification(notification);
   } 
   super.destroy();
  +
  +instanceListeners = new String[0];
  +applicationListeners = new String[0];
   }
   
   private void resetContext() throws Exception, MBeanRegistrationException {
  
  
  
  1.43  +1 -13 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- ContextConfig.java24 Mar 2004 20:00:22 -  1.42
  +++ ContextConfig.java25 Mar 2004 22:31:46 -  1.43
  @@ -659,12 +659,6 @@
   context.removeChild(children[i]);
   }
   
  -// Removing application listeners
  -String[] applicationListeners = context.findApplicationListeners();
  -for (i = 0; i  applicationListeners.length; i++) {
  -context.removeApplicationListener(applicationListeners[i]);
  -}
  -
   // Removing application parameters
   /*
   ApplicationParameter[] applicationParameters =
  @@ -713,12 +707,6 @@
   FilterMap[] filterMaps = context.findFilterMaps();
   for (i = 0; i  filterMaps.length; i++) {
   context.removeFilterMap(filterMaps[i]);
  -}
  -
  -// Removing instance listeners
  -String[] instanceListeners = context.findInstanceListeners();
  -for (i = 0; i  instanceListeners.length; i++) {
  -context.removeInstanceListener(instanceListeners[i]);
   }
   
   // Removing local ejbs
  
  
  

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



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

2004-03-24 Thread jfarcand
jfarcand2004/03/24 12:00:22

  Modified:catalina/src/share/org/apache/catalina Context.java
   catalina/src/share/org/apache/catalina/core
StandardContext.java
   catalina/src/share/org/apache/catalina/mbeans
MBeanFactory.java
   catalina/src/share/org/apache/catalina/startup
ContextConfig.java TldConfig.java
  Log:
  Add support for xml validation/namespaceAware at the context level. The new 
attributes override the ones set on the host element.
  
  Add a dummy method for jmx calls (until the admin starts supporting the new sets 
of attributes)
  
  Revision  ChangesPath
  1.11  +69 -1 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Context.java
  
  Index: Context.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Context.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Context.java  27 Feb 2004 14:58:38 -  1.10
  +++ Context.java  24 Mar 2004 20:00:22 -  1.11
  @@ -1128,4 +1128,72 @@
   public void removeWrapperListener(String listener);
   
   
  +/**
  + * Get the server.xml context attribute's xmlNamespaceAware.
  + * @return true if namespace awarenes is enabled.
  + *
  + */
  +public boolean getXmlNamespaceAware();
  +
  +
  +/**
  + * Get the server.xml context attribute's xmlValidation.
  + * @return true if validation is enabled.
  + *
  + */
  +public boolean getXmlValidation();
  +
  +
  +/**
  + * Set the validation feature of the XML parser used when
  + * parsing xml instances.
  + * @param xmlValidation true to enable xml instance validation
  + */
  +public void setXmlValidation(boolean xmlValidation);
  +
  +
  +   /**
  + * Set the namespace aware feature of the XML parser used when
  + * parsing xml instances.
  + * @param xmlNamespaceAware true to enable namespace awareness
  + */
  +public void setXmlNamespaceAware(boolean xmlNamespaceAware);
  +/**
  + * Get the server.xml context attribute's xmlValidation.
  + * @return true if validation is enabled.
  + */
  + 
  +
  +/**
  + * Set the validation feature of the XML parser used when
  + * parsing tlds files. 
  + * @param tldXmlValidation true to enable xml instance validation
  + */
  +public void setTldValidation(boolean tldValidation);
  +
  +
  +/**
  + * Get the server.xml context attribute's webXmlValidation.
  + * @return true if validation is enabled.
  + *
  + */
  +public boolean getTldValidation();
  +
  +
  +/**
  + * Get the server.xml host attribute's xmlNamespaceAware.
  + * @return true if namespace awarenes is enabled.
  + */
  +public boolean getTldNamespaceAware();
  +
  +
  +/**
  + * Set the namespace aware feature of the XML parser used when
  + * parsing xml instances.
  + * @param xmlNamespaceAware true to enable namespace awareness
  + */
  +public void setTldNamespaceAware(boolean tldNamespaceAware);
  +
  +
   }
  +
  
  
  
  1.121 +126 -8
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.120
  retrieving revision 1.121
  diff -u -r1.120 -r1.121
  --- StandardContext.java  22 Mar 2004 12:45:55 -  1.120
  +++ StandardContext.java  24 Mar 2004 20:00:22 -  1.121
  @@ -575,12 +575,38 @@
   private long startTime;
   private long tldScanTime;
   
  -/** Name of the engine. If null, the domain is used.
  +/** 
  + * Name of the engine. If null, the domain is used.
*/ 
   private String engineName = null;
   private String j2EEApplication=none;
   private String j2EEServer=none;
   
  +
  +/**
  + * Attribute value used to turn on/off XML validation
  + */
  + private boolean webXmlValidation = false;
  +
  +
  +/**
  + * Attribute value used to turn on/off XML namespace validation
  + */
  + private boolean webXmlNamespaceAware = false;
  +
  +
  +/**
  + * Attribute value used to turn on/off XML validation
  + */
  + private boolean tldValidation = false;
  +
  +
  +/**
  + * Attribute value used to turn on/off TLD XML namespace validation
  + */
  + private boolean tldNamespaceAware = false;
  +
  +
   // - Context Properties
   
   public void setName( String name ) {
  @@ -4179,10 +4205,24 @@
   // Read

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

2004-03-04 Thread jfarcand
jfarcand2004/03/04 09:51:16

  Modified:catalina/src/share/org/apache/catalina/session
StandardSession.java
  Log:
  Avoid serializing Subject/Principal when persisting the session.
  
  Revision  ChangesPath
  1.36  +27 -2 
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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- StandardSession.java  27 Feb 2004 14:58:46 -  1.35
  +++ StandardSession.java  4 Mar 2004 17:51:16 -   1.36
  @@ -44,6 +44,7 @@
   import javax.servlet.http.HttpSessionListener;
   
   import org.apache.catalina.Context;
  +import org.apache.catalina.Globals;
   import org.apache.catalina.Manager;
   import org.apache.catalina.Session;
   import org.apache.catalina.SessionEvent;
  @@ -159,6 +160,14 @@
   
   
   /**
  + * Set of attribute names which are not allowed to be persisted.
  + */
  +private static final String[] excludedAttributes = {
  +Globals.SUBJECT_ATTR
  +};
  +
  +
  +/**
* We are currently processing a session expiration, so bypass
* certain IllegalStateException tests.  NOTE:  This value is not
* included in the serialized version of this object.
  @@ -1384,7 +1393,8 @@
   }
   if (value == null)
   continue;
  -else if (value instanceof Serializable) {
  +else if ( (value instanceof Serializable) 
  + (!exclude(keys[i]) )) {
   saveNames.add(keys[i]);
   saveValues.add(value);
   }
  @@ -1410,6 +1420,21 @@
   }
   }
   
  +}
  +
  +
  +/**
  + * Exclude attribute that cannot be serialized.
  + * @param name the attribute's name
  + */
  +protected boolean exclude(String name){
  +
  +for (int i = 0; i  excludedAttributes.length; i++) {
  +if (name.equalsIgnoreCase(excludedAttributes[i]))
  +return true;
  +}
  +
  +return false;
   }
   
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 LocalStrings_fr.properties

2004-02-26 Thread jfarcand
jfarcand2004/02/26 09:21:32

  Modified:catalina/src/share/org/apache/coyote/tomcat5
LocalStrings_fr.properties
  Log:
  Fix minor typo.
  
  Revision  ChangesPath
  1.3   +3 -3  
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/LocalStrings_fr.properties
  
  Index: LocalStrings_fr.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/LocalStrings_fr.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LocalStrings_fr.properties26 Feb 2004 16:02:38 -  1.2
  +++ LocalStrings_fr.properties26 Feb 2004 17:21:32 -  1.3
  @@ -7,13 +7,13 @@
   coyoteConnector.alreadyStarted=Le connecteur a déjà été démarré
   coyoteConnector.cannotRegisterProtocol=Impossible d'enregistrer le MBean pour le 
Protocol
   coyoteConnector.notStarted=Le connecteur Coyote n''a pas été démarré
  -coyoteConnector.protocolHandlerDestroyFailed=La destruction du gestionnaire de 
protocole a échoué: {0}
  +coyoteConnector.protocolHandlerDestroyFailed=La destruction du gestionnaire de 
protocole a échouée: {0}
   coyoteConnector.protocolHandlerInitializationFailed=L''initialisation du 
gestionnaire de protocole a échoué: {0}
   coyoteConnector.protocolHandlerInstantiationFailed=L''instantiation du gestionnaire 
de protocole a échoué: {0}
   coyoteConnector.protocolHandlerStartFailed=Le démarrage du gestionnaire de 
protocole a échoué: {0}
   coyoteConnector.protocolRegistrationFailed=L'enregistrement du protocol JMX a échoué
  -coyoteConnector.protocolHandlerPauseFailed=La suspension du gestionnaire de 
protocole a échoué
  -coyoteConnector.protocolHandlerResumeFailed=Le redémarrage du gestionnaire de 
protocole  a échoué
  +coyoteConnector.protocolHandlerPauseFailed=La suspension du gestionnaire de 
protocole a échouée
  +coyoteConnector.protocolHandlerResumeFailed=Le redémarrage du gestionnaire de 
protocole a échoué
   
   #
   # CoyoteAdapter
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 MapperListener.java

2004-02-17 Thread jfarcand
jfarcand2004/02/17 14:15:34

  Modified:catalina/src/share/org/apache/coyote/tomcat5
MapperListener.java
  Log:
  The defaultHostName may be alias, so we need to also try to find if the registered 
hosts' aliases contains the defaultHostName.
  
  Revision  ChangesPath
  1.17  +28 -1 
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/MapperListener.java
  
  Index: MapperListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/MapperListener.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- MapperListener.java   2 Feb 2004 17:35:47 -   1.16
  +++ MapperListener.java   17 Feb 2004 22:15:34 -  1.17
  @@ -293,7 +293,34 @@
   ObjectName hostName = new ObjectName
   (domain + :type=Host, + host= + defaultHost);
   if (!mBeanServer.isRegistered(hostName)) {
  -log.warn(Unknown default host:  + defaultHost);
  +
  +// Get the hosts' list
  +String onStr = domain + :type=Host,*;
  +ObjectName objectName = new ObjectName(onStr);
  +Set set = mBeanServer.queryMBeans(objectName, null);
  +Iterator iterator = set.iterator();
  +String[] aliases;
  +boolean isRegisteredWithAlias = false;
  +
  +while (iterator.hasNext()) {
  +
  +if (isRegisteredWithAlias) break;
  +
  +ObjectInstance oi = (ObjectInstance) iterator.next();
  +hostName = oi.getObjectName();
  +aliases = (String[])
  +mBeanServer.invoke(hostName, findAliases, null, null);
  +
  +for (int i=0; i  aliases.length; i++){
  +if (aliases[i].equalsIgnoreCase(defaultHost)){
  +isRegisteredWithAlias = true;
  +break;
  +}
  +}
  +}
  +
  +if (!isRegisteredWithAlias)
  +log.warn(Unknown default host:  + defaultHost);
   }
   // This should probablt be called later 
   if( defaultHost != null ) {
  
  
  

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



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

2004-02-04 Thread jfarcand
jfarcand2004/02/04 09:28:28

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  When using the embedded interface and calling removeChild(..), the mbean wasn't 
unregistered. That's only occurs when you call removeChild. The mbean is always 
unregistered when calling addChild (StandardContext.start())
  
  Revision  ChangesPath
  1.115 +4 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- StandardContext.java  27 Jan 2004 23:18:19 -  1.114
  +++ StandardContext.java  4 Feb 2004 17:28:28 -   1.115
  @@ -4536,6 +4536,9 @@
   // If you extend this - override this method and make sure to clean up
   children=new HashMap();
   log.debug(resetContext  + oname +   + mserver);
  +// Unregister the mbean so when ContainerBase.removeChild() is called
  +// the associated mbean is unregistered.
  +destroy();
   }
   
   /**
  
  
  

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



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

2004-02-04 Thread jfarcand
jfarcand2004/02/04 09:49:14

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  Revert my last commit.
  
  Revision  ChangesPath
  1.116 +1 -4  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- StandardContext.java  4 Feb 2004 17:28:28 -   1.115
  +++ StandardContext.java  4 Feb 2004 17:49:14 -   1.116
  @@ -4536,9 +4536,6 @@
   // If you extend this - override this method and make sure to clean up
   children=new HashMap();
   log.debug(resetContext  + oname +   + mserver);
  -// Unregister the mbean so when ContainerBase.removeChild() is called
  -// the associated mbean is unregistered.
  -destroy();
   }
   
   /**
  
  
  

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



cvs commit: jakarta-tomcat-catalina/webapps/webdav/WEB-INF web.xml

2004-02-02 Thread jfarcand
jfarcand2004/02/02 10:28:26

  Modified:.build.properties.default
   webapps/webdav/WEB-INF web.xml
  Log:
  - Update to Xerces 2.6.1
  - Fix validation error.
  
  Revision  ChangesPath
  1.118 +4 -4  jakarta-tomcat-5/build.properties.default
  
  Index: build.properties.default
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v
  retrieving revision 1.117
  retrieving revision 1.118
  diff -u -r1.117 -r1.118
  --- build.properties.default  15 Jan 2004 14:37:37 -  1.117
  +++ build.properties.default  2 Feb 2004 18:28:26 -   1.118
  @@ -130,12 +130,12 @@
   regexp.loc=${base-jakarta.loc}/regexp/binaries/jakarta-regexp-1.3.tar.gz
   
   
  -# - Xerces XML Parser, version 2.6.0 -
  -xerces.home=${base.path}/xerces-2_6_0
  +# - Xerces XML Parser, version 2.6.1 -
  +xerces.home=${base.path}/xerces-2_6_1
   xerces.lib=${xerces.home}
   xercesImpl.jar=${xerces.lib}/xercesImpl.jar
   xmlParserAPIs.jar=${xerces.lib}/xmlParserAPIs.jar
  -xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.6.0.tar.gz
  +xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.6.1.tar.gz
   
   
   # --
  
  
  
  1.3   +3 -1  jakarta-tomcat-catalina/webapps/webdav/WEB-INF/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/webdav/WEB-INF/web.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- web.xml   1 Feb 2004 23:18:15 -   1.2
  +++ web.xml   2 Feb 2004 18:28:26 -   1.3
  @@ -66,6 +66,8 @@
 /security-role
   --
   
  -  welcome-file-list /
  +  welcome-file-list
  +welcome-file/
  +  /welcome-file-list  
   
   /web-app
  
  
  

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



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

2004-01-26 Thread jfarcand
jfarcand2004/01/26 08:07:54

  Modified:catalina/src/share/org/apache/catalina/startup
DigesterFactory.java
  Log:
  Add missing setUseContextClassLoader call to avoid possible classloader issue when 
Tomcat is embedded
  
  Revision  ChangesPath
  1.3   +2 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/DigesterFactory.java
  
  Index: DigesterFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/DigesterFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DigesterFactory.java  20 Dec 2003 23:04:02 -  1.2
  +++ DigesterFactory.java  26 Jan 2004 16:07:54 -  1.3
  @@ -116,7 +116,8 @@
   Digester digester = new Digester();
   digester.setNamespaceAware(xmlNamespaceAware);
   digester.setValidating(xmlValidation);
  -
  +digester.setUseContextClassLoader(true);
  +
   String parserName = 
   digester.getFactory().getClass().getName();
   if (parserName.indexOf(xerces)!=-1) {
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteRequest.java

2003-12-16 Thread jfarcand
jfarcand2003/12/16 11:46:24

  Modified:catalina/src/share/org/apache/coyote/tomcat5
CoyoteRequest.java
  Log:
  Fix typo (cut and paste should not exist)
  
  Revision  ChangesPath
  1.28  +5 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- CoyoteRequest.java10 Dec 2003 22:26:28 -  1.27
  +++ CoyoteRequest.java16 Dec 2003 19:46:23 -  1.28
  @@ -1266,7 +1266,7 @@
   if (localName == null) {
   if (socket != null) {
   InetAddress inet = socket.getLocalAddress();
  -localAddr = inet.getHostName();
  +localName = inet.getHostName();
   } else {
   coyoteRequest.action
   (ActionCode.ACTION_REQ_LOCAL_NAME_ATTRIBUTE, coyoteRequest);
  
  
  

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



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

2003-12-11 Thread jfarcand
jfarcand2003/12/11 08:41:28

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  Minor fix. Avoid creating two array.
  
  Revision  ChangesPath
  1.29  +3 -3  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- WebappClassLoader.java10 Dec 2003 23:45:39 -  1.28
  +++ WebappClassLoader.java11 Dec 2003 16:41:28 -  1.29
  @@ -1436,12 +1436,12 @@
   }
   
   repositoryURLs = urls;
  -return repositoryURLs;
   
   } catch (MalformedURLException e) {
   repositoryURLs = new URL[0];
  -return (new URL[0]);
   }
  +
  +return repositoryURLs;
   
   }
   
  
  
  

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



cvs commit: jakarta-servletapi-5/jsr154/examples helloworld.html

2003-12-08 Thread jfarcand
jfarcand2003/12/08 07:38:29

  Modified:jsr154/examples helloworld.html
  Log:
  Apply patch from Mark Thomas (medthomas at ntlworld dot com)
  
  Revision  ChangesPath
  1.3   +0 -1  jakarta-servletapi-5/jsr154/examples/helloworld.html
  
  Index: helloworld.html
  ===
  RCS file: /home/cvs/jakarta-servletapi-5/jsr154/examples/helloworld.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- helloworld.html   29 Oct 2002 17:42:57 -  1.2
  +++ helloworld.html   8 Dec 2003 15:38:29 -   1.3
  @@ -21,7 +21,6 @@
   response.setContentType(quot;font color=#009900text/html/fontquot;);
   PrintWriter out = response.getWriter();
   out.println(quot;font color=#009900lt;htmlgt;/fontquot;);
  -out.println(quot;font color=#009900lt;bodygt;/fontquot;);
   out.println(quot;font color=#009900lt;headgt;/fontquot;);
   out.println(quot;font color=#009900lt;titlegt;Hello 
World!lt;/titlegt;/fontquot;);
   out.println(quot;font color=#009900lt;/headgt;/fontquot;);
  
  
  

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



cvs commit: jakarta-tomcat-4.0/webapps/examples/servlets helloworld.html

2003-12-08 Thread jfarcand
jfarcand2003/12/08 07:40:42

  Modified:webapps/examples/servlets helloworld.html
  Log:
  Port patch.
  
  Revision  ChangesPath
  1.2   +0 -1  jakarta-tomcat-4.0/webapps/examples/servlets/helloworld.html
  
  Index: helloworld.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/examples/servlets/helloworld.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- helloworld.html   17 Aug 2000 00:58:20 -  1.1
  +++ helloworld.html   8 Dec 2003 15:40:42 -   1.2
  @@ -21,7 +21,6 @@
   response.setContentType(quot;font color=#009900text/html/fontquot;);
   PrintWriter out = response.getWriter();
   out.println(quot;font color=#009900lt;htmlgt;/fontquot;);
  -out.println(quot;font color=#009900lt;bodygt;/fontquot;);
   out.println(quot;font color=#009900lt;headgt;/fontquot;);
   out.println(quot;font color=#009900lt;titlegt;Hello 
World!lt;/titlegt;/fontquot;);
   out.println(quot;font color=#009900lt;/headgt;/fontquot;);
  
  
  

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



cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java

2003-12-02 Thread jfarcand
jfarcand2003/12/02 08:27:11

  Modified:coyote/src/java/org/apache/coyote Request.java
ActionCode.java
   catalina/src/share/org/apache/coyote/tomcat5
CoyoteRequest.java
   http11/src/java/org/apache/coyote/http11
Http11Processor.java
  Log:
  Implement getLocalPort using ActionCode instead of getServerPort. Associate 1 
ActionCode for each getXXX method.
  
  Please review.
  
  Revision  ChangesPath
  1.24  +11 -1 
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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Request.java  7 Sep 2003 18:03:21 -   1.23
  +++ Request.java  2 Dec 2003 16:27:11 -   1.24
  @@ -136,6 +136,7 @@
   private String localHost;
   
   private int remotePort;
  +private int localPort;
   
   private MessageBytes schemeMB = new MessageBytes();
   
  @@ -303,7 +304,14 @@
   public void setRemotePort(int port){
   this.remotePort = port;
   }
  -
  +
  +public int getLocalPort(){
  +return localPort;
  +}
  +
  +public void setLocalPort(int port){
  +this.localPort = port;
  +}
   
   //  encoding/type 
   
  @@ -502,6 +510,8 @@
   headers.recycle();
   serverNameMB.recycle();
   serverPort=-1;
  +localPort = -1;
  +remotePort = -1;
   
cookies.recycle();
   parameters.recycle();
  
  
  
  1.14  +17 -0 
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java
  
  Index: ActionCode.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ActionCode.java   1 Oct 2003 07:50:29 -   1.13
  +++ ActionCode.java   2 Dec 2003 16:27:11 -   1.14
  @@ -135,7 +135,24 @@
* (including forcing a re-handshake if necessary)
*/
   public static final ActionCode ACTION_REQ_SSL_CERTIFICATE = new ActionCode(15);
  +
  +
  +/**
  + * Callback for lazy evaluation - socket remote port.
  + **/
  +public static final ActionCode ACTION_REQ_REMOTEPORT_ATTRIBUTE = new 
ActionCode(16);
   
  +
  +/**
  + * Callback for lazy evaluation - socket local port.
  + **/
  +public static final ActionCode ACTION_REQ_LOCALPORT_ATTRIBUTE = new 
ActionCode(17);
  +
  +
  +/**
  + * Callback for lazy evaluation - local address.
  + **/
  +public static final ActionCode ACTION_REQ_LOCAL_ADDR_ATTRIBUTE = new 
ActionCode(18);
   
   // --- Constructors
   int code;
  
  
  
  1.24  +23 -7 
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- CoyoteRequest.java20 Nov 2003 20:56:28 -  1.23
  +++ CoyoteRequest.java2 Dec 2003 16:27:11 -   1.24
  @@ -366,6 +366,11 @@
   
   
   /**
  + * Local port
  + */
  +protected int localPort = -1;
  +
  +/**
* Remote address.
*/
   protected String remoteAddr = null;
  @@ -420,6 +425,7 @@
   remoteAddr = null;
   remoteHost = null;
   remotePort = -1;
  +localPort = -1;
   localAddr = null;
   
   attributes.clear();
  @@ -646,6 +652,7 @@
   remoteHost = null;
   remoteAddr = null;
   remotePort = -1;
  +localPort = -1;
   localAddr = null;
   }
   
  @@ -1236,7 +1243,7 @@
   remotePort = socket.getPort();
   } else {
   coyoteRequest.action
  -(ActionCode.ACTION_REQ_HOST_ATTRIBUTE, coyoteRequest);
  +(ActionCode.ACTION_REQ_REMOTEPORT_ATTRIBUTE, coyoteRequest);
   remotePort = coyoteRequest.getRemotePort();
   }
   }
  @@ -1262,7 +1269,7 @@
   localAddr = inet.getHostAddress();
   } else {
   coyoteRequest.action
  -(ActionCode.ACTION_REQ_HOST_ATTRIBUTE, coyoteRequest);
  +(ActionCode.ACTION_REQ_LOCAL_ADDR_ATTRIBUTE, coyoteRequest

cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java

2003-12-02 Thread jfarcand
jfarcand2003/12/02 15:01:01

  Modified:coyote/src/java/org/apache/coyote Request.java
ActionCode.java
   catalina/src/share/org/apache/coyote/tomcat5
CoyoteRequest.java
   http11/src/java/org/apache/coyote/http11
Http11Processor.java
  Log:
  Add proper getLocalName implementation.
  
  Please review
  
  Revision  ChangesPath
  1.25  +5 -1  
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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Request.java  2 Dec 2003 16:27:11 -   1.24
  +++ Request.java  2 Dec 2003 23:01:00 -   1.25
  @@ -149,7 +149,7 @@
   
   // remote address/host
   private MessageBytes remoteAddrMB = new MessageBytes();
  -private MessageBytes localAddr = new MessageBytes();
  +private MessageBytes localNameMB = new MessageBytes();
   private MessageBytes remoteHostMB = new MessageBytes();
   private MessageBytes localAddrMB = new MessageBytes();

  @@ -284,6 +284,10 @@
   public MessageBytes remoteHost() {
return remoteHostMB;
   }
  +
  +public MessageBytes localName() {
  + return localNameMB;
  +}
   
   public MessageBytes localAddr() {
return localAddrMB;
  
  
  
  1.15  +6 -0  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java
  
  Index: ActionCode.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ActionCode.java   2 Dec 2003 16:27:11 -   1.14
  +++ ActionCode.java   2 Dec 2003 23:01:00 -   1.15
  @@ -153,6 +153,12 @@
* Callback for lazy evaluation - local address.
**/
   public static final ActionCode ACTION_REQ_LOCAL_ADDR_ATTRIBUTE = new 
ActionCode(18);
  +
  +
  +/**
  + * Callback for lazy evaluation - local address.
  + **/
  +public static final ActionCode ACTION_REQ_LOCAL_NAME_ATTRIBUTE = new 
ActionCode(19);
   
   // --- Constructors
   int code;
  
  
  
  1.25  +23 -5 
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- CoyoteRequest.java2 Dec 2003 16:27:11 -   1.24
  +++ CoyoteRequest.java2 Dec 2003 23:01:01 -   1.25
  @@ -391,7 +391,13 @@
* Local address
*/
   protected String localAddr = null;
  +
   
  +/**
  + * Local address
  + */
  +protected String localName = null;
  +
   /** After the request is mapped to a ServletContext, we can also
* map it to a logger.
*/ 
  @@ -427,6 +433,7 @@
   remotePort = -1;
   localPort = -1;
   localAddr = null;
  +localName = null;
   
   attributes.clear();
   notes.clear();
  @@ -654,6 +661,7 @@
   remotePort = -1;
   localPort = -1;
   localAddr = null;
  +localName = null;
   }
   
   
  @@ -1255,7 +1263,17 @@
* which the request was received.
*/
   public String getLocalName(){
  -return getServerName();
  +if (localName == null) {
  +if (socket != null) {
  +InetAddress inet = socket.getLocalAddress();
  +localAddr = inet.getHostName();
  +} else {
  +coyoteRequest.action
  +(ActionCode.ACTION_REQ_LOCAL_NAME_ATTRIBUTE, coyoteRequest);
  +localName = coyoteRequest.localName().toString();
  +}
  +}
  +return localName;
   }
   
   /**
  
  
  
  1.92  +21 -2 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
  
  Index: Http11Processor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- Http11Processor.java  2 Dec 2003 16:27:11 -   1.91
  +++ Http11Processor.java  2 Dec 2003 23:01:01 -   1.92
  @@ -239,9 +239,17 @@
* Remote

cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java

2003-12-01 Thread jfarcand
jfarcand2003/12/01 12:44:14

  Modified:http11/src/java/org/apache/coyote/http11
Http11Processor.java
  Log:
  Use the socket info instead of hardcoded value. HttpServletRequest.getLocalPort() is 
currently broken if the port are not the default one.
  
  Revision  ChangesPath
  1.89  +4 -4  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
  
  Index: Http11Processor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- Http11Processor.java  21 Nov 2003 21:10:21 -  1.88
  +++ Http11Processor.java  1 Dec 2003 20:44:14 -   1.89
  @@ -1294,11 +1294,11 @@
   
   if (colonPos  0) {
   if (sslSupport == null) {
  -// 80 - Default HTTTP port
  -request.setServerPort(80);
  +// Default HTTTP port
  +request.setServerPort(socket.getLocalPort());
   } else {
  -// 443 - Default HTTPS port
  -request.setServerPort(443);
  +// Default HTTPS port
  +request.setServerPort(socket.getLocalPort());
   }
   request.serverName().setChars(hostNameC, 0, valueL);
   } else {
  
  
  

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



cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java

2003-12-01 Thread jfarcand
jfarcand2003/12/01 15:58:53

  Modified:http11/src/java/org/apache/coyote/http11
Http11Processor.java
  Log:
  Revert my last commit based on Remy's feedback.
  
  Revision  ChangesPath
  1.90  +4 -4  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
  
  Index: Http11Processor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- Http11Processor.java  1 Dec 2003 20:44:14 -   1.89
  +++ Http11Processor.java  1 Dec 2003 23:58:53 -   1.90
  @@ -1294,11 +1294,11 @@
   
   if (colonPos  0) {
   if (sslSupport == null) {
  -// Default HTTTP port
  -request.setServerPort(socket.getLocalPort());
  +// 80 - Default HTTTP port
  +request.setServerPort(80);
   } else {
  -// Default HTTPS port
  -request.setServerPort(socket.getLocalPort());
  +// 443 - Default HTTPS port
  +request.setServerPort(443);
   }
   request.serverName().setChars(hostNameC, 0, valueL);
   } else {
  
  
  

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



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

2003-11-24 Thread jfarcand
jfarcand2003/11/24 13:48:27

  Modified:catalina/src/share/org/apache/catalina/core
ApplicationContext.java
  Log:
  When calling ServletContext.log, append the application's name so we know from which 
application the log is coming.
  
  Feel free to revert if it breaks something.
  
  Revision  ChangesPath
  1.21  +7 -7  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
  
  Index: ApplicationContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ApplicationContext.java   4 Sep 2003 17:45:40 -   1.20
  +++ ApplicationContext.java   24 Nov 2003 21:48:27 -  1.21
  @@ -665,7 +665,7 @@
   
   Logger logger = context.getLogger();
   if (logger != null)
  -logger.log(message);
  +logger.log(context.logName() + message);
   
   }
   
  @@ -683,7 +683,7 @@
   
   Logger logger = context.getLogger();
   if (logger != null)
  -logger.log(exception, message);
  +logger.log(exception, context.logName() + message);
   
   }
   
  @@ -698,7 +698,7 @@
   
   Logger logger = context.getLogger();
   if (logger != null)
  -logger.log(message, throwable);
  +logger.log(context.logName() + message, throwable);
   
   }
   
  
  
  

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



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

2003-11-13 Thread jfarcand
jfarcand2003/11/13 14:56:27

  Modified:catalina/src/share/org/apache/catalina/session
PersistentManagerBase.java
  Log:
  Return the object instead of a null. Throw the proper exception. Cut/Paste should 
not exists
  
  Revision  ChangesPath
  1.12  +10 -7 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java
  
  Index: PersistentManagerBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- PersistentManagerBase.java8 Sep 2003 15:25:18 -   1.11
  +++ PersistentManagerBase.java13 Nov 2003 22:56:27 -  1.12
  @@ -140,8 +140,7 @@
   }
   
   public Object run() throws Exception{
  -   store.load(id);
  -   return null;
  +   return store.load(id);
   }   
   }   
 
  @@ -802,7 +801,11 @@
   }catch(PrivilegedActionException ex){
   Exception exception = ex.getException();
   log.error(Exception clearing the Store:  + exception);
  -exception.printStackTrace();
  +if (exception instanceof IOException){
  +throw (IOException)exception;
  +} else if (exception instanceof ClassNotFoundException) {
  +throw (ClassNotFoundException)exception;
  +}
   }
   } else {
session = store.load(id);
  
  
  

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



cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/security SecurityClassLoad.java

2003-10-30 Thread jfarcand
jfarcand2003/10/30 17:30:01

  Modified:catalina/src/share/org/apache/catalina/security
SecurityClassLoad.java
   http11/src/java/org/apache/coyote/http11
Http11Processor.java InternalOutputBuffer.java
   jasper2/src/share/org/apache/jasper/runtime
JspWriterImpl.java PageContextImpl.java
   jasper2/src/share/org/apache/jasper/security
SecurityClassLoad.java
  Log:
  Fix for bug 24270: NoClassDefFoundError when running in security mode
  
  Next time I will update my tcks before syaing they all passes ;-)
  
  Revision  ChangesPath
  1.11  +14 -4 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityClassLoad.java
  
  Index: SecurityClassLoad.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityClassLoad.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SecurityClassLoad.java19 Sep 2003 22:03:35 -  1.10
  +++ SecurityClassLoad.java31 Oct 2003 01:30:01 -  1.11
  @@ -89,6 +89,7 @@
   loadUtilPackage(loader);
   loadJavaxPackage(loader);
   loadCoyotePackage(loader);
  +loadHttp11Package(loader);
   }
   
   
  @@ -148,6 +149,15 @@
   private final static void loadJavaxPackage(ClassLoader loader)
   throws Exception {
   loader.loadClass(javax.servlet.http.Cookie);
  +}
  +
  +
  +private final static void loadHttp11Package(ClassLoader loader)
  +throws Exception {
  +String basePackage = org.apache.coyote.http11.;
  +loader.loadClass(basePackage + Http11Processor$1);
  +loader.loadClass(basePackage + InternalOutputBuffer$1);
  +loader.loadClass(basePackage + InternalOutputBuffer$2);
   }
   
   
  
  
  
  1.85  +19 -3 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
  
  Index: Http11Processor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- Http11Processor.java  17 Oct 2003 18:45:40 -  1.84
  +++ Http11Processor.java  31 Oct 2003 01:30:01 -  1.85
  @@ -66,6 +66,8 @@
   import java.net.InetAddress;
   import java.net.Socket;
   import java.util.StringTokenizer;
  +import java.security.AccessController;
  +import java.security.PrivilegedAction;
   
   import org.apache.coyote.ActionCode;
   import org.apache.coyote.ActionHook;
  @@ -1434,9 +1436,23 @@
   }
   
   // Add date header
  -if (! response.containsHeader(Date))
  -  response.addHeader(Date, FastHttpDateFormat.getCurrentDate());
  -
  +if (! response.containsHeader(Date)){
  +  
  +  String date = null;
  +  if (System.getSecurityManager() != null){
  +date = (String)AccessController.doPrivileged( 
  +new PrivilegedAction() {
  +public Object run(){
  +return FastHttpDateFormat.getCurrentDate();
  +}
  +}
  +);
  +  } else {
  +date = FastHttpDateFormat.getCurrentDate();
  +  }
  +  response.addHeader(Date, date);
  +}
  + 
   // Add server header
   response.addHeader(Server, Constants.SERVER);
   
  
  
  
  1.20  +28 -2 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalOutputBuffer.java
  
  Index: InternalOutputBuffer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalOutputBuffer.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- InternalOutputBuffer.java 12 Sep 2003 13:15:36 -  1.19
  +++ InternalOutputBuffer.java 31 Oct 2003 01:30:01 -  1.20
  @@ -61,6 +61,8 @@
   
   import java.io.IOException;
   import java.io.OutputStream;
  +import java.security.AccessController;
  +import java.security.PrivilegedAction;
   
   import org.apache.tomcat.util.buf.ByteChunk;
   import org.apache.tomcat.util.buf.MessageBytes;
  @@ -489,16 +491,40 @@
   // Write message
   String message = response.getMessage();
   if (message == null) {
  -write(HttpMessages.getMessage(status));
  +write(getMessage(status));
   } else {
   write(message);
   }
   
   // End the response status line
  -write(Constants.CRLF_BYTES

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

2003-10-27 Thread jfarcand
jfarcand2003/10/27 12:49:00

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java ContextConfig.java
  Added:   catalina/src/share/org/apache/catalina/startup
DigesterFactory.java
  Log:
  Merge digester's initialization logic into 1 class and add schema supports for 
parser other that Xerces ( someday I will find one ).
  
  Please review.
  
  Revision  ChangesPath
  1.33  +4 -107
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- TldConfig.java6 Oct 2003 23:51:46 -   1.32
  +++ TldConfig.java27 Oct 2003 20:48:59 -  1.33
  @@ -86,7 +86,6 @@
   import javax.naming.NamingException;
   import javax.naming.directory.DirContext;
   import javax.servlet.ServletException;
  -import javax.xml.parsers.ParserConfigurationException;
   
   import org.apache.catalina.Context;
   import org.apache.catalina.Globals;
  @@ -95,8 +94,6 @@
   import org.apache.catalina.util.StringManager;
   import org.apache.commons.digester.Digester;
   import org.xml.sax.InputSource;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
   
   /**
* Startup event listener for a bContext/b that configures the properties
  @@ -452,112 +449,12 @@
*/
   private static Digester createTldDigester() {
   
  -URL url = null;
  -Digester tldDigester = new Digester();
  -tldDigester.setNamespaceAware(xmlNamespaceAware);
  -tldDigester.setValidating(xmlValidation);
  -
  -if (tldDigester.getFactory().getClass()
  -.getName().indexOf(xerces)!=-1) {
  -tldDigester = patchXerces(tldDigester);
  -}
  -// Set the schemaLocation
  -SchemaResolver tldEntityResolver = new SchemaResolver( tldDigester);
  -
  -if (xmlValidation) {
  -if (tldDigester.getFactory().getClass()
  -.getName().indexOf(xerces)!=-1) {
  -try{
  -tldDigester.setFeature(
  -http://apache.org/xml/features/validation/dynamic;,
  -true);
  -tldDigester.setFeature(
  -http://apache.org/xml/features/validation/schema;,
  -true);
  -} catch(ParserConfigurationException e){
  -// log(contextConfig.registerLocalSchema, e);
  -} catch(SAXNotRecognizedException e){
  -// log(contextConfig.registerLocalSchema, e);
  -} catch(SAXNotSupportedException e){
  -// log(contextConfig.registerLocalSchema, e);
  -}
  +return DigesterFactory.newDigester(xmlValidation, 
  +   xmlNamespaceAware, 
  +   new TldRuleSet());
   
  -}
  -}
  -
  -url = TldConfig.class.getResource(Constants.TldDtdResourcePath_11);
  -tldEntityResolver.register(Constants.TldDtdPublicId_11,
  -   url.toString());
  -
  -url = TldConfig.class.getResource(Constants.TldDtdResourcePath_12);
  -tldEntityResolver.register(Constants.TldDtdPublicId_12,
  -   url.toString());
  -
  -tldEntityResolver = registerLocalSchema(tldEntityResolver);
  -
  -tldDigester.setEntityResolver(tldEntityResolver);
  -tldDigester.addRuleSet(new TldRuleSet());
  -return (tldDigester);
  -
  -}
  -
  -
  -private static Digester patchXerces(Digester digester){
  -// This feature is needed for backward compatibility with old DDs
  -// which used Java encoding names such as ISO8859_1 etc.
  -// with Crimson (bug 4701993). By default, Xerces does not
  -// support ISO8859_1.
  -try{
  -digester.setFeature(
  -http://apache.org/xml/features/allow-java-encodings;, true);
  -} catch(ParserConfigurationException e){
  -// log(contextConfig.registerLocalSchema, e);
  -} catch(SAXNotRecognizedException e){
  -// log(contextConfig.registerLocalSchema, e);
  -} catch(SAXNotSupportedException e){
  -// log(contextConfig.registerLocalSchema, e);
  -}
  -return digester;
  -}
  -
  -/**
  - * Utilities used to force the parser to use local schema, when available,
  - * instead of the codeschemaLocation

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

2003-10-21 Thread jfarcand
jfarcand2003/10/21 17:28:44

  Modified:catalina/src/bin catalina.sh catalina.bat
  Log:
  Remove supports for Embedded options.
  
  Revert if you still use it (and make it work againt :-) ).
  
  Revision  ChangesPath
  1.11  +1 -13 jakarta-tomcat-catalina/catalina/src/bin/catalina.sh
  
  Index: catalina.sh
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/catalina.sh,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- catalina.sh   10 Oct 2003 15:42:20 -  1.10
  +++ catalina.sh   22 Oct 2003 00:28:44 -  1.11
  @@ -173,17 +173,6 @@
   fi
 fi
   
  -elif [ $1 = embedded ] ; then
  -
  -  shift
  -  echo Embedded Classpath: $CLASSPATH
  -  exec $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \
  --Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \
  --Dcatalina.base=$CATALINA_BASE \
  --Dcatalina.home=$CATALINA_HOME \
  --Djava.io.tmpdir=$CATALINA_TMPDIR \
  -org.apache.catalina.startup.Embedded $@
  -
   elif [ $1 = run ]; then
   
 shift
  @@ -270,7 +259,6 @@
   echo   debug Start Catalina in a debugger
   echo   debug -security   Debug Catalina with a security manager
 fi
  -  echo   embedded  Start Catalina in embedded mode
 echo   jpda startStart Catalina under JPDA debugger
 echo   run   Start Catalina in the current window
 echo   run -security Start in the current window with security manager
  
  
  
  1.6   +1 -8  jakarta-tomcat-catalina/catalina/src/bin/catalina.bat
  
  Index: catalina.bat
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/catalina.bat,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- catalina.bat  2 Oct 2003 17:07:40 -   1.5
  +++ catalina.bat  22 Oct 2003 00:28:44 -  1.6
  @@ -102,7 +102,6 @@
   :noJpda
   
   if %1 == debug goto doDebug
  -if %1 == embedded goto doEmbedded
   if %1 == run goto doRun
   if %1 == start goto doStart
   if %1 == stop goto doStop
  @@ -111,7 +110,6 @@
   echo commands:
   echo   debug Start Catalina in a debugger
   echo   debug -security   Debug Catalina with a security manager
  -echo   embedded  Start Catalina in embedded mode
   echo   jpda startStart Catalina under JPDA debugger
   echo   run   Start Catalina in the current window
   echo   run -security Start in the current window with security manager
  @@ -128,11 +126,6 @@
   shift
   echo Using Security Manager
   set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
  -goto execCmd
  -
  -:doEmbedded
  -shift
  -set MAINCLASS=org.apache.catalina.startup.Embedded
   goto execCmd
   
   :doRun
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteResponse.java

2003-10-15 Thread jfarcand
jfarcand2003/10/15 11:47:49

  Modified:catalina/src/share/org/apache/catalina Wrapper.java
   catalina/src/share/org/apache/catalina/core
StandardWrapper.java StandardWrapperValve.java
   catalina/src/share/org/apache/coyote/tomcat5
CoyoteResponse.java
  Log:
  Better increment the error count value by incrementing the count everytime sendError 
is invoked
  
  Revision  ChangesPath
  1.3   +10 -4 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Wrapper.java
  
  Index: Wrapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Wrapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Wrapper.java  29 Jan 2003 12:41:47 -  1.2
  +++ Wrapper.java  15 Oct 2003 18:47:49 -  1.3
  @@ -290,6 +290,12 @@
   
   
   /**
  + * Increment the error count value used when monitoring.
  + */
  +public void incrementErrorCount();
  +
  +
  +/**
* Load and initialize an instance of this servlet, if there is not already
* at least one initialized instance.  This can be used, for example, to
* load servlets that are marked in the deployment descriptor to be loaded
  
  
  
  1.34  +11 -4 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
  
  Index: StandardWrapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- StandardWrapper.java  24 Sep 2003 06:56:21 -  1.33
  +++ StandardWrapper.java  15 Oct 2003 18:47:49 -  1.34
  @@ -1424,6 +1424,13 @@
  swValve.setErrorCount(errorCount);
   }
   
  +/**
  + * Increment the error count used for monitoring.
  + */
  +public void incrementErrorCount(){
  +swValve.setErrorCount(swValve.getErrorCount() + 1);
  +}
  +
   public long getLoadTime() {
   return loadTime;
   }
  
  
  
  1.23  +1 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java
  
  Index: StandardWrapperValve.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- StandardWrapperValve.java 2 Sep 2003 21:22:04 -   1.22
  +++ StandardWrapperValve.java 15 Oct 2003 18:47:49 -  1.23
  @@ -442,7 +442,6 @@
*/
   private void exception(Request request, Response response,
  Throwable exception) {
  -errorCount++;
   ServletRequest sreq = request.getRequest();
   sreq.setAttribute(Globals.EXCEPTION_ATTR, exception);
   
  
  
  
  1.10  +10 -4 
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteResponse.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CoyoteResponse.java   19 Sep 2003 22:03:07 -  1.9
  +++ CoyoteResponse.java   15 Oct 2003 18:47:49 -  1.10
  @@ -90,6 +90,7 @@
   import org.apache.catalina.Connector;
   import org.apache.catalina.Context;
   import org.apache.catalina.HttpResponse;
  +import org.apache.catalina.Wrapper;
   import org.apache.catalina.util.CharsetMapper;
   import org.apache.catalina.util.DateTool;
   import org.apache.catalina.util.StringManager;
  @@ -1149,6 +1150,11 @@
   // Ignore any call from an included servlet
   if (included)
   return; 
  +
  +Wrapper wrapper = getRequest().getWrapper();
  +if (wrapper != null) {
  +wrapper.incrementErrorCount();
  +} 
   
   setError();
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/conf server.xml

2003-10-07 Thread jfarcand
jfarcand2003/10/07 07:38:12

  Modified:catalina/src/conf server.xml
  Log:
  Make the xmlValidation more visible so people (meaning I) don't forget to turn on 
those attributes when testing.
  
  Revision  ChangesPath
  1.25  +4 -13 jakarta-tomcat-catalina/catalina/src/conf/server.xml
  
  Index: server.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/server.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- server.xml1 Oct 2003 09:45:06 -   1.24
  +++ server.xml7 Oct 2003 14:38:12 -   1.25
  @@ -208,21 +208,12 @@
 userRoleTable=user_roles roleNameCol=role_name /
 --
   
  -  !-- Define the default virtual host --
  -  Host name=localhost debug=0 appBase=webapps
  -   unpackWARs=true autoDeploy=true
  -
  -  !-- Add the following attributes if you want to turn XML validation
  -   on. Remember to comment the Host element above. 
  -   
  -   Note: XML Schema validationn will works with Xerces 2.0.1 or 
  -   Xerces 2.1. Xerces 2.0.2 and Xerces 2.2 have bugs that prevent 
  -   their use with Tomcat--
  -  !--
  +  !-- Define the default virtual host
  +   Note: XML Schema validationn will not works with Xerces 2.2.
  +   --
 Host name=localhost debug=0 appBase=webapps
  unpackWARs=true autoDeploy=true
  -   xmlValidation=true xmlNamespaceAware=true
  -  --
  +   xmlValidation=false xmlNamespaceAware=false
   
   !-- Defines a cluster for this node,
By defining this element, means that every manager will be changed.
  
  
  

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



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

2003-10-06 Thread jfarcand
jfarcand2003/10/06 16:51:46

  Modified:catalina/src/share/org/apache/catalina/util
SchemaResolver.java
   catalina/src/share/org/apache/catalina/startup
ContextConfig.java TldConfig.java
   catalina/src/share/org/apache/catalina/core
StandardHost.java
  Log:
  Cleanup schema validation and add a status message at startup.
  
  Revision  ChangesPath
  1.2   +2 -9  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/SchemaResolver.java
  
  Index: SchemaResolver.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/SchemaResolver.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SchemaResolver.java   20 Aug 2002 03:26:37 -  1.1
  +++ SchemaResolver.java   6 Oct 2003 23:51:46 -   1.2
  @@ -101,18 +101,11 @@
   
   
   /**
  - * The XML schema to use for validating an XML instance.
  - */
  -protected String schemaLocation = null;
  -
  -
  -/**
* Create a new codeEntityResolver/code that will redirect
* all remote dtds and schema to a locat destination.
* @param schemaLocation the XML Schema used to validate xml instance.
*/
  -public SchemaResolver(String schemaLocation, Digester digester) {
  -this.schemaLocation = schemaLocation;
  +public SchemaResolver(Digester digester) {
   this.digester = digester;
   }
   
  @@ -162,7 +155,7 @@
   
   // Redirect the schema location to a local destination
   String key = null;
  -if (schemaLocation != null  entityURL == null  systemId != null) {
  +if (entityURL == null  systemId != null) {
   key = systemId.substring(systemId.lastIndexOf('/')+1);
   entityURL = (String)entityValidator.get(key);
   }
  
  
  
  1.37  +4 -7  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- ContextConfig.java25 Sep 2003 19:27:59 -  1.36
  +++ ContextConfig.java6 Oct 2003 23:51:46 -   1.37
  @@ -493,15 +493,12 @@
   webDigester.setNamespaceAware(namespaceAware);
   webDigester.setValidating(validation);
  
  -if (webDigester.getFactory().getClass().getName().indexOf(xerces)!=-1) {
  +if (webDigester.getFactory().getClass()
  +.getName().indexOf(xerces)!=-1) {
   webDigester = patchXerces(webDigester);
   }
  -
  -url = ContextConfig.class.
  -getResource(Constants.WebSchemaResourcePath_24);
   
  -SchemaResolver webEntityResolver = new SchemaResolver(url.toString(),
  -  webDigester);
  +SchemaResolver webEntityResolver = new SchemaResolver( webDigester);
   
   if (validation) {
   if (webDigester.getFactory().getClass()
  
  
  
  1.32  +3 -4  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- TldConfig.java26 Sep 2003 23:09:08 -  1.31
  +++ TldConfig.java6 Oct 2003 23:51:46 -   1.32
  @@ -457,13 +457,12 @@
   tldDigester.setNamespaceAware(xmlNamespaceAware);
   tldDigester.setValidating(xmlValidation);
   
  -if (tldDigester.getFactory().getClass().getName().indexOf(xerces)!=-1) {
  +if (tldDigester.getFactory().getClass()
  +.getName().indexOf(xerces)!=-1) {
   tldDigester = patchXerces(tldDigester);
   }
   // Set the schemaLocation
  -url = TldConfig.class.getResource(Constants.TldSchemaResourcePath_20);
  -SchemaResolver tldEntityResolver = new SchemaResolver(url.toString(), 
  -  tldDigester);
  +SchemaResolver tldEntityResolver = new SchemaResolver( tldDigester);
   
   if (xmlValidation) {
   if (tldDigester.getFactory().getClass()
  
  
  
  1.23  +8 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java
  
  Index: StandardHost.java

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

2003-10-06 Thread jfarcand
jfarcand2003/10/06 16:54:10

  Modified:catalina/src/share/org/apache/catalina/core
StandardHost.java
  Log:
  One day I will be able to write english properly (probably in 20 years)
  
  Revision  ChangesPath
  1.24  +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java
  
  Index: StandardHost.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- StandardHost.java 6 Oct 2003 23:51:46 -   1.23
  +++ StandardHost.java 6 Oct 2003 23:54:10 -   1.24
  @@ -792,7 +792,7 @@
   }
   
   if (xmlValidation)
  -log.info( XML validation enaled );
  +log.info( XML validation enabled );
   else
   log.info( XML validation disabled );
   
  
  
  

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



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

2003-10-02 Thread jfarcand
jfarcand2003/10/02 10:07:40

  Modified:catalina/src/bin catalina.sh catalina.bat
  Log:
  Minor fixes (should we remove that props?).
  
  Revision  ChangesPath
  1.9   +3 -3  jakarta-tomcat-catalina/catalina/src/bin/catalina.sh
  
  Index: catalina.sh
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/catalina.sh,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- catalina.sh   2 Sep 2003 12:23:13 -   1.8
  +++ catalina.sh   2 Oct 2003 17:07:40 -   1.9
  @@ -155,7 +155,7 @@
 shift
 exec $_RUNJDB $JAVA_OPTS $CATALINA_OPTS \
   -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \
  --sourcepath $CATALINA_HOME/../../jakarta-tomcat-4.0/catalina/src/share \
  +-sourcepath 
$CATALINA_HOME/../../jakarta-tomcat-catalina/catalina/src/share \
   -Djava.security.manager \
   -Djava.security.policy==$CATALINA_BASE/conf/catalina.policy \
   -Dcatalina.base=$CATALINA_BASE \
  @@ -165,7 +165,7 @@
   else
 exec $_RUNJDB $JAVA_OPTS $CATALINA_OPTS \
   -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \
  --sourcepath $CATALINA_HOME/../../jakarta-tomcat-4.0/catalina/src/share \
  +-sourcepath 
$CATALINA_HOME/../../jakarta-tomcat-catalina/catalina/src/share \
   -Dcatalina.base=$CATALINA_BASE \
   -Dcatalina.home=$CATALINA_HOME \
   -Djava.io.tmpdir=$CATALINA_TMPDIR \
  
  
  
  1.5   +2 -2  jakarta-tomcat-catalina/catalina/src/bin/catalina.bat
  
  Index: catalina.bat
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/catalina.bat,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- catalina.bat  29 Sep 2003 10:27:20 -  1.4
  +++ catalina.bat  2 Oct 2003 17:07:40 -   1.5
  @@ -123,7 +123,7 @@
   :doDebug
   shift
   set _EXECJAVA=%_RUNJDB%
  -set DEBUG_OPTS=-sourcepath 
%CATALINA_HOME%\..\..\jakarta-tomcat-4.0\catalina\src\share
  +set DEBUG_OPTS=-sourcepath 
%CATALINA_HOME%\..\..\jakarta-tomcat-catalina\catalina\src\share
   if not %1 == -security goto execCmd
   shift
   echo Using Security Manager
  
  
  

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



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

2003-10-02 Thread jfarcand
jfarcand2003/10/02 10:10:54

  Modified:catalina/src/share/org/apache/catalina/session
StandardSession.java
  Log:
  Fix for bugzilla 23525 HttpSessionListener implementors are called to late according 
to Servlet Specification 2.4 Final Draft 3.
  
  Revision  ChangesPath
  1.23  +11 -7 
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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- StandardSession.java  2 Sep 2003 21:22:01 -   1.22
  +++ StandardSession.java  2 Oct 2003 17:10:54 -   1.23
  @@ -575,10 +575,14 @@
*/
   public boolean isValid() {
   
  -if (!this.isValid || this.expiring) {
  +if (this.expiring){
  +return true;
  +}
  +
  +if (!this.isValid ) {
   return false;
   }
  - 
  +
   if (maxInactiveInterval = 0) { 
   long timeNow = System.currentTimeMillis();
   int timeIdle = (int) ((timeNow - lastAccessedTime) / 1000L);
  @@ -1154,7 +1158,7 @@
   public void removeAttribute(String name, boolean notify) {
   
   // Validate our current state
  -if (!expiring  !isValid())
  +if (!isValid())
   throw new IllegalStateException
   (sm.getString(standardSession.removeAttribute.ise));
   
  
  
  

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



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

2003-10-02 Thread jfarcand
jfarcand2003/10/02 18:53:17

  Modified:catalina/src/share/org/apache/catalina/session
StandardSession.java
  Log:
  We also need to call the listener when the session is invalidated because we can't 
predict the interval between the time the session is marked invalid and the 
StandardrMmanager expires the session.
  
  Revision  ChangesPath
  1.24  +5 -5  
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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- StandardSession.java  2 Oct 2003 17:10:54 -   1.23
  +++ StandardSession.java  3 Oct 2003 01:53:17 -   1.24
  @@ -587,7 +587,7 @@
   long timeNow = System.currentTimeMillis();
   int timeIdle = (int) ((timeNow - lastAccessedTime) / 1000L);
   if (timeIdle = maxInactiveInterval) {
  -this.isValid = false;
  +expire(true);
   }
   }
   
  
  
  

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



cvs commit: jakarta-servletapi-5/jsr154/src/share/javax/servlet ServletRequest.java

2003-10-01 Thread jfarcand
jfarcand2003/10/01 06:42:55

  Modified:jsr154/src/share/javax/servlet ServletRequest.java
  Log:
  Fix the confusing description in getServerName() and getServerPort() - change host 
header to host header value.
  
  Submitted by: Yutaka Yoshida
  
  Revision  ChangesPath
  1.9   +2 -2  
jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletRequest.java
  
  Index: ServletRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletRequest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ServletRequest.java   30 Sep 2003 19:49:00 -  1.8
  +++ ServletRequest.java   1 Oct 2003 13:42:55 -   1.9
  @@ -351,7 +351,7 @@
   /**
* Returns the host name of the server to which the request was sent.
* It is the value of the part before : in the codeHost/code
  - * header, if any, or the resolved server name, or the server IP address.
  + * header value, if any, or the resolved server name, or the server IP address.
*
* @return   a codeString/code containing the name 
*   of the server
  @@ -365,7 +365,7 @@
   /**
* Returns the port number to which the request was sent.
* It is the value of the part after : in the codeHost/code
  - * header, if any, or the server port where the client connection
  + * header value, if any, or the server port where the client connection
* was accepted on.
*
* @return   an integer specifying the port number
  
  
  

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



cvs commit: jakarta-servletapi-5/jsr154/src/share/javax/servlet/http HttpServletRequest.java HttpServletResponse.java HttpSession.java HttpSessionBindingEvent.java

2003-09-30 Thread jfarcand
jfarcand2003/09/30 12:49:00

  Modified:jsr154/src/share/javax/servlet Filter.java FilterChain.java
GenericServlet.java ServletContext.java
ServletContextAttributeEvent.java
ServletContextAttributeListener.java
ServletContextEvent.java
ServletContextListener.java
ServletOutputStream.java ServletRequest.java
ServletRequestAttributeEvent.java
ServletRequestAttributeListener.java
ServletRequestEvent.java
ServletRequestListener.java ServletResponse.java
   jsr154/src/share/javax/servlet/http HttpServletRequest.java
HttpServletResponse.java HttpSession.java
HttpSessionBindingEvent.java
  Log:
  Apply patch submitted by Yutaka Yoshida at Sun:
  
  The attached file is to update the Servlet 2.4 API.
  Changes are synchronizing with the latest specification
  and fixing a typo and a bad indentation. All semantics
  stay the same.
  
  Revision  ChangesPath
  1.3   +1 -1  jakarta-servletapi-5/jsr154/src/share/javax/servlet/Filter.java
  
  Index: Filter.java
  ===
  RCS file: /home/cvs/jakarta-servletapi-5/jsr154/src/share/javax/servlet/Filter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Filter.java   18 Aug 2003 16:50:33 -  1.2
  +++ Filter.java   30 Sep 2003 19:49:00 -  1.3
  @@ -114,7 +114,7 @@
* filter content or headers for output filtering br
* 4. a) strongEither/strong invoke the next entity in the chain using the 
FilterChain object (codechain.doFilter()/code), br   
** 4. b) strongor/strong not pass on the request/response pair to the next 
entity in the filter chain to block the request processingbr
  - ** 5. Directly set headers on the response after invocation of the next entity 
in ther filter chain.
  + ** 5. Directly set headers on the response after invocation of the next entity 
in the filter chain.
**/
   public void doFilter ( ServletRequest request, ServletResponse response, 
FilterChain chain ) throws IOException, ServletException;
   
  
  
  
  1.2   +1 -1  
jakarta-servletapi-5/jsr154/src/share/javax/servlet/FilterChain.java
  
  Index: FilterChain.java
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr154/src/share/javax/servlet/FilterChain.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FilterChain.java  13 Aug 2002 16:21:42 -  1.1
  +++ FilterChain.java  30 Sep 2003 19:49:00 -  1.2
  @@ -66,7 +66,7 @@
   * A FilterChain is an object provided by the servlet container to the developer
   * giving a view into the invocation chain of a filtered request for a resource. 
Filters
   * use the FilterChain to invoke the next filter in the chain, or if the calling 
filter
  -* is the last filter in the chain, to invoke the rosource at the end of the 
chain.
  +* is the last filter in the chain, to invoke the resource at the end of the 
chain.
   *
   * @see Filter
   * @since Servlet 2.3
  
  
  
  1.3   +1 -1  
jakarta-servletapi-5/jsr154/src/share/javax/servlet/GenericServlet.java
  
  Index: GenericServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr154/src/share/javax/servlet/GenericServlet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GenericServlet.java   11 Jan 2003 00:26:02 -  1.2
  +++ GenericServlet.java   30 Sep 2003 19:49:00 -  1.3
  @@ -136,7 +136,7 @@
*   of the initialization parameter
*
* @return Stringa codeString/code containing the value
  - *   of the initalization parameter
  + *   of the initialization parameter
*
*/ 
   
  
  
  
  1.6   +1 -1  
jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletContext.java
  
  Index: ServletContext.java
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletContext.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ServletContext.java   2 Sep 2003 21:14:10 -   1.5
  +++ ServletContext.java   30 Sep 2003 19:49:00 -  1.6
  @@ -674,7 +674,7 @@
   public void removeAttribute(String name);
   
   /**
  - * Returns the name of this web application correponding to this ServletContext 
as specified in the deployment

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

2003-09-25 Thread jfarcand
jfarcand2003/09/25 12:27:59

  Modified:catalina/src/share/org/apache/catalina/startup
ContextConfig.java TldConfig.java
  Log:
  Follow a 101 Tranning course on how to use Xerces 2.3/2.5 and fix the schema 
validation problem. The fix will only works for Xerces when schema are supported 
(Crimson will still work).
  
  Changes between 2.1/2.3 seems to have modified the way the parser is working. Those 
private property will be added to the next release of jaxp.
  
  Thanks to ramesh mandava at sun for is teaching lesson :-)
  
  Revision  ChangesPath
  1.36  +23 -4 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- ContextConfig.java23 Sep 2003 21:37:00 -  1.35
  +++ ContextConfig.java25 Sep 2003 19:27:59 -  1.36
  @@ -300,7 +300,7 @@
   if (context instanceof StandardContext) {
   ((StandardContext) context).setReplaceWelcomeFiles(true);
   }
  -webDigester.setUseContextClassLoader(true);
  +webDigester.setUseContextClassLoader(false);
   webDigester.push(context);
   webDigester.parse(is);
   } else {
  @@ -497,12 +497,31 @@
   webDigester = patchXerces(webDigester);
   }
   
  -url = ContextConfig.class.getResource(Constants.WebSchemaResourcePath_24);
  +url = ContextConfig.class.
  +getResource(Constants.WebSchemaResourcePath_24);
  +
   SchemaResolver webEntityResolver = new SchemaResolver(url.toString(),
 webDigester);
   
   if (validation) {
  -webDigester.setSchema(url.toString());
  +if (webDigester.getFactory().getClass()
  +.getName().indexOf(xerces)!=-1) {
  +try{
  +webDigester.setFeature(
  +http://apache.org/xml/features/validation/dynamic;,
  +true);
  +webDigester.setFeature(
  +http://apache.org/xml/features/validation/schema;,
  +true);
  +} catch(ParserConfigurationException e){
  +// log(contextConfig.registerLocalSchema, e);
  +} catch(SAXNotRecognizedException e){
  +// log(contextConfig.registerLocalSchema, e);
  +} catch(SAXNotSupportedException e){
  +// log(contextConfig.registerLocalSchema, e);
  +}
  +
  +}
   }
   
   url = ContextConfig.class.getResource(Constants.WebDtdResourcePath_22);
  
  
  
  1.29  +18 -1 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- TldConfig.java23 Sep 2003 21:37:00 -  1.28
  +++ TldConfig.java25 Sep 2003 19:27:59 -  1.29
  @@ -409,7 +409,24 @@
 tldDigester);
   
   if (xmlValidation) {
  -tldDigester.setSchema(url.toString());
  +if (tldDigester.getFactory().getClass()
  +.getName().indexOf(xerces)!=-1) {
  +try{
  +tldDigester.setFeature(
  +http://apache.org/xml/features/validation/dynamic;,
  +true);
  +tldDigester.setFeature(
  +http://apache.org/xml/features/validation/schema;,
  +true);
  +} catch(ParserConfigurationException e){
  +// log(contextConfig.registerLocalSchema, e);
  +} catch(SAXNotRecognizedException e){
  +// log(contextConfig.registerLocalSchema, e);
  +} catch(SAXNotSupportedException e){
  +// log(contextConfig.registerLocalSchema, e);
  +}
  +
  +}
   }
   
   url = TldConfig.class.getResource(Constants.TldDtdResourcePath_11);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED

cvs commit: jakarta-tomcat-5 build.properties.default

2003-09-23 Thread jfarcand
jfarcand2003/09/23 11:41:11

  Modified:.build.properties.default
  Log:
  Use Xerces 2.5 as it validate DT properly (only schema are broken). Working on a 
solution.
  
  Revision  ChangesPath
  1.108 +3 -3  jakarta-tomcat-5/build.properties.default
  
  Index: build.properties.default
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- build.properties.default  8 Sep 2003 10:11:39 -   1.107
  +++ build.properties.default  23 Sep 2003 18:41:11 -  1.108
  @@ -126,11 +126,11 @@
   
   
   # - Xerces XML Parser, version 2.5.0 -
  -xerces.home=${base.path}/xerces-2_1_0
  +xerces.home=${base.path}/xerces-2_5_0
   xerces.lib=${xerces.home}
   xercesImpl.jar=${xerces.lib}/xercesImpl.jar
   xmlParserAPIs.jar=${xerces.lib}/xmlParserAPIs.jar
  -xerces.loc=http://xml.apache.org/dist/xerces-j/old_xerces2/Xerces-J-bin.2.1.0.tar.gz
  +xerces.loc=http://xml.apache.org/dist/xerces-j/Xerces-J-bin.2.5.0.tar.gz
   
   
   # --
  
  
  

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



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

2003-09-23 Thread jfarcand
jfarcand2003/09/23 11:43:12

  Modified:catalina/src/share/org/apache/catalina/startup
ContextConfig.java TldConfig.java
  Log:
  Partial fix for xml validation. At least DTD works now and the stack trace for 
schema is no longer 1 km long.
  
  Revision  ChangesPath
  1.34  +4 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- ContextConfig.java9 Sep 2003 15:27:00 -   1.33
  +++ ContextConfig.java23 Sep 2003 18:43:12 -  1.34
  @@ -459,6 +459,8 @@
   try{
   digester.setFeature(
   http://apache.org/xml/features/allow-java-encodings;, true);
  +digester.setFeature(
  +http://apache.org/xml/features/validation/schema;, true);
   } catch(ParserConfigurationException e){
   // log(contextConfig.registerLocalSchema, e);
   } catch(SAXNotRecognizedException e){
  @@ -490,6 +492,7 @@
   boolean validation) {
   URL url = null;
   Digester webDigester = new Digester();
  +webDigester.setUseContextClassLoader(false);
   webDigester.setNamespaceAware(namespaceAware);
   webDigester.setValidating(validation);
  
  
  
  
  1.24  +2 -0  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- TldConfig.java22 Sep 2003 23:56:11 -  1.23
  +++ TldConfig.java23 Sep 2003 18:43:12 -  1.24
  @@ -416,6 +416,8 @@
   try{
   digester.setFeature(
   http://apache.org/xml/features/allow-java-encodings;, true);
  +digester.setFeature(
  +http://apache.org/xml/features/validation/schema;, true);
   } catch(ParserConfigurationException e){
   // log(contextConfig.registerLocalSchema, e);
   } catch(SAXNotRecognizedException e){
  
  
  

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



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

2003-09-23 Thread jfarcand
jfarcand2003/09/23 14:37:01

  Modified:catalina/src/share/org/apache/catalina/startup
ContextConfig.java TldConfig.java
  Log:
  Revert my previous patch since it force validation even when the value is set to 
false (for schema).
  
  Revision  ChangesPath
  1.35  +2 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- ContextConfig.java23 Sep 2003 18:43:12 -  1.34
  +++ ContextConfig.java23 Sep 2003 21:37:00 -  1.35
  @@ -459,8 +459,6 @@
   try{
   digester.setFeature(
   http://apache.org/xml/features/allow-java-encodings;, true);
  -digester.setFeature(
  -http://apache.org/xml/features/validation/schema;, true);
   } catch(ParserConfigurationException e){
   // log(contextConfig.registerLocalSchema, e);
   } catch(SAXNotRecognizedException e){
  @@ -492,7 +490,6 @@
   boolean validation) {
   URL url = null;
   Digester webDigester = new Digester();
  -webDigester.setUseContextClassLoader(false);
   webDigester.setNamespaceAware(namespaceAware);
   webDigester.setValidating(validation);
  
  @@ -507,7 +504,7 @@
   if (validation) {
   webDigester.setSchema(url.toString());
   }
  -
  +
   url = ContextConfig.class.getResource(Constants.WebDtdResourcePath_22);
   webEntityResolver.register(Constants.WebDtdPublicId_22,
  url.toString());
  
  
  
  1.28  +0 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- TldConfig.java23 Sep 2003 20:06:07 -  1.27
  +++ TldConfig.java23 Sep 2003 21:37:00 -  1.28
  @@ -437,8 +437,6 @@
   try{
   digester.setFeature(
   http://apache.org/xml/features/allow-java-encodings;, true);
  -digester.setFeature(
  -http://apache.org/xml/features/validation/schema;, true);
   } catch(ParserConfigurationException e){
   // log(contextConfig.registerLocalSchema, e);
   } catch(SAXNotRecognizedException e){
  
  
  

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



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

2003-09-19 Thread jfarcand
jfarcand2003/09/19 12:29:15

  Modified:jasper2/src/share/org/apache/jasper/runtime
PageContextImpl.java
  Log:
  Add missing doPrivileged block.
  
  Revision  ChangesPath
  1.53  +21 -8 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- PageContextImpl.java  2 Sep 2003 21:39:59 -   1.52
  +++ PageContextImpl.java  19 Sep 2003 19:29:15 -  1.53
  @@ -64,6 +64,7 @@
   import java.io.IOException;
   import java.io.Writer;
   import java.security.AccessController;
  +import java.security.PrivilegedAction;
   import java.security.PrivilegedActionException;
   import java.security.PrivilegedExceptionAction;
   import java.util.Enumeration;
  @@ -399,12 +400,24 @@
return 0;
   }
   
  -public Object findAttribute(String name) {
  +public Object findAttribute(final String name) {
  +if (name == null) {
  +throw new NullPointerException(
  +Localizer.getMessage(jsp.error.attribute.null_name));
  +}
   
  - if (name == null) {
  - throw new NullPointerException(
  - Localizer.getMessage(jsp.error.attribute.null_name));
  - }
  +if (System.getSecurityManager() != null){
  +return AccessController.doPrivileged(new PrivilegedAction(){
  +public Object run(){
  +return doFindAttribute(name);
  +}
  +});
  +} else {
  +return doFindAttribute(name);
  +}
  +}
  +
  +private Object doFindAttribute(String name){
   
   Object o = attributes.get(name);
   if (o != null)
  
  
  

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



cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/security SecurityClassLoad.java

2003-09-19 Thread jfarcand
jfarcand2003/09/19 14:24:48

  Modified:jasper2/src/share/org/apache/jasper/runtime
PageContextImpl.java
   jasper2/src/share/org/apache/jasper/security
SecurityClassLoad.java
  Log:
  Package protect the class properly.
  
  Revision  ChangesPath
  1.54  +425 -249  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- PageContextImpl.java  19 Sep 2003 19:29:15 -  1.53
  +++ PageContextImpl.java  19 Sep 2003 21:24:47 -  1.54
  @@ -254,150 +254,228 @@
attributes.clear();
   }
   
  -public Object getAttribute(String name) {
  +public Object getAttribute(final String name) {
  +
  +if (name == null) {
  +throw new NullPointerException(
  +Localizer.getMessage(jsp.error.attribute.null_name));
  +}
  +
  +if (System.getSecurityManager() != null){
  +return AccessController.doPrivileged(new PrivilegedAction(){
  +public Object run(){
  +return doGetAttribute(name);
  +}
  +});
  +} else {
  +return doGetAttribute(name);
  +}
   
  - if (name == null) {
  - throw new NullPointerException(
  - Localizer.getMessage(jsp.error.attribute.null_name));
  - }
  - return attributes.get(name);
   }
   
  -public Object getAttribute(String name, int scope) {
  +private Object doGetAttribute(String name){
  +return attributes.get(name);
  +}
   
  - if (name == null) {
  - throw new NullPointerException(
  - Localizer.getMessage(jsp.error.attribute.null_name));
  - }
  +public Object getAttribute(final String name, final int scope) {
   
  - switch (scope) {
  - case PAGE_SCOPE:
  - return attributes.get(name);
  -
  - case REQUEST_SCOPE:
  - return request.getAttribute(name);
  -
  - case SESSION_SCOPE:
  - if (session == null) {
  - throw new IllegalStateException(
  - Localizer.getMessage(jsp.error.page.noSession));
  - }
  - return session.getAttribute(name);
  +if (name == null) {
  +throw new NullPointerException(
  +Localizer.getMessage(jsp.error.attribute.null_name));
  +}
   
  - case APPLICATION_SCOPE:
  - return context.getAttribute(name);
  +if (System.getSecurityManager() != null){
  +return AccessController.doPrivileged(new PrivilegedAction(){
  +public Object run(){
  +return doGetAttribute(name, scope);
  +}
  +});
  +} else {
  +return doGetAttribute(name, scope);
  +}
   
  - default:
  - throw new IllegalArgumentException(Invalid scope);
  - }
   }
   
  -public void setAttribute(String name, Object attribute) {
  +private Object doGetAttribute(String name, int scope){
  +switch (scope) {
  +case PAGE_SCOPE:
  +return attributes.get(name);
  +
  +case REQUEST_SCOPE:
  +return request.getAttribute(name);
  +
  +case SESSION_SCOPE:
  +if (session == null) {
  +throw new IllegalStateException(
  +Localizer.getMessage(jsp.error.page.noSession));
  +}
  +return session.getAttribute(name);
   
  - if (name == null) {
  - throw new NullPointerException(
  - Localizer.getMessage(jsp.error.attribute.null_name));
  - }
  +case APPLICATION_SCOPE:
  +return context.getAttribute(name);
   
  - if (attribute != null) {
  - attributes.put(name, attribute);
  - } else {
  - removeAttribute(name, PAGE_SCOPE);
  - }
  +default:
  +throw new IllegalArgumentException(Invalid scope);
  +}
   }
   
  -public void setAttribute(String name, Object o, int scope) {
  +public void setAttribute(final String name, final Object attribute) {
   
  - if (name == null) {
  - throw new NullPointerException(
  - Localizer.getMessage(jsp.error.attribute.null_name));
  - }
  +if (name == null) {
  +throw new NullPointerException(
  +Localizer.getMessage(jsp.error.attribute.null_name));
  +}
   
  - if (o != null) {
  - switch (scope

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteResponse.java

2003-09-19 Thread jfarcand
jfarcand2003/09/19 15:03:07

  Modified:catalina/src/share/org/apache/coyote/tomcat5
CoyoteResponse.java
  Log:
  Add missing doPrivileged block
  
  Revision  ChangesPath
  1.9   +45 -13
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteResponse.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CoyoteResponse.java   3 Sep 2003 22:10:33 -   1.8
  +++ CoyoteResponse.java   19 Sep 2003 22:03:07 -  1.9
  @@ -70,6 +70,7 @@
   import java.io.PrintWriter;
   import java.net.MalformedURLException;
   import java.security.AccessController;
  +import java.security.PrivilegedAction;
   import java.security.PrivilegedActionException;
   import java.security.PrivilegedExceptionAction;
   import java.text.SimpleDateFormat;
  @@ -905,7 +906,7 @@
*
* @param cookie Cookie to be added
*/
  -public void addCookie(Cookie cookie) {
  +public void addCookie(final Cookie cookie) {
   
   if (isCommitted())
   return;
  @@ -916,11 +917,25 @@
   
   cookies.add(cookie);
   
  -StringBuffer sb = new StringBuffer();
  -ServerCookie.appendCookieValue
  -(sb, cookie.getVersion(), cookie.getName(), cookie.getValue(),
  - cookie.getPath(), cookie.getDomain(), cookie.getComment(), 
  - cookie.getMaxAge(), cookie.getSecure());
  +final StringBuffer sb = new StringBuffer();
  +if (System.getSecurityManager() != null) {
  +AccessController.doPrivileged(new PrivilegedAction() {
  +public Object run(){
  +ServerCookie.appendCookieValue
  +(sb, cookie.getVersion(), cookie.getName(), 
  + cookie.getValue(), cookie.getPath(), 
  + cookie.getDomain(), cookie.getComment(), 
  + cookie.getMaxAge(), cookie.getSecure());
  +return null;
  +}
  +});
  +} else {
  +ServerCookie.appendCookieValue
  +(sb, cookie.getVersion(), cookie.getName(), cookie.getValue(),
  + cookie.getPath(), cookie.getDomain(), cookie.getComment(), 
  + cookie.getMaxAge(), cookie.getSecure());
  +}
  +
   // the header name is Set-Cookie for both old and v.1 ( RFC2109 )
   // RFC2965 is not supported by browsers and the Servlet spec
   // asks for 2109.
  @@ -1305,7 +1320,7 @@
*
* @param location Absolute URL to be validated
*/
  -protected boolean isEncodeable(String location) {
  +protected boolean isEncodeable(final String location) {
   
   if (location == null)
   return (false);
  @@ -1315,13 +1330,30 @@
   return (false);
   
   // Are we in a valid session that is not using cookies?
  -HttpServletRequest hreq = (HttpServletRequest) request.getRequest();
  -HttpSession session = hreq.getSession(false);
  +final HttpServletRequest hreq = 
  +(HttpServletRequest) request.getRequest();
  +final HttpSession session = hreq.getSession(false);
   if (session == null)
   return (false);
   if (hreq.isRequestedSessionIdFromCookie())
   return (false);
  +
  +if (System.getSecurityManager() != null) {
  +return ((Boolean)
  +AccessController.doPrivileged(new PrivilegedAction() {
  +
  +public Object run(){
  +return new Boolean(doIsEncodeable(hreq, session, location));
  +}
  +})).booleanValue();
  +} else {
  +return doIsEncodeable(hreq, session, location);
  +}
  +}
   
  +private boolean doIsEncodeable(HttpServletRequest hreq, 
  +   HttpSession session,
  +   String location){
   // Is this a valid absolute URL?
   URL url = null;
   try {
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security SecurityClassLoad.java

2003-09-19 Thread jfarcand
jfarcand2003/09/19 15:03:35

  Modified:catalina/src/share/org/apache/catalina/security
SecurityClassLoad.java
  Log:
  Add missing doPrivileged block
  
  Revision  ChangesPath
  1.10  +13 -4 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityClassLoad.java
  
  Index: SecurityClassLoad.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityClassLoad.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SecurityClassLoad.java23 Jun 2003 19:22:26 -  1.9
  +++ SecurityClassLoad.java19 Sep 2003 22:03:35 -  1.10
  @@ -107,6 +107,9 @@
   loader.loadClass
   (basePackage +
core.ContainerBase$PrivilegedAddChild);
  +loader.loadClass
  +(basePackage +
  + core.StandardWrapper$1);
   }
   
   
  @@ -220,6 +223,12 @@
   loader.loadClass
   (basePackage +
CoyoteResponse$1);
  +loader.loadClass
  +(basePackage +
  + CoyoteResponse$2);
  +loader.loadClass
  +(basePackage +
  + CoyoteResponse$3);
   }
   
   }
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security SecurityUtil.java

2003-09-10 Thread jfarcand
jfarcand2003/09/10 09:56:45

  Modified:catalina/src/share/org/apache/catalina/security
SecurityUtil.java
  Log:
  Always associate a Subject. If not created, then create a default one.
  
  Revision  ChangesPath
  1.7   +5 -0  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityUtil.java
  
  Index: SecurityUtil.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityUtil.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SecurityUtil.java 2 Sep 2003 21:22:06 -   1.6
  +++ SecurityUtil.java 10 Sep 2003 16:56:45 -  1.7
  @@ -292,6 +292,11 @@
   (HttpServletRequest)targetArguments[0];
   subject = (Subject)request.getSession()
   .getAttribute(Globals.SUBJECT_ATTR);
  +
  +if (subject == null){
  +subject = new Subject();
  +request.getSession().setAttribute(Globals.SUBJECT_ATTR, 
subject);
  +}
   }
   
   Subject.doAsPrivileged(subject, pea, null);   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security SecurityUtil.java

2003-09-10 Thread jfarcand
jfarcand2003/09/10 14:28:37

  Modified:catalina/src/share/org/apache/catalina/security
SecurityUtil.java
  Log:
  Do not create session when no one is available.
  
  Revision  ChangesPath
  1.8   +9 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityUtil.java
  
  Index: SecurityUtil.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityUtil.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SecurityUtil.java 10 Sep 2003 16:56:45 -  1.7
  +++ SecurityUtil.java 10 Sep 2003 21:28:37 -  1.8
  @@ -73,6 +73,7 @@
   import javax.servlet.ServletException;
   import javax.servlet.UnavailableException;
   import javax.servlet.http.HttpServletRequest;
  +import javax.servlet.http.HttpSession;
   
   import org.apache.catalina.Globals;
   import org.apache.catalina.util.StringManager;
  @@ -290,12 +291,15 @@
targetArguments[0] instanceof HttpServletRequest){
   HttpServletRequest request = 
   (HttpServletRequest)targetArguments[0];
  -subject = (Subject)request.getSession()
  -.getAttribute(Globals.SUBJECT_ATTR);
   
  -if (subject == null){
  -subject = new Subject();
  -request.getSession().setAttribute(Globals.SUBJECT_ATTR, 
subject);
  +HttpSession session = request.getSession(false);
  +if (session != null){
  +subject = (Subject)session.getAttribute(Globals.SUBJECT_ATTR);
  +
  +if (subject == null){
  +subject = new Subject();
  +session.setAttribute(Globals.SUBJECT_ATTR, subject);
  +}
   }
   }
   
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteRequest.java

2003-09-10 Thread jfarcand
jfarcand2003/09/10 20:56:48

  Modified:catalina/src/share/org/apache/coyote/tomcat5
CoyoteRequest.java
  Log:
  Oups forgot that one (See previous commit)
  
  Revision  ChangesPath
  1.16  +10 -7 
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CoyoteRequest.java31 Aug 2003 21:08:56 -  1.15
  +++ CoyoteRequest.java11 Sep 2003 03:56:48 -  1.16
  @@ -1767,15 +1767,18 @@
   public void setUserPrincipal(Principal principal) {
   
   if (System.getSecurityManager() != null){
  +HttpSession session = getSession(false);
   if ( (subject != null)  
(!subject.getPrincipals().contains(principal)) ){
   subject.getPrincipals().add(principal); 
  -} else if (getSession()
  -.getAttribute(Globals.SUBJECT_ATTR) == null) {
  +} else if (session != null 
  +session.getAttribute(Globals.SUBJECT_ATTR) == null) {
   subject = new Subject();
   subject.getPrincipals().add(principal); 
   }
  -getSession().setAttribute(Globals.SUBJECT_ATTR, subject);
  +if (session != null){
  +session.setAttribute(Globals.SUBJECT_ATTR, subject);
  +}
   } 
   
   this.userPrincipal = principal;
  
  
  

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



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

2003-09-09 Thread jfarcand
jfarcand2003/09/09 18:47:24

  Modified:jasper2/src/share/org/apache/jasper/servlet JspServlet.java
  Log:
  Fix jsp-config problem reported by Kin-Man:
  ?xml version=1.0 encoding=ISO-8859-1?
  
  web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd
  version=2.4
jsp-config
jsp-property-group
  url-pattern/utf16/*/url-pattern
  page-encodingUTF-16/page-encoding
/jsp-property-group
/jsp-config
  /web-app
  
  Create a file in /utf16/foo.jsp:
  Create a file in /test.jsp
  Begin
  jsp:include page=utf16/foo.jsp /
  End
  
  The include was falling. I'm implementing the fix here since I don't think 
implementing jsp-config on the servlet side is correct.
  
  Revision  ChangesPath
  1.31  +49 -33
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java
  
  Index: JspServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- JspServlet.java   2 Sep 2003 21:39:59 -   1.30
  +++ JspServlet.java   10 Sep 2003 01:47:24 -  1.31
  @@ -186,18 +186,34 @@
 HttpServletResponse response)
throws ServletException, IOException {
   
  - try {
  +try {
   String includeUri 
   = (String) request.getAttribute(Constants.INC_SERVLET_PATH);
  -
  +String requestUri 
  += (String) request.getAttribute(Constants.INC_REQUEST_URI);
  +
   String jspUri;
  +
  +// When jsp-property-group/url-matching is used, and when the 
  +// jsp is not defined with servlet-name, the url
  +// as to be passed as it is to the JSP container (since 
  +// Catalina doesn't know anything about the requested JSP 
  +
  +// The first scenario occurs when the jsp is not directly under /
  +// example: /utf16/foo.jsp
  +if (requestUri != null){
  +String currentIncludedUri 
  += requestUri.substring(requestUri.indexOf(includeUri));
   
  +if ( !includeUri.equals(currentIncludedUri) ) {
  +includeUri = currentIncludedUri;
  +}
  +}
  +
  +// The second scenario is when the includeUri is null but it 
  +// is still possible to recreate the request.
   if (includeUri == null) {
  - jspUri = request.getServletPath();
  -// When jsp-property-group/url-matching is used, and when the 
  -// jsp is not defined with servlet-name, the url
  -// as to be passed as it is to the JSP container (since 
  -// Catalina doesn't know anything about the requested JSP 
  +jspUri = request.getServletPath();
   if (request.getPathInfo() != null) {
   jspUri = request.getServletPath() + request.getPathInfo();
   }
  @@ -212,40 +228,40 @@
   
   boolean precompile = preCompile(request);
   
  - if (log.isDebugEnabled()) { 
  - log.debug(JspEngine --  + jspUri);
  - log.debug(\t ServletPath:  + request.getServletPath());
  - log.debug(\tPathInfo:  + request.getPathInfo());
  - log.debug(\tRealPath:  + context.getRealPath(jspUri));
  - log.debug(\t  RequestURI:  + request.getRequestURI());
  - log.debug(\t QueryString:  + request.getQueryString());
  - log.debug(\t  Request Params: );
  - Enumeration e = request.getParameterNames();
  +if (log.isDebugEnabled()) {  
  +log.debug(JspEngine --  + jspUri);
  +log.debug(\t ServletPath:  + request.getServletPath());
  +log.debug(\tPathInfo:  + request.getPathInfo());
  +log.debug(\tRealPath:  + context.getRealPath(jspUri));
  +log.debug(\t  RequestURI:  + request.getRequestURI());
  +log.debug(\t QueryString:  + request.getQueryString());
  +log.debug(\t  Request Params: );
  +Enumeration e = request.getParameterNames();
   
  -   while (e.hasMoreElements()) {
  +while (e.hasMoreElements()) {
   String name = (String) e.nextElement();
   log.info(\t\t  + name +  =  +
request.getParameter(name));
   }
  - }
  +}
   
   serviceJspFile

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

2003-09-08 Thread jfarcand
jfarcand2003/09/08 08:25:18

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
   catalina/src/share/org/apache/catalina/session
PersistentManagerBase.java
  Log:
  Minor refactoring. Easier to overload the behaviour when extending the class.
  
  Revision  ChangesPath
  1.89  +2 -7  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- StandardContext.java  2 Sep 2003 21:22:04 -   1.88
  +++ StandardContext.java  8 Sep 2003 15:25:18 -   1.89
  @@ -4397,12 +4397,7 @@
   } else if (getManager() instanceof PersistentManagerBase) {
   PersistentManagerBase pManager = 
   (PersistentManagerBase) getManager();
  -pManager.processExpires();
  -pManager.processPersistenceChecks();
  -if ((pManager.getStore() != null) 
  - (pManager.getStore() instanceof StoreBase)) {
  -((StoreBase) pManager.getStore()).processExpires();
  -}
  +pManager.backgroundProcess();
   }
   }
   
  
  
  
  1.11  +15 -4 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java
  
  Index: PersistentManagerBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PersistentManagerBase.java20 Aug 2003 08:20:41 -  1.10
  +++ PersistentManagerBase.java8 Sep 2003 15:25:18 -   1.11
  @@ -240,6 +240,17 @@
   
   // - Properties
   
  +/**
  + * Perform the background processes for this Manager
  + */
  +public void backgroundProcess() {
  +this.processExpires();
  +this.processPersistenceChecks();
  +if ((this.getStore() != null)
  + (this.getStore() instanceof StoreBase)) {
  +((StoreBase) this.getStore()).processExpires();
  +}
  +}
   
   /**
* Indicates how many seconds old a session can get, after its last
  
  
  

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



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

2003-09-08 Thread jfarcand
jfarcand2003/09/08 08:57:21

  Modified:catalina/src/share/org/apache/catalina/core
StandardPipeline.java
  Log:
  Allow extention fo this class (The SecurityManager will block any malicious uses at 
runtime)
  
  Revision  ChangesPath
  1.16  +5 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardPipeline.java
  
  Index: StandardPipeline.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- StandardPipeline.java 2 Sep 2003 21:22:04 -   1.15
  +++ StandardPipeline.java 8 Sep 2003 15:57:21 -   1.16
  @@ -101,7 +101,7 @@
* @author Craig R. McClanahan
*/
   
  -public final class StandardPipeline
  +public class StandardPipeline
   implements Pipeline, Contained, Lifecycle 
{
   private static Log log = LogFactory.getLog(StandardPipeline.class);
  @@ -546,7 +546,7 @@
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet exception is thrown
*/
  -public final void invoke(Request request, Response response)
  +public void invoke(Request request, Response response)
   throws IOException, ServletException {
   
   // Invoke the first Valve in this pipeline for this request
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteRequest.java

2003-08-29 Thread jfarcand
jfarcand2003/08/29 10:18:14

  Modified:catalina/src/share/org/apache/catalina Globals.java
   catalina/src/share/org/apache/catalina/security
SecurityUtil.java
   catalina/src/share/org/apache/coyote/tomcat5
CoyoteRequest.java
  Log:
  Do not create a new Subject everytime a Servlet/Filter is invoked. Associate the 
same Subject to the AccessControlContext.
  
  Revision  ChangesPath
  1.6   +11 -4 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java
  
  Index: Globals.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Globals.java  3 Mar 2003 15:46:45 -   1.5
  +++ Globals.java  29 Aug 2003 17:18:14 -  1.6
  @@ -332,6 +332,13 @@
   
   
   /**
  + * The subject under which the AccessControlContext is running.
  + */
  +public static final String SUBJECT_ATTR =
  +javax.security.auth.subject;
  +
  +
  +/**
* The servlet context attribute under which we record the set of
* welcome files (as an object of type String[]) for this application.
*/
  
  
  
  1.5   +78 -39
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityUtil.java
  
  Index: SecurityUtil.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityUtil.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SecurityUtil.java 4 Jun 2003 21:15:39 -   1.4
  +++ SecurityUtil.java 29 Aug 2003 17:18:14 -  1.5
  @@ -64,6 +64,7 @@
   import java.lang.reflect.InvocationTargetException;
   import java.util.HashMap;
   import java.security.AccessController;
  +import java.security.AccessControlContext;
   import java.security.Principal;
   import java.security.PrivilegedActionException;
   import java.security.PrivilegedExceptionAction;
  @@ -72,17 +73,17 @@
   import javax.servlet.Filter;
   import javax.servlet.Servlet;
   import javax.servlet.ServletException;
  +import javax.servlet.http.HttpServletRequest;
   import javax.servlet.UnavailableException;
   
  -import org.apache.tomcat.util.buf.MessageBytes;
  -
  +import org.apache.catalina.Globals;
   import org.apache.catalina.util.StringManager;
  -
   /**
* This utility class associates a codeSubject/code to the current 
  - * codeAccessControlContext/code. When a codeSecurityManager/code is used, 
  - * the container will always associate the called thread with an 
AccessControlContext
  - * containing only the principal of the requested Servlet/Filter.
  + * codeAccessControlContext/code. When a codeSecurityManager/code is
  + * used, * the container will always associate the called thread with an 
  + * AccessControlContext * containing only the principal of the requested
  + * Servlet/Filter.
*
* This class uses reflection to invoke the invoke methods.
*
  @@ -123,7 +124,8 @@
* will be granted to a codenull/code subject. 
*
* @param methodName the method to apply the security restriction
  - * @param targetObject the codeServlet/code on which the method will be 
called.
  + * @param targetObject the codeServlet/code on which the method will
  + * be called.
*/
   public static void doAsPrivilege(final String methodName, 
final Servlet targetObject) throws 
java.lang.Exception{
  @@ -136,15 +138,24 @@
* will be granted to a codenull/code subject. 
*
* @param methodName the method to apply the security restriction
  - * @param targetObject the codeServlet/code on which the method will be 
called.
  - * @param targetType codeClass/code array used to instanciate a 
codeMethod/code object.
  - * @param targetObject codeObject/code array contains the runtime 
parameters instance.
  + * @param targetObject the codeServlet/code on which the method will
  + * be called.
  + * @param targetType codeClass/code array used to instanciate a i
  + * codeMethod/code object.
  + * @param targetObject codeObject/code array contains the runtime 
  + * parameters instance.
*/
   public static void doAsPrivilege(final String methodName, 
final Servlet targetObject, 
final Class[] targetType,
  - final Object[] targetArguments) throws 
java.lang.Exception{
  - doAsPrivilege(methodName, targetObject, targetType, targetArguments, 
null);
  + final Object

cvs commit: jakarta-servletapi-5/jsr154/src/share/dtd web-app_2_4.xsd

2003-08-26 Thread jfarcand
jfarcand2003/08/26 14:38:09

  Modified:jsr154/src/share/dtd web-app_2_4.xsd
  Log:
  Apply patch submitted by Yutaka Yoshida.
  
  Revision  ChangesPath
  1.12  +11 -11jakarta-servletapi-5/jsr154/src/share/dtd/web-app_2_4.xsd
  
  Index: web-app_2_4.xsd
  ===
  RCS file: /home/cvs/jakarta-servletapi-5/jsr154/src/share/dtd/web-app_2_4.xsd,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- web-app_2_4.xsd   16 May 2003 23:20:18 -  1.11
  +++ web-app_2_4.xsd   26 Aug 2003 21:38:09 -  1.12
  @@ -126,7 +126,7 @@
 /xsd:documentation
   /xsd:annotation
   
  -xsd:unique name=servlet-name-uniqueness
  +xsd:unique name=web-app-servlet-name-uniqueness
 xsd:annotation
xsd:documentation
   
  @@ -139,7 +139,7 @@
 xsd:fieldxpath=j2ee:servlet-name/
   /xsd:unique
   
  -xsd:unique name=filter-name-uniqueness
  +xsd:unique name=web-app-filter-name-uniqueness
 xsd:annotation
xsd:documentation
   
  @@ -152,7 +152,7 @@
 xsd:fieldxpath=j2ee:filter-name/
   /xsd:unique
   
  -xsd:unique name=ejb-local-ref-name-uniqueness
  +xsd:unique name=web-app-ejb-local-ref-name-uniqueness
 xsd:annotation
xsd:documentation
   
  @@ -170,7 +170,7 @@
 xsd:fieldxpath=j2ee:ejb-ref-name/
   /xsd:unique
   
  -xsd:unique name=ejb-ref-name-uniqueness
  +xsd:unique name=web-app-ejb-ref-name-uniqueness
 xsd:annotation
xsd:documentation
   
  @@ -188,7 +188,7 @@
 xsd:fieldxpath=j2ee:ejb-ref-name/
   /xsd:unique
   
  -xsd:unique name=resource-env-ref-uniqueness
  +xsd:unique name=web-app-resource-env-ref-uniqueness
 xsd:annotation
xsd:documentation
   
  @@ -204,7 +204,7 @@
 xsd:fieldxpath=j2ee:resource-env-ref-name/
   /xsd:unique
   
  -xsd:unique name=message-destination-ref-uniqueness
  +xsd:unique name=web-app-message-destination-ref-uniqueness
 xsd:annotation
xsd:documentation
   
  @@ -220,7 +220,7 @@
 xsd:fieldxpath=j2ee:message-destination-ref-name/
   /xsd:unique
   
  -xsd:unique name=res-ref-name-uniqueness
  +xsd:unique name=web-app-res-ref-name-uniqueness
 xsd:annotation
xsd:documentation
   
  @@ -235,7 +235,7 @@
 xsd:fieldxpath=j2ee:res-ref-name/
   /xsd:unique
   
  -xsd:unique name=env-entry-name-uniqueness
  +xsd:unique name=web-app-env-entry-name-uniqueness
 xsd:annotation
xsd:documentation
   
  @@ -251,7 +251,7 @@
 xsd:fieldxpath=j2ee:env-entry-name/
   /xsd:unique
   
  -xsd:key name=role-name-key
  +xsd:key name=web-app-role-name-key
 xsd:annotation
xsd:documentation
   
  @@ -264,8 +264,8 @@
 xsd:fieldxpath=j2ee:role-name/
   /xsd:key
   
  -xsd:keyref name=role-name-references
  - refer=j2ee:role-name-key
  +xsd:keyref name=web-app-role-name-references
  + refer=j2ee:web-app-role-name-key
 xsd:annotation
xsd:documentation
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper Mapper.java

2003-08-20 Thread jfarcand
jfarcand2003/08/20 14:09:57

  Modified:util/java/org/apache/tomcat/util/http/mapper Mapper.java
  Log:
  Fix bugtraq 4897366: Tomcat fails to do a URL mapping for a servlet/jsp that 
contains the following url pattern.
  servlet-mapping
servlet-nameTwo/servlet-name
url-pattern*.jsp/url-pattern
  /servlet-mapping
  
  When the compare method returns 0, the current algorithm will never return and the 
extension will never get mapped (at least with the test case I have). I will try to 
translate the current test I have to be run by the tester.
  
  Revision  ChangesPath
  1.29  +15 -5 
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java
  
  Index: Mapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Mapper.java   20 Aug 2003 17:31:37 -  1.28
  +++ Mapper.java   20 Aug 2003 21:09:56 -  1.29
  @@ -900,9 +900,14 @@
   if (b == -1) {
   return -1;
   }
  -if (compare(name, start, end, map[0].name)  0) {
  +
  +int result = compare(name, start, end, map[0].name);
  +if (result  0 ) {
   return -1;
  +} else if (result == 0){
  +return 0;   
   }
  +
   if (b == 0) {
   return 0;
   }
  @@ -910,7 +915,7 @@
   int i = 0;
   while (true) {
   i = (b + a) / 2;
  -int result = compare(name, start, end, map[i].name);
  +result = compare(name, start, end, map[i].name);
   if (result == 1) {
   a = i;
   } else if (result == 0) {
  @@ -945,9 +950,14 @@
   if (b == -1) {
   return -1;
   }
  -if (name.compareTo(map[0].name)  0) {
  +
  +int result = name.compareTo(map[0].name);
  +if (result  0) {
   return -1;
  -}
  +} else if (result == 0){
  +return 0;
  +}   
  +
   if (b == 0) {
   return 0;
   }
  @@ -955,7 +965,7 @@
   int i = 0;
   while (true) {
   i = (b + a) / 2;
  -int result = name.compareTo(map[i].name);
  +result = name.compareTo(map[i].name);
   if (result  0) {
   a = i;
   } else if (result == 0) {
  
  
  

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



cvs commit: jakarta-tomcat-5 build.xml

2003-08-18 Thread jfarcand
jfarcand2003/08/18 09:34:42

  Modified:.build.xml
  Log:
  Minor cleanup (modeler is now released or soon to be)
  
  Revision  ChangesPath
  1.150 +0 -7  jakarta-tomcat-5/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v
  retrieving revision 1.149
  retrieving revision 1.150
  diff -u -r1.149 -r1.150
  --- build.xml 10 Aug 2003 09:53:37 -  1.149
  +++ build.xml 18 Aug 2003 16:34:42 -  1.150
  @@ -117,13 +117,6 @@
 srcfiles dir=${catalina.home}/webapps/admin includes=** /
   /uptodate
   
  -!--
  -uptodate property=commons-modeler.build.notrequired
  -  targetfile=${commons-modeler.jar}
  -  srcfiles dir=${cvs.base}/jakarta-commons/modeler/src/java includes=** /
  -/uptodate
  ---
  -
   uptodate property=commons-daemon.build.notrequired
 targetfile=${commons-daemon.jar}
 srcfiles dir=${cvs.base}/jakarta-commons-sandbox/daemon/src includes=** 
/
  
  
  

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



cvs commit: jakarta-servletapi-5/jsr154/src/share/javax/servlet/http Cookie.java HttpServlet.java HttpServletRequest.java HttpServletResponse.java HttpSession.java HttpSessionListener.java

2003-08-18 Thread jfarcand
jfarcand2003/08/18 09:50:33

  Modified:jsr154/src/share/javax/servlet Filter.java FilterConfig.java
ServletConfig.java ServletContext.java
ServletContextAttributeEvent.java
ServletContextListener.java
ServletOutputStream.java ServletRequest.java
ServletResponse.java UnavailableException.java
   jsr154/src/share/javax/servlet/http Cookie.java
HttpServlet.java HttpServletRequest.java
HttpServletResponse.java HttpSession.java
HttpSessionListener.java
  Log:
  Apply documentation patch submitted by Yutaka Yoshida at sun.com
  
  Revision  ChangesPath
  1.2   +2 -2  jakarta-servletapi-5/jsr154/src/share/javax/servlet/Filter.java
  
  Index: Filter.java
  ===
  RCS file: /home/cvs/jakarta-servletapi-5/jsr154/src/share/javax/servlet/Filter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Filter.java   13 Aug 2002 16:21:42 -  1.1
  +++ Filter.java   18 Aug 2003 16:50:33 -  1.2
  @@ -63,7 +63,7 @@
   import java.io.IOException;
   
/** 
  - * A filter is an object than perform filtering tasks on either the request to 
a resource (a servlet or static content), or on the response from a resource, or both.
  + * A filter is an object that performs filtering tasks on either the request to 
a resource (a servlet or static content), or on the response from a resource, or both.
   * brbr
* Filters perform filtering in the codedoFilter/code method. Every Filter 
has access to 
** a FilterConfig object from which it can obtain its initialization 
parameters, a
  @@ -114,7 +114,7 @@
* filter content or headers for output filtering br
* 4. a) strongEither/strong invoke the next entity in the chain using the 
FilterChain object (codechain.doFilter()/code), br   
** 4. b) strongor/strong not pass on the request/response pair to the next 
entity in the filter chain to block the request processingbr
  - ** 5. Directly set headers on the response after invokation of the next entity 
in ther filter chain.
  + ** 5. Directly set headers on the response after invocation of the next entity 
in ther filter chain.
**/
   public void doFilter ( ServletRequest request, ServletResponse response, 
FilterChain chain ) throws IOException, ServletException;
   
  
  
  
  1.2   +4 -4  
jakarta-servletapi-5/jsr154/src/share/javax/servlet/FilterConfig.java
  
  Index: FilterConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr154/src/share/javax/servlet/FilterConfig.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FilterConfig.java 13 Aug 2002 16:21:42 -  1.1
  +++ FilterConfig.java 18 Aug 2003 16:50:33 -  1.2
  @@ -68,7 +68,7 @@
 /** 
 *
 * A filter configuration object used by a servlet container
  -  * used to pass information to a filter during initialization.
  +  * to pass information to a filter during initialization.
 * @see Filter 
  * @since  Servlet 2.3
 *
  @@ -116,13 +116,13 @@
   
   
   /**
  - * Returns the names of the servlet's initialization parameters
  + * Returns the names of the filter's initialization parameters
* as an codeEnumeration/code of codeString/code objects, 
  - * or an empty codeEnumeration/code if the servlet has
  + * or an empty codeEnumeration/code if the filter has
* no initialization parameters.
*
* @return   an codeEnumeration/code of codeString/code 
  - *   objects containing the names of the servlet's 
  + *   objects containing the names of the filter's 
*   initialization parameters
*
*
  
  
  
  1.2   +1 -1  
jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletConfig.java
  
  Index: ServletConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletConfig.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServletConfig.java13 Aug 2002 16:21:43 -  1.1
  +++ ServletConfig.java18 Aug 2003 16:50:33 -  1.2
  @@ -67,7 +67,7 @@
   /**
* 
* A servlet configuration object used by a servlet container
  - * used to pass information to a servlet during initialization. 
  + * to pass information to a servlet during initialization. 
*
*/

  
  
  
  1.4   +6 -2  
jakarta-servletapi-5/jsr154/src/share/javax/servlet

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

2003-08-18 Thread jfarcand
jfarcand2003/08/18 12:41:56

  Modified:catalina/src/share/org/apache/catalina/servlets
DefaultServlet.java
  Log:
  Fix NPE when getMessage returns null.
  
  Revision  ChangesPath
  1.17  +6 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- DefaultServlet.java   29 Jul 2003 14:23:35 -  1.16
  +++ DefaultServlet.java   18 Aug 2003 19:41:56 -  1.17
  @@ -513,7 +513,8 @@
   serveResource(request, response, true);
   } catch( IOException ex ) {
   // we probably have this check somewhere else too.
  -if( ex.getMessage().indexOf(Broken pipe) = 0 ) {
  +if( ex.getMessage() != null 
  + ex.getMessage().indexOf(Broken pipe) = 0 ) {
   // ignore it.
   }
   throw ex;
  
  
  

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



cvs commit: jakarta-tomcat-5 build.properties.default

2003-08-14 Thread jfarcand
jfarcand2003/08/12 09:49:24

  Modified:.build.properties.default
  Log:
  Until I figure out what is the problem with Xerces 2.3.0+, use Xerces 2.1.0 so at 
least people can turn on validation and test Tld validation.
  
  Revision  ChangesPath
  1.101 +4 -5  jakarta-tomcat-5/build.properties.default
  
  Index: build.properties.default
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- build.properties.default  10 Aug 2003 08:50:44 -  1.100
  +++ build.properties.default  12 Aug 2003 16:49:24 -  1.101
  @@ -125,13 +125,12 @@
   
regexp.loc=http://jakarta.apache.org/builds/jakarta-regexp/release/v1.2/jakarta-regexp-1.2.tar.gz
   
   
  -# - Xerces XML Parser, version 2.4.0 -
  -xerces.home=${base.path}/xerces-2_5_0
  +# - Xerces XML Parser, version 2.1.0 -
  +xerces.home=${base.path}/xerces-2_1_0
   xerces.lib=${xerces.home}
   xercesImpl.jar=${xerces.lib}/xercesImpl.jar
   xmlParserAPIs.jar=${xerces.lib}/xmlParserAPIs.jar
  -xerces.loc=http://xml.apache.org/dist/xerces-j/Xerces-J-bin.2.5.0.tar.gz
  -
  +xerces.loc=http://xml.apache.org/dist/xerces-j/old_xerces2/Xerces-J-bin.2.1.0.tar.gz
   
   # --
   #  CORE OPTIONAL LIBRARIES
  
  
  

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



  1   2   3   >