1
votes

I turned on the session management in my application and find that session variables (user defined as well as cfid and cftoken) do no persist between pages when I do not turn on 'Use J2EE session variables' in CF Admin. Once I turn on this setting, the session variables persist. Below is the code in application.cfm

<cfapplication name="myapp"
    applicationtimeout="#createtimespan(1, 0, 0, 0)#"
    sessionmanagement="yes"
    sessiontimeout="#createtimespan(1, 0, 0, 0)#"
    clientmanagement="no">

Both 'Use J2EE session variables' as well as 'Enable Session variables' are turned on in CF admin.

Everything works fine on my personal laptop when I whip up a sample application (I don't have J2EE session variables turned on here).

Can someone clarify why this discrepancy. Why session variables are persisting between pages only when I turn on J2EE session?

1
I would recommend not having a space in your application name. I doubt that's causing the error, but just something I'd update. - Matt Busche
@MattBusche: it is the same even after removing the space in the name - fn79
Are you seeing the same behavior in different browsers? The cfid and cftoken are just cookies that get passed. Not sure why you would be having issues. Perhaps a restart of the ColdFusion server is necessary after changing that setting (I'm not sure). For what it's worth you should be using Java EE sessions anyway. stackoverflow.com/questions/12397599/… - Miguel-F
Thanks Miguel. I am using J2EE session variables now. - fn79

1 Answers

1
votes

check out your Global session timeout settings in the CFIDE admin page.

this will always override every settings in all the Applications.