Run zkoss site inside an iframe from another domain

asked 2021-02-20 01:40:06 +0800

agsiegel gravatar image agsiegel
6 1

updated 2021-02-20 01:45:53 +0800

I would like to embed a zkoss website inside an iframe on another domain. For example

on site1.com there is a page ...

<iframe src="https://www.site2.com/index.zul"></iframe>

The zk app keeps resetting. Not sure if this is a cross domain scripting or session id cookie problem. Accessing the zk app directly on site2 works fine.

The application on site2 is running under Jetty behind an nginx proxy.

Appreciate any suggestions.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-02-22 10:46:40 +0800

cor3000 gravatar image cor3000
5868 2 7
ZK Team

updated 2021-03-01 09:50:30 +0800

ZK is unaware of running inside an iframe, so there's nothing to do/configure inside ZK.

The zk app keeps resetting.

This error description is not very precise. So I can't help this that. I assume you don't know where to look yet to obtain more details.

So my initial suggestion is to open the browser's developer tools (e.g. in Chrome [F12]) and check for console errors (e.g. about cross origin problems and/or cookie warnings/errors) -> those errors will often even contain links to documentation about how to address them.

To get even more details you should also look into the network tab of the developer tools. There you'll see whether requests succeed or fail, as well as which cookies are sent and received.

Looking into the browser's developer tools is generally the first thing to do and compare what you expect against what's actually happening. Then you'll have more information to post in a forum question and sometimes even the solution provided by the tools. (Other browsers have similar tools)

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2021-02-20 01:40:06 +0800

Seen: 6 times

Last updated: Mar 01

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More