This week's book giveaway is in the Design and Architecture forum.
We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!
See this thread for details.
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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
 
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic