Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Cookie maxAge problem

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a simple Seam applikacion created in Eclipse.I'm trying to track down user's session using cookies.You can see in pages.xml what methods from manage bean are invoked on each page.After I enter username on the login page,appropriate cookie is created and the login_success page is displayed.There is also a check box which determines max age of the username cookie(if checked cookie's max age is set to a large value).I've noticed,during debugging,if the check box is checked,at first,username cookie is set properly but on the login_success page when GetLogged() method is invoked,cookie max age is -1(will be deleted at the end of the session) instead of a much larger value.
Another curious thing occurs,when the check box is not checked,the cookie is still in the browser even its max age before the browser's closing was -1 and it shouldn't be there after reopenning of the browser.

Login.xhtml:


LoginBeanAction.java


pages.xml:


GetCurrentUlr() updates cookie containg last visited page.

Any suggestions?Thanks
 
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic