1

Do xpages have a session of time? I do some research on "session timeout" about the xpages. But i not sure, is my xpages auto "refresh" after idle for few minute is related with it?

Experience:

  1. I use google chrome to run on my xpages page.

  2. My xpages page have around 20 field.

  3. I look for information around few minute, after that try to fill it in, but when i click on the field, all the field that i filled in before it become "empty" and look like the page is auto refresh.

Question here

  1. Do anyone face this auto refresh problem before?

  2. Do this related with session timeout/Expired?

  3. If anyone face this problem before, how you guy solve the problem?

Desmond Sim
  • 211
  • 2
  • 19

1 Answers1

3

Use keepSessionAlive to avoid session timeout. It causes the client to communicate with the server regularly so the server keeps the session open as long as the XPage is not closed.

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
    <xe:keepSessionAlive id="keepSessionAlive1" delay="0"></xe:keepSessionAlive>
...
</xp:view>

delay="0" means the current session timeout value (specified on the XPages tab for Application Properties) minus 30 seconds.

Knut Herrmann
  • 30,880
  • 4
  • 31
  • 67
  • Thanks for the solution / suggestion, but may i know, do i need to do that on every xpage? for example, index.xsp and etc page. Do xpages have some way using database setting to control all web page create using xpages? – Desmond Sim Feb 20 '17 at 03:49
  • Yes, it has to be on every XPage. Usually you have a CustomControl with keepSessionAlive and other general layout elements that is part of every XPage. This way you have this code on just one place. – Knut Herrmann Feb 20 '17 at 06:14