Sounds like a great idea in any case, thanks, will do.
FlorianSchaetz ( 2016-12-14 18:11:58 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
perhaps someone got an idea: How can I force ZK to remove the current session and load a page (on the same server/domain) with a new one? I store a lot of data in the session and keeping it there when loading the new page would effectively pollute that new page, so I'm looking for a way to "redirectAndForgetSession"...
Calling invalidate() on the session and then sendRedirect in a click-listener doesn't work.
Little detail: I use session identification via url (single-page-application, iframe, cross-domain... long story) and so the resulting url I get for the redirect looks like /index.zul;jsessionid=... - when removing that jsessionid manually from the link, it works, but I cannot stop ZK from adding it automatically. Preventing that could solve my problem as well.
Regards,
Flo
Ok, found one solution myself: When using an absolute link ( http://...) instead of a relative one ( /... ), ZK doesn't seem to attach the jsessionid to it, which pretty much solves my problem since without the jsessionid nothing bad happens.
Hey Flo,
Maybe some easier solution is there.
Put in your session a Map<String,Object>
as object.
Then store all the "pollution" data in there.
Calling new page => just put a new Map into the session or clear the map and your done.
Saves also all the code of invalidating and recreating a new Session.
Greetz chill.
Sounds like a great idea in any case, thanks, will do.
FlorianSchaetz ( 2016-12-14 18:11:58 +0800 )editAsked: 2016-12-14 14:29:33 +0800
Seen: 40 times
Last updated: Dec 14 '16
sendRedirect hide URL [closed]
Timeout on timeOut on....... [closed]
redirection without "server processing page"
Executions.SendRedirect in the @Init [closed]
How to access attribute of servlet context in zk application ?
How to open new tab in SelectorComposer?
execution.sendRedirect not working in IE9 & IE8