0

zk without cookies

asked 2009-06-27 10:16:13 +0800

mrSmall gravatar image mrSmall
30

Hi,

it seems that ZK can't work without cookies at all... If cookies are disabled: the ZUL-Page is shown, but no ajax request works... On each event apears the error message "the resource you requested is no longer available" with resource id and two buttons: close and redraw.

Is there a work around for this problem?

Best regards,
A.Klein

delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2009-06-29 04:24:11 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

as you might know that zk keeps user's state in session. but http protocol itself is stateless, so we have to keep session info in cookie.
that's why zk requires you to enable cookie.

/robbie

link publish delete flag offensive edit

answered 2009-06-29 08:33:38 +0800

mrSmall gravatar image mrSmall
30

Hi, thanks for your answer:

Why dont't use the native session? Containers like Tomcat recognize if cookies are enabled or not and set jsessionid if needed. Session cookie contains no other data then session id, right?

Best regards,
A.Klein.

link publish delete flag offensive edit

answered 2009-07-06 04:03:43 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

hi Anton,

it's my fault, zk can run under environment without cookie properly unless you store any information in cookie. by default, zk won't save any information on cookie.

/robbie

link publish delete flag offensive edit

answered 2009-07-08 14:49:50 +0800

mrSmall gravatar image mrSmall
30

Yes, it runs without cookies. It shows the page correctly, but no AJAX functions are available. At least my ZK Portlet shows "...component no longer available... CLOSE/REDRAW" window on every event if cookies are disabled in browser.

Best regards,
A.Klein

link publish delete flag offensive edit

answered 2009-07-09 11:15:50 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

which portal container do you use? not sure if it's an issue caused by container. is it possible that we can visit your application?

/robbie

link publish delete flag offensive edit

answered 2009-07-12 13:16:01 +0800

mrSmall gravatar image mrSmall
30

updated 2009-07-12 13:16:16 +0800

I'm using Liferay and it works great with ZK, as long as cookies are turned on =)... You can visit it at twiton.com, but there no ZK portlet on public pages. You can visit this site http://www.safetytour.de/index.php?page=preise. It's a customer site and there is a portlet in Iframe shared from twiton.com on this page.

Best regards,
A.Klein.

link publish delete flag offensive edit

answered 2009-07-22 00:59:02 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

looks like you need to disable cookie manually.
please take a look at this thread.

/robbie

link publish delete flag offensive edit

answered 2009-07-31 19:43:53 +0800

mrSmall gravatar image mrSmall
30

Hi,

it was the very first thing I've tried. I've disabled cookies in Tomcat context, in Liferay config and in browser. In all posible combination (brutforce config change =). Results were allways equal: if browser cookies are disabled then ZK Portlet said "component no longer available".

Liferay and tomcat can handle the session over jsessionid in URI, but it seems like ZK can't work in a portlet without to set own cookies.

I've tried the component explorer demo with cookies disabled in browser - it works. So I think ZK in portlet is a problem...
At least a Liferay portlet made with ZK.

Best regards,
A.Klein.

link publish delete flag offensive edit
Your reply
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

Follow

RSS

Stats

Asked: 2009-06-27 10:16:13 +0800

Seen: 642 times

Last updated: Jul 31 '09

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