Hi,

I have created a page and setStatelessHint(true) and made sure all the child components are stateless but an http session is still being created. The method isPageStateless() returns true.


Here is the trace where the SEssion is created:

com.citikey.site.SessionListener.sessionCreated(SessionListener.java:29)
at org.mortbay.jetty.servlet.AbstractSessionManager.addSession (AbstractSessionManager.java:569) at org.mortbay.jetty.servlet.AbstractSessionManager.newHttpSession (AbstractSessionManager.java:414)
        at org.mortbay.jetty.Request.getSession(Request.java:1005)
at org.apache.wicket.protocol.http.AbstractHttpSessionStore.getSessionId (AbstractHttpSessionStore.java:188)
        at org.apache.wicket.Session.bind(Session.java:415)
        at org.apache.wicket.Component.beforeRender(Component.java:855)


This code in Component.beforeRenderlooks suspicious:

// If any of the components on page is not stateless, we need to bind the session // before we start rendering components, as then jsessionid won't be appended
        // for links rendered before first stateful component
        if (isStateless() && getSession().isTemporary())
        {
                getSession().bind();
        }

Cheers,

John

Reply via email to