Also,  the example application "stateless" is doing the same.

When I go to this page

http://localhost:8080/wicket-examples/stateless/public/Index/

after restarting my browser I get this

a session exists for this client, with session id z4zov2z9j024
go to another stateless page
go to a stateful page (triggers session creation if not already done so)

Something is going on here.



On 10 Oct 2007, at 18:24, John Patterson wrote:

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