If you don't want the value to exist throughout the entire session, why put in the session? Perhaps you should make it request scope so that it will be evaluated once per request, if needed?
Thanks for your response. Sorry I haven't been able to get back to you sooner.
"Putting it in the request scope" equals using request parameters throughout the page, right? Is there an easy way to do this, ie does s:link for example have an option to forward existing page parameters automatically, or do I have to add param-tags to all the links?
Also, for links that should be clickable both when this variable is set, and when it's not .. how do I solve this?
I tried putting it all in a conversation instead, but then the problem of the variable not being updated remained.