Is there a way to include a servlet by using "org.zkoss.zul.Inlude" with set-cookie?

asked 2022-07-01 08:20:54 +0800

myntpay gravatar image myntpay


In my project, there are 2 ZUL files: "zul1.zul" and "zul2.zul". On zul1.zul, there is a button called button1. When click on button1, it will get the content of zul2.zul by ZK Include class(org.zkoss.zul.Include) and output to zul1.zul.

Everything works fine until I tried to set a cookie in zul2.zul. It it seems that ZK Include Class wouldn't ignore the Set-Cookie Header.

My question is in this situation, how can we set the cookie from zul2.zul?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2022-07-01 18:56:13 +0800

MDuchemin gravatar image MDuchemin
2146 1 5
ZK Team

Hey there!

Just to clarify the use case:

  • Which include mode are you using? (include in instant mode and defer mode will have different way to interact with the client, and the client's properties). If you are not sure, or if you are using auto mode, the rule is: "if the src="" of your include contains url parameters (?param=value&param2=value2...), then you are in defer mode. if it doesn't, then you are in instant mode.

  • How are you setting the cookies? Are you accessing the HttpServletResponse and using response.addCookie()? or are you using another option?

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: 2022-07-01 08:20:54 +0800

Seen: 5 times

Last updated: Jul 01

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