Skip to main content
August 28, 2008
Question

Session Variables not staying set between pages

  • August 28, 2008
  • 3 replies
  • 788 views
I am working on a web site and pages on my local development environment and my Session Variables not staying set between pages. I recently installed the development environment. Is there anything I may be missing or need to check to make sure session variables stay set?
This topic has been closed for replies.

3 replies

BKBK
Community Expert
Community Expert
September 2, 2008
I found the problem to be that the CF server did not have "Use J2EE session variables" set.
That is a different matter. Coldfusion session management and J2EE session management are the two available options. You might just have chosen to use the J2EE option.


setclientcookies="no"

I think that setting tells Coldfusion not to set Coldfusion session cookies on the browser. Change it to "yes".

Inspiring
August 28, 2008
Greg Nenninger wrote:
> I am working on a web site and pages on my local development environment and my
> Session Variables not staying set between pages. I recently installed the
> development environment. Is there anything I may be missing or need to check
> to make sure session variables stay set?
>

Do you have cookies disabled in your browser. It's an often overlooked
fact that if a browser does not accept cookies session state can not be
maintained without taken extra steps to pass the required keys in the
URLs of all requests of an application.

August 28, 2008
Thanks for the help. I found the problem to be that the CF server did not have "Use J2EE session variables
" set.
Inspiring
August 28, 2008
Check your application.cfc/cfm file to see if you have enabled session variables.
August 28, 2008
I have set session variables enables in my application.cfm. The line that I have is:

<cfapplication name="pr" clientmanagement="no" sessionmanagement="yes" setclientcookies="no" setdomaincookies="no" sessiontimeout=#CreateTimeSpan("0","2","0","0")#>
August 28, 2008
Even though the cfapplication is in my application.cfm, the session variables are not staying bwtween pages.