Click to Play

Advice from Aaron Wall on SEO...
Aaron Wall, the Author of SEO Book, talked with WebProNews about SEO tracking software. He gives special insights to several free or inexpensive SEO...

Web News

T-Mobile Germany to defend iPhone contract in courts
T-Mobile is set to defend its exclusive rights to iPhone sales within Germany on Thursday, as a German court will hear arguments for and against the deal.

Online Advertisement Market Grows By 68 Percent...
According to a report recently published by BITKOM and Thomson Media Control online advertisement in Germany is growing fast and 800 million Euro could be...

Millions of euros in TV ad spending may be at risk...
Millions of euros in television ad spending may be at risk in Germany, ad executives say, because of confusion over recent changes in the way the leading...

Vodafone launches USB stick wireless data modem
Vodafone Germany has launched a wireless modem for PCs and notebooks in the form of a USB stick. Customers can use the USB stick modem to access...

EU agrees on public funding for GPS rival
EU member states clinched a deal late on Friday to fund an ambitious satellite navigation project to rival the US Global Positioning System using unspent cash from...

11.29.07


When Does A Session Start?

By Raymond Camden

Darren asks:

I want to use on sessionstart to initiate a session variable and then use that value in a function call to to set the default language for a site but I get an error saying the session var isn't there. Does the session start after the first request? Should I use on application start instead?

No and no. onSessionStart will definitely fire before onRequestStart. Turns out - Darren had another problem. He had written his Application.cfc without the session variables in his onSessionStart, he had hit his site, and then he had modified the onSessionStart. Since his session had already started, the method didn't run again.

There are a few ways to get around this. One simple way is to quickly rename your Application. If you had:



Download Now!

This will not be single threaded, but during development, you typically don't care about it. I use this same hook to rerun onApplicationStart as well. In fact, during development I'll typically always run the code by appending OR 1 to the end.

Of course, the Nuclear Option is to restart ColdFusion, but even with ColdFusion 8 being super fast, that's overkill.

Comments


About the Author:
Raymond Camden, ray@camdenfamily.com
http://ray.camdenfamily.com

Raymond Camden is Vice President of Technology for roundpeg, Inc. A long time ColdFusion user, Raymond has worked on numerous ColdFusion books and is the creator of many of the most popular ColdFusion community web sites. He is an Adobe Community Expert, user group manager, and the proud father of three little bundles of joy.

About DevWebProDE
DevWebProDE is for professional developers ... those who build and manage applications and sophisticated websites. DevWebProDE delivers via news and expert advice New Strategies In Development.

DevWebProDE is brought to you by:

SecurityConfig.comNetworkingFiles.com
NetworkNewz.comWebProASP.com
DatabaseProNews.comSQLProNews.com
ITcertificationNews.comSysAdminNews.com
LinuxProNews.comWirelessProNews.com
CProgrammingTrends.comNetworkNewz.com



-- DevWebProDE is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
 © 2007 iEntry Inc.  All Rights Reserved  Privacy Policy Legal    

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


New Strategies In Development DevWebProDE News Archives About Us Feedback DevWebProDE Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact