You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/02/01 19:04:21 UTC
DO NOT REPLY [Bug 50700] New: Context parameters are being
overridden with parameters from the web application deployment descriptor
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
Summary: Context parameters are being overridden with
parameters from the web application deployment
descriptor
Product: Tomcat 6
Version: 6.0.30
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: dx_xb@mail.ru
Context parameters are being overridden with parameters from the web
application deployment descriptor even through "override" attribute is set to
"false"
For example:
lines from context file
<Context path="/path" docBase="/path/to/docbase" cookies="true">
<Parameter name="parameter_name" value="test1" override="false"/>
....
</Context>
lines from web.xml
<context-param>
<description>default value for parameter_name</description>
<param-name>parameter_name</param-name>
<param-value>test2</param-value>
</context-param>
Now servletContext.getInitParameter("parameter_name") returns "test2"
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50700] Context parameters are being overridden
with parameters from the web application deployment descriptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
--- Comment #3 from chris@derham.me.uk 2011-02-08 04:12:56 EST ---
Sergey's explanation is good, but just in case any more detail is required in
how to reproduce it, here's the steps I take. Expand a tomcat distribution.
Edit the <tomcat_home>\webapps\root\WEB-INF\web.xml file to become
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>
<context-param>
<param-name>initialDbPath</param-name>
<param-value>a</param-value>
</context-param>
</web-app>
then edit <tomcat_home>\conf\context.xml to become
<Context>
<Parameter name="initialDbPath" value="xyz" override="false"/>
</Context>
then add a new file <tomcat_home>\webapps\ROOT\test.jsp which contains
<%@ page contentType="text/html; charset=UTF-8" %>
<html>
<body>
<br>initialDbPath is : ${initParam.initialDbPath}
</body>
</html>
The context.xml setting should override the web.xml setting, but this is not
happening
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50700] Context parameters are being overridden
with parameters from the web application deployment descriptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
--- Comment #4 from Mark Thomas <ma...@apache.org> 2011-02-14 14:06:02 EST ---
This has been fixed in 7.0.x and will be included in 7.0.9 onwards.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50700] Context parameters are being overridden
with parameters from the web application deployment descriptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
--- Comment #6 from Konstantin Kolinko <kn...@gmail.com> 2011-02-15 02:48:13 EST ---
Some comments on the fix for this issue (r1070609), for better understanding:
1) This bug was caused by the fix for bug 49987 (r1022117), Tomcat 6.0.30-32
are affected.
2) The cause of this, which went unnoticed when the patch for Bug 49987 was
reviewed, is that ApplicationContext#setInitParameter(name, value) is effective
only once.
Subsequent calls to #setInitParameter(name, value) with the same name are
ignored. That is why init-param overriding with override="false" stopped
working.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50700] Context parameters are being overridden
with parameters from the web application deployment descriptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
Oliver <ol...@vdb.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oliver@vdb.de
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50700] Context parameters are being overridden
with parameters from the web application deployment descriptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
Oliver Doepner <od...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version| |All
--- Comment #1 from Oliver Doepner <od...@gmail.com> 2011-02-04 13:52:27 EST ---
I can reproduce the problem (Tomcat 6.0.30 on JDK6u23, Windows XP, 32bit, *.zip
distribution).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50700] Context parameters are being overridden
with parameters from the web application deployment descriptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #7 from Mark Thomas <ma...@apache.org> 2011-03-10 08:52:53 EST ---
Fixed in 6.0.x and will be included in 6.0.33 onwards.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 50700] Context parameters are being overridden with parameters
from the web application deployment descriptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
--- Comment #9 from Jackie Rosen <ja...@hushmail.com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50700] Context parameters are being overridden
with parameters from the web application deployment descriptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
n.beekman <n....@o3spaces.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |n.beekman@o3spaces.com
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50700] Context parameters are being overridden
with parameters from the web application deployment descriptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
chris@derham.me.uk changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |chris@derham.me.uk
--- Comment #2 from chris@derham.me.uk 2011-02-07 11:22:09 EST ---
can reproduce using apache-tomcat-7.0.8-windows-x86.zip, jdk1.6.0_23, windows 7
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50700] Context parameters are being overridden
with parameters from the web application deployment descriptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
Konstantin Kolinko <kn...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wg@wg.be
--- Comment #8 from Konstantin Kolinko <kn...@gmail.com> 2011-07-13 12:35:10 UTC ---
*** Bug 47516 has been marked as a duplicate of this bug. ***
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50700] Context parameters are being overridden
with parameters from the web application deployment descriptor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700
--- Comment #5 from Mark Thomas <ma...@apache.org> 2011-02-14 14:09:10 EST ---
The Tomcat 7 patch has been proposed for backport to 6.0.x.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org