Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Losing jsession variables

New Here ,
Apr 15, 2006 Apr 15, 2006
I had my cfapp all written using cf session variables. Now it doesnt work. The host told me to use j2ee sessions. OK. So I have the jsession.user and other variables set within application.cfm. This works wondefully on the index page. When I goto another page, it drops the jsession variables. What is going on? This is really starting to irritate me.
TOPICS
Getting started
310
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2006 Apr 17, 2006
LATEST
So I have the jsession.user and other variables set within application.cfm.
Jsession is not a standard Coldfusion structure; session is, even when you're using J2EE sessions. So, use session.user instead.

Also, to maintain state, replace reqURL by #URLSessionFormat(reqURL)# or reqURL?#session.URLToken#, where reqURL is any URL from your site to your site. For example, use

<cfoutput><form action="#URLSessionFormat(myActionPage.cfm)#"></cfoutput>

or

<cfoutput><form action="myActionPage.cfm?#session.URLToken#"></cfoutput>

instead of

<form action="myActionPage.cfm">






Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources