


Try to get within the Wicket world whenever possible. Avoid the usage of other servlet filters. For this you can use the _RequestCycle_ and override the methods _onBeginRequest()_ and _onEndRequest()_. You can apply the same to the _HttpSession_. The equivalent in Wicket is the _WebSession_. Just extend the _WebSession_ and override the _newSession()_-method from the Application class. There are very few reasons to access the servlet interfaces. An example could be to read an external cookie to authenticate a user. Those parts should be properly encapsulated and avoided when possible. For this example, you could do the handling within the Wicket session because this is an authentication.

