Sessions in Wicket
So, if you find that newSession(Request request, Response response) is being called in your WebApplication class for each and every request (not somethng you want happening if you're trying to keep state in the session between requests!) what you have to do is use the bind() method for the current session.
Using bind() can be done within the constructor of your custom Session class itself, or if you want more control over when Sessions persist, you can call bind selectively (i.e. only in the constructor of pages which use the Session to store/retrieve information intended to live between sessions).
e.g.
public class MyPage extends WebPage {
//...
public MyPage(String id) {
getSession().bind();
//setup wicket components
}
//...
}


