apache
|
READMEJ1L.txt,
READMEJ1S.txt,
READMET0L.txt,
READMET0S.txt,
READMET1L.txt,
READMET1LB.inc,
READMET1LB.txt,
READMET1S.txt,
READMET1SB.inc,
READMET1SB.txt,
READMET3.1LRH6.2-txt.txt,
READMET3.1LRH6.2.txt,
apache2.0.49-rh7.0,
apache2.0.49-solaris,
apacheRH7.0,
apacheRH7.0httpd,
bug.html,
debian-tomcat,
httpd.conf.3.1b1.txt,
irix-6.5,
j2ee,
java-1.4.1,
latex2html,
mod_jserv.so,
rh7.1,
rh7.3,
server.xml.3.1b1.txt,
solaris-t3.2,
solaris-t3.2b5,
solaris2.8,
tj3.1,
tomcat,
tomcat-apache.conf.3.1b1.txt,
tomcat.conf.3.1b1.txt,
tomcat.properties.3.1b1.txt,
tomcat3.1b1-faq.html,
tomcat4.0.5,
tomcat4.1.12
|
|
|
init-param bug
Date: Fri, 31 Mar 2000 20:56:32 -0500 (EST)
From: Jan Labanowski <jkl@ccl.net>
To: tomcat-dev@jakarta.apache.org
Cc: Jan Labanowski <jkl@ccl.net>
Subject: <init-param> in /test
Small bug to fix, but for me it took a good hour to get it (I was born slow...)
Tomcat 3.1 Beta 1, Apache 1.3.12, both RH 6.1 linux and Solaris 2.7
If you mount <TOMCAT_HOME>/webapps/test/ in tomcat.conf as:
ApJServMount /test /root
and you play with it on tomcat port, e.g.:
http://xxx.xxx.xxx:8080/test/servlet/ServletParam
your response is:
<html>
<body>
<h1>ServletParam</h1>
<dl>
</dl>
</body></html>
To my surprise (after reading <TOMCAT_HOME>/webapps/test/WEB-INF/web.xml) the
http://xxx.xxx.xxx:8080/test/servlet/servletParam1
and
http://xxx.xxx.xxx:8080/test/servlet/servletParam2
gave the same response as the "naked servlet" with no init-params
However, when I replaced the following fragment:
================================
<servlet>
<servlet-name>
servletParam1
</servlet-name>
<servlet-class>
ServletParam
</servlet-class>
<init-param>
<param-name>
param1
</param-name>
<param-value>
value1
</param-value>
</init-param>
<init-param>
<param-name>
param2
</param-name>
<param-value>
value2
</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>
servletParam2
</servlet-name>
<servlet-class>
ServletParam
</servlet-class>
<init-param>
<param-name>
param3
</param-name>
<param-value>
</param-value>
</init-param>
<init-param>
<param-name>
param4
</param-name>
<param-value>
value4
</param-value>
</init-param>
</servlet>
=======================
With the following fragment:
=======================================
<servlet>
<servlet-name>
servletParam1
</servlet-name>
<servlet-class>
ServletParam
</servlet-class>
<init-param>
<param-name>param1</param-name>
<param-value>value1</param-value>
</init-param>
<init-param>
<param-name>param2</param-name>
<param-value>value2</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>
servletParam2
</servlet-name>
<servlet-class>
ServletParam
</servlet-class>
<init-param>
<param-name>param3</param-name>
<param-value>value3</param-value>
</init-param>
<init-param>
<param-name>param4</param-name>
<param-value>value4</param-value>
</init-param>
</servlet>
=================================
i.e., when I removed the white space from around the tags
I got correct responses, e.g., the:
http://xxx.xxx.xxx:8080/test/servlet/servletParam1
gives me:
<html>
<body>
<h1>servletParam1</h1>
<dl>
<dt>param2</dt><dd>value2</dd>
<dt>param1</dt><dd>value1</dd>
</dl>
</body></html>
Conclusion: White space should be removed from around initialized
parameters, and the file <TOMCAT_HOME>/webapps/test/WEB-INF/web.xml is BAD.
Try it yourself, if you do not believe me. I do not want to go into
"Should XML parser remove the white space?" here...
I like it as is, but the fact remains... Keep the good work... Thanks for
everything...
Jan
jkl@ccl.net
Jan K. Labanowski | phone: 614-292-9279, FAX: 614-292-7168
Ohio Supercomputer Center | Internet: jkl@ccl.net
1224 Kinnear Rd, | http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163 | http://www.ccl.net/
[][][][][][][][][][][][][][][][]
Date: Fri, 31 Mar 2000 18:04:48 -0800
From: Anil Vijendran <akv@pipedream.org>
To: tomcat-dev@jakarta.apache.org
Cc: Jan Labanowski <jkl@ccl.net>
Subject: Re: <init-param> in /test
Jan Labanowski wrote:
> Conclusion: White space should be removed from around initialized
> parameters, and the file <TOMCAT_HOME>/webapps/test/WEB-INF/web.xml is BAD.
Thanks for pointing this out. This should just be a trim() on the Text node in
the
web.xml parsing code. Can you please file a bug report so we don't lose things
like these? (http://jakarta.apache.org/bugs)
--
Peace, Anil +<:-)
[][][][][][][][]
|