OK, I found the cause, I set cookie-config in secure mode within web.xml, as I 
test my application in localhost which without ssl enabled.
As I commented it , cookies works fine.

But, it raise a new question that I deploy application on physical machine with 
apache http in front of wildfly with ssl enable. How do i adjust this parameter 
to accommodate  both situation?

> On 1 Mar 2018, at 21:13, Martin Grigorov <mgrigo...@apache.org> wrote:
> 
> Are both pages using the same protocol ?
> If you bind the session while at HTTP page the session won't be there if
> you navigate to HTTPS page.
> 
> Check in your browser dev tools whether JSESSIONID cookie is stored with
> the response after the call to .bind().
> 
> Martin Grigorov
> Wicket Training and Consulting
> Looking for a remote position with Wicket ? Contact me!
> https://twitter.com/mtgrigorov <https://twitter.com/mtgrigorov>
> 
> 
> On Thu, Mar 1, 2018 at 1:17 PM, <shengchehs...@gmail.com 
> <mailto:shengchehs...@gmail.com>> wrote:
> 
>> I called Session.bind() in callback page (from google login) , when
>> redirect to another page session data disappeared. Below is the log trace:
>> 
>> 
>> 2018-03-01 12:13:05,516 INFO  [southernlight.callbackpage.GoogleReturnPage]
>> (default task-26) Update User
>> 2018-03-01 12:13:05,517 INFO  [southernlight.callbackpage.GoogleReturnPage]
>> (default task-26) Persist Users : UsersImpl { uid = 1, subject =
>> 113544839275895272134, truename = ShengChe Hsiao, nickname = ShengChe
>> Hsiao, email = front...@gmail.com, created = 2018-01-14 03:25:27.0, allow
>> = 1, schoolid = google, titles = null, classinfo = null }
>> 2018-03-01 12:13:05,518 INFO  [southernlight.callbackpage.GoogleReturnPage]
>> (default task-26) Temp Session : true
>> 2018-03-01 12:13:05,519 INFO  [southernlight.info.WicketSession] (default
>> task-26) Set User in Session : UsersImpl { uid = 1, subject =
>> 113544839275895272134, truename = ShengChe Hsiao, nickname = ShengChe
>> Hsiao, email = front...@gmail.com, created = 2018-01-14 03:25:27.0, allow
>> = 1, schoolid = google, titles = null, classinfo = null }
>> 2018-03-01 12:13:05,519 INFO  [southernlight.info.WicketSession] (default
>> task-26) Storeed User : UsersImpl { uid = 1, subject =
>> 113544839275895272134, truename = ShengChe Hsiao, nickname = ShengChe
>> Hsiao, email = front...@gmail.com, created = 2018-01-14 03:25:27.0, allow
>> = 1, schoolid = google, titles = null, classinfo = null }
>> 2018-03-01 12:13:05,520 INFO  [southernlight.callbackpage.GoogleReturnPage]
>> (default task-26) Login
>> 2018-03-01 12:13:05,520 INFO  [southernlight.info.WicketSession] (default
>> task-26) User is login : UsersImpl { uid = 1, subject =
>> 113544839275895272134, truename = ShengChe Hsiao, nickname = ShengChe
>> Hsiao, email = front...@gmail.com, created = 2018-01-14 03:25:27.0, allow
>> = 1, schoolid = google, titles = null, classinfo = null }
>> 2018-03-01 12:13:05,520 INFO  [southernlight.info.WicketSession] (default
>> task-26) Subject is : 113544839275895272134
>> 2018-03-01 12:13:05,526 INFO  [southernlight.info.WicketSession] (default
>> task-26) Logined
>> 2018-03-01 12:13:05,527 INFO  [southernlight.callbackpage.GoogleReturnPage]
>> (default task-26) Users : UsersImpl { uid = 1, subject =
>> 113544839275895272134, truename = ShengChe Hsiao, nickname = ShengChe
>> Hsiao, email = front...@gmail.com, created = 2018-01-14 03:25:27.0, allow
>> = 1, schoolid = google, titles = null, classinfo = null }
>> 2018-03-01 12:13:05,527 INFO  [southernlight.callbackpage.GoogleReturnPage]
>> (default task-26) Is Sign In : true
>> 2018-03-01 12:13:05,528 INFO  [southernlight.callbackpage.GoogleReturnPage]
>> (default task-26) Subject : 113544839275895272134
>> 2018-03-01 12:13:05,528 INFO  [southernlight.callbackpage.GoogleReturnPage]
>> (default task-26) Temp Session : false
>> 2018-03-01 12:13:05,588 INFO  [southernlight.info.BasePage] (default
>> task-30) Users : null
>> 2018-03-01 12:13:05,588 INFO  [southernlight.info.BasePage] (default
>> task-30) Is Sign In : false
>> 2018-03-01 12:13:05,588 INFO  [southernlight.info.BasePage] (default
>> task-30) Subject : null
>> 2018-03-01 12:13:05,588 INFO  [southernlight.info.BasePage] (default
>> task-30) Temp Session : true
>> 2018-03-01 12:13:05,591 INFO  [southernlight.admin.users.UserListPage]
>> (default task-30) User : null
>> 2018-03-01 12:13:05,592 INFO  [southernlight.admin.users.UserListPage]
>> (default task-30)
>> 2018-03-01 12:13:05,594 INFO  [stdout] (default task-30)
>> 2018-03-01T12:13:05.594Z DEBUG [default task-30] (#STREAM) - SELECT
>> `uid`,`subject`,`truename`,`nickname`,`email`,`created`,`
>> allow`,`schoolid`,`titles`,`classinfo` FROM `videoconferencing`.`Users`,
>> values:[]
>> 2018-03-01 12:13:05,610 INFO  [southernlight.info.HeaderPanel] (default
>> task-30) Panel Sign In User: null
>> 
>> 
>> 
>> 
>>> On 1 Mar 2018, at 19:23, Martin Grigorov <mgrigo...@apache.org> wrote:
>>> 
>>> On Thu, Mar 1, 2018 at 11:59 AM, <shengchehs...@gmail.com 
>>> <mailto:shengchehs...@gmail.com> <mailto:
>> shengchehs...@gmail.com <mailto:shengchehs...@gmail.com>>> wrote:
>>> 
>>>> I called Session#isTemporary() and the value is true, how do I fix it?
>>>> 
>>> 
>>> Call Session.bind() :-)
>>> 
>>> 
>>>> 
>>>>> On 1 Mar 2018, at 18:01, Bas Gooren <b...@iswd.nl <mailto:b...@iswd.nl>> 
>>>>> wrote:
>>>>> 
>>>>> Hi!
>>>>> 
>>>>> It sounds like your session is not getting bound. Have you tried
>>>>> explicitly calling bind()?
>>>>> 
>>>>> Ps it’s good practice to call replaceSession() on login to prevent
>>>>> session fixation, so have a look at that, too.
>>>>> 
>>>>> // Bas
>>>>> 
>>>>> Verstuurd vanaf mijn iPhone
>>>>> 
>>>>>> Op 1 mrt. 2018 om 10:44 heeft "shengchehs...@gmail.com 
>>>>>> <mailto:shengchehs...@gmail.com>" <
>>>> shengchehs...@gmail.com <mailto:shengchehs...@gmail.com>> het volgende 
>>>> geschreven:
>>>>>> 
>>>>>> Dear all
>>>>>> 
>>>>>> I built a application with parent BasePage, and child page extends it
>>>> except LoginPage.
>>>>>> When I try to login, I saw the user data persist in session, but when
>>>> redirect to another page (extends BasePage) , the session data
>> disappeared
>>>>>> , how do i concur this?
>>>>>> 
>>>>>> Thanks
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
>>>>>> <mailto:users-unsubscr...@wicket.apache.org>
>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org 
>>>>>> <mailto:users-h...@wicket.apache.org>
>>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
>>>>> <mailto:users-unsubscr...@wicket.apache.org>
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org 
>>>>> <mailto:users-h...@wicket.apache.org>
>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
>>>> <mailto:users-unsubscr...@wicket.apache.org> <mailto:
>> users-unsubscr...@wicket.apache.org 
>> <mailto:users-unsubscr...@wicket.apache.org>>
>>>> For additional commands, e-mail: users-h...@wicket.apache.org 
>>>> <mailto:users-h...@wicket.apache.org> <mailto:
>> users-h...@wicket.apache.org <mailto:users-h...@wicket.apache.org>>

Reply via email to