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

Handling sessions in JForum

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all

In my application, if someone first logs in a cookie is created which then in turn is read by JForum by its SSO mechanism. But if a user visits the JForum part of my application without logging in first, their session will become anonymous. If they then decide to log in and visit the forum again then are still an anonymous user since JForum doesn't re-read their session.

How would one go about to check for cookies everytime a user visits the JForum main page?

Thanks!
[originally posted on jforum.net by bubblare]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, at a first glance an easy,fast and very dirty way for checking cookie value and do something (ie update session value) is by putting some code in the boolean isSessionValid(UserSession userSession, HttpServletRequest request) method of the SSO implementation in use.

Actually can't think of a cleaner way to do this considering my lean knowledge of the session handling.
[originally posted on jforum.net by Jules]
 
Something about .... going for a swim. 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