[英]Wicket unexpected session id
I'm working on a webapplication using Wicket, which is running on a Jetty server. 我正在使用Wicket进行Web应用程序,该应用程序在Jetty服务器上运行。
In specific cases, a user of the application spontaneously loses his session and cannot login again until he closes his browser. 在特定情况下,应用程序的用户会自动失去会话,并且在关闭浏览器之前无法再次登录。 (I've excluded session time-out and deliberate logout) (我已经排除了会话超时并故意退出)
What is the best way to log session invalidation and trace the cause of this problem? 记录会话失效并跟踪此问题原因的最佳方法是什么?
On the Jetty side, you can setup a servlet javax.servlet.http.HttpSessionListener
to log the various create/destroy events. 在Jetty端,您可以设置servlet javax.servlet.http.HttpSessionListener
来记录各种create / destroy事件。
Create your own class for this, and add it to your WEB-INF/web.xml
为此创建自己的类,并将其添加到WEB-INF/web.xml
<web-app>
<listener>
<listener-class>MySessionListener</listener-class>
</listener>
You could write a subclass of WebSession
and override the invalidate()
method to print out the StackTrace before invalidation. 您可以编写WebSession
的子类并覆盖invalidate()
方法以在失效之前打印出StackTrace。
That will help to determine if the invalidation of the Session happens because of something in Wicket
or something outside of Wicket
这将有助于确定会话的失效是否由于Wicket
的某些内容或Wicket
之外的内容而发生
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.