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

2003-09-09 Thread Bill Barker

[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 remm2003/09/08 02:31:38

   Modified:.build.properties.default
   Log:
   - New PureTLS version.
   - I'll be including PureTLS support in 5.0.11+.


While I'm +1, this may cause problems since at the moment Tomcat will select
PureTLS by default if it is found (on the grounds that you've had to
download and install it, so you must want it :).  If PureTLS ships with,
then there needs to be a big bold instruction in the ssl_howto to select
JSSE.




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



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

2003-09-09 Thread Remy Maucherat
Bill Barker wrote:
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
remm2003/09/08 02:31:38

 Modified:.build.properties.default
 Log:
 - New PureTLS version.
 - I'll be including PureTLS support in 5.0.11+.
While I'm +1, this may cause problems since at the moment Tomcat will select
PureTLS by default if it is found (on the grounds that you've had to
download and install it, so you must want it :).  If PureTLS ships with,
then there needs to be a big bold instruction in the ssl_howto to select
JSSE.
I won't be shipping PureTLS and Cryptix ;-) I meant build the PureTLS 
support in j-t-c/util (with versions before 5.0.11, you had to rebuild 
j-t-c/util). Basically, when I got my new laptop, I forgot about PureTLS.

Remy

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


Re: jakarta-tomcat-5.0.9 batch files

2003-09-09 Thread Bill Barker
Being as lazy as anyone else ;-), we prefer diff files.  However, you're
script are very nice.  I'd prefer that a little more attention was paid to
W9x support (since you've got several statements that will bomb on W9x).

- Original Message - 
From: R. W. Stavros, PhD [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 08, 2003 10:35 PM
Subject: jakarta-tomcat-5.0.9 batch files



 Hello,
 I'm new a tomcat developer and have quite a time trying to get it up and
 working and to understand what was actually going on in the various batch
 files that were delivered with jakarta-tomcat-5.0.9.

 So I have spent some time documenting, formatting, and standardized the
 batch files.
 Included are the files that I have done so far. What do I do next??

 All errors are marked with a --*** prefix to help differentiate them
from
 other lines.
 All errors set a return code that is returned upon completion
 All echo statements start with a -- to help differentiate them from
 Catalina output
 All batch files have a Setup, Initialization, Execution, Finalization
 sections
 All batch files have a header
 I've commented each section
 I've added a help command/action for each file.
 I've added a verification steps for all env. variables, jars and
executables
 that document what is wrong with error statements and error return codes.

 R. W. Stavros, Ph.D.








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

This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication in 
error, please notify us immediately by e-mail and then delete all copies of this 
message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through the 
Internet is not secure. Do not send confidential or sensitive information, such as 
social security numbers, account numbers, personal identification numbers and 
passwords, to us via ordinary (unencrypted) e-mail.

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

Re: AW: [5.0] JSP performance ...

2003-09-09 Thread Remy Maucherat
Kin-Man Chung wrote:
I have implemented generating text strings as char arrays, with a
compiler option to turn it on and off, and did some timings on the
benchmark.  Just as I suspected, the benchmark did not show much
performance difference, when the option was turned on and then off.
Now I am wondering if there is any value in committing my change.  :(
Well, if it does improve results, it can't hurt, but the two should 
likely be similar. What did you get in your testing ?
I think what should be optimized is that there's twice the amount of writes.
Looking at the code generated, this situation seems rather common. So 
the idea would be to do a pass to merge all those TemplateText nodes :)

The profile showed about 75% of the CPU was spent in the JSP service (as 
usual with the VM profiles, it's probably misleading), and probably some 
of that time comes from the fact it has to invoke hundreds of methods.

Remy

I took a look at o.a.j.runtime.JspWriterImpl and the methods

write(String s, int off, int len)
and
write(char cbuf[], int off, int len)
in particualr, and failed to see any performance gain of the 2nd over the
first.  They are very similar, the only different is that the first uses
String.getChars while the second uses System.arraycopy, but those two
methods should be on par in terms of performance.  That is, I don't see
any extra unnecessary copies.
Perhasp the culprit is those extra writes?

-Kin-man


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


AW: AW: [5.0] JSP performance ...

2003-09-09 Thread Torsten Fohrer

what's about char[] array/string reusing?
Create only a char array for each unique templatetext node. 

- 
  10 x char[] jspx_text_1 = something\n;
  1  x char[] jspx_text_1 = something\n;


cu Torsten Fohrer

-Ursprüngliche Nachricht-
Von: Remy Maucherat [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 9. September 2003 09:00
An: Tomcat Developers List
Betreff: Re: AW: [5.0] JSP performance ...


Kin-Man Chung wrote:
 I have implemented generating text strings as char arrays, with a
 compiler option to turn it on and off, and did some timings on the
 benchmark.  Just as I suspected, the benchmark did not show much
 performance difference, when the option was turned on and then off.
 
 Now I am wondering if there is any value in committing my change.  :(

Well, if it does improve results, it can't hurt, but the two should 
likely be similar. What did you get in your testing ?
I think what should be optimized is that there's twice the amount of writes.
Looking at the code generated, this situation seems rather common. So 
the idea would be to do a pass to merge all those TemplateText nodes :)

The profile showed about 75% of the CPU was spent in the JSP service (as 
usual with the VM profiles, it's probably misleading), and probably some 
of that time comes from the fact it has to invoke hundreds of methods.

Remy

I took a look at o.a.j.runtime.JspWriterImpl and the methods

  write(String s, int off, int len)
and
  write(char cbuf[], int off, int len)

in particualr, and failed to see any performance gain of the 2nd over the
first.  They are very similar, the only different is that the first uses
String.getChars while the second uses System.arraycopy, but those two
methods should be on par in terms of performance.  That is, I don't see
any extra unnecessary copies.

Perhasp the culprit is those extra writes?

-Kin-man


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


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



Re: AW: AW: [5.0] JSP performance ...

2003-09-09 Thread Remy Maucherat
Torsten Fohrer wrote:

what's about char[] array/string reusing?
Create only a char array for each unique templatetext node. 

- 
  10 x char[] jspx_text_1 = something\n;
  1  x char[] jspx_text_1 = something\n;
Won't the VM do that internally ?
Since apparently you have examined that issue in detail already, maybe 
you can give more details :)

- What exactly did you implement ?
- What's the code it generates ? Does it also merge the TemplateText nodes ?
- Did it improve performance ? For example, if you try to run the test I 
gave, what kind of performance increase do you see ?

Remy



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


[5.0] Cluster code

2003-09-09 Thread Remy Maucherat
Hi,

The cluster code for configuration is not very nice, and results in 
contexts being associated with a clustered manager even when they don't 
have a distributable flag or element. This creates annoying logging.

I'll fix this and remove the not very useful setDistributable(String 
contextName, boolean distributable) method from the Cluster interface. 
Since it's perfectly acceptable to replace a manager, the solution seems 
to simply do the check for distributable after parsing web.xml, and 
replace the existing manager.

Remy



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


AW: AW: AW: [5.0] JSP performance ...

2003-09-09 Thread Torsten Fohrer

patched a snapshot to merge template text nodes.

I implement following using a additional visitor in Generator.java
 - char[] arrays for templatetexts
 - same templatetexts - only 1 char array for text, better without merging

good/bad gimmicks: 
  - removing empty templatetexts, example: only \r\n, , null and so
  - removing \r\n after scripting elements

One effect, i see is a lower memory usage from jasper pages 

cu Torsten Fohrer

-Ursprüngliche Nachricht-
Von: Remy Maucherat [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 9. September 2003 11:31
An: Tomcat Developers List
Betreff: Re: AW: AW: [5.0] JSP performance ...


Torsten Fohrer wrote:

 what's about char[] array/string reusing?
 Create only a char array for each unique templatetext node. 
 
 - 
   10 x char[] jspx_text_1 = something\n;
   1  x char[] jspx_text_1 = something\n;

Won't the VM do that internally ?
Since apparently you have examined that issue in detail already, maybe 
you can give more details :)

- What exactly did you implement ?
- What's the code it generates ? Does it also merge the TemplateText nodes ?
- Did it improve performance ? For example, if you try to run the test I 
gave, what kind of performance increase do you see ?

Remy



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



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

Re: jakarta-tomcat-5.0.9 batch files

2003-09-09 Thread Martin Gainty
I also have run into problems with bat files
My immediate response was to break the CLASSPATH into functional area
CLASSPATH
e.g.
TOMCAT_CLASSPATH=F:\TOMCAT\JAKART~1.27\server\lib\catalina.jar;F:\TOMCAT\JAK
ART~1.27\common\lib\jasper-runtime.jar;F:\TOMCAT\JAKART~1.27\server\lib\tomc
at-jk2.jar;F:\TOMCAT\JAKART~1.27\server\lib\tomcat-http11.jar;F:\TOMCAT\JAKA
RT~1.27\common\lib\naming-resources.jar;F:\TOMCAT\JAKART~1.27\server\lib\tom
cat-coyote.jar;F:\TOMCAT\JAKART~1.27\server\lib\commons-modeler.jar;F:\TOMCA
T\JAKART~1.27\server\lib\mx4j-jmx.jar;F:\TOMCAT\JAKART~1.27\server\lib\commo
ns-beanutils.jar;F:\TOMCAT\JAKART~1.27\common\lib\naming-common.jar;F:\TOMCA
T\JAKART~1.27\common\lib\commons-collections.jar;F:\TOMCAT\JAKART~1.27\serve
r\lib\tomcat-util.jar;F:\TOMCAT\JAKART~1.27\server\lib\bootstrap.jar;F:\TOMC
AT\JAKART~1.27\server\lib\commons-digester.jar;F:\TOMCAT\JAKART~1.27\common\
lib\ant.jar;F:\TOMCAT\JAKART~1.27\common\lib\log4j-1.2.8.jar;

SERVLETS_PATH=F:\TOMCAT\JAKART~1.27\common\lib\servlet.jar;F:\TOMCAT\JAKART~
1.27\common\lib\jasper-compiler.jar;F:\TOMCAT\JAKART~1.27\server\lib\servlet
s-invoker.jar;F:\TOMCAT\JAKART~1.27\server\lib\servlets-common.jar;F:\TOMCAT
\JAKART~1.27\server\lib\servlets-default.jar

AXIS_CLASSPATH=H:\SOAP_BIN\SOAP-2~1;J:\AXIS\axis-1_1\axis.jar;J:\AXIS\axis-1
_1\lib\commons-logging.jar;J:\Log4J\JAKART~1.3\dist\lib\log4j-core.jar;J:\AX
IS\axis-1_1\lib\jaxrpc.jar;K:\Jakarta\AXIS\xml-axis\java\lib\tt-bytecode.jar
;K:\Jakarta\AXIS\xml-axis\java\lib\wsdl4j.jar;K:\Jakarta\Tomcat\TOMCAT~1.1\c
ommon\endorsed\xercesImpl.jar;K:\Jakarta\Tomcat\TOMCAT~1.1\common\endorsed\x
mlParserAPIs.jar

CLASSPATH=%TOMCAT_CLASSPATH%;%SERVLETS_PATH%;%AXIS_CLASSPATH%
- Original Message -
From: R. W. Stavros, PhD [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 08, 2003 10:35 PM
Subject: jakarta-tomcat-5.0.9 batch files



 Hello,
 I'm new a tomcat developer and have quite a time trying to get it up and
 working and to understand what was actually going on in the various batch
 files that were delivered with jakarta-tomcat-5.0.9.

 So I have spent some time documenting, formatting, and standardized the
 batch files.
 Included are the files that I have done so far. What do I do next??

 All errors are marked with a --*** prefix to help differentiate them
from
 other lines.
 All errors set a return code that is returned upon completion
 All echo statements start with a -- to help differentiate them from
 Catalina output
 All batch files have a Setup, Initialization, Execution, Finalization
 sections
 All batch files have a header
 I've commented each section
 I've added a help command/action for each file.
 I've added a verification steps for all env. variables, jars and
executables
 that document what is wrong with error statements and error return codes.

 R. W. Stavros, Ph.D.








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

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



[GUMP] Build Failure - jakarta-tomcat-4.0

2003-09-09 Thread Craig McClanahan

This email is autogenerated from the output from:
http://cvs.apache.org/builds/gump/2003-09-09/jakarta-tomcat-4.0.html


Buildfile: build.xml

deploy-prepare:

deploy-static:

deploy:
 [echo] Target: Catalina - Deploy ...

flags:

flags.display:
 [echo] --- Build environment for Catalina ---
 [echo] If ${property_name} is displayed, then the property is not set)
 [echo] --- Build options ---
 [echo] full.dist=${full.dist}
 [echo] build.sysclasspath=only
 [echo] compile.debug=${compile.debug}
 [echo] compile.deprecation=${compile.deprecation}
 [echo] compile.optimize=${compile.optimize}
 [echo] --- Ant Flags ---
 [echo] style task available (required)=true
 [echo] --- JDK ---
 [echo] jdk.1.2.present=true
 [echo] jdk.1.3.present=true
 [echo] jdk.1.4.present=true
 [echo] --- Source Dependencies ---
 [echo] jtc.home.present=true
 [echo] --- Required Libraries ---
 [echo] beanutils.present=true
 [echo] collections.present=true
 [echo] digester.present=true
 [echo] jaxp.present=true
 [echo] jndi.present=true
 [echo] logging.present=true
 [echo] regexp.present=true
 [echo] servlet.present=true
 [echo] --- Optional Libraries ---
 [echo] daemon.present=${daemon.present}
 [echo] dbcp.present=true
 [echo] fileupload.present=${fileupload.present}
 [echo] jaas.present=true
 [echo] javamail.present=true
 [echo] jmx.present=true
 [echo] jsse.present=true
 [echo] jta.present=true
 [echo] junit.present=true
 [echo] ldap.present=true
 [echo] modeler.present=true
 [echo] pool.present=true
 [echo] tyrex.present=${tyrex.present}
 [echo] --- Required JARs ---
 [echo] jndi.jar.present(except JDK 1.3+)=true
 [echo] regexp.jar.present=true
 [echo] servlet.jar.present=true
 [echo] xerces.jar.present(except JDK 1.4+ or xerces2)=true
 [echo] xerces2.jars.present(except JDK 1.4+ or xerces1)=${xerces2.jars.present}
 [echo] --- Optional JARs ---
 [echo] daemon.jar.present=${daemon.jar.present}
 [echo] dbcp.jar.present=true
 [echo] fileupload.jar.present=${fileupload.jar.present}
 [echo] jaas.jar.present=true
 [echo] javamail.jar.present=true
 [echo] jdbc20ext.jar.present=true
 [echo] jmx.jar.present=true
 [echo] jta.jar.present=true
 [echo] junit.jar.present=${junit.jar.present}
 [echo] ldap.jar.present=true
 [echo] modeler.jar.present=true
 [echo] pool.jar.present=true
 [echo] tyrex.jar.present=${tyrex.jar.present}
 [echo] --- Conditional compilation flags ---
 [echo] compile.daemon=${compile.daemon}
 [echo] compile.dbcp=true
 [echo] compile.jaas=true
 [echo] compile.javamail=true
 [echo] compile.jmx=true
 [echo] compile.jndi=true
 [echo] compile.jsse=true
 [echo] compile.jta=true
 [echo] compile.junit=true
 [echo] compile.ldap=true
 [echo] compile.ssi=true
 [echo] compile.tyrex=${compile.tyrex}
 [echo] --- Distribution flags ---
 [echo] copy.daemon.jar=${copy.daemon.jar}
 [echo] copy.dbcp.jar=true
 [echo] copy.jaas.jar=${copy.jaas.jar}
 [echo] copy.jdbc20ext.jar=${copy.jdbc20ext.jar}
 [echo] copy.javamail.jar=true
 [echo] copy.jmx.jar=true
 [echo] copy.jndi.jar=${copy.jndi.jar}
 [echo] copy.jta.jar=true
 [echo] copy.ldap.jar=${copy.ldap.jar}
 [echo] copy.logging.jar=true
 [echo] copy.modeler.jar=true
 [echo] copy.pool.jar=true
 [echo] copy.tyrex.jar=${copy.tyrex.jar}
 [echo] copy.xerces.jar=${copy.xerces.jar}
 [echo] copy.xerces2.jars=${copy.xerces2.jars}

build-prepare:

copy-activation.jar:
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/common/lib
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/common/lib

copy-daemon.jar:

copy-dbcp.jar:
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/common/lib

copy-fileupload.jar:

copy-jaas.jar:

copy-jdbc20ext.jar:

copy-jmx.jar:
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/server/lib
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/server/lib

copy-jndi.jar:

copy-jsse.jar:

copy-jta.jar:
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/common/lib

copy-ldap.jar:

copy-modeler.jar:
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/server/lib

copy-pool.jar:
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat-4.0/catalina/build/common/lib

copy-tyrex.jar:

copy-xerces.jar:

copy-xerces2.jars:

build-static:











build-tomcat-util:

detect:

build-prepare:

build-main:
 [echo] - Java-utils -
 [echo] -- puretls.present = ${puretls.present}
 [echo] 

Classloader when Tomcat is embedded + save

2003-09-09 Thread Florent BENOIT
   Hello,

When we embed Tomcat in an application server, we have the following 
problem that we must patch.
It would be good if in the Tomcat 5.x branch, this will be fixed.

The problem :

It's about the setClassPath() method of the class WebappLoader of the 
package org.apache.catalina.loader.

This is the following code :

   int layers = 0;
   int n = 0;
   while ((layers  3)  (loader != null)) {
So, the classpath is set to 3 level.
When JOnAS is embedded, several URL Classloader can be parent 
classloader and not set to 3 levels.
So, for example if we have an application server classloader, ear 
classloader, ejb classloader, web classloader, etc.
The final classpath has some missing jars which can be found on a layer 
= 3.
So, please, if you can :
- remove this test on this value (only testing (loader != null) and we 
stop when it's not anymore an URLClassLoader
- or that we can configure this value by a system property or anything 
else.
It will make a better integration of the Tomcat product, without having 
to set the right classpath with the same method but without the number 3.

Another request is if the save action to the server.xml file could not 
saved some configurable parameters.
For example, in a j2ee application server, some contexts are created at 
the runtime, but we don't want that these contexts will be stored on the 
server.xml as their path are sometimes dynamic, temporary, etc.
So if we could add/remove/configure the actions of the save() method, it 
would be great for a better integration.
I can understand that this is not your priority but it can be a good 
feature when we embed Tomcat. Thanks.

Best regards,

Florent.

ObjectWeb JOnAS server
http://jonas.objectweb.org




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


DO NOT REPLY [Bug 19034] - InvalidClassException in StoreBase.java

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19034.
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=19034

InvalidClassException in StoreBase.java





--- Additional Comments From [EMAIL PROTECTED]  2003-09-09 14:48 ---
If there is an InvalidClassException in load(keys[i]) in
StoreBase.processExpires the session will never expire, because the code which
checks for expiration is never reached.
Valid sessions will not expire also, because the loop is ended by the exception.

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



DO NOT REPLY [Bug 19034] - InvalidClassException in StoreBase.java

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19034.
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=19034

InvalidClassException in StoreBase.java





--- Additional Comments From [EMAIL PROTECTED]  2003-09-09 15:16 ---
Two more things.
1. Sessions which get a ClassNotFoundException while loading from the Store can
probably be removed also.
2. I don't know if the InvalidClassException should be catched on more places.

-
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

2003-09-09 Thread remm
remm2003/09/09 08:27:00

  Modified:catalina/src/share/org/apache/catalina Cluster.java
   catalina/src/share/org/apache/catalina/core
StandardContext.java
   catalina/src/share/org/apache/catalina/session
StandardManager.java
   catalina/src/share/org/apache/catalina/startup
ContextConfig.java
  Log:
  - Refactor manager initialization, and move it into ContextConfig.
  - Remove Cluster.setDistributable.
  
  Revision  ChangesPath
  1.5   +5 -12 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Cluster.java
  
  Index: Cluster.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Cluster.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Cluster.java  16 Apr 2003 04:06:53 -  1.4
  +++ Cluster.java  9 Sep 2003 15:27:00 -   1.5
  @@ -221,13 +221,6 @@
*  the web application
*/
   public void stop(String contextPath) throws IOException;
  -
  -/**
  - * Notifies the cluster if a context is distributable or not
  - * @param contextName - the name of the registed context
  - * @param distributable - true means that the sessions will be replicated
  - */
  -public void setDistributable(String contextName, boolean distributable);
  -
  +
   
   }
  
  
  
  1.90  +8 -31 
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.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- StandardContext.java  8 Sep 2003 15:25:18 -   1.89
  +++ StandardContext.java  9 Sep 2003 15:27:00 -   1.90
  @@ -964,12 +964,9 @@
   public void setDistributable(boolean distributable) {
   boolean oldDistributable = this.distributable;
   this.distributable = distributable;
  -if ( getCluster() != null ) 
getCluster().setDistributable(getName(),distributable);
   support.firePropertyChange(distributable,
  new Boolean(oldDistributable),
  new Boolean(this.distributable));
  -
  -
   }
   
   
  @@ -3923,7 +3920,7 @@
   }
   }
   
  -if (getLoader() == null) {  // (2) Required by Manager
  +if (getLoader() == null) {
   if (getPrivileged()) {
   if (log.isDebugEnabled())
   log.debug(Configuring privileged default Loader);
  @@ -3934,28 +3931,6 @@
   setLoader(new WebappLoader(getParentClassLoader()));
   }
   }
  -if (getManager() == null) { // (3) After prerequisites
  -if (log.isDebugEnabled())
  -log.debug(Configuring default Manager);
  -if (getCluster() != null) {
  -try {
  -//The setDistributable is set after the context is started, 
hence 
  -//this doesn't work :(
  -//if ( this.getDistributable() ) {
  -log.debug(Creating clustering manager for 
context=+getName());
  -setManager(getCluster().createManager(getName()));
  -//} else {
  -//log.info(Ignoring clustering manager for 
context=+getName()+  element distributable not present in web.xml);
  -//setManager(new StandardManager());
  -//}
  -} catch ( Exception x ) {
  -log.warn(Clustering disabled for context:+getName()+ 
reason:+x.getMessage());
  -setManager(new StandardManager());
  -}
  -} else {
  -setManager(new StandardManager());
  -}
  -}
   
   // Initialize character set mapper
   getCharsetMapper();
  @@ -4045,8 +4020,10 @@
   // Read tldListeners. XXX Option to disable
   TldConfig tldConfig = new TldConfig();
   tldConfig.setContext(this);
  -tldConfig.setXmlValidation(((StandardHost) 
getParent()).getXmlValidation());
  -tldConfig.setXmlNamespaceAware(((StandardHost) 
getParent()).getXmlNamespaceAware());
  +tldConfig.setXmlValidation
  +(((StandardHost) getParent()).getXmlValidation());
  +tldConfig.setXmlNamespaceAware
  +(((StandardHost) getParent()).getXmlNamespaceAware());
   try 

cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp SimpleTcpCluster.java

2003-09-09 Thread remm
remm2003/09/09 08:27:16

  Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp
SimpleTcpCluster.java
  Log:
  - Refactor manager initialization, and move it into ContextConfig.
  - Remove Cluster.setDistributable.
  
  Revision  ChangesPath
  1.15  +7 -19 
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
  
  Index: SimpleTcpCluster.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- SimpleTcpCluster.java 24 Apr 2003 04:24:01 -  1.14
  +++ SimpleTcpCluster.java 9 Sep 2003 15:27:16 -   1.15
  @@ -412,27 +412,15 @@
   
   public synchronized Manager createManager(String name) {
   SimpleTcpReplicationManager manager = new SimpleTcpReplicationManager(name);
  -manager.setCluster(null);
  -manager.setDistributable(false);
  +manager.setCluster(this);
  +manager.setDistributable(true);
   manager.setExpireSessionsOnShutdown(expireSessionsOnShutdown);
   manager.setPrintToScreen(printToScreen);
   manager.setUseDirtyFlag(useDirtyFlag);
   manager.setDebug(debug);
   allmanagers.put(name, manager);
  +managers.put(name,manager);
   return manager;
  -}
  -
  -public void setDistributable(String contextName, boolean distributable)
  -{
  -log.info(Setting distributable for context:+contextName+ to 
+distributable);
  -SimpleTcpReplicationManager manager = 
(SimpleTcpReplicationManager)allmanagers.get(contextName);
  -manager.setDistributable(distributable);
  -if (distributable) {
  -manager.setCluster(this);
  -manager.setDistributable(true);
  -managers.put(contextName,manager);
  -}
  -
   }
   
   
  
  
  

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



DO NOT REPLY [Bug 23026] New: - DB JNDI Datasource does not work with SAP DB

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23026.
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=23026

DB JNDI Datasource does not work with SAP DB

   Summary: DB JNDI Datasource does not work with SAP DB
   Product: Tomcat 4
   Version: 4.1.27
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Webapps:Administration
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


1. JDBC driver in $CATALINA_HOME/common/lib/sapdbc.jar
2. server.xml configuration:
Context path=/Test docBase=Test debug=5 reloadable=true
crossContext=true
Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_TestDB_log. suffix=.txt timestamp=true/
Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/
ResourceParams name=jdbc/TestDB
parameter namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter
parameter namemaxActive/name value45/value /parameter
parameter namemaxIdle/name value5/value /parameter
parameter namemaxWait/name value15000/value /parameter
parameter nameusername/name valueDBA/value /parameter
parameter namepassword/name valuePASSWORD/value /parameter
parameter namedriverClassName/name
valuecom.sap.dbtech.jdbc.DriverSapDB/value /parameter
parameter nameurl/name valuejdbc:sapdb:///TestDB/value
/parameter
/ResourceParams
/Context

3. web.xml configuration:
web-app
...
servlet
servlet-nameTest/servlet-name
servlet-classTest/servlet-class
/servlet
...
servlet-mapping
servlet-nameTest/servlet-name
url-pattern/Test/url-pattern
/servlet-mapping
...
resource-ref
descriptionTest DB Connection/description
res-ref-namejdbc/TestDB/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
...
/web-app

4. Test Servlet:
...
Context initContext = new InitialContext();
if (initContext != null) {
out.println(pOK. Got InitialContext()/p);
} // if

Context envContext = (Context)initContext.lookup(java:/comp/env);
if (envContext != null) {
out.println(pOK. Got initContext.lookup(\java:/comp/env\)/p);
} // if

DataSource ds = (DataSource) envContext.lookup(jdbc/TestDB);
if (ds != null) {
out.println(pOK. Got envContext.lookup(\jdbc/TestDB\)/p);
} // if

Connection con = ds.getConnection();
if (con != null) {
out.println(pOK. ds.getConnection()/p);
} // if

} catch (Exception e) {
out.println(p);
e.printStackTrace(out);
out.println(/p);
} // catch
...
Result:
OK. Got InitialContext()
OK. Got initContext.lookup(java:/comp/env)
OK. Got envContext.lookup(jdbc/TestDB)
java.sql.SQLException: Cannot load JDBC driver class 'null' at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:529) at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
12) at Test.processRequest(Test.java:79) at Test.doGet(Test.java:104) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
...

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



DO NOT REPLY [Bug 23009] - random code (such as ??????) in tomcat 5.0.10

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23009.
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=23009

random code (such as ??) in tomcat 5.0.10

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-09-09 08:01 ---
This has been discussed previously, and has been identified as a spec limitation
if I remember correctly. Kin-Man can comment more if there are updates on this,
but it is not useful to discuss that further in a bug report.

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



DO NOT REPLY [Bug 22852] - JDK1.4 logging formatter class not being found

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22852.
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=22852

JDK1.4 logging formatter class not being found





--- Additional Comments From [EMAIL PROTECTED]  2003-09-09 16:22 ---
I have discovered that the formatter class IS found if I place the class in a
jar and put it in tomcat's common/endorsed directory. 

I think it is related to this class-loading issue:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg103306.html

I am using Sun JDK 1.4.2

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



DO NOT REPLY [Bug 19034] - InvalidClassException in StoreBase.java

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19034.
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=19034

InvalidClassException in StoreBase.java

[EMAIL PROTECTED] changed:

   What|Removed |Added

Version|4.1.24  |4.1.27

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



Re: AW: AW: AW: [5.0] JSP performance ...

2003-09-09 Thread Jeff Tulley
Torsten,
   Your attachment didn't come through. (Common mistake, I've made it dozens of 
times).  Rename the file as .txt, that should work.

Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., The Leading Provider of Net Business Solutions
http://www.novell.com

 [EMAIL PROTECTED] 9/9/03 5:55:27 AM 

patched a snapshot to merge template text nodes.

I implement following using a additional visitor in Generator.java
 - char[] arrays for templatetexts
 - same templatetexts - only 1 char array for text, better without merging

good/bad gimmicks: 
  - removing empty templatetexts, example: only \r\n, , null and so
  - removing \r\n after scripting elements

One effect, i see is a lower memory usage from jasper pages 

cu Torsten Fohrer

-Ursprüngliche Nachricht-
Von: Remy Maucherat [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 9. September 2003 11:31
An: Tomcat Developers List
Betreff: Re: AW: AW: [5.0] JSP performance ...


Torsten Fohrer wrote:

 what's about char[] array/string reusing?
 Create only a char array for each unique templatetext node. 
 
 - 
   10 x char[] jspx_text_1 = something\n;
   1  x char[] jspx_text_1 = something\n;

Won't the VM do that internally ?
Since apparently you have examined that issue in detail already, maybe 
you can give more details :)

- What exactly did you implement ?
- What's the code it generates ? Does it also merge the TemplateText nodes ?
- Did it improve performance ? For example, if you try to run the test I 
gave, what kind of performance increase do you see ?

Remy



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





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



RE: [PATCH] Bug 22666

2003-09-09 Thread Mark Thomas
This works a treat. Do you want me to port the changes back to TC4? I need to 
do this so I can close the bug.

Mark

On Sunday, September 07, 2003 3:40 PM, Remy Maucherat [SMTP:[EMAIL PROTECTED] 
wrote:

 The idea is that it would work if the type of the MB is chars (see
 processParameters(MB)). So that's why handleQueryParameters attempts to
 convert the URI to chars. I have reviewed the code, and for some reason
 which eludes me, toChars didn't set the MB type to chars. So the problem
 is with MessageBytes, and I have added the missing code.

 There are a few things which are weird in those buffer classes. Probably
 a cleanup will be needed, but later, as this will undoubtedly cause
 regressions.

 Remy



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



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



Re: Classloader when Tomcat is embedded + save

2003-09-09 Thread Remy Maucherat
Florent BENOIT wrote:
   Hello,

When we embed Tomcat in an application server, we have the following 
problem that we must patch.
It would be good if in the Tomcat 5.x branch, this will be fixed.

The problem :

It's about the setClassPath() method of the class WebappLoader of the 
package org.apache.catalina.loader.

This is the following code :

   int layers = 0;
   int n = 0;
   while ((layers  3)  (loader != null)) {
So, the classpath is set to 3 level.
When JOnAS is embedded, several URL Classloader can be parent 
classloader and not set to 3 levels.
So, for example if we have an application server classloader, ear 
classloader, ejb classloader, web classloader, etc.
The final classpath has some missing jars which can be found on a layer 
 = 3.
So, please, if you can :
- remove this test on this value (only testing (loader != null) and we 
stop when it's not anymore an URLClassLoader
- or that we can configure this value by a system property or anything 
else.
It will make a better integration of the Tomcat product, without having 
to set the right classpath with the same method but without the number 3.
Well, I think in the complex cases, you should probably use 
StandardContext.setCompilerClasspath. I'm willing to remove that check, 
though.
Of course, it's good to remember that this code exists only because of 
the lack of a good in memory compiler. This could change.

Another request is if the save action to the server.xml file could not 
saved some configurable parameters.
For example, in a j2ee application server, some contexts are created at 
the runtime, but we don't want that these contexts will be stored on the 
server.xml as their path are sometimes dynamic, temporary, etc.
So if we could add/remove/configure the actions of the save() method, it 
would be great for a better integration.
That feature is thought out for standalone mode. It's hard to predict 
what are the components which should be saved, and which should not.
Now if you want to refactor the save-to-xml code to a separate class 
(and allow configuring that class, of course), then I'm waiting for your 
patch :)

Remy



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


DO NOT REPLY [Bug 22992] - tomcat.exe fails with access violation, apparently while writing to std error stream

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22992.
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=22992

tomcat.exe fails with access violation, apparently while writing to std error stream

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2003-09-09 18:07 ---
Resolving as WONTFIX based on Remy's comments.

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



DO NOT REPLY [Bug 22823] - Tomcat 4.1.27 is missing from download directory? I only see 4.1.24 4.1.26-alpha

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22823.
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=22823

Tomcat 4.1.27 is missing from download directory? I only see 4.1.24   4.1.26-alpha

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-09-09 18:24 ---
These has been addressed (see http://www.mail-archive.com/tomcat-
[EMAIL PROTECTED]/msg46421.html).

I am therefore closing this bug.

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



Re: Classloader when Tomcat is embedded + save

2003-09-09 Thread matthias.ernst
 Of course, it's good to remember that this code exists only because of
 the lack of a good in memory compiler. This could change.

Class org.eclipse.jdt.internal.compiler.Compiler in combination with
org.apache.cocoon.components.language.programming.java.EclipseJavaCompiler
provide a load-from-context-classloader compiler, independent of the
filesystem. The latter can be easily turned into an ant CompilerAdapter.

I've once briefly browsed the javac source, that one couldn't even easily
be adapted.

Matthias
-- 
Matthias Ernst
Software Engineer

CoreMedia - Smart Content Technology


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



DO NOT REPLY [Bug 23009] - random code (such as ??????) in tomcat 5.0.10

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23009.
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=23009

random code (such as ??) in tomcat 5.0.10

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2003-09-09 07:15 ---
About second bug, I have tested on tomcat 4.0.4/5.0.0/5.0.3/5.0.10. Only on 
tomcat 4.0.4, It's normal. Any 5.0.X serials are all abnormal. It doesn't work 
properly with 5.0.X. All GBK code in include file viewed on web are ??. 
I can't understand. Just tomcat 5.0.X has new standardizations, or it's a bug?

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



DO NOT REPLY [Bug 22652] - JspWriter problem? A JSP Document with contentType=text/html makes a wrong output

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22652.
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=22652

JspWriter problem? A JSP Document with contentType=text/html makes a wrong output

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2003-09-09 20:36 ---
I have tested this with the latest TC4 and TC5 code. I had to add a 
/jsp:root ending tag to your example to get it to work but once I had it 
worked as expected. There was no extra /body tag and all the span tags 
were correctly located.

I am therefore closing this bug report as WORKSFORME.

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



Re: AW: [5.0] JSP performance ...

2003-09-09 Thread Kin-Man Chung

 Date: Tue, 09 Sep 2003 08:59:51 +0200
 From: Remy Maucherat [EMAIL PROTECTED]
 Subject: Re: AW: [5.0] JSP performance ...
 To: Tomcat Developers List [EMAIL PROTECTED]
 
 Kin-Man Chung wrote:
  I have implemented generating text strings as char arrays, with a
  compiler option to turn it on and off, and did some timings on the
  benchmark.  Just as I suspected, the benchmark did not show much
  performance difference, when the option was turned on and then off.
  
  Now I am wondering if there is any value in committing my change.  :(
 
 Well, if it does improve results, it can't hurt, but the two should 
 likely be similar. What did you get in your testing ?

I ran your Jsp page with added timings.  The difference in the numbers
with the option switched on and off is less the time flutuation itself.

 I think what should be optimized is that there's twice the amount of writes.
 Looking at the code generated, this situation seems rather common. So 
 the idea would be to do a pass to merge all those TemplateText nodes :)
 

I'll try that next, but don't get your hope up.  It may not change much.

 The profile showed about 75% of the CPU was spent in the JSP service (as 
 usual with the VM profiles, it's probably misleading), and probably some 
 of that time comes from the fact it has to invoke hundreds of methods.
 
Method calls should be cheap.  The question is: is writng a String of
size 1000 much faster than writing 10 Strings each of size 100?

-Kin-man

 Remy
 
 I took a look at o.a.j.runtime.JspWriterImpl and the methods
 
 write(String s, int off, int len)
 and
 write(char cbuf[], int off, int len)
 
 in particualr, and failed to see any performance gain of the 2nd over the
 first.  They are very similar, the only different is that the first uses
 String.getChars while the second uses System.arraycopy, but those two
 methods should be on par in terms of performance.  That is, I don't see
 any extra unnecessary copies.
 
 Perhasp the culprit is those extra writes?
 
 -Kin-man
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



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

2003-09-09 Thread kinman
kinman  2003/09/09 14:47:11

  Modified:catalina/src/conf web.xml
  Log:
  - Add an compilation option to generate writing char arrays instead of Strings
for template texts.
  
  Revision  ChangesPath
  1.25  +4 -0  jakarta-tomcat-catalina/catalina/src/conf/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/web.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- web.xml   19 Aug 2003 00:17:03 -  1.24
  +++ web.xml   9 Sep 2003 21:47:11 -   1.25
  @@ -157,6 +157,10 @@
 !--   dumped to a file? [false]  --
 !--   False if suppressSmap is true  --
 !--  --
  +  !--   genStrAsCharArray   Should text strings be generated as char   --
  +  !--   arrays, to improve performance in some cases?  --
  +  !--   [false]--
  +  !--  --
 !--   scratchdir  What scratch directory should we use when  --
 !--   compiling JSP pages?  [default work directory  --
 !--   for the current web application]   --
  
  
  

-
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));
   }
  - }
  +}
   
   

new Aspen Group Email

2003-09-09 Thread gatkin
Due to problems with SPAM, [EMAIL PROTECTED] has been discontinued.

Please note my new email address. To prevent automated systems from obtaining my new 
email address, I will spell out the @ symbol. Please send all future email to:

gordon[at]aspengroup.net



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



RE: jakarta-tomcat-5.0.9 batch files

2003-09-09 Thread R. W. Stavros, PhD
I'm sorry to ask, but what tool do you use to perform you diffs?

I think I fixed all the W9X references.

I have created a use-launcher.bat file that takes 'start' 'stop' or
'tool-wrapper' as an argument since this was the only real difference that I
saw. This would mean less bat files to maintain. Or do you think we should
have a bat file that just sets up the call to the use-launcher.bat file?

I don't see where cpappend.bat is used, do we need it?

I don't see where digest.bat is used.

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]
Sent: Monday, September 08, 2003 11:26 PM
To: Tomcat Developers List; [EMAIL PROTECTED]
Subject: Re: jakarta-tomcat-5.0.9 batch files


Being as lazy as anyone else ;-), we prefer diff files.  However, you're
script are very nice.  I'd prefer that a little more attention was paid to
W9x support (since you've got several statements that will bomb on W9x).

- Original Message -
From: R. W. Stavros, PhD [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 08, 2003 10:35 PM
Subject: jakarta-tomcat-5.0.9 batch files



 Hello,
 I'm new a tomcat developer and have quite a time trying to get it up and
 working and to understand what was actually going on in the various batch
 files that were delivered with jakarta-tomcat-5.0.9.

 So I have spent some time documenting, formatting, and standardized the
 batch files.
 Included are the files that I have done so far. What do I do next??

 All errors are marked with a --*** prefix to help differentiate them
from
 other lines.
 All errors set a return code that is returned upon completion
 All echo statements start with a -- to help differentiate them from
 Catalina output
 All batch files have a Setup, Initialization, Execution, Finalization
 sections
 All batch files have a header
 I've commented each section
 I've added a help command/action for each file.
 I've added a verification steps for all env. variables, jars and
executables
 that document what is wrong with error statements and error return codes.

 R. W. Stavros, Ph.D.








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



newbat_1.zip
Description: Zip compressed data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]