I'm not prepared to answer Henry's question, but quickly to answer Charles' question, request scope is way cool (been around a long while).
Look in the CF docs, its in there. Basically, it is a scope that transcends all templates, custom tags, etc. and lives and dies with a request. It doesnt require locking. One common thing that you can do now with the request scope is if you're setting a Application variables in the Application.cfm, you can simply set them to request. The variable lives for every template called in the request and there is no need to lock them. (Unlike Application scope, it doesnt live for the life of the application, therefore you dont put an IsDefined around it -- like you would in this example). I put most of my variables, including query to request so that there are no issues with custom tags etc. Of course, it means that if you "reuse" a variable name in two separate parts of an application, then the second will overwrite the first. I've never had that as a problem. Jeremy -----Original Message----- From: Charles F. McLean III [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 5:23 PM To: [EMAIL PROTECTED] Subject: Re: Session variable Henry, it may be an obvious question, but do you have a CFAPPLICATION tag that sets up your initial session management? Also, what is a "request" scoped variable ... <CFSET request.uid = session.uid>? I've never seen a variable prefaced with "request" before. Thanks, Charles F. McLean III Principal Member of the Technical Staff Northrop Grumman Information Technologies ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 24, 2002 5:34 PM Subject: Session variable > I setup session variable on one page: > > (<CFLOCK TIMEOUT="5" THROWONTIMEOUT="Yes" TYPE="EXCLUSIVE" SCOPE="SESSION"> > <CFSET session.uid = GetUser.uid> > <CFSET request.uid = session.uid> > </CFLOCK>) > > However, when I open another page it does not exist. How to make sure that > session var. does exist? > > <CFIF (NOT IsDefined("session.uid"))> > <CFIF IsDefined("form.action") AND (form.action IS "login")> > <CFINCLUDE TEMPLATE="actions/login.cfm"> > </CFIF> > > Henry Dilsky > > > ------------------------------------------------------------------------- > This email server is running an evaluation copy of the MailShield anti- > spam software. Please contact your email administrator if you have any > questions about this message. MailShield product info: www.mailshield.com > > ----------------------------------------------- > To post, send email to [EMAIL PROTECTED] > To subscribe / unsubscribe: http://www.dfwcfug.org > ------------------------------------------------------------------------- This email server is running an evaluation copy of the MailShield anti- spam software. Please contact your email administrator if you have any questions about this message. MailShield product info: www.mailshield.com ----------------------------------------------- To post, send email to [EMAIL PROTECTED] To subscribe / unsubscribe: http://www.dfwcfug.org ------------------------------------------------------------------------- This email server is running an evaluation copy of the MailShield anti- spam software. Please contact your email administrator if you have any questions about this message. MailShield product info: www.mailshield.com ----------------------------------------------- To post, send email to [EMAIL PROTECTED] To subscribe / unsubscribe: http://www.dfwcfug.org
