wicket will create session instances for every request if there is no
session stored in httpsession. the session is stored into httpsession
only when the user encounters a stateful page.

i am guessing that since you changed the form to stateless the page
itself is no longer stateful and so wicket will not save it into
session, thus it creates an interim session for the duration of the
request.

if you want to manually bind the session then call bind() on it.

-igor

On Fri, Jun 20, 2008 at 8:43 AM, Jürgen Lind <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I tried using a stateless form for the Login page, but it seems that a new
> session is created before the page is even called. I inserted a stacktrack
> output in the constructor of my Wicket-Session (which happens to be s
> subclass
> of AuthenticatedWebSession)  and that trace shows me that
> AuthenticatedWebApplication.newSession is called by wicket somewhere in the
> application lifecycle.
>
> I can reproduce the behavior by adding a "logout" link that invalidates the
> current  session and redirects to the Homepage (implying a redirect to the
> Login
> page). Again, a new session is created immediately by wicket. Any clues?
>
> J.
>
> Igor Vaynberg wrote:
>>
>> use a stateless form
>>
>> -igor
>>
>> On Fri, Jun 20, 2008 at 1:21 AM, Jürgen Lind <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Hi,
>>>
>>> I am facing a little annoyance in conjunction with session creation that
>>> I
>>> have
>>> been unable to fix until now:
>>>
>>> 1. My pages are guarded using MetaDataRoleAuthorizationStrategy
>>> 2. When the homepage is opened, the user is redirected to the Login page
>>> 3. Now, if the user does not fill out the form immediately but waits very
>>> long,
>>>  a "Page Expired" error is thrown when the form is submitted
>>>
>>> As I said, this is not a big problem but rather an annoyance that I would
>>> like
>>> to have fixed. Can anybody tell me what the problem is? I assume that a
>>> session
>>> is created immediately when the user opens the home page. How can I avoid
>>> this
>>> behavior?
>>>
>>> Kind Regards,
>>>
>>> Jürgen
>>>
>>> --
>>> Dr. Jürgen Lind
>>> iteratec GmbH                Fon: +49 (0)89 614551-44
>>> Inselkammerstrasse 4         Fax: +49 (0)89 614551-10
>>> 82008 Unterhaching           Web: www.iteratec.de
>>>
>>> Sitz und Registergericht der iteratec GmbH: München HRB 113 519
>>> Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
> --
> Mit freundlichen Grüßen,
>
> Jürgen Lind
>
> --
> Dr. Jürgen Lind
> iteratec GmbH                Fon: +49 (0)89 614551-44
> Inselkammerstrasse 4         Fax: +49 (0)89 614551-10
> 82008 Unterhaching           Web: www.iteratec.de
>
> Sitz und Registergericht der iteratec GmbH: München HRB 113 519
> Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to