zk.xml"

From Documentation
m
Line 1: Line 1:
 
{{ZKConfigurationReferencePageHeader}}
 
{{ZKConfigurationReferencePageHeader}}
 +
 +
__NOTOC__
  
 
<tt>WEB-INF/zk.xml</tt> is the configuration descriptor of ZK. This file optional. If you need to configure ZK differently from the default, you could provide a file called <tt>zk.xml</tt> under the <tt>WEB-INF</tt> directory.
 
<tt>WEB-INF/zk.xml</tt> is the configuration descriptor of ZK. This file optional. If you need to configure ZK differently from the default, you could provide a file called <tt>zk.xml</tt> under the <tt>WEB-INF</tt> directory.
Line 14: Line 16:
  
 
=== metainfo/zk/zk.xml ===
 
=== metainfo/zk/zk.xml ===
[since 3.6.0]
+
[since 3.6.0]
  
 
For library providers, <code>zk.xml</code> is better to be packed with a JAR file. It can be done by placing zk.xml in the <code>metainfo/zk</code> directory identifiable by classpath (i.e., in a JAR file).
 
For library providers, <code>zk.xml</code> is better to be packed with a JAR file. It can be done by placing zk.xml in the <code>metainfo/zk</code> directory identifiable by classpath (i.e., in a JAR file).
  
Notice that <code>zk.xml</code> found in the classpath is parsed first. It means <code>WEB-INF/zk.xml</code> has higher priority (since it overrides <code>metainfo/zk/zk.xml</code> if conflicts).
+
=== Additonal Configuration File ===
 +
[since 5.0.7]
 +
 
 +
In additions, you could specify an additional configuration file in a library or system property called <tt>org.zkoss.zk.config.path</tt>. It is useful if some of the configuration can not be part of the WAR file (such as depending on the deployment environment). For more information, please refer to [[ZK Configuration Reference/zk.xml/The Library Properties/org.zkoss.zk.config.path|this section]].
 +
 
 +
Notice that <code>zk.xml</code> found in the classpath is parsed first, then <code>WEB-INF/zk.xml</code>, and finally the additional configuration file. It means the additional configuration file, if any, has the highest priority, and <code>WEB-INF/zk.xml</code> (since the later will overrides the previous one if conflicts).
  
 
{{ZKConfigurationReferenceHeadingToc}}
 
{{ZKConfigurationReferenceHeadingToc}}

Revision as of 14:49, 22 April 2011



WEB-INF/zk.xml is the configuration descriptor of ZK. This file optional. If you need to configure ZK differently from the default, you could provide a file called zk.xml under the WEB-INF directory.

The root element must be <zk>. Then, you could specify any combination of the following element under the root element.

File Location

You can place zk.xml in either a WAR file or a JAR file.

WEB-INF/zk.xml

zk.xml is usually packed with a Web application and it shall be located under WEB-INF.

metainfo/zk/zk.xml

[since 3.6.0]

For library providers, zk.xml is better to be packed with a JAR file. It can be done by placing zk.xml in the metainfo/zk directory identifiable by classpath (i.e., in a JAR file).

Additonal Configuration File

[since 5.0.7]

In additions, you could specify an additional configuration file in a library or system property called org.zkoss.zk.config.path. It is useful if some of the configuration can not be part of the WAR file (such as depending on the deployment environment). For more information, please refer to this section.

Notice that zk.xml found in the classpath is parsed first, then WEB-INF/zk.xml, and finally the additional configuration file. It means the additional configuration file, if any, has the highest priority, and WEB-INF/zk.xml (since the later will overrides the previous one if conflicts).


Subsections:




Last Update : 2011/04/22

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.