0

login page

asked 2016-12-12 15:41:11 +0800

ivzel gravatar image ivzel
1

I'm using ZK with Spring including Spring Security. And my zk.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<zk>
    <session-config>
        <timer-keep-alive>false</timer-keep-alive>
        <automatic-timeout>true</automatic-timeout>
        <device-type>ajax</device-type>
        <timeout-uri>/idle_timeout</timeout-uri>
    </session-config>
</zk>

But I found that ZK redirects to timeout-uri even from login page (/login). So how I can to configure ZK to not check session timeout on login-page?

delete flag offensive retag edit

Comments

to @cor3000: I already tried ?page directive, but it still times out. On page I use these zul objects: window, zscript, groupbox, form, button, grid, textbox. I don't know what means 'native'.

ivzel ( 2016-12-13 09:19:52 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-12-13 02:02:43 +0800

cor3000 gravatar image cor3000
4366 2 7
ZK Team

updated 2016-12-13 04:19:43 +0800

you can disable automatic timeout for specific pages using the ?page directive with automaticTimeout="false"

https://www.zkoss.org/wiki/ZKDeveloper'sReference/UIPatterns/SessionTimeoutManagement#Page-levelAutomatic_Timeout

But be aware if your login page depends on ZK components (native will work) for the login it will run into timeouts just like any other page.

link publish delete flag offensive edit
0

answered 2016-12-13 10:04:14 +0800

cor3000 gravatar image cor3000
4366 2 7
ZK Team

(forget about the native elements I mentioned, if you don't know them yet you're likely not using them)

To be clear: EVERY zk page's life time is limited by the timeout configured at server side. The question is how you deal with it. You can:

  1. let it timeout in the background, and it will error/redirect at the next user interaction
  2. configure automatic timeout and it will follow the redirect automatically
  3. use a keep alive timer to avoid time out limit

using the page-directive will only switch between option 1 and option 2. If you want to keep the page alive (option 3) you can use a <timer> component with the keep-alive configuration option.

See https://www.zkoss.org/wiki/ZKConfigurationReference/zk.xml/Thesession-configElement/Thetimer-keep-aliveElement

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

Follow
1 follower

RSS

Stats

Asked: 2016-12-12 15:41:11 +0800

Seen: 45 times

Last updated: Dec 13 '16

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