

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.
