开发者

How to incorporate an xml fragment into tomcat's server.xml

I'm doing a distribution of tomcat for a many servers and in each of these servers the realm is going to be different. I would like to have a file /etc/tomcat/realm.xml containing the realm for that installation and have the file /var/lib/tomcat/conf/server.xml import it directly. I've tried with Xinclude without luck and I'm about to resort开发者_运维百科 to sed to the import when running /etc/init.d/tomcat. Is there a better way to do this?


I'm not familiar with tomcat, but will it recognize/handle a system entity?

I'm not sure what the root element of /var/lib/tomcat/conf/server.xml is, so I'll just use server in my example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server [
<!ENTITY realm SYSTEM "/etc/tomcat/realm.xml">
]>
<server>
&realm;
</server>

Would something like that work?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜