Embedded ZK Application

From Documentation
Revision as of 09:08, 20 November 2019 by Jameschu (talk | contribs) (Created page with "{{ZKDevelopersReferencePageHeader}} =Employment/Purpose= Instead of using iframe, there is a new way to use ZK in a non-ZK web container. For example, we could use NodeJs, Pytho...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Embedded ZK Application


Employment/Purpose

Instead of using iframe, there is a new way to use ZK in a non-ZK web container. For example, we could use NodeJs, Python, etc. as the web application, and embed another ZK application in the web pages.

  • Available for ZK:
  • http://www.zkoss.org/product/zkhttp://www.zkoss.org/whyzk/zkeeVersion ee.png
[ since 9.0.0 ]

Prerequisite

Setting in ZK application

For security reason, we need to set the origin server white list, which means only the predefined web application could access our ZK application. We use library property to set the allowed origin (In zk.xml).

For example:

<library-property>
	<name>org.zkoss.web.servlet.http.embedded.AllowOrigin</name>
	<value>http://localhost:9000</value>
</library-property>

Another setting is that we should define the target URL. Then all the HTTP request in ZK would be redirected to correct URL.

For example:

<library-property>
	<name>org.zkoss.web.servlet.http.embedded.TargetURL</name>
	<value>http://localhost:8080/zktest</value>
</library-property>

CORS in ZK application

<syntax lang="java" high="13">

</syntax>

Version History

Last Update : 2019/11/20


Version Date Content
9.0.0



Last Update : 2019/11/20

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