Note that there are some explanatory texts on larger screens.

plurals
  1. POTomcat updates context.xml but should not
    primarykey
    data
    text
    <p>Tomcat documentation (http://tomcat.apache.org/tomcat-6.0-doc/config/context.html)</p> <blockquote> <p>Only if a context file does not exist for the application in the $CATALINA_BASE/conf/[enginename]/[hostname]/, in an individual file at /META-INF/context.xml inside the application files. If the web application is packaged as a WAR then /META-INF/context.xml will be copied to $CATALINA_BASE/conf/[enginename]/[hostname]/ and renamed to match the application's context path. <strong>Once this file exists, it will not be replaced if a new WAR with a newer /META-INF/context.xml is placed in the host's appBase.</strong></p> </blockquote> <p>Text in bold is clear. But I notify as not true. (I need exactly this behaviour)</p> <p>Here are steps:</p> <ol> <li>aaa.war with context.xml included into META-INF</li> <li>copy to webapps. tomcat deploys. File <code>conf\Catalina\localhost\aaa.xml</code> OK</li> <li>change aaa.war by changing META-INF/context.xml</li> <li>copy to webapps</li> <li>File <code>conf\Catalina\localhost\aaa.xml</code> is changed!!!</li> </ol> <p>What is wrong? Is it a bug or a hidden feature?</p> <p>Background - the issue I want to resolve:</p> <p>Configuration independent build and installation. I plant to ship war file. Client per-configures his Tomcat using his own settings. when I ship a new release I just delivery the war without config and when deployed it will use client specific configuration.</p> <p>By documentation the best place is the context.xml But if it overwritten each time it make no sense to use at all. (why would I use JNDI and such a things if new deliverable has to created? Changing something in build-time is not a big configuration advantage.)</p> <p>Environment: windows, tomcat 6.0.33</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload