DO NOT REPLY [Bug 24206] New: - Error while starting up tomcat server

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24206

Error while starting up tomcat server

   Summary: Error while starting up tomcat server
   Product: Tomcat 5
   Version: 5.0.12
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Major
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have downloaded latest version from tomact.(version 5.0.12).
In its Running.txt file, it was mentioned it runs with JDK 1.3 or higher.
I installed jdk 1.3 on my machine, it gave an error like this :
***
[ERROR] Digester - -Begin event threw error java.lang.ExceptionInInitializerError: sun.misc.InvalidJarIndexException: Inv
alid index!
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:594)
at sun.misc.URLClassPath.getResource(URLClassPath.java:134)
at java.net.URLClassLoader$2.run(URLClassLoader.java:349)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findResource(URLClassLoader.java:346)
at org.apache.catalina.loader.StandardClassLoader.findResource(StandardC
lassLoader.java:562)
at org.apache.catalina.loader.StandardClassLoader.getResource(StandardCl
assLoader.java:638)
at org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:895
)
at org.apache.catalina.mbeans.MBeanUtils.createRegistry(MBeanUtils.java:
1649)
at org.apache.catalina.mbeans.MBeanUtils.(MBeanUtils.java:154)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.(
GlobalResourcesLifecycleListener.java:112)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.j
ava:253)
at org.apache.commons.digester.Rule.begin(Rule.java:200)
at org.apache.commons.digester.Digester.startElement(Digester.java:1273)

at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXP
arser.java:471)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Abst
ractXMLDocumentParser.java:225)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(XMLDocumentFragmentScannerImpl.java:819)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1544)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
LDocumentFragmentScannerImpl.java:350)
at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration
.java:220)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
a:595)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
ava:1162)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:512)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:258)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:391)

java.lang.reflect.InvocationTargetException: java.lang.ExceptionInInitializerErr
or: sun.misc.InvalidJarIndexException: Invalid index!
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:594)
at sun.misc.URLClassPath.getResource(URLClassPath.java:134)
at java.net.URLClassLoader$2.run(URLClassLoader.java:349)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findResource(URLClassLoader.java:346)
at org.apache.catalina.loader.StandardClassLoader.findResource(StandardC
lassLoader.java:562)
at org.apache.catalina.loader.StandardClassLoader.getResource(StandardCl
assLoader.java:638)
at org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:895
)
at org.apache.catalina.mbeans.MBeanUtils.createRegistry(MBeanUtils.java:
1649)
at org.apache.catalina.mbeans.MBeanUtils.(MBeanUtils.java:154)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.(
GlobalResourcesLifecycleListener.java:112)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.j
ava:253

DO NOT REPLY [Bug 24197] New: - adding an extra slash in a mod_jk url circumvents tomcat (form) login authentication

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24197

adding an extra slash in a mod_jk url circumvents tomcat (form) login authentication

   Summary: adding an extra slash in a mod_jk url circumvents tomcat
(form) login authentication
   Product: Tomcat 4
   Version: 4.1.27
  Platform: All
   URL: http://(on request)
OS/Version: All
Status: NEW
  Severity: Major
  Priority: Other
 Component: Connector:JK/AJP (deprecated)
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Assume some.host:8009 with webapp 'webapp' is JkMounted on
http://some.host/webapp/*. If you request a file (e.g.
http://some.host/webapp/private.jsp) protected by a security-constraint in the
web.xml file, normally a password prompt would appear. However, if you type
http://some.host/webapp//private.jsp in your browser's address bar, you can view
the page, but as a user with no role.

This problem doesn't occur if you try tomcat's http/1.1 connector with an extra
slash.

Tested with FreeBSD 4.8, RedHat 8, mod_jk 1.1.0, mod_jk 1.2.4, mod_jk 1.2.5,
tomcat 4.1.12, tomcat 4.1.27, apache 1.3.28.

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



cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler TextOptimizer.java Compiler.java Node.java Parser.java

2003-10-28 Thread kinman
kinman  2003/10/28 15:04:11

  Modified:jasper2/src/share/org/apache/jasper/compiler Compiler.java
Node.java Parser.java
  Added:   jasper2/src/share/org/apache/jasper/compiler
TextOptimizer.java
  Log:
  - Concatenate text strings of adjecent TemplateText nodes.  This may
reduce code size and improve performance.
  - Remove previous implementation for "mappedfile" options from Parser,
since this functionality works for free now.
  
  Revision  ChangesPath
  1.73  +3 -0  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- Compiler.java 28 Oct 2003 19:18:53 -  1.72
  +++ Compiler.java 28 Oct 2003 23:04:11 -  1.73
  @@ -267,6 +267,9 @@
TagPluginManager tagPluginManager = options.getTagPluginManager();
tagPluginManager.apply(pageNodes, errDispatcher, pageInfo);
   
  +// Optimization: concatenate contiguous template texts.
  +TextOptimizer.concatenate(pageNodes);
  +
// Generate static function mapper codes.
ELFunctionMapper.map(this, pageNodes);
   
  
  
  
  1.78  +7 -3  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java
  
  Index: Node.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- Node.java 16 Sep 2003 17:46:43 -  1.77
  +++ Node.java 28 Oct 2003 23:04:11 -  1.78
  @@ -1943,6 +1943,10 @@
   text = text.substring(index);
   }
   
  +public void setText(String text) {
  +this.text = text;
  +}
  +
   /**
* Trim all whitespace from the right of the template text
*/
  
  
  
  1.83  +5 -44 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- Parser.java   23 Sep 2003 20:47:23 -  1.82
  +++ Parser.java   28 Oct 2003 23:04:11 -  1.83
  @@ -101,7 +101,6 @@
   private boolean directivesOnly;
   private URL jarFileUrl;
   private PageInfo pageInfo;
  -private boolean mappedFile;
   
   // Virtual body content types, to make parsing a little easier.
   // These are not accessible from outside the parser.
  @@ -128,7 +127,6 @@
this.directivesOnly = directivesOnly;
this.jarFileUrl = jarFileUrl;
   start = reader.mark();
  -mappedFile = ctxt.getOptions().getMappedFile();
   }
   
   /**
  @@ -1409,44 +1407,9 @@
return true;
   }
   
  -/**
  - * Determines whether the current text is template text
  - * or not.  Assumes the reader is at the character 
  - * following the "<".
  - */
  -private boolean isTemplateText() throws JasperException {
  -
  -Mark m = reader.mark();
  -int ch = reader.peekChar();
  -if (ch == '/') {
  -reader.nextChar();
  -}
  -String tagIdentifier = reader.parseToken(false);
  -reader.reset(m);
  -
  -if (tagIdentifier.startsWith("%")) {
  -return false;
  -}
  -if (tagIdentifier.startsWith("jsp:")) {
  -return false;
  -}
  -
  -// Check if this is a user-defined tag.
  -int i = tagIdentifier.indexOf(':');
  -if (i == -1) {
  -return true;
  -}
  -String prefix = tagIdentifier.substring(0, i);
  -String uri = pageInfo.getURI(prefix);
  -if (uri == null) {
  -return true;
  -}
  -
  -return false;
  -}
  -
   /*
  - *
  + * Parse for a template text string until '<' or "${" is encountered, 
  + * recognizing escape sequences "\%" and "\$".
*/
   private void parseTemplateText(Node parent) throws JasperException {
   
  @@ -1461,11 +1424,9 @@
while (reader.hasMoreInput()) {
ch = reader.nextChar();
if (ch == '<') {
  -if (!mappedFile || !isTemplateText()) {
   reader.pushChar();
   break;
   }
  - }
else if( ch == '$' ) {
if (!reader.hasMoreInput()) {
ttext.write('$');
 

cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/res LocalStrings.properties

2003-10-28 Thread luehe
luehe   2003/10/28 12:03:01

  Modified:util/java/org/apache/tomcat/util/threads ThreadPool.java
  Added:   util/java/org/apache/tomcat/util/threads/res
LocalStrings.properties
  Log:
  Added support for localized messages
  
  Revision  ChangesPath
  1.15  +19 -14
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java
  
  Index: ThreadPool.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ThreadPool.java   11 Sep 2003 04:05:02 -  1.14
  +++ ThreadPool.java   28 Oct 2003 20:03:01 -  1.15
  @@ -63,6 +63,7 @@
   import java.util.*;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.tomcat.util.res.StringManager;
   
   /**
* A thread pool that is trying to copy the apache process management.
  @@ -70,7 +71,13 @@
* @author Gal Shachor
*/
   public class ThreadPool  {
  -static Log log = LogFactory.getLog(ThreadPool.class);
  +
  +private static Log log = LogFactory.getLog(ThreadPool.class);
  +
  +private static StringManager sm =
  +StringManager.getManager("org.apache.tomcat.util.threads.res");
  +
  +private static boolean logfull=true;
   
   /*
* Default values ...
  @@ -140,17 +147,16 @@
*/
   protected int sequence = 1;
   
  +
   /**
  - * Helper object for logging
  - **/
  -//Log loghelper = Log.getLog("tc/ThreadPool", "ThreadPool");
  -
  + * Constructor.
  + */
   public ThreadPool() {
  -maxThreads  = MAX_THREADS;
  +maxThreads = MAX_THREADS;
   maxSpareThreads = MAX_SPARE_THREADS;
   minSpareThreads = MIN_SPARE_THREADS;
  -currentThreadCount  = 0;
  -currentThreadsBusy  = 0;
  +currentThreadCount = 0;
  +currentThreadsBusy = 0;
   stopThePool = false;
   }
   
  @@ -361,13 +367,12 @@
   return c;
   }
   
  -static boolean logfull=true;
  -public static void logFull(Log loghelper, int currentThreadCount, int 
maxThreads) {
  +private static void logFull(Log loghelper, int currentThreadCount,
  +int maxThreads) {
if( logfull ) {
  -log.error("All threads are busy, waiting. Please " +
  -"increase maxThreads or check the servlet" +
  -" status" + currentThreadCount + " " +
  -maxThreads  );
  +log.error(sm.getString("threads.busy",
  +   new Integer(currentThreadCount),
  +   new Integer(maxThreads)));
   logfull=false;
   } else if( log.isDebugEnabled() ) {
   log.debug("All threads are busy " + currentThreadCount + " " +
  
  
  
  1.1  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  threads.busy=All threads ({0}) are currently busy, waiting. Increase maxThreads 
({1}) or check the servlet status
  
  

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



cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/res - New directory

2003-10-28 Thread luehe
luehe   2003/10/28 12:00:42

  jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/res - New 
directory

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



DO NOT REPLY [Bug 24186] - Jasper SystemLogHandler memory leak

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24186

Jasper SystemLogHandler memory leak

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-10-28 19:23 ---
Thanks for the patch.  Applied.

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



cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/util SystemLogHandler.java

2003-10-28 Thread kinman
kinman  2003/10/28 11:18:54

  Modified:jasper2/src/share/org/apache/jasper/compiler Compiler.java
JspRuntimeContext.java
   jasper2/src/share/org/apache/jasper/util
SystemLogHandler.java
  Log:
  - Patch by [EMAIL PROTECTED]
  
Fix 24186: Jasper SystemLogHandler memory leak
  
  Revision  ChangesPath
  1.72  +0 -6  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- Compiler.java 1 Oct 2003 22:44:02 -   1.71
  +++ Compiler.java 28 Oct 2003 19:18:53 -  1.72
  @@ -98,12 +98,6 @@
   // - Static
   
   
  -static {
  -
  -System.setErr(new SystemLogHandler(System.err));
  -
  -}
  -
   // Some javac are not thread safe; use a lock to serialize compilation, 
   static Object javacLock = new Object();
   
  
  
  
  1.17  +11 -5 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java
  
  Index: JspRuntimeContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JspRuntimeContext.java2 Sep 2003 21:39:58 -   1.16
  +++ JspRuntimeContext.java28 Oct 2003 19:18:53 -  1.17
  @@ -82,6 +82,7 @@
   import org.apache.jasper.Constants;
   import org.apache.jasper.JspCompilationContext;
   import org.apache.jasper.Options;
  +import org.apache.jasper.util.SystemLogHandler;
   import org.apache.jasper.runtime.JspFactoryImpl;
   import org.apache.jasper.security.SecurityClassLoad;
   import org.apache.jasper.servlet.JspServletWrapper;
  @@ -125,6 +126,8 @@
*/
   public JspRuntimeContext(ServletContext context, Options options) {
   
  +System.setErr(new SystemLogHandler(System.err));
  +
   this.context = context;
   this.options = options;
   
  @@ -271,7 +274,10 @@
   /**
* Process a "destory" event for this web application context.
*/
  -public void destroy() {
  +public void destroy() {
  +
  +if(System.err instanceof SystemLogHandler)
  +System.setErr(((SystemLogHandler)System.err).getWrapped());
   
   threadStop();
   
  
  
  
  1.3   +7 -3  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/util/SystemLogHandler.java
  
  Index: SystemLogHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/util/SystemLogHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SystemLogHandler.java 2 Sep 2003 21:40:00 -   1.2
  +++ SystemLogHandler.java 28 Oct 2003 19:18:54 -  1.3
  @@ -79,7 +79,7 @@
*/
   public SystemLogHandler(PrintStream wrapped) {
   super(wrapped);
  -out = wrapped;
  +this.wrapped = wrapped;
   }
   
   
  @@ -89,7 +89,7 @@
   /**
* Wrapped PrintStream.
*/
  -protected PrintStream out = null;
  +protected PrintStream wrapped = null;
   
   
   /**
  @@ -107,6 +107,10 @@
   // - Public Methods
   
   
  +public PrintStream getWrapped() {
  +  return wrapped;
  +}
  +
   /**
* Start capturing thread's output.
*/
  @@ -142,7 +146,7 @@
   protected PrintStream findStream() {
   PrintStream ps = (PrintStream) streams.get(Thread.currentThread());
   if (ps == null) {
  -ps = out;
  +ps = wrapped;
   }
   return ps;
   }
  
  
  

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



RE: jk2/apr

2003-10-28 Thread Mladen Turk


> From: Henri Gomez
> 
> Ding/Dong,
> 
> What's the status of jk2 use APR ?
> 
> Mladen did you are still with works in progress ?
> 

I'm in a few deadline loops, again ;-).
So if nobody beets me before weekend I'll commit the needed changes.

MT.


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



DO NOT REPLY [Bug 24186] - Jasper SystemLogHandler memory leak

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24186

Jasper SystemLogHandler memory leak





--- Additional Comments From [EMAIL PROTECTED]  2003-10-28 17:49 ---
Created an attachment (id=8777)
patch as attachment

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



DO NOT REPLY [Bug 24186] New: - Jasper SystemLogHandler memory leak

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24186

Jasper SystemLogHandler memory leak

   Summary: Jasper SystemLogHandler memory leak
   Product: Tomcat 5
   Version: 5.0.14
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


In an embedded setting it may be desirable to load and unload Jasper in an own
classloader. This is impossible with Jasper right now without a memory leak.
o.a.j.c.Compiler sets System.err to an instance of o.a.j.u.SystemLogHandler in
its static initializer and never reset it. A new instance of Jasper will pick up
this instance as its 'wrapped' PrintStream and so on ...

This way, System.err retains a reference chain to each incarnation of
SystemLogHandler and the whole classloader cannot be unloaded. 

I propose to move the redirection to the JspRuntimeContext constructor and to
undo it in JspRuntimeContext#destroy. With that change, Jasper can be unloaded
without memory leak. Actually, since Jasper uses Ant for compilation which seems
to support System.{out,err} redirect, it is not clear to me why the
SystemLogHandler is in there (legacy?).

Workaround: manually reset System.err on unload.

patch against current CVS:

===
RCS file:
/home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
retrieving revision 1.71
diff -u -r1.71 Compiler.java
--- compiler/Compiler.java  1 Oct 2003 22:44:02 -   1.71
+++ compiler/Compiler.java  28 Oct 2003 17:38:06 -
@@ -98,12 +98,6 @@
 // - Static
 
 
-static {
-
-System.setErr(new SystemLogHandler(System.err));
-
-}
-
 // Some javac are not thread safe; use a lock to serialize compilation, 
 static Object javacLock = new Object();

===
RCS file:
/home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java,v
retrieving revision 1.16
diff -u -r1.16 JspRuntimeContext.java
--- compiler/JspRuntimeContext.java 2 Sep 2003 21:39:58 -   1.16
+++ compiler/JspRuntimeContext.java 28 Oct 2003 17:38:06 -
@@ -82,6 +82,7 @@
 import org.apache.jasper.Constants;
 import org.apache.jasper.JspCompilationContext;
 import org.apache.jasper.Options;
+import org.apache.jasper.util.SystemLogHandler;
 import org.apache.jasper.runtime.JspFactoryImpl;
 import org.apache.jasper.security.SecurityClassLoad;
 import org.apache.jasper.servlet.JspServletWrapper;
@@ -125,6 +126,8 @@
  */
 public JspRuntimeContext(ServletContext context, Options options) {
 
+System.setErr(new SystemLogHandler(System.err));
+
 this.context = context;
 this.options = options;
 
@@ -271,7 +274,10 @@
 /**
  * Process a "destory" event for this web application context.
  */
-public void destroy() {
+public void destroy() {
+
+if(System.err instanceof SystemLogHandler)
+System.setErr(((SystemLogHandler)System.err).getWrapped());
 
 threadStop();


===
RCS file:
/home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/util/SystemLogHandler.java,v
retrieving revision 1.2
diff -u -r1.2 SystemLogHandler.java
--- util/SystemLogHandler.java  2 Sep 2003 21:40:00 -   1.2
+++ util/SystemLogHandler.java  28 Oct 2003 17:38:06 -
@@ -79,7 +79,7 @@
  */
 public SystemLogHandler(PrintStream wrapped) {
 super(wrapped);
-out = wrapped;
+this.wrapped = wrapped;
 }
 
 
@@ -89,7 +89,7 @@
 /**
  * Wrapped PrintStream.
  */
-protected PrintStream out = null;
+protected PrintStream wrapped = null;
 
 
 /**
@@ -107,6 +107,10 @@
 // - Public Methods
 
 
+public PrintStream getWrapped() {
+  return wrapped;
+}
+
 /**
  * Start capturing thread's output.
  */
@@ -142,7 +146,7 @@
 protected PrintStream findStream() {
 PrintStream ps = (PrintStream) streams.get(Thread.currentThread());
 if (ps == null) {
-ps = out;
+ps = wrapped;
 }
 return ps;
 }

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

DO NOT REPLY [Bug 24182] New: - java.util.ConcurrentModificationException

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24182

java.util.ConcurrentModificationException

   Summary: java.util.ConcurrentModificationException
   Product: Tomcat 4
   Version: 4.1.27
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Windows 2003 Server
Sun JDK 1.4.1
Tomcat 4.1.27

java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextEntry
(LinkedHashMap.java:358)
at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:377)
at java.util.HashMap.writeObject(HashMap.java:976)
at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at java.io.ObjectStreamClass.invokeWriteObject
(ObjectStreamClass.java:809)
at java.io.ObjectOutputStream.writeSerialData
(ObjectOutputStream.java:1296)
at java.io.ObjectOutputStream.writeOrdinaryObject
(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at org.apache.catalina.session.StandardSession.writeObject
(StandardSession.java:1439)
at org.apache.catalina.session.StandardSession.writeObjectData
(StandardSession.java:881)
at org.apache.catalina.session.JDBCStore.save(JDBCStore.java:730)
at org.apache.catalina.session.PersistentManagerBase.writeSession
(PersistentManagerBase.java:782)
at org.apache.catalina.session.PersistentManagerBase.swapOut
(PersistentManagerBase.java:762)
at org.apache.catalina.session.PersistentManagerBase.processMaxIdleSwaps
(PersistentManagerBase.java:1015)
at 
org.apache.catalina.session.PersistentManagerBase.processPersistenceChecks
(PersistentManagerBase.java:525)
at org.apache.catalina.session.PersistentManagerBase.run
(PersistentManagerBase.java:1172)
at java.lang.Thread.run(Thread.java:534)

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



Re: mod_jk timeout?

2003-10-28 Thread Glenn Nielsen
Brian Maher wrote:
On Mon, 27 Oct 2003, Henri Gomez wrote:

If the thread on java side is a long running task or a blocking task,
it should be handled by the servlet engine and sus some watchdog support
should be added in Tomcat.
In you're exemple I didn't know how the thread could be ever finished 
!!!


In theory, that's what Thread#interrupt is for. It asks the thread to 
shut
down, resulting in setting the #interrupted flag / an 
InterruptedException
on potentially blocking calls such as wait() or sleep(). One could
interrupt named jsp like that.


Actually, I was thinking the Thread#join would be better since we could 
be in an infinite loop not doing any calls to wait() or sleep().  I was 
thinking of implementing a scheme sort of like this:

   mod_jk |  tomcat
   ---+--
   PING  -->  received
   received  <--  PONG
  [ sleep ~2 seconds ]
   received  <--  PING
   PONG  -->  received
If any side sends a PING and doesn't hear a PONG in 0.1 seconds, it can 
assume the other side is "dead".  This would mean a there would need to 
be a separate thread in the tomcat that is simply doing housekeeping or 
"watch dogging" on the status of the connections.

This won't work well on the Tomcat side due to Garbage Collection.
the JVM will often freeze Tomcat for > .1 seconds during GC.  And
when doing a Full GC can freeze Tomcat for many seconds.
Regards,

Glenn

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


DO NOT REPLY [Bug 18485] - Jasper tries to write something directly to $CATALINA_HOME

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18485

Jasper tries to write something directly to $CATALINA_HOME





--- Additional Comments From [EMAIL PROTECTED]  2003-10-28 15:16 ---
ant related issue: 
 
http://issues.apache.org/bugzilla/show_bug.cgi?id=19765

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



DO NOT REPLY [Bug 24179] - Including CATALINA_BASE in the catalina and common class loaders construction

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24179

Including CATALINA_BASE in the catalina and common class loaders construction





--- Additional Comments From [EMAIL PROTECTED]  2003-10-28 15:13 ---
Created an attachment (id=8771)
Proposed patch

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



DO NOT REPLY [Bug 24179] New: - Including CATALINA_BASE in the catalina and common class loaders construction

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24179

Including CATALINA_BASE in the catalina and common class loaders construction

   Summary: Including CATALINA_BASE in the catalina and common class
loaders construction
   Product: Tomcat 4
   Version: 4.1.27
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The idea is to modify org.apache.catalina.startup.Bootstrap (or implement a 
subclass) to include the following paths in the base class loaders:

commonLoader:
  - $CATALINA_BASE/common/classes
  - $CATALINA_BASE/common/endorsed/*.jar
  - $CATALINA_BASE/common/lib/*.jar
catalinaLoader:
  - $CATALINA_BASE/server/classes
  - $CATALINA_BASE/server/lib/*.jar

A reason for this modification would be the next scenario:

Suppose a web-enabled solution that uses a Tomcat server as a servlet 
container, but that involves the development or usage of custom valves, 
listeners, socket factories and so.

Some of these applications will require some extra libraries to be added to the 
common class loader. Some others will require them to be in the catalina class 
loader.

Currently, the only way to get this to work is to customize a full Tomact 
installation, putting the additional jars in common/lib or server/lib.

This means that, in a development environment, each programmer will need a 
local full tomcat installed for the product to be tested.

If you multiply this by N developers, and by M different products, the waste of 
space begins to become important.

If those "tomcat components" are shared among products, and different versions 
are incompatible, the same can be applied to a customer production environment, 
where using a shared instance would be desirable, but it would not be possible 
due to library incompatibilities.

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



DO NOT REPLY [Bug 18485] - Jasper tries to write something directly to $CATALINA_HOME

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18485

Jasper tries to write something directly to $CATALINA_HOME





--- Additional Comments From [EMAIL PROTECTED]  2003-10-28 15:08 ---
 
readable stacktrace  
 
java.io.FileNotFoundException: /home/tomcat5/bin/files606548030 (Permission 
denied)  
at java.io.FileOutputStream.open(Native Method)  
at java.io.FileOutputStream.(FileOutputStream.java:176)  
at java.io.FileOutputStream.(FileOutputStream.java:131)  
at java.io.FileWriter.(FileWriter.java:73) 
at 
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:424)

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



DO NOT REPLY [Bug 18485] - Jasper tries to write something directly to $CATALINA_HOME

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18485

Jasper tries to write something directly to $CATALINA_HOME

[EMAIL PROTECTED] changed:

   What|Removed |Added

  Component|Jasper 2|Jasper
Product|Tomcat 4|Tomcat 5
Version|4.1.24  |5.0.13



--- Additional Comments From [EMAIL PROTECTED]  2003-10-28 15:06 ---
same problem different tomcat version -> 5.0.13/14.after looking in 
DefaultCompilerAdapter, i see "ant" use the system property "user.dir". 
java.io.FileNotFoundException: /home/tomcat5/bin/files606548030 (Permission   denied)  
 at java.io.FileOutputStream.open(Native Method)   at 
java.io.FileOutputStream.(FileOutputStream.java:176)   at 
java.io.FileOutputStream.(FileOutputStream.java:131)   at 
java.io.FileWriter.(FileWriter.java:73)   at   
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:424)
   at   org.apache.tools.ant.taskdefs.compilers.Jikes.execute(Jikes.java:232)  
 at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:840)   at 
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)   at   
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:396)   at 
org.apache.jasper.compiler.Compiler.compile(Compiler.java:463)   at 
org.apache.jasper.compiler.Compiler.compile(Compiler.java:444)

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



jk2/apr

2003-10-28 Thread Henri Gomez
Ding/Dong,

What's the status of jk2 use APR ?

Mladen did you are still with works in progress ?

Regards

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


problems with german umlauts

2003-10-28 Thread Stefan Weigel
Hi!
I'm using Tomcat 3.3.1a on a SuSE Linux Enterprise 8 (Apache 1.3.26 + mod_jk) 
and when I enter some umauts like äöü (example Schröder becomes 
mod_jk is configured to use ajp13. These umlauts isse is discussed here 
(http://www.mail-archive.com/[EMAIL PROTECTED]/msg13510.html)
but with my config I still have problems. If I make the connection directly 
over port 8080, I have no problems.
Is there a configuration flag that I'm missing or is it a bug
-- 

__




 stefan weigel
 administration


 global linxs gmbh
 knowledge interaction
 romanstrasse 16
 80639 munich - germany
 www.global-linxs.com



 tel.: +49(0)89. 189 336- 61
 fax.: +49(0)89. 189 336- 99
 email: [EMAIL PROTECTED]



__


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



DO NOT REPLY [Bug 24176] New: - Header Encoding Problem

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24176

Header Encoding Problem

   Summary: Header Encoding Problem
   Product: Tomcat 4
   Version: 4.1.27
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Tomcat 4.1.2x seems always returned headers encoded in UTF8 irrespective of 
content type setting. This casued browser(MSIE) cannot download file with 
correct non-ISO characters filename. There is no such problem found in 4.0.6.

Have tried charset=Big5, ISO8859-1, ..., all failed.

Example:

// filename obtained from file system in ISO format and convert to correct big5 
encoding
filename=new String(filename.getBytes("ISO8859-1"), "big5");
response.setContentType("application/octet-stream;charset=xxx"); 
response.setHeader("Content-encoding","binary");
String resp=filename; // read from disk
response.setHeader("Content-Disposition", "filename="+resp);
ServletOutputStream out = response.getOutputStream();
// ... read the file from disk and write to user
out.close();

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



Faking server_port

2003-10-28 Thread David Cassidy
Guys,

I need to fake the server_port that mod_jk forwards to apache. This is due to the fact 
that our apache
listens on port 8080 but our firewall re-writes the hits on port 80 to go to this 
server.

Sadly this means that when tomcat writes a re-direct header it uses port 8080 and not 
80 as the server_port
tells it 8080 and hence any redirect fails.

Is there anyway to fake the server_port to be 80 yet or is this something I'll need to 
add in ?

Any suggestions ?

Thanks

David




--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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



Re: mod_jk timeout?

2003-10-28 Thread Henri Gomez
Brian Maher a écrit :
On Mon, 27 Oct 2003, Henri Gomez wrote:

If the thread on java side is a long running task or a blocking task,
it should be handled by the servlet engine and sus some watchdog support
should be added in Tomcat.
In you're exemple I didn't know how the thread could be ever finished 
!!!


In theory, that's what Thread#interrupt is for. It asks the thread to 
shut
down, resulting in setting the #interrupted flag / an 
InterruptedException
on potentially blocking calls such as wait() or sleep(). One could
interrupt named jsp like that.


Actually, I was thinking the Thread#join would be better since we could 
be in an infinite loop not doing any calls to wait() or sleep().  I was 
thinking of implementing a scheme sort of like this:

   mod_jk |  tomcat
   ---+--
   PING  -->  received
   received  <--  PONG
  [ sleep ~2 seconds ]
   received  <--  PING
   PONG  -->  received
If any side sends a PING and doesn't hear a PONG in 0.1 seconds, it can 
assume the other side is "dead".  This would mean a there would need to 
be a separate thread in the tomcat that is simply doing housekeeping or 
"watch dogging" on the status of the connections.

However, dealing correctly with InterruptedExceptions is hard (you should
leave your objects in a meaningful state) and since InterruptedException
also is a checked exception, many people choose to
catch(InterruptedException ie) {}, even(?) Sun ORB code does so (not to
speak of my own).


Certainly it can be hard to correctly deal with interruptions, but what 
is the alternative.  Especially if you are running an untrusted JSP 
pages that could contain an infinite loop.  Certainly testing for 
infinite loops is impossible, or at least NP Complete.  And, with many 
requests to such a web page, it would be easy to turn it into a denial 
of service attack.

Those threads are inevitably lost.


I would think that is the point.

If I was to implement this feature, where should I look for the source 
code, and should I simply submit a patch to be reviewed?
In the ajp13 java side and the jk side, both is jtc.

BTW, there is works on jk2 so it will have to wait a little ;(

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


Re: mod_jk timeout?

2003-10-28 Thread Brian Maher
On Mon, 27 Oct 2003, Henri Gomez wrote:

If the thread on java side is a long running task or a blocking task,
it should be handled by the servlet engine and sus some watchdog 
support
should be added in Tomcat.

In you're exemple I didn't know how the thread could be ever finished 
!!!
In theory, that's what Thread#interrupt is for. It asks the thread to 
shut
down, resulting in setting the #interrupted flag / an 
InterruptedException
on potentially blocking calls such as wait() or sleep(). One could
interrupt named jsp like that.
Actually, I was thinking the Thread#join would be better since we could 
be in an infinite loop not doing any calls to wait() or sleep().  I was 
thinking of implementing a scheme sort of like this:

   mod_jk |  tomcat
   ---+--
   PING  -->  received
   received  <--  PONG
  [ sleep ~2 seconds ]
   received  <--  PING
   PONG  -->  received
If any side sends a PING and doesn't hear a PONG in 0.1 seconds, it can 
assume the other side is "dead".  This would mean a there would need to 
be a separate thread in the tomcat that is simply doing housekeeping or 
"watch dogging" on the status of the connections.

However, dealing correctly with InterruptedExceptions is hard (you 
should
leave your objects in a meaningful state) and since 
InterruptedException
also is a checked exception, many people choose to
catch(InterruptedException ie) {}, even(?) Sun ORB code does so (not to
speak of my own).
Certainly it can be hard to correctly deal with interruptions, but what 
is the alternative.  Especially if you are running an untrusted JSP 
pages that could contain an infinite loop.  Certainly testing for 
infinite loops is impossible, or at least NP Complete.  And, with many 
requests to such a web page, it would be easy to turn it into a denial 
of service attack.

Those threads are inevitably lost.
I would think that is the point.

If I was to implement this feature, where should I look for the source 
code, and should I simply submit a patch to be reviewed?

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


DO NOT REPLY [Bug 24174] New: - [PACTH]/home/cvspublic/jakarta-tomcat-4.0/catalina/src/test/org/apache/naming/resources/BaseDirContextTestCase.java

2003-10-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24174

[PACTH]/home/cvspublic/jakarta-tomcat-4.0/catalina/src/test/org/apache/naming/resources/BaseDirContextTestCase.java

   Summary: [PACTH]/home/cvspublic/jakarta-tomcat-
4.0/catalina/src/test/org/apache/naming/resources/BaseDi
rContextTestCase.java
   Product: Tomcat 4
   Version: Nightly Build
  Platform: All
OS/Version: Other
Status: UNCONFIRMED
  Severity: Enhancement
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


This may be a bug.I  used junit3.8.1 to compile this source,but failed.Because 
there is no "assert" in junit3.8.1 ,but "assertTrue" can be used.

Index: BaseDirContextTestCase.java
===
RCS file: /home/cvspublic/jakarta-tomcat-
4.0/catalina/src/test/org/apache/naming/resources/BaseDirContextTestCase.java,v
retrieving revision 1.3
diff -u -r1.3 BaseDirContextTestCase.java
--- BaseDirContextTestCase.java 21 Oct 2001 22:03:34 -  1.3
+++ BaseDirContextTestCase.java 28 Oct 2003 08:29:49 -
@@ -247,7 +247,7 @@
 // Look up the WEB-INF entry
 Object webInfEntry = context.lookup("WEB-INF");
 assertNotNull("Found WEB-INF entry", webInfEntry);
-assert("WEB-INF entry is a DirContext",
+   assertTrue("WEB-INF entry is a DirContext",
webInfEntry instanceof DirContext);
 DirContext webInfContext = (DirContext) webInfEntry;
 
@@ -303,7 +303,7 @@
 // Look up the WEB-INF entry
 Object webInfEntry = context.lookup("WEB-INF");
 assertNotNull("Found WEB-INF entry", webInfEntry);
-assert("WEB-INF entry is a DirContext",
+   assertTrue("WEB-INF entry is a DirContext",
webInfEntry instanceof DirContext);
 DirContext webInfContext = (DirContext) webInfEntry;
 
@@ -353,20 +353,20 @@
 while (ne.hasMore()) {
 
 Object next = ne.next();
-assert("list() returns NameClassPair instances",
+   assertTrue("list() returns NameClassPair instances",
next instanceof NameClassPair);
 NameClassPair ncp = (NameClassPair) next;
 
-assert("Name '" + ncp.getName() + "' is expected",
+   assertTrue("Name '" + ncp.getName() + "' is expected",
isListed(ncp.getName(), list));
 
 if (isDirContext(ncp.getName())) {
-assert("Class '" + ncp.getClassName() + "' is '" +
+   assertTrue("Class '" + ncp.getClassName() + "' 
is '" +
contextClassName + "'",
contextClassName.equals(ncp.getClassName()));
 }
 
-assert("Relative is 'true'", ncp.isRelative());
+   assertTrue("Relative is 'true'", ncp.isRelative());
 
 }
 
@@ -391,29 +391,29 @@
 while (ne.hasMore()) {
 
 Object next = ne.next();
-assert("listBindings() returns Binding instances",
+   assertTrue("listBindings() returns Binding instances",
next instanceof Binding);
 Binding b = (Binding) next;
 
-assert("Name '" + b.getName() + "' is expected",
+   assertTrue("Name '" + b.getName() + "' is expected",
isListed(b.getName(), list));
 
 if (isDirContext(b.getName())) {
-assert("Class '" + b.getClassName() + "' is '" +
+   assertTrue("Class '" + b.getClassName() + "' 
is '" +
contextClassName + "'",
contextClassName.equals(b.getClassName()));
 }
 
-assert("Relative is 'true'", b.isRelative());
+   assertTrue("Relative is 'true'", b.isRelative());
 
 Object object = b.getObject();
 assertNotNull("Name '" + b.getName() + "' has a non-null object",
   object);
 if (b.getName().equals("web.xml")) {
-assert("Entry '" + b.getName() + "' is a Resource",
+   assertTrue("Entry '" + b.getName() + "' is a 
Resource",
object instanceof Resource);
 } else {
-assert("Entry '" + b.getName() + "' is a DirContext",
+   assertTrue("Entry '" + b.getName() + "' is a 
DirContext",
object in