Tomcat5.5プチ新機能 コンテキストファイル置き場

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html より

New default configuration mechanism for web applications, replacing DefaultContext. This uses a shared context file located in conf/context.xml. (remm)

%TOMCAT_HOME%/conf/context.xml にデフォルト設定がかけるようになってます。

The container will now always process a /META-INF/context.xml resource, unless the webapp has a specified external context file. (remm)

WebアプリのMETA-INF/context.xml にコンテキスト設定が書けるようになっています。
そういえば、Tomcatのサーバ固有設定で、Webアプリに一緒に含めてデプロイって感じでなかったですな。



なお、5.5新機能ではないですが、5.0からコンテキストの記述は、%TOMCAT_HOME%/conf/Catalina/localhost/ 以下(正確にはエンジンのディレクトリうんぬん)のXMLファイルに書きます。
server.xmlに書いても動きますが、removeしにくいのでやめときましょう。


http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

This method allows dynamic reconfiguration of the web application, since the main conf/server.xml file cannot be reloaded without restarting Tomcat. Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended to place elements directly in the server.xml file. Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above.

あれ?server.xmlに書いとくとサーバ再起動しないとリロードできないってことは、
コンテキストファイル書き換えて、Webアプリの再起動で反映されるんですな。
そういえばSysdeoのプロパティー変更(ログの出力先とか)も再起動なし反映されたかも。。。