tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chris derham <>
Subject Problem with overriding parameters via context.xml
Date Wed, 26 Jan 2011 14:44:24 GMT

I appear to have an issue with tomcat 6.0.30 not allowed web.xml parameters
to be over-ridden via context.xml file entries. This works fine in tomcat

I have a parameter defined in web.xml, like this

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns=""


Then in context.xml I wish to override this parameter in different
deployment environments. So I create a context.xml file in
catalina_base\conf\context.xml containing the following

<?xml version='1.0' encoding='utf-8'?>
    <Parameter name="log4jConfigLocation"
value="WEB-INF/classes/log4j.uat.xml" override="false"/>

I then have a jsp file that contains the following

<%@ page contentType="text/html; charset=UTF-8" %>
<br>log4jConfigLocation is : ${initParam.log4jConfigLocation}

Using 6.0.29 the jsp shows the value present in the context.xml file, e.g.
expected behaviour. In 6.0.30 the value from the web.xml file is shown, e.g.
the required override hasn't happened.

I have read the release notes, and can't see anything that jumps out to me
saying that this behaviour has changed. Is this a defect in tomcat, or a
desired change or behaviour? If the latter, can anyone provide any pointers
as to how I can achieve my stated goal? My only current work around is to
revert to 6.0.29



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message