License"

From Documentation
Line 1: Line 1:
 
{{ZKSpreadsheetEssentials3PageHeader}}
 
{{ZKSpreadsheetEssentials3PageHeader}}
  
 +
You can choose one of the following ways to put a license file:
  
 
= Default License Loading Path =
 
= Default License Loading Path =
Line 15: Line 16:
 
</source>
 
</source>
  
= Specify Loading Path with a Library Property=  
+
= Specify an Absolute Path with a Library Property=  
  
 
Some application servers like Weblogic could fail to locate the license file in the default path. You shall put the following library property in <tt> zk.xml</tt> to specify the license directory and copy your ZSS license file there.
 
Some application servers like Weblogic could fail to locate the license file in the default path. You shall put the following library property in <tt> zk.xml</tt> to specify the license directory and copy your ZSS license file there.
Line 22: Line 23:
 
<library-property>
 
<library-property>
 
     <name>org.zkoss.zssex.rt.Runtime.directory</name>
 
     <name>org.zkoss.zssex.rt.Runtime.directory</name>
     <value>c:/my-directory/my-licenses</value>
+
     <value>c:/my-directory/my-licenses/</value>
 
</library-property>
 
</library-property>
 
</source>
 
</source>
Line 37: Line 38:
  
 
<source lang="text">
 
<source lang="text">
export CATALINA_OPTS="$CATALINA_OPTS -Dorg.zkoss.zssex.rt.Runtime.directory=/yourLicenseFilePath/onThisServer"
+
export CATALINA_OPTS="$CATALINA_OPTS -Dorg.zkoss.zssex.rt.Runtime.directory=/absolutePathToYourLicenseFilePath/"
 
</source>
 
</source>
 
   
 
   

Revision as of 01:56, 8 March 2019


You can choose one of the following ways to put a license file:

Default License Loading Path

ZSS loads a license file from the default path:

WEB-INF/classes/metainfo/zss/license/

If the license is loaded successfully, you should see some license information printed on your application console like:

*** Potix Corporation License Information ***
(your license information)

Specify an Absolute Path with a Library Property

Some application servers like Weblogic could fail to locate the license file in the default path. You shall put the following library property in zk.xml to specify the license directory and copy your ZSS license file there.

<library-property>
    <name>org.zkoss.zssex.rt.Runtime.directory</name>
    <value>c:/my-directory/my-licenses/</value>
</library-property>


Specify the Path in a System Property

Because Library.getProperty() will look for a system property if no corresponding property defined in zk.xml, you can also pass the license file path to ZSS via a system property.

For example in a Tomcat, you can add a setenv.sh (or setenv.bat) that contains

export CATALINA_OPTS="$CATALINA_OPTS -Dorg.zkoss.zssex.rt.Runtime.directory=/absolutePathToYourLicenseFilePath/"

Tomcat catalina.sh will invoke this script if exists.

Refer to your application server's documentation to set a system property. In conclusion, you can pass the path in any way that can be retrieved by Java's System.getProperty(), e.g. a system variable in Windows.



All source code listed in this book is at Github.


Last Update : 2019/03/08

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