PDA

View Full Version : J2EE Session variables supported?



Brian
February 1st, 2010, 11:38 AM
We are bringing a new ColdFusion server online this week that will have J2EE Session variables enabled.

Thanks to all of you who have made the suggestion to support J2EE Session variables. We have listened and will have the server ready for production use tomorrow, running ColdFusion 9 Enterprise.

Brian
February 27th, 2010, 05:02 PM
If your Sessions aren't working, if you are on one of our J2EE Session enabled servers, instead of using SESSION.cfid or SESSION.cftoken or SESSION.JSESSIONID, just use SESSION.SESSIONID instead.

Using SESSION.SESSIONID with J2EE is more secure also.

JamesRLamar
March 25th, 2010, 12:30 PM
I know you said SESSION.SESSIONID will replace cftoken as well, but what about the instance where we are checking and setting both cfid and cftoken. Example below:


<!--- Define the local scope. --->
<cfset var LOCAL = {} />
<!---
Store the CF id and token. We are about to clear the
session scope for intialization and want to make sure
we don't lose our auto-generated tokens.
--->
<cfset LOCAL.CFID = SESSION.CFID />
<cfset LOCAL.CFTOKEN = SESSION.CFTOKEN />
<!--- Clear the session. --->
<cfset StructClear( SESSION ) />
<!---
Replace the id and token so that the ColdFusion
application knows who we are.
--->
<cfset SESSION.CFID = LOCAL.CFID />
<cfset SESSION.CFTOKEN = LOCAL.CFTOKEN />

Brian
March 25th, 2010, 12:34 PM
James,

Good question. Per Adobe's site:


If you use J2EE session management, the Session scope does not include the Session.CFID or Session.CFToken variables, but does include the Session.URLToken and Session.SessionID variables. In this case, the Session.SessionID is the J2EE session ID and Session.URLToken consists of the string jsessionid= followed by the J2EE session ID.

Hope that helps.

JamesRLamar
March 25th, 2010, 12:39 PM
James,

Good question. Per Adobe's site:



Hope that helps.

BTW, you guys have some outstanding response time! Kudos!

xyzsupport
November 24th, 2010, 07:30 PM
Can anyone help me with this;
http://farmstyle-com-au.securec16.ezhostingserver.com/

Not sure why this is happening or what it means. I changed all references to "session.cfid##session.cftoken" to"session.SESSIONID##session.SESSIONID#"

Cameron L
November 24th, 2010, 07:43 PM
The error indicates a problem with your database query, not sessions. I will contact you about his via email so we can get this worked out.

-Cameron L.