Cloud
Cloud

Reputation: 468

Wicket unexpected session id

I'm working on a webapplication using Wicket, which is running on a Jetty server.

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?

Upvotes: 3

Views: 726

Answers (2)

Rob Audenaerde
Rob Audenaerde

Reputation: 20099

You could write a subclass of WebSession and override the invalidate() method to print out the StackTrace before invalidation.

That will help to determine if the invalidation of the Session happens because of something in Wicket or something outside of Wicket

Upvotes: 1

Joakim Erdfelt
Joakim Erdfelt

Reputation: 49545

On the Jetty side, you can setup a servlet javax.servlet.http.HttpSessionListener to log the various create/destroy events.

Create your own class for this, and add it to your WEB-INF/web.xml

<web-app>
    <listener>
        <listener-class>MySessionListener</listener-class> 
    </listener>

Upvotes: 3

Related Questions