<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 7/12/16 4:16 AM, Brent Putman wrote:<br>
    </div>
    <blockquote
      cite="mid:a9ece3dc-2271-360e-58dd-431bd0c1d060@georgetown.edu"
      type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      <p><br>
      </p>
      <br>
      <div class="moz-cite-prefix">On 7/11/16 11:00 PM, Tom Zeller
        wrote:<br>
      </div>
      <blockquote
        cite="mid:DAF9A1C5-BFA2-42A5-82F6-8257B2C0D432@dragonacea.biz"
        type="cite"><br>
        <pre wrap="">Also FWIW, after re-reading the Tomcat docs, I think context.xml can accept <context-param>s to avoid modifying web.xml. But I'm not sure, and plan on giving that a try when I get back to it.
</pre>
      </blockquote>
      <br>
      Absolutely it can, I do that routinely. Actually, I'm not sure
      which "context.xml" or <Context> you mean [1], since they
      can be located in various places [2], but:  You can absolutely
      set/override context params for a specific web app completely in
      the container - meaning completely external to the web app -
      without touching web.xml or anything else in the war at all.  You
      do that by putting the params in the external <Context>
      deployment fragment, such as we document as
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      conf/Catalina/localhost/idp.xml [3].    The syntax there is not
      quite the same as web.xml; instead it's <Parameter> elements
      [4].  But it absolutely it works, I've been doing it for probably
      a decade.<br>
    </blockquote>
    <br>
    In case someone wants an example, here is the actual context
    deployment fragment from a production app I have.  I'm externally
    setting a context param (which in this case customizes the Spring
    root web app context resources to add in an external beans file in
    addition to the default applicationContext.xml) <br>
    <br>
    The 'override' attrib is a little counter-intuitive IMHO.  Setting
    'false' means don't allow any the like-named context param value
    which may be in web.xml to override the one being set here in the
    context deployment element (which is the opposite of what my brain
    would think of as natural). IIRC it defaults to true, which means
    the web.xml value takes precedence over the externally defined
    context descriptor value (which again seems backwards to me, but oh
    well).<br>
    <br>
    <br>
    <tt><?xml version="1.0" encoding="UTF-8"?></tt><tt><br>
    </tt><tt><Context
      docBase="/var/tomcat/gartner/manual-deploy/gartner.war"</tt><tt><br>
    </tt><tt>         privileged="true" antiResourceLocking="false"
      antiJARLocking="false"></tt><tt><br>
    </tt><tt><br>
    </tt><tt>  <Parameter name="contextConfigLocation"
      value="/WEB-INF/applicationContext.xml
      <a class="moz-txt-link-freetext" href="file:///etc/gartner/gartner-spring.xml">file:///etc/gartner/gartner-spring.xml</a>" override="false"/></tt><tt><br>
    </tt><tt><br>
    </tt><tt></Context></tt><tt><br>
    </tt><tt><br>
    </tt><br>
  </body>
</html>