Hi,

WicketSessionFilter#doFilter() code looks like:

@Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
 throws IOException, ServletException
{
try
 {
WebApplication application = bindApplication();
bindSession(request, application);
 chain.doFilter(request, response);
}
finally
 {
cleanupBoundApplicationAndSession();
}
}

bindApplication() and bindSession() methods set the Application and Session
as thread locals and they are available for the "chain".
You need to attach the Wicket sources and see what happens in
#bindSession() method. The code is:

private void bindSession(ServletRequest request, WebApplication application)
{
// find wicket session and bind it to thread

HttpSession httpSession = ((HttpServletRequest)request).getSession(false);
Session session = getSession(httpSession, application);
 if (session == null)
{
if (logger.isDebugEnabled())
 {
logger.debug("could not set Wicket session: key " + sessionKey +
" not found in http session for " +
 ((HttpServletRequest)request).getContextPath() + "," +
request.getServerName() +
", or http session does not exist");
 }
}
else
{
 ThreadContext.setSession(session);
}
}




Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Wed, Jul 9, 2014 at 7:49 AM, rsi610 <[email protected]> wrote:

> WicketSessionFilter gets called..Also it has a session with it.
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4666503/WicketSession.jpg
> >
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Not-able-to-get-Wicket-Session-even-though-WicketSessionFilter-has-been-added-tp4666469p4666503.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to