org.zkoss.zk.config.path"

From Documentation
m
m
Line 12: Line 12:
  
 
* A servlet path, such as <code>/WEB-INF/config/zk-extra.xml</code>
 
* A servlet path, such as <code>/WEB-INF/config/zk-extra.xml</code>
* A file path, such as <code>file:/home/http/zk.xml</code> and <code>file:/C:/test/zk.xml</code>, if Windows. Notice it must start with <code>file:/</code>
+
* A file path, such as <code>file:///home/http/zk.xml</code> and <code>file:///C:/test/zk.xml</code>, if Windows. Notice it must start with <code>file://</code><ref>For more information about the URI of a file, please refer to [http://en.wikipedia.org/wiki/File_URI_scheme File URI scheme].</ref>.
 
* A URL, such as <code><nowiki>http://foo.com/config/zk.xml</nowiki></code>. Notice it must starts with <code>http://</code>, <code>https://</code>, and <code>ftp://</code>.
 
* A URL, such as <code><nowiki>http://foo.com/config/zk.xml</nowiki></code>. Notice it must starts with <code>http://</code>, <code>https://</code>, and <code>ftp://</code>.
  
 
For example, assume you put the configuration in a file called <tt>/configs/zk-production.xml</tt>, then you could specify <tt>-Dorg.zkoss.zk.config.path=file:/configs/zk-production.xml</tt> as one of the arguments when starting the Web server.
 
For example, assume you put the configuration in a file called <tt>/configs/zk-production.xml</tt>, then you could specify <tt>-Dorg.zkoss.zk.config.path=file:/configs/zk-production.xml</tt> as one of the arguments when starting the Web server.
 +
 +
{{references}}
  
 
=Version History=
 
=Version History=

Revision as of 04:59, 10 May 2011


org.zkoss.zk.config.path


Property:

org.zkoss.zk.config.path
Default: none
[since 5.0.7]

It specifies the second configuration file in addition to WEB-INF/zk.xml. It is useful if you have two or more environments, such as testing and production. Then, you could put the different configuration into separated files and load the required based on the requirement.

The value could be one of the following:

  • A servlet path, such as /WEB-INF/config/zk-extra.xml
  • A file path, such as file:///home/http/zk.xml and file:///C:/test/zk.xml, if Windows. Notice it must start with file://[1].
  • A URL, such as http://foo.com/config/zk.xml. Notice it must starts with http://, https://, and ftp://.

For example, assume you put the configuration in a file called /configs/zk-production.xml, then you could specify -Dorg.zkoss.zk.config.path=file:/configs/zk-production.xml as one of the arguments when starting the Web server.

Template:References

Version History

Last Update : 2011/05/10


Version Date Content
5.0.7 April, 2011 Introduced



Last Update : 2011/05/10

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


  1. For more information about the URI of a file, please refer to File URI scheme.