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

2002-06-03 Thread remm

remm2002/06/02 23:58:39

  Modified:jasper2/src/share/org/apache/jasper CommandLineContext.java
JspEngineContext.java
  Log:
  - Formatting.
  - Remove some dead code.
  
  Revision  ChangesPath
  1.4   +127 -96   
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/CommandLineContext.java
  
  Index: CommandLineContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/CommandLineContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CommandLineContext.java   2 Jun 2002 21:40:22 -   1.3
  +++ CommandLineContext.java   3 Jun 2002 06:58:38 -   1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/CommandLineContext.java,v
 1.3 2002/06/02 21:40:22 remm Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/06/02 21:40:22 $
  + * $Header: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/CommandLineContext.java,v
 1.4 2002/06/03 06:58:38 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/06/03 06:58:38 $
*
* 
* 
  @@ -111,6 +111,10 @@
   
   boolean outputInDirs;
   
  +
  +//  Constructor
  +
  +
   public CommandLineContext(String newJspFile, String newUriBase,
 String newUriRoot, boolean newErrPage,
 Options newOptions)
  @@ -148,6 +152,9 @@
   }
   
   
  +// - Public Methods
  +
  +
   /**
* Resolve relative path, and create output directories.
*/
  @@ -171,13 +178,17 @@
   }
   
   
  +// -- JspCompilationContext Methods
  +
  +
   /**
* The classpath that is passed off to the Java compiler. 
*/
   public String getClassPath() {
   return classPath;
   }
  -
  +
  +
   /**
* The classpath that is passed off to the Java compiler. 
*/
  @@ -185,20 +196,23 @@
   this.classPath = classPath;
   }
   
  +
   /**
* Get the input reader for the JSP text. 
*/
   public JspReader getReader() {
   return reader;
   }
  -
  +
  +
   /**
* Where is the servlet being generated?
*/
   public ServletWriter getWriter() {
   return writer;
   }
  -
  +
  +
   /**
* What class loader to use for loading classes while compiling
* this JSP?
  @@ -207,6 +221,7 @@
   return loader;
   }
   
  +
   /**
* Are we processing something that has been declared as an
* errorpage? 
  @@ -214,15 +229,16 @@
   public boolean isErrorPage() {
   return errPage;
   }
  -
  +
  +
   /**
* The scratch directory to generate code into.
*/
   public String getOutputDir() {
   return outputDir;
  -//return options.getScratchDir().toString();
   }
  -
  +
  +
   /**
* Path of the JSP URI. Note that this is not a file name. This is
* the context rooted URI of the JSP file. 
  @@ -230,7 +246,30 @@
   public String getJspFile() {
   return jspFile;
   }
  -
  +
  +
  +/**
  + * Path of the JSP relative to the work directory.
  + */
  +public String getJspPath() {
  +if (jspPath != null) {
  +return jspPath;
  +}
  +String dirName = getJspFile();
  +int pos = dirName.lastIndexOf('/');
  +if (pos  0) {
  +dirName = dirName.substring(0, pos + 1);
  +} else {
  +dirName = ;
  +}
  +jspPath = dirName + getServletClassName() + .java;
  +if (jspPath.startsWith(/)) {
  +jspPath = jspPath.substring(1);
  +}
  +return jspPath;
  +}
  +
  +
   /**
* Just the class name (does not include package name) of the
* generated class. 
  @@ -261,7 +300,8 @@
   servletClassName = modifiedClassName.toString();
   return servletClassName;
   }
  -
  +
  +
   /**
* The package name for the generated class.
* The final package is assembled from the one specified in -p, and
  @@ -292,37 +332,23 @@
   
   }
   
  -public String getJspPath() {
  -if (jspPath != null) {
  -return jspPath;
  -}
  -String dirName = getJspFile();
  -int pos = dirName.lastIndexOf('/');
  -if (pos  0) {
  -dirName = dirName.substring(0, pos + 1);
  -} else {
  -dirName = ;
  -}
  -jspPath = dirName + getServletClassName() + .java;
  -if 

RE: Ethereal AJP13 dissector? [Ethereal patch attached]

2002-06-03 Thread GOMEZ Henri

Thanks Chris, I'm a long time user of ethereal and provide
rpm for ethereal.

So a big +1 for ajp13 disector (something I planned but never done) 

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: Christopher K. St. John [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 7:09 PM
To: [EMAIL PROTECTED]
Subject: Re: Ethereal AJP13 dissector? [Ethereal patch attached]


jean-frederic clere wrote:
 
 I am rewritting the Ajp protocol documentation. A protocol
 analyser would help me.


 The analyzer was written using the existing docs, so
if there are problems in the docs the analyzer will
be wrong as well.


 So please send it. (Even if it is not run and not clean).


 Some of the code is a bit iffy, and it's definitely a
work in progress, but it runs. I did some cleanup and put
in some comments. I've attached a patch to Ethereal 0.9.4,
which you can get at:

 http://www.ethereal.com/

 Make sure you have a recent version of libpcap. If you
want to hack on it, there are Ethereal developer docs in
docs/README.developer, but they are very out of date.

Notes:

 It autodetects 8009 as AJP traffic. It doesn't decode FORWARD_REQUEST
attributes (the optional stuff at the end). There are problems with
the protocol hierarchy display. There are probably memory leaks. The
protocol display could be easier to read. You need ethereal-0.9.4,
I'm confident it won't work with earlier versions, and I haven't
tested against CVS. There are lots of compiler warnings, many of them
legitimate.

Install:

 download and untar a clean copy of ethereal-0.9.4.tgz
 $ cd $PATH_TO_ETHEREAL/ethereal-0.9.4
 $ patch  $PATH_TO_PATCH/eth-ajp13.patch
 patching file Makefile.am
 patching file Makefile.nmake
 patching file packet-ajp13.c
 patching file packet-ajp13.h
 patching file register-static.c
 $ ./configure
 $ make 
   many compiler warnings
 $ su
 # ./ethereal
make sure that Edit - Preferences - Protocols - TCP 
 Allow subdissectors to desegment TCP streams is set
 to true 
   Capture - Start - Ok # try update packets in real time
   Surf
   Giggle like an anime schoolgirl as you watch the capture


-- 
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com


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




RE: M1 ?

2002-06-03 Thread GOMEZ Henri

Hi,

I'm just back from my week spent in finishing works
in our new-house.

Could you wait up to the end of the week, to give me 
time to finish autoconf works (JNI).

BTW, I'll need more informations on how to use 
JNI use stuff in apache 1.3 and 2.0.

We'll have also to comment the fact that at least
under Linux there is need to update by hand LD_LIBRARY_PATH
to have jni shared libs loaded 

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 01, 2002 1:35 AM
To: Tomcat Developers List
Subject: Re: M1 ?


On Fri, 31 May 2002, Remy Maucherat wrote:

 I spent zero time working on the native parts of JK 2, so 
obviously my
 opinion doesn't really count ;-)

I'll count in the time you spent optimizing jasper :-), so 
your opinions
matters.


 I think it's good to start releasing milestones. There's already a
 Connector:Coyote JK 2 category in the TC 4 BZ which could be 
used for that.
 Is that good enough ?

I think so.

 So with 4.1.x, what should be the recommended connector ? 
mod_jk1 or mod_jk2

mod_jk1 is the stable one, and that should be used and recommended for 
now. 

The java code will work with any mod_jk, so it doesn't matter too much,
is just the configuration of apache that will be different. I already 
started with the web.xml - workers2.properties generators, 
and I hope jk2 
config will be much more automated and simpler.

But for now - don't hold 4.1.x releases on mod_jk2.

Costin



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


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




RE: [PATCH] mod_jk2 - fix double module module exposure

2002-06-03 Thread GOMEZ Henri

Hum I added it here I didn't get it on my Linux Box with Apache 2.0.36 :[

=

[Mon Jun 03 12:31:58 2002] [notice] caught SIGTERM, shutting down
[Mon Jun 03 12:34:17 2002] [notice] Digest: generating secret for digest 
authentication ...
[Mon Jun 03 12:34:17 2002] [notice] Digest: done
[Mon Jun 03 12:34:18 2002] [warn] uriEnv.init() exact mapping 
/examples/servlet/HelloW=lb:lb 
[Mon Jun 03 12:34:18 2002] [warn] workerEnv.init() ok 
/etc/httpd2/conf/workers2.properties
[Mon Jun 03 12:34:18 2002] [warn] mod_jk child init 1 -1
[Mon Jun 03 12:34:18 2002] [notice] Apache/2.0.36 (Unix) mod_ssl/2.0.36 OpenSSL/0.9.6 
DAV/2 mod_jk/1.2.0 configured -- resuming normal operations
[Mon Jun 03 12:34:18 2002] [warn] uriEnv.init() exact mapping 
/examples/servlet/HelloW=lb:lb 
[Mon Jun 03 12:34:18 2002] [warn] workerEnv.init() ok 
/etc/httpd2/conf/workers2.properties
[Mon Jun 03 12:34:18 2002] [warn] mod_jk child init 1 -1

no ref to mod_jk/2.0.0 :

It may be incorrect to use ap_add_version_component in child init ?


-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 01, 2002 8:32 AM
To: [EMAIL PROTECTED]
Subject: [PATCH] mod_jk2 - fix double module module exposure


Hi,
There is an extra call to ap_add_version_component inside mod_jk2.
One inside the jk2_init is IMO enough.


Index: mod_jk2.c
===
RCS file:
/home/cvspublic/jakarta-tomcat-connectors/jk/native2/server/apa
che2/mod_
jk2.c,v
retrieving revision 1.30
diff -u -r1.30 mod_jk2.c
--- mod_jk2.c  31 May 2002 22:27:17 -  1.30
+++ mod_jk2.c  1 Jun 2002 06:27:11 -
@@ -465,8 +465,6 @@
 if(s-is_virtual) 
 return OK;
 
-ap_add_version_component(pconf, JK_EXPOSED_VERSION);
-
 env=workerEnv-globalEnv;
 
 rc=jk2_apache2_isValidating( plog, gPool );


MT.


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



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




RE: [PATCH] mod_jk2 - fix double module module exposure

2002-06-03 Thread GOMEZ Henri

After a quick look in http 2.0 source, it appears
that mod_dav for example use ap_add_version in 
post config phase, so I'll update mod_jk2.c 
accordingly


-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: GOMEZ Henri 
Sent: Monday, June 03, 2002 12:45 PM
To: Tomcat Developers List
Subject: RE: [PATCH] mod_jk2 - fix double module module exposure


Hum I added it here I didn't get it on my Linux Box with 
Apache 2.0.36 :[

=

[Mon Jun 03 12:31:58 2002] [notice] caught SIGTERM, shutting down
[Mon Jun 03 12:34:17 2002] [notice] Digest: generating secret 
for digest authentication ...
[Mon Jun 03 12:34:17 2002] [notice] Digest: done
[Mon Jun 03 12:34:18 2002] [warn] uriEnv.init() exact mapping 
/examples/servlet/HelloW=lb:lb 
[Mon Jun 03 12:34:18 2002] [warn] workerEnv.init() ok 
/etc/httpd2/conf/workers2.properties
[Mon Jun 03 12:34:18 2002] [warn] mod_jk child init 1 -1
[Mon Jun 03 12:34:18 2002] [notice] Apache/2.0.36 (Unix) 
mod_ssl/2.0.36 OpenSSL/0.9.6 DAV/2 mod_jk/1.2.0 configured -- 
resuming normal operations
[Mon Jun 03 12:34:18 2002] [warn] uriEnv.init() exact mapping 
/examples/servlet/HelloW=lb:lb 
[Mon Jun 03 12:34:18 2002] [warn] workerEnv.init() ok 
/etc/httpd2/conf/workers2.properties
[Mon Jun 03 12:34:18 2002] [warn] mod_jk child init 1 -1

no ref to mod_jk/2.0.0 :

It may be incorrect to use ap_add_version_component in child init ?


-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 01, 2002 8:32 AM
To: [EMAIL PROTECTED]
Subject: [PATCH] mod_jk2 - fix double module module exposure


Hi,
There is an extra call to ap_add_version_component inside mod_jk2.
One inside the jk2_init is IMO enough.


Index: mod_jk2.c
===
RCS file:
/home/cvspublic/jakarta-tomcat-connectors/jk/native2/server/apa
che2/mod_
jk2.c,v
retrieving revision 1.30
diff -u -r1.30 mod_jk2.c
--- mod_jk2.c 31 May 2002 22:27:17 -  1.30
+++ mod_jk2.c 1 Jun 2002 06:27:11 -
@@ -465,8 +465,6 @@
 if(s-is_virtual) 
 return OK;
 
-ap_add_version_component(pconf, JK_EXPOSED_VERSION);
-
 env=workerEnv-globalEnv;
 
 rc=jk2_apache2_isValidating( plog, gPool );


MT.


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



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


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




cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 mod_jk2.c

2002-06-03 Thread hgomez

hgomez  2002/06/03 04:24:25

  Modified:jk/native2/server/apache2 mod_jk2.c
  Log:
  Others apache 2.0 modules use ap_add_version_component in
  post config phase (ie DAV2).
  Having it done in child init make it appears too late to
  be present in error.log.
  
  Revision  ChangesPath
  1.32  +6 -2  jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c
  
  Index: mod_jk2.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- mod_jk2.c 1 Jun 2002 15:40:09 -   1.31
  +++ mod_jk2.c 3 Jun 2002 11:24:25 -   1.32
  @@ -59,7 +59,7 @@
* Description: Apache 2 plugin for Jakarta/Tomcat *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.31 $   *
  + * Version: $Revision: 1.32 $   *
***/
   
   /*
  @@ -412,7 +412,8 @@
   {
   workerEnv-init(env, workerEnv );
   workerEnv-server_name   = (char *)ap_get_server_version();
  -ap_add_version_component(pconf, JK_EXPOSED_VERSION);
  +/* Should be done in post config instead (cf DAV2) */
  +/* ap_add_version_component(pconf, JK_EXPOSED_VERSION); */
   return NULL;
   }
   
  @@ -464,6 +465,9 @@
   
   if(s-is_virtual) 
   return OK;
  +
  +/* Other apache 2.0 modules add version info at post_config */
  +ap_add_version_component(pconf, JK_EXPOSED_VERSION);
   
   env=workerEnv-globalEnv;
   
  
  
  

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




RE: PROPOSAL: clientFlush() method

2002-06-03 Thread GOMEZ Henri

+1, it should reduce greatly overhead and let the 
OS stack handle the traffic directly, it will also
certainly reduce overhead in reader part (ie web server).

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 30, 2002 7:55 PM
To: List Tomcat-Dev
Subject: PROPOSAL: clientFlush() method


Hi,

I would like to add a new method to Response. 

clientFlush() will be called by ServletOutputStream.flush() to 
notify the
container ( and the low level connector ) that the user has 
explicitely 
asked for the stream to be flushed. 

The default impl. will be empty, and in coyote adapter we'll generate
an Action.CLIENT_FLUSH that may be interpreted by the connector.

This would allow the connector to increase the granularity, which in 
turns result in about 20% reduction in the overhead ( for ajp/socket ).

This happens by allowing the use of a BufferedOutputStream on the
socket - the packets to send the header and the first chunk and
the end response messages will all be sent at once, in one 
write() operation instead of 3. 

The servlet spec allows us to do that, but we must honor the flush()
requests.

I'll leave the option as disabled in jk2 ( since 4.1 and the current
3.3 doesn't support this ), but an option will enable the buffered 
writing.

Comments ? Larry, Bill ? 

( I tested this with 3.3 - Remy, I suppose something similar 
will be done
in a future release of 4.1.x, I don't want to delay the release )

Costin


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


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




Fwd: [PATCH] j-t-c build.xml

2002-06-03 Thread Anthony W. Marino

j-t-c build.xml attempts to use a non-existant dir structure.

Thank You,
Anthony

--  Forwarded Message  --

Subject: [PATCH] j-t-c build.xml
Date: Wed, 29 May 2002 12:53:25 -0400
From: Anthony W. Marino [EMAIL PROTECTED]
To: 'Tomcat Developers List' [EMAIL PROTECTED]

Please find attached changes to j-t-c build.xml which corrects an invalid
fileset used in creation of jtc.jar.


Anthony W. Marino
Pres./CTO, AWM Objects
email:  [EMAIL PROTECTED]

jtc-patch_awm-0001

---


Index: build.xml
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/build.xml,v
retrieving revision 1.3
diff -u -r1.3 build.xml
--- build.xml   6 Apr 2002 17:00:24 -   1.3
+++ build.xml   29 May 2002 16:35:00 -
@@ -18,7 +18,7 @@
 fileset dir=util/build/classes includes=org/apache/** /
 fileset dir=coyote/build/classes includes=org/apache/coyote/** /
 fileset dir=http11/build/classes includes=org/apache/coyote/** /
-fileset dir=jk/build/WEB-INF/classes 
+fileset dir=jk/build/classes 
 include name=org/apache/** /
 exclude name=org/apache/jk/ant/** /
 /fileset



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


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


Re: [PROPOSAL] Tag pooling/reuse in Jasper 2

2002-06-03 Thread peter lin


I am definitely willing to put in time to test the patches. The
discussion has been great and covered all the concerns I had. With the
test pages I have, the 64K limitation forces me to break long pages into
several jsp files using both include directive and action include. In my
mind, it's good to break it up, since no one writing a servlet would
write a method exceeding 64K.

I'm biased towards improving JSP tag performance for concurrent
requests. For 1-4 connections, the performance is fine for pages with
80-150 tags. The same pages under 60+ concurrent requests takes a
performance hit due to GC as everyone already knows. Increasing the heap
size to 512 from the default results in increasing 2-3x the concurrent
requests. 

peter lin


Kin-Man Chung wrote:
 
 I think it a good idea to limit the stacks to some reasonable value.  One
 easy way of accomplishing this is to add a tag object to the stack only
 when its stack has not reach its maximum size.
 
 The neat thing about these two approaches is that they can both be
 implemented.  Once a tag object is obtained from the stack, the compiler
 can assign it to a local variable, and reuse that local variable for
 another tag handler in the same page, if needed.  The compiler has full
 control over when a tag object returns to the pool (stack).  Like
 Jan said, we intended to do such optimization for tags in iteration
 bodies.
 
 I know Peter Lin is very interest in this area, and has tools and
 applications for measuring performance.  It'd be good if Peter can run
 them again after we put back our mods, and tell us what other areas that
 need to be worked on.
 
 - Kin-man

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




Re: M1 ?

2002-06-03 Thread jean-frederic clere

GOMEZ Henri wrote:
 Hi,
 
 I'm just back from my week spent in finishing works
 in our new-house.
 
 Could you wait up to the end of the week, to give me 
 time to finish autoconf works (JNI).
 
 BTW, I'll need more informations on how to use 
 JNI use stuff in apache 1.3 and 2.0.
 
 We'll have also to comment the fact that at least
 under Linux there is need to update by hand LD_LIBRARY_PATH
 to have jni shared libs loaded 

Will it work to load them before? I am thinking of adding some dlopen in the 
jakarta-commons-sandbox/daemon to load native libraries. (jsvc is what I use to 
start the TC).

 
 -
 Henri Gomez ___[_]
 EMAIL : [EMAIL PROTECTED](. .) 
 PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
 PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 
 
 
 
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 01, 2002 1:35 AM
To: Tomcat Developers List
Subject: Re: M1 ?


On Fri, 31 May 2002, Remy Maucherat wrote:


I spent zero time working on the native parts of JK 2, so 

obviously my

opinion doesn't really count ;-)

I'll count in the time you spent optimizing jasper :-), so 
your opinions
matters.



I think it's good to start releasing milestones. There's already a
Connector:Coyote JK 2 category in the TC 4 BZ which could be 

used for that.

Is that good enough ?

I think so.


So with 4.1.x, what should be the recommended connector ? 

mod_jk1 or mod_jk2

mod_jk1 is the stable one, and that should be used and recommended for 
now. 

The java code will work with any mod_jk, so it doesn't matter too much,
is just the configuration of apache that will be different. I already 
started with the web.xml - workers2.properties generators, 
and I hope jk2 
config will be much more automated and simpler.

But for now - don't hold 4.1.x releases on mod_jk2.

Costin



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




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




DO NOT REPLY [Bug 8969] - Manager - remove does not delete the webapps/application/ Dir

2002-06-03 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=8969.
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=8969

Manager - remove does not delete the webapps/application/ Dir





--- Additional Comments From [EMAIL PROTECTED]  2002-06-03 13:10 ---
I've been having the same problem.  I copy a .war file into webapps directory 
and deploy it using the manager install command, after which point tomcat 
unpacks the .war file into a directory in webapps. If I modify and update 
the .war file, neither the manager reload nor the manager remove/install 
causes the updated .war file to be unpacked. Doing a remove should remove the 
unpacked directory (shouldn't it?), but it doesn't. Doing a remove, then 
removing the directory manually, followed by install of the updated .war 
file, does the trick, but it's pretty inconvenient to have to remove the 
unpacked directory manually when remove should do it automatically.

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




RE: M1 ?

2002-06-03 Thread GOMEZ Henri

 We'll have also to comment the fact that at least
 under Linux there is need to update by hand LD_LIBRARY_PATH
 to have jni shared libs loaded 

Will it work to load them before? I am thinking of adding some 
dlopen in the 
jakarta-commons-sandbox/daemon to load native libraries. (jsvc 
is what I use to 
start the TC).

We should try it

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




Re: M1 ?

2002-06-03 Thread costinm

On Mon, 3 Jun 2002, jean-frederic clere wrote:

  BTW, I'll need more informations on how to use 
  JNI use stuff in apache 1.3 and 2.0.
  
  We'll have also to comment the fact that at least
  under Linux there is need to update by hand LD_LIBRARY_PATH
  to have jni shared libs loaded 

We can add it in the tomcat.sh script. It's a bit tricky since the PATH 
depends on VM, but we can include more ( JAVA_HOME/jre/lib/`arch`/classic,
... ) to be sure.

Note that JNI doesn't work with 1.3 ( or it doesn't make sense, even
if it works ) - 1.3 is single threaded. 

I also expect JNI to be more used for out-of-process connections and
operations ( unix socket, signals, chuid, shmem ), from the java process.
In this case you only need libapr.so and libjkjni.so in the 
LD_LIBRARY_PATH ( i.e. easier to put in the script ).

Regarding 'how to use' - I'll write some more docs. Workers2.properties
is where you have to configure it.  

Also - I don't consider JNI worker one of the 'supported' features, there
are still many things to tests and is too tricky. I think the socket
remains the 'default' and what we should support for most users.


 Will it work to load them before? I am thinking of adding some dlopen in the 
 jakarta-commons-sandbox/daemon to load native libraries. (jsvc is what I use to 
 start the TC).

I don't know. Depends on Java, that's where things go bad. In theory you 
shouldn't need to set LD_LIBRARY_PATH, but it's extremely unconsistent.

If you find that adding dlopen solves the problem for jni worker, it would 
be better to add it to jk_vm.c - since tomcat is started by the apache
process, you can't start it with jsvc ( or I don't know how you would
do it ). 

If you want to use the libjkjni without setting LD_LIBRARY_PATH, you could
also do it in the jk_jni code ( for example a small loader function ). You 
can already specify the full path to libjkjni.so, and if libapr.so is
installed in the same dir it'll work. 

Costin




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




DO NOT REPLY [Bug 9254] - JDBCRealm leaves open Statements

2002-06-03 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=9254.
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=9254

JDBCRealm leaves open Statements





--- Additional Comments From [EMAIL PROTECTED]  2002-06-03 16:08 ---
Tomcat cache's prepared statments.  It seems like closing a cached
PreparedStatement would be a bad idea.   What JDBC driver are you using?

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




Tomcat 4.0.3 build problem

2002-06-03 Thread vijay





 hi i am not able to compile source for tomcat 4.0.3
 The exact problem i have written down. Can you help me in this case.
 I am sure that my jar file containing
 org/w3c/dom/traversal/NodeIterator is
  in a classpath.
 Pls help me in this case

 thanks ,
 vijay

 BUILD FAILED

 java.lang.NoClassDefFoundError: org/w3c/dom/traversal/NodeIterator
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:120)
 at org.apache.xml.utils.ObjectPool.init(ObjectPool.java:100)
 at
 org.apache.xalan.transformer.TransformerImpl.init(TransformerImpl.java:
 23
 6)
 at

org.apache.xalan.templates.StylesheetRoot.newTransformer(StylesheetRoot.jav
 a:175)
 at
 org.apache.tools.ant.taskdefs.optional.TraXLiaison.setStylesheet
 (TraXLiaiso
 n.java:112)
 at

org.apache.tools.ant.taskdefs.XSLTProcess.configureLiaison(XSLTProcess.java
 :459)
 at
 org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:340)
 at
 org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:179)
 at org.apache.tools.ant.Task.perform(Task.java:217)
 at org.apache.tools.ant.Target.execute(Target.java:164)
 at org.apache.tools.ant.Target.performTasks(Target.java:182)
 at org.apache.tools.ant.Project.executeTarget(Project.java:601)
 at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:256)
 at org.apache.tools.ant.Task.perform(Task.java:217)
 at org.apache.tools.ant.Target.execute(Target.java:164)
 at org.apache.tools.ant.Target.performTasks(Target.java:182)
 at org.apache.tools.ant.Project.executeTarget(Project.java:601)
 at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:256)
 at org.apache.tools.ant.Task.perform(Task.java:217)
 at org.apache.tools.ant.Target.execute(Target.java:164)
 at org.apache.tools.ant.Target.performTasks(Target.java:182)
 at org.apache.tools.ant.Project.executeTarget(Project.java:601)
 at org.apache.tools.ant.Project.executeTargets(Project.java:560)
 at org.apache.tools.ant.Main.runBuild(Main.java:454)
 at org.apache.tools.ant.Main.start(Main.java:153)
 at org.apache.tools.ant.Main.main(Main.java:176)

 Total time: 13 seconds
 org/w3c/dom/traversal/NodeIterator





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




[VOTE] Rate milestone 4.1.3

2002-06-03 Thread Remy Maucherat

ballot
[ ] Alpha
[ ] Beta
/ballot

4.1.3 should be feature complete (at least according to what is in the
release plan; it now has the Ant compiler in Jasper 2 and a more finalized
admin webapp), and does not seem to have any major issues, so it looks like
a decent beta candidate.

Comments ?

Remy


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




Re: [VOTE] Rate milestone 4.1.3

2002-06-03 Thread costinm

On Mon, 3 Jun 2002, Remy Maucherat wrote:

 ballot
 [ ] Alpha
 [X] Beta
 /ballot
 
 4.1.3 should be feature complete (at least according to what is in the
 release plan; it now has the Ant compiler in Jasper 2 and a more finalized
 admin webapp), and does not seem to have any major issues, so it looks like
 a decent beta candidate.

Costin


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




Re: [VOTE] Rate milestone 4.1.3

2002-06-03 Thread Kin-Man Chung


 
 ballot
 [ ] Alpha
 [X] Beta
 /ballot
 
 4.1.3 should be feature complete (at least according to what is in the
 release plan; it now has the Ant compiler in Jasper 2 and a more finalized
 admin webapp), and does not seem to have any major issues, so it looks like
 a decent beta candidate.
 
 Comments ?
 
 Remy
 


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




cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade ServletOutputStreamFacade.java

2002-06-03 Thread costin

costin  2002/06/03 10:25:00

  Modified:src/share/org/apache/tomcat/core Response.java
   src/facade22/org/apache/tomcat/facade
ServletOutputStreamFacade.java
  Log:
  Add a notification on user-initiated flush().
  
  The writer doesn't need changes, since it'll be propagated to the
  output stream.
  
  User calling flush() is the only event that _requires_ us to send
  data - we can cache everything until this happens.
  
  Revision  ChangesPath
  1.56  +5 -0  jakarta-tomcat/src/share/org/apache/tomcat/core/Response.java
  
  Index: Response.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Response.java,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- Response.java 26 Aug 2001 01:52:18 -  1.55
  +++ Response.java 3 Jun 2002 17:25:00 -   1.56
  @@ -402,6 +402,11 @@
 oBuffer.flush();
   }
   
  +/** Client-originated flush
  + */
  +public void clientFlush() throws IOException {
  +// Nothing. Can be overriden.
  +}
   
   //  I18N 
   
  
  
  
  1.5   +2 -1  
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/ServletOutputStreamFacade.java
  
  Index: ServletOutputStreamFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/ServletOutputStreamFacade.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ServletOutputStreamFacade.java22 Mar 2002 02:54:34 -  1.4
  +++ ServletOutputStreamFacade.java3 Jun 2002 17:25:00 -   1.5
  @@ -142,7 +142,8 @@
   public void flush() throws IOException {
if( ob.flushCharsNeeded() )
ob.flushChars();
  - ob.flushBytes();
  +ob.flushBytes();
  +resA.clientFlush();
   }
   
   public void close() throws IOException {
  
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2 build.xml

2002-06-03 Thread costin

costin  2002/06/03 10:27:09

  Modified:jasper2  build.xml
  Log:
  Remove 'classic' so it can compile with jdk1.4.
  
  Revision  ChangesPath
  1.5   +0 -1  jakarta-tomcat-jasper/jasper2/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/build.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- build.xml 17 May 2002 22:12:07 -  1.4
  +++ build.xml 3 Jun 2002 17:27:09 -   1.5
  @@ -10,7 +10,6 @@
 property file=${user.home}/build.properties/
   
 !-- Build Defaults --
  -  property name=build.compilervalue=classic/
 property name=jasper.build  value=${basedir}/build/
 property name=catalina.home value=../../jakarta-tomcat-4.1/build/
 property name=jasper.deploy value=${catalina.home}/
  
  
  

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




FastHashMap ?

2002-06-03 Thread costinm

I was looking at jasper2, and there is one lonely use of FastHashMap in
compiler/JspRuntimeContext.java. It's the only place where jasper2 depends
on commons-collections, and it seems pretty useless - nothing calls
setFast(), and all that happens is an extra ( synchronized ) call to the 
original map.

Any problem if I replace it with a regular HashMap ( or Collections.syncMap(HashMap)  
? 


Costin


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




Re: FastHashMap ?

2002-06-03 Thread Remy Maucherat

 I was looking at jasper2, and there is one lonely use of FastHashMap in
 compiler/JspRuntimeContext.java. It's the only place where jasper2 depends
 on commons-collections, and it seems pretty useless - nothing calls
 setFast(), and all that happens is an extra ( synchronized ) call to the
 original map.

 Any problem if I replace it with a regular HashMap ( or
Collections.syncMap(HashMap)  ?

+1

Remy


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




http 302 issue on tomcat 4.0.1

2002-06-03 Thread remy.menetrieux

Hello,

When browsers request my url containing a filename, Tomcat does not
internally redirect this request, it sends a HTTP 302 redirect.

How can we configure and patch Tomcat to disable this feature ?

Thx for any help.


Here is what we get :

GET / HTTP/1.0
host: www.SiteName.com

HTTP/1.1 302 Moved Temporarily
Content-Type: text/html
Date: Tue, 28 May 2002 10:34:13 GMT
Location: http://www.SiteName.com/index.htm
Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)
Connection: close

htmlheadtitleApache Tomcat/4.0.1 - Error
report/titleSTYLE!--H1{font-family : sans-serif,Arial,Tahoma;color :
white;background-color : #0086b2;} BODY{font-family :
sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color :
white;background-color : #0086b2;} HR{color : #0086b2;} --/STYLE
/headbodyh1Apache Tomcat/4.0.1 - HTTP Status 302 - Moved
Temporarily/h1HR size=1 noshadepbtype/b Status
report/ppbmessage/b uMoved
Temporarily/u/ppbdescription/b uThe requested resource
(Moved Temporarily) has moved temporarily to a new location./u/pHR
size=1 noshade/body/html










DO NOT REPLY [Bug 9584] New: - error in web.xml.txt file

2002-06-03 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=9584.
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=9584

error in web.xml.txt file

   Summary: error in web.xml.txt file
   Product: Tomcat 4
   Version: 4.0 Beta 1
  Platform: All
   URL: http://jakarta.apache.org/tomcat/tomcat-4.0-
doc/appdev/web.xml.txt
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Webapps:Documentation
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When clicking on the above link, there is a problem because
there is a literal tag inside one of the description tags.  In the description
tag starting on line 76, line 79 is as follows:

filename extension with a servlet-mapping element, and all form.

When trying to view this (at least with IE), I get an error because the
above is being treated as a tag.  When the parser hits the closing 
/description
it complains about unmatched tags.  I was able to fix the problem by replacing 
the greater and less
than symbols with their references:

filename extension with a lt;servlet-mappinggt; element, and all form.

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




Re: http 302 issue on tomcat 4.0.1

2002-06-03 Thread Dan Sandberg

Fixing this requires mucking with the core of Tomcat, which I find scary.

Do we have any regression tests I can use to see if my changes have 
broken anything?  Or should I just commit the changes when they are 
ready, and hope someone will notice any bugs before we release?

I'm asking because I would hate to be the cause of a totally messed up 
release...

Thanks,

Dan

Dan Sandberg wrote:

 Hi Remy.

 I filed a bug report about this a week ago at:

 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9559 ( which was 
 marked invalid )

 Apparently this is a long-standing issue, as I found the following bug 
 ( marked invalid ):

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

 I hope to submit a patch for it within a week.  I may also fix the 
 following welcome-related bugs:

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

 -Dan

 remy.menetrieux wrote:

 Hello,

 When browsers request my url containing a filename, Tomcat does not
 internally redirect this request, it sends a HTTP 302 redirect.

 How can we configure and patch Tomcat to disable this feature ?

 Thx for any help.


 Here is what we get :

 GET / HTTP/1.0
 host: www.SiteName.com

 HTTP/1.1 302 Moved Temporarily
 Content-Type: text/html
 Date: Tue, 28 May 2002 10:34:13 GMT
 Location: http://www.SiteName.com/index.htm
 Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)
 Connection: close

 htmlheadtitleApache Tomcat/4.0.1 - Error
 report/titleSTYLE!--H1{font-family : 
 sans-serif,Arial,Tahoma;color :
 white;background-color : #0086b2;} BODY{font-family :
 sans-serif,Arial,Tahoma;color : black;background-color : white;} 
 B{color :
 white;background-color : #0086b2;} HR{color : #0086b2;} --/STYLE
 /headbodyh1Apache Tomcat/4.0.1 - HTTP Status 302 - Moved
 Temporarily/h1HR size=1 noshadepbtype/b Status
 report/ppbmessage/b uMoved
 Temporarily/u/ppbdescription/b uThe requested resource
 (Moved Temporarily) has moved temporarily to a new location./u/pHR
 size=1 noshade/body/html












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






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




DO NOT REPLY [Bug 9466] - Tomcat 4.0.3 fails to find location of certain files in the classpath

2002-06-03 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=9466.
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=9466

Tomcat 4.0.3 fails to find location of certain files in the classpath





--- Additional Comments From [EMAIL PROTECTED]  2002-06-03 21:15 ---
Created an attachment (id=1994)
This test case uses getClass().getResourceAsInputStream for files in WEB-INF/classes

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




DO NOT REPLY [Bug 9466] - Tomcat 4.0.3 fails to find location of certain files in the classpath

2002-06-03 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=9466.
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=9466

Tomcat 4.0.3 fails to find location of certain files in the classpath

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2002-06-03 21:19 ---

I have used the test case on Win98/jdk1.4.0/tomcat4.0.3,
Solaris/jdk1.4.0/tomcat4.0.3, Solaris/jdk1.4.0/tomcat4.1
and have been unable to reproduce the problem.

Cheers,
[EMAIL PROTECTED]

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




DO NOT REPLY [Bug 9584] - error in web.xml.txt file

2002-06-03 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=9584.
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=9584

error in web.xml.txt file





--- Additional Comments From [EMAIL PROTECTED]  2002-06-03 21:27 ---

The file is type TXT, so IE should respect the fact that the document is text
and not HTML.  I would argue that IE is broken.

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




DO NOT REPLY [Bug 9590] New: - cookies stop sending to browser after nested loop

2002-06-03 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=9590.
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=9590

cookies stop sending to browser after nested loop

   Summary: cookies stop sending to browser after nested loop
   Product: Tomcat 4
   Version: 4.0.3 Final
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


3 simple cookies/1 nested loop 
 
res:addCookie name=TEST40 value=40/ 
c:forEach var=dupe1 items=${param} varStatus=status1 
  c:forEach var=dupe2 items=${param} varStatus=status2 
c:if test=${(dupe1.value==dupe2.value)(status1.count!=status2.count)} 
  page:setAttribute name=errorsbrERROR!: Duplicate 
Number!hr/page:setAttribute 
/c:if 
  /c:forEach 
res:addCookie name=TEST45 value=45/ 
/c:forEach 
res:addCookie name=TEST50 value=50/ 
 
(1)in this examples cookie 'TEST40' gets sent to browser 
(2)next the nested for loops works coorectly 
(3)next cookie 'TEST45' gets sent to browser 
 problem: cookie TEST50 does not get sent to browser  
(5)all code before and after this snipet works fine 
synopsis: after doing nested loops tomcat stops sending cookies 
 
ps.(I have ruled out the custom taglibs RESPONSE, and PAGE) 
Thanks in advance, 
[EMAIL PROTECTED]

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




JspException in jasper 2?

2002-06-03 Thread Kin-Man Chung

org.apache.jasper.runtime.JspException seems to be serving no purpose,
and it conflicts with javax.servlet.jsp.JspException.

Any objections to my removing it?

BTW, it also exists in tomcat 4/jasper.


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




[3.3.2-dev] CoyoteConnector2 invalid headers

2002-06-03 Thread Keith Wannamaker

When using CC2 with TC 3.3.2, every request sets both
the content-length and the transfer-encoding, which
is not only wrong, but can confuse some clients.

Content-Length: 9
Transfer-Encoding: chunked

The 4.0 org.apache.catalina.connector.http.HttpConnector
does not have this problem.  Any quick ideas while I dig
through the code?

Keith


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




DO NOT REPLY [Bug 9591] New: - Creating a temporary file in a servlet throws an IOException

2002-06-03 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=9591.
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=9591

Creating a temporary file in a servlet throws an IOException

   Summary: Creating a temporary file in a servlet throws an
IOException
   Product: Tomcat 4
   Version: 4.0.3 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Major
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When a servlet attepts to create a temporary file an IOException is thrown 
indicating that the system cannot find the path specified.

Code to reproduce error:

public class Example3 extends HttpServlet {
  
public void doGet (HttpServletRequest request,HttpServletResponse response
) throws ServletException, IOException {

PrintStream out = new PrintStream (response.getOutputStream());
response.setContentType (text/html);

try {
File f = File.createTempFile(foo,.txt);
out.println(h3+f+/h3);
} catch (Exception e) {
out.println(ibError code:/b  + e + /i);
e.printStackTrace(System.err);
} finally {
out.close();
response.getOutputStream().close();
}
}
}

Stacktrace:
java.io.IOException: The system cannot find the path specified
at java.io.Win32FileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1157)
at java.io.File.createTempFile(File.java:1242)
at java.io.File.createTempFile(File.java:1279)
at Example3.doGet(Example3.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.servlets.InvokerServlet.serveRequest
(InvokerServlet.java:446)
at org.apache.catalina.servlets.InvokerServlet.doGet
(InvokerServlet.java:180)
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
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:479)

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

DO NOT REPLY [Bug 9584] - error in web.xml.txt file

2002-06-03 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=9584.
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=9584

error in web.xml.txt file





--- Additional Comments From [EMAIL PROTECTED]  2002-06-03 22:29 ---
I don't think the point is whether IE should try to automatically open the 
document as XML is the issue.  When I got the error, I downloaded the file, 
renamed it to web.xml, then tried to open it and still got the same error.  The 
issue is that the example is NOT a well-formed document because it is using the 
symbols  and  with in the body of an element.  These symbols should be 
replaced with lt; and gt; so the document will parse correctly.

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




Re: [3.3.2-dev] CoyoteConnector2 invalid headers

2002-06-03 Thread Remy Maucherat

 When using CC2 with TC 3.3.2, every request sets both
 the content-length and the transfer-encoding, which
 is not only wrong, but can confuse some clients.

 Content-Length: 9
 Transfer-Encoding: chunked

 The 4.0 org.apache.catalina.connector.http.HttpConnector
 does not have this problem.  Any quick ideas while I dig
 through the code?

This does not happen with 4.0.x and 4.1.x when using Coyote. I have no idea
why it would happen in 3.3, esp when looking at the code in the
Http11Processor class.

int contentLength = response.getContentLength();
if (contentLength != -1) {
outputBuffer.addActiveFilter
(outputFilters[Constants.IDENTITY_FILTER]);
contentDelimitation = true;
} else {
if (entityBody  http11) {
outputBuffer.addActiveFilter
(outputFilters[Constants.CHUNKED_FILTER]);
contentDelimitation = true;
response.addHeader(Transfer-Encoding, chunked);
}
}

That's the only place where the Transfer-Encoding header is set.

There could be a problem when setting the Content-Length header directly
in
the MimeHeaders object (in that case, the content length of the response
won't
get updated).

Either:
- coyote.Response.getContentLength should check for a Content-Length
header
if the int value is -1.
- the Tomcat 3 adapter should properly call coyote.Response.setContentLength
the same way the Tomcat 4 adapter does.

Remy


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




DO NOT REPLY [Bug 9591] - Creating a temporary file in a servlet throws an IOException

2002-06-03 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=9591.
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=9591

Creating a temporary file in a servlet throws an IOException

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-06-03 22:31 ---
The 4.0.3 distribution does not include the 'temp' directory, which is set as
the tempdir of the VM. Creating it (%CATALINA_HOME%\temp) would fix the problem.

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




Re: [3.3.2-dev] CoyoteConnector2 invalid headers

2002-06-03 Thread Bill Barker

It looks like Tomcat3Response.endHeaders needs to call
coyoteResponse.setContentLength so that Http11Processor can see it.  It
might also want to call setContentType, but that one doesn't seem to be used
by the Http11Processor.
- Original Message -
From: Keith Wannamaker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 03, 2002 3:55 PM
Subject: [3.3.2-dev] CoyoteConnector2 invalid headers


 When using CC2 with TC 3.3.2, every request sets both
 the content-length and the transfer-encoding, which
 is not only wrong, but can confuse some clients.

 Content-Length: 9
 Transfer-Encoding: chunked

 The 4.0 org.apache.catalina.connector.http.HttpConnector
 does not have this problem.  Any quick ideas while I dig
 through the code?

 Keith


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



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




Re: [VOTE] Rate milestone 4.1.3

2002-06-03 Thread bob


ballot
 [ ] Alpha
 [X] Beta
/ballot

Cheers,
-bob


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




doc fix to globalresources.xml

2002-06-03 Thread bob


Global Resources are a little confusing.  Declaring a resource in the
GlobalNamingResources section of the server.xml doesn't make the
resource visible to webapps until the context for the webapp includes
a ResourceLink.  This obscurity is for security.  

It seems weird to declare something 'global' and have it visible
nowhere.  (until it is linked.)  Tempting to call a
GlobalNamingResources a HiddenGlobalNamingResources or
BackgroundGlobalNamingResources or MightBeGlobalNamingResources

In any event, I tried to update globalresources.xml to refer to the
needed ResourceLink so developers don't get tripped up on the
documentation.  I am not sure I am happy with my exact text.  Remmy,
what do you think?

Cheers,
-bob


Index: globalresources.xml
===
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/webapps/tomcat-docs/config/globalresources.xml,v
retrieving revision 1.1
diff -u -r1.1 globalresources.xml
--- globalresources.xml 30 Nov 2001 06:23:13 -  1.1
+++ globalresources.xml 3 Jun 2002 22:20:50 -
@@ -51,7 +51,19 @@
 lt;/GlobalNamingResourcesgt;
 /source
 
-pThis is equivalent to the inclusion of the following element in the
+pYou must then make the this global setting visible to the context by using a 
+a href=context.html#Resource LinksResource Link/a, like this:/p
+
+source
+lt;Context ...gt;
+  ...
+  lt;ResourceLink name=maxExemptions
+global=maxExemptions
+type=java.lang.Integer/gt;
+  ...
+lt;/Contextgt;
+/source
+
+pThis is then equivalent to the inclusion of the following element in the
 web application deployment descriptor (code/WEB-INF/web.xml/code):
 /p
 source
@@ -129,7 +141,19 @@
 lt;/GlobalNamingResourcesgt;
 /source
 
-pThis is equivalent to the inclusion of the following element in the
+pYou must then make the this global setting visible to the context by using a 
+a href=context.html#Resource LinksResource Link/a, like this:/p
+
+source
+lt;Context ...gt;
+  ...
+  lt;ResourceLink name=jdbc/EmployeeDB
+global=jdbc/EmployeeDB
+type=javax.sql.DataSource/gt;
+  ...
+lt;/Contextgt;
+/source
+
+pThis is then equivalent to the inclusion of the following element in the
 web application deployment descriptor (code/WEB-INF/web.xml/code):/p
 source
 lt;resource-refgt;


Cheers,
-bob

Cheers,
-bob

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




DO NOT REPLY [Bug 9254] - JDBCRealm leaves open Statements

2002-06-03 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=9254.
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=9254

JDBCRealm leaves open Statements





--- Additional Comments From [EMAIL PROTECTED]  2002-06-03 23:33 ---
Hummm interesting, I'll take a look at how tomcat does that caching... 
meanwhile both methods (credentials and roles) create new prepared statements 
everytime!!

The driver was the TDS driver for SQL server.

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




Re: http 302 issue on tomcat 4.0.1

2002-06-03 Thread Remy Maucherat

 Fixing this requires mucking with the core of Tomcat, which I find scary.

 Do we have any regression tests I can use to see if my changes have
 broken anything?  Or should I just commit the changes when they are
 ready, and hope someone will notice any bugs before we release?

 I'm asking because I would hate to be the cause of a totally messed up
 release...

A forward is not used in that case because a security constraint may be
applied on the target URI.
Also, welcome pages such as foo/index.html are allowed, and using a
forward would mess up the links from that welcome page (maybe that's normal,
but it's not very clear to me).

Remy


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




DO NOT REPLY [Bug 4948] - Class.getPackage() returns null in classes loaded by webapp class loader

2002-06-03 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=4948.
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=4948

Class.getPackage() returns null in classes loaded by webapp class loader

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |



--- Additional Comments From [EMAIL PROTECTED]  2002-06-04 02:49 ---
This bug is definitely still live in Tomcat 3.3.

-Eric

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




Re: http 302 issue on tomcat 4.0.1

2002-06-03 Thread Craig R. McClanahan



 
  Do we have any regression tests I can use to see if my changes have
  broken anything?  Or should I just commit the changes when they are
  ready, and hope someone will notice any bugs before we release?
 

There is in fact a regression test suite, in the tester subdirectory of
the jakarta-tomcat-4.0 repository.  After you build Tomcat, build and
install the tester webapps like this:

  cd tester
  ant deploy

Then start or restart Tomcat and run:

  $CATALINA_HOME/bin/tester.sh foo

to run the foo set of tests.  If you leave off foo, it will run all of
them.  Too see what's available:

  $CATALINA_HOME/bin/tester.sh -projecthelp

Each test outputs a success or failure message -- grep for FAIL in the
output is the easiest way to check for problems.

Besides passing the test suite, you should also ensure that the Watchdog
tests also pass (they are the basis for the tests that check for spec
compliance against the Servlet 2.3 and JSP 1.2 specs) from the
jakarta-watchdog-4.0 CVS repository.

Craig McClanahan


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




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3 Tomcat3Response.java

2002-06-03 Thread billbarker

billbarker2002/06/03 20:09:57

  Modified:coyote/src/java/org/apache/coyote/tomcat3
Tomcat3Response.java
  Log:
  Make certain that content-length gets set on the coyoteRequest.
  
  Long-term, I'd much rather use the header only like in the Tomcat 3.3 core Request.  
However, I can't think of a good reason why it can't wait for v1.1.
  
  Reported By: Keith Wannamaker
  
  Revision  ChangesPath
  1.6   +5 -8  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Response.java
  
  Index: Tomcat3Response.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Response.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Tomcat3Response.java  17 May 2002 19:49:03 -  1.5
  +++ Tomcat3Response.java  4 Jun 2002 03:09:56 -   1.6
  @@ -92,14 +92,6 @@
   super();
   }
   
  -/** Set the Content lenth
  - */
  -public void setContentLength(int contentLength) {
  - if(! isIncluded() ){
  - super.setContentLength(contentLength);
  - coyoteResponse.setContentLength(contentLength);
  - }
  -}
   /** Attach a Coyote Request to this request.
*/
   public void setCoyoteResponse(org.apache.coyote.Response cRes) {
  @@ -126,6 +118,11 @@
   public void endHeaders()  throws IOException {
super.endHeaders();
coyoteResponse.setStatus(getStatus());
  + // Check that the content-length has been set.
  + int cLen = getContentLength();
  + if( cLen = 0 ) {
  + coyoteResponse.setContentLength(cLen);
  + }
   // Calls a sendHeaders callback to the protocol
coyoteResponse.sendHeaders();
   }
  
  
  

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




Re: http 302 issue on tomcat 4.0.1

2002-06-03 Thread Dan Sandberg

Yes, this is true.  Also, a request to /foo which becomes /foo/index.jsp 
would also screw up relative links.

I believe the following behavior would do what people want 99% of the 
time while still not screwing up the scenario you mentioned or the one I 
mentioned above (forgive the pythonic pseudocode):

if matchingWelcomeFile.equals(a/b.jsp): //if the welcome file has a 
slash in it
  redirect( pathRequest + [forwardSlash if needed] + a/ )
else:
  if pathRequested.endWith('/'):
  redispatch // see below for meaning
  else:
  pathRequest += '/'
  redirect( pathRequest )

This only does redirects when necessary to preserve relative link 
meanings, and does not make so the redirected URL contains the 
welcome-file filename in any circumstance.  This is what people prob. 
want, since if people bookmark /shoppingCart, they'll still have the 
right URL even if people switch from .jsp to .xtp or whatever 
 Incidentally, this is the behavior that Resin has--I checked.

I believe that this code shouldn't be in DefaultServlet.java.  It should 
be in the code that maps the request to a servlet.   I think this is 
clear from the spec ( SRV.9.10 ):  If no matching welcome file is found 
in the manner described, the container may handle the request in a 
manner it finds suitable. For some configurations this may mean invoking 
a default file servlet, or returning a directory listing. For other 
configurations it may return a 404 response.

So by redispatch, I mean 'pretend that the changed path is what was 
originally requested'.  This should be easy to do in the wrapper mapping 
ocde.

Since I won't be forwarding ( since I won't be handling this in 
DefaultServlet ) your security constraint problems should be allayed.

And I think I can fix the 'mapping welcome files onto servlet' problem 
while I'm at it.

Comments?

-Dan

Remy Maucherat wrote:

Fixing this requires mucking with the core of Tomcat, which I find scary.

Do we have any regression tests I can use to see if my changes have
broken anything?  Or should I just commit the changes when they are
ready, and hope someone will notice any bugs before we release?

I'm asking because I would hate to be the cause of a totally messed up
release...



A forward is not used in that case because a security constraint may be
applied on the target URI.
Also, welcome pages such as foo/index.html are allowed, and using a
forward would mess up the links from that welcome page (maybe that's normal,
but it's not very clear to me).

Remy


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


  





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




Re: http 302 issue on tomcat 4.0.1

2002-06-03 Thread Remy Maucherat

 Yes, this is true.  Also, a request to /foo which becomes /foo/index.jsp
 would also screw up relative links.

 I believe the following behavior would do what people want 99% of the
 time while still not screwing up the scenario you mentioned or the one I
 mentioned above (forgive the pythonic pseudocode):

 if matchingWelcomeFile.equals(a/b.jsp): //if the welcome file has a
 slash in it
   redirect( pathRequest + [forwardSlash if needed] + a/ )
 else:
   if pathRequested.endWith('/'):
   redispatch // see below for meaning
   else:
   pathRequest += '/'
   redirect( pathRequest )

 This only does redirects when necessary to preserve relative link
 meanings, and does not make so the redirected URL contains the
 welcome-file filename in any circumstance.  This is what people prob.
 want, since if people bookmark /shoppingCart, they'll still have the
 right URL even if people switch from .jsp to .xtp or whatever
  Incidentally, this is the behavior that Resin has--I checked.

 I believe that this code shouldn't be in DefaultServlet.java.  It should
 be in the code that maps the request to a servlet.   I think this is
 clear from the spec ( SRV.9.10 ):  If no matching welcome file is found
 in the manner described, the container may handle the request in a
 manner it finds suitable. For some configurations this may mean invoking
 a default file servlet, or returning a directory listing. For other
 configurations it may return a 404 response.

 So by redispatch, I mean 'pretend that the changed path is what was
 originally requested'.  This should be easy to do in the wrapper mapping
 ocde.

 Since I won't be forwarding ( since I won't be handling this in
 DefaultServlet ) your security constraint problems should be allayed.

 And I think I can fix the 'mapping welcome files onto servlet' problem
 while I'm at it.

 Comments?

We can try it, but it will still cause problems with nested welcome files
and relative paths.

If you can implement it well, that would be cool.

Remy


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




Re: [VOTE] Rate milestone 4.1.3

2002-06-03 Thread Remy Maucherat

 Beta for Catalina with Jasper 1
 Alpha for Catalina with Jasper 2

4.1.3 includes Jasper 2, so I'm counting your vote as alpha.

Remy


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