java - Session timeout does't work vaadin -


I am developing a vaadin web application and I have added the following snippet of code in my web.xml. & lt; Session-Config & gt; & Lt; Session timeout & gt; 30 & lt; / Session timeout & gt; & Lt; / Session-config & gt;

Now I have noticed after 30 minutes that my users are capable of using appllication and I do not want this. I read something about this problem on the book Wadin but I do not believe in anything.

From the Wadin book:

The session expires after user deactivation

In the normal servlet operation, the session time defines the allowed time of inactivity After which the server should clear the session. Inactivity is measured by the last server request. Different servicelists use different default for container timeouts, such as 30 minutes for Apache Tomcat. You can set the timeout with:

In a web.xml:

  & lt; Session-config & gt; & Lt; Session timeout & gt; 30 & lt; / Session timeout & gt; & Lt; / Session-config & gt;   

The session time should be longer than the heartbeat interval or else the heartbeat can keep them alive before the session is closed. After the termination of the session, the UI is left in a state where they believe that the session is still present, due to this there will be an out-of-sync error notification in the browser.

However, due to the end of the session, some heartbeat intervals, which is normal, prevents the session from expiring. If the closeIdleSessions parameter is enabled for the servlet (disabled by default), Wadiaan has stopped after the ending of the last non-heartbeat request specified in the UI sessions and session session-timeout parameters.

Web.xml:

  & lt; Servlet & gt; ... & lt; Init-param & gt; & Lt; Ultimate Name & gt; CloseIdleSessions & lt; / Lastname & gt; & Lt; Ultimate Price & gt; True & lt; / Super-valued & gt; & Lt; / Init-param & gt; Now I think the problem is that my application server  leaves the UI in those states where they believe that the session still exists  but I am not able to understand what is the heartbeat? What else is  closeSessionId  OK?   

The heartbeat indicates that the client side is still present, for example, when the user closes the browser , The client side can no longer send heart beats, the server detects it and clears the UI on the server side. By default this keeps the session alive forever. Thus, if this is not expected behavior, then you can access it on the Web. To set up in Xml:

  & lt; Init-param & gt; & Lt; Details & gt; Enable session timeout & lt; / Description & gt; & Lt; Ultimate Name & gt; CloseIdleSessions & lt; / Lastname & gt; & Lt; Ultimate Price & gt; True & lt; / Super-valued & gt; & Lt; / Init-param & gt;    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -