You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by John Patterson <jd...@gmail.com> on 2007/10/11 02:24:52 UTC

Stateless page creating session

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


Re: Stateless page creating session

Posted by John Patterson <jd...@gmail.com>.
There is now:

https://issues.apache.org/jira/browse/WICKET-1072

On 12 Oct 2007, at 11:28, John Patterson wrote:

> Is there a JIRA issue for the broken stateless support so I know  
> when to update my application?
>
> Cheers,
>
> John.
>
> On 11 Oct 2007, at 00:57, Matej Knopp wrote:
>
>> Yeah, it's a bug introduced by me recently. Will look at it ASAP.
>>
>> -Matej
>>
>> On 10/11/07, John Patterson <jd...@gmail.com> wrote:
>>> 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.getSession 
>>>> Id(
>>>> 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
>>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Stateless page creating session

Posted by John Patterson <jd...@gmail.com>.
Is there a JIRA issue for the broken stateless support so I know when  
to update my application?

Cheers,

John.

On 11 Oct 2007, at 00:57, Matej Knopp wrote:

> Yeah, it's a bug introduced by me recently. Will look at it ASAP.
>
> -Matej
>
> On 10/11/07, John Patterson <jd...@gmail.com> wrote:
>> 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.getSessionI 
>>> d(
>>> 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
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Stateless page creating session

Posted by John Patterson <jd...@gmail.com>.
OK Cool.  I guess I can just comment out session binding until this  
is fixed because for the next couple of weeks all of my pages are  
stateless.

On 11 Oct 2007, at 00:57, Matej Knopp wrote:

> Yeah, it's a bug introduced by me recently. Will look at it ASAP.
>
> -Matej
>
> On 10/11/07, John Patterson <jd...@gmail.com> wrote:
>> 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.getSessionI 
>>> d(
>>> 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
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Stateless page creating session

Posted by Matej Knopp <ma...@gmail.com>.
Yeah, it's a bug introduced by me recently. Will look at it ASAP.

-Matej

On 10/11/07, John Patterson <jd...@gmail.com> wrote:
> 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
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Stateless page creating session

Posted by John Patterson <jd...@gmail.com>.
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
>