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?
cfidandcftokenare 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