org.zkoss.web.util.resource.dir"

From Documentation
(Created page with ' {{ZKConfigurationReferencePageHeader}} Default: <i>none</i> [Since 5.0.0] It specifies a directory, where ZK will load the so-called Class-Web Resources (CWR), in addition t…')
 
Line 1: Line 1:
 
  {{ZKConfigurationReferencePageHeader}}
 
  {{ZKConfigurationReferencePageHeader}}
 +
 +
'''Property:'''
 +
  org.zkoss.web.util.resource.dir
  
 
  Default: <i>none</i>
 
  Default: <i>none</i>

Revision as of 03:04, 6 December 2010


org.zkoss.web.util.resource.dir


Property:

 org.zkoss.web.util.resource.dir
Default: none
[Since 5.0.0]

It specifies a directory, where ZK will load the so-called Class-Web Resources (CWR), in addition to the class path. CWR includes JavaScript files, CSS files, and other resources that are specified in the form of ~./xxx.

By default, ZK only searches the class path for the required CWR. By specifying a directory here, ZK will search the directory first and then the class path. It implies a developer can override the default behavior by providing a file with the same name.

Notice: don't put security sensitive files in the directory specified here, since they can be accessed externally.

For example, assume we have a JavaScript package called foo.great and we want to put it to WEB-INF/cwr. Then, we have to specify the following in WEB-INF/zk.xml:

	<library-property>
		<name>org.zkoss.web.util.resource.dir</name>
		<value>/WEB-INF/cwr</value>
	</library-property>

Then, you can place zk.wpd and required JavaScript files under the WEB-INF/cwr/js/foo/great directory.



Last Update : 2010/12/06

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