License"

From Documentation
m (correct highlight (via JWB))
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{ZKSpreadsheetEssentials3PageHeader}}
 
{{ZKSpreadsheetEssentials3PageHeader}}
  
You can choose one of the following ways to put a license file:
+
 
 +
__TOC__
 +
 
 +
Only ZSS EE official version requires a license file. You need to choose '''one''' of the following 3 ways to put a license file:
  
 
= Default License Loading Path =
 
= Default License Loading Path =
 
ZSS loads a license file from the default path:  
 
ZSS loads a license file from the default path:  
  
'''<tt>WEB-INF/classes/metainfo/zss/license/</tt>'''
+
'''<code>WEB-INF/classes/metainfo/zss/license/</code>'''
  
 +
Create the path above if it does not exist, and put the license key into the path.
 +
This is the simplest way if you just have one zss-based web application.
  
 
= Specify an Absolute 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. Then you can specify the absolute path of the license with the following library property in <code> zk.xml</code> and copy your ZSS license file there.
  
 
<source lang='xml'>
 
<source lang='xml'>
 
<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:/systemAbsolutePath/my-licenses/</value>
 
</library-property>
 
</library-property>
 
</source>
 
</source>
  
 +
It's also a way that multiple ZSS-bases applications can load the same license file.
 
<!--
 
<!--
 
http://tracker.zkoss.org/browse/ZSS-38
 
http://tracker.zkoss.org/browse/ZSS-38
 
-->
 
-->
 
  
 
= Specify the Path in a System Property =  
 
= Specify the Path in a System Property =  
Because [https://www.zkoss.org/javadoc/latest/zk/org/zkoss/lang/Library.html#getProperty(java.lang.String) <tt>Library.getProperty()</tt>] will look for a system property if no corresponding property defined in <tt>zk.xml</tt>, you can also pass the license file path to ZSS via a system property.
+
Because [https://www.zkoss.org/javadoc/latest/zk/org/zkoss/lang/Library.html#getProperty(java.lang.String) <code>Library.getProperty()</code>] will look for a system property if no corresponding property defined in <code>zk.xml</code>, you can also pass the license file path to ZSS via a system property.
 
   
 
   
For example in a Tomcat, you can add a <tt>setenv.sh</tt> (or <tt>setenv.bat</tt>) that contains
+
For example in a Tomcat, you can add a <code>setenv.sh</code> (or <code>setenv.bat</code>) that contains
  
 
<source lang="text">
 
<source lang="text">
Line 34: Line 39:
 
</source>
 
</source>
 
   
 
   
Tomcat <tt>catalina.sh</tt> will invoke this script if exists.
+
Tomcat <code>catalina.sh</code> 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 <tt>System.getProperty()</tt>, e.g. a system variable in Windows.
+
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 <code>System.getProperty()</code>, e.g. a system variable in Windows.
  
  
  
 
= License Information =
 
= License Information =
If the license is loaded successfully, you should see some license information printed on your application console like:
+
If the license is loaded successfully, you should see license information like below printed in your application server's console when the server starts like:
  
 
<source lang='text'>
 
<source lang='text'>

Latest revision as of 12:47, 19 January 2022



Only ZSS EE official version requires a license file. You need to choose one of the following 3 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/

Create the path above if it does not exist, and put the license key into the path. This is the simplest way if you just have one zss-based web application.

Specify an Absolute Path with a Library Property

Some application servers like Weblogic could fail to locate the license file in the default path. Then you can specify the absolute path of the license with the following library property in zk.xml and copy your ZSS license file there.

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

It's also a way that multiple ZSS-bases applications can load the same license file.

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.


License Information

If the license is loaded successfully, you should see license information like below printed in your application server's console when the server starts like:

*** Potix Corporation License Information ***

     Licensed Company: my company
     Certificate Number: 123456       
     Licensed Product: ZK Spreadsheet EE
     ...

     To renew, obtain more licenses, or if you require help, please contact [email protected].



All source code listed in this book is at Github.


Last Update : 2022/01/19

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