Embedded ZK Application
From Documentation
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:
[ 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
Version | Date | Content |
---|---|---|
9.0.0 |