Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic