The application will run under the MOST RECENTLY declared CFAPPLICATION tag.
If you use a second CFAPPLICATION tag in the same call the server will run
under that one.  There are easier ways to clear the session scope, however.

1. Use the structClear() function
        - if you do this be sure to store session.sessionID in a local
variable and reassign it after the call
        - i.e. 
                [use cflock here]
                temp = session.sessionID;
                foo = structClear(session);
                session.sessionID = temp;
                [end lock]

2. You can identify the session variables you wish to delete
        - [lock]
          foo = structDelete(session,"key");
          [end lock]

Actually, I've found that it is easier to create and maintain applications
if you can rely on certain variables ALWAYS being around and just test their
contents.  In other words, instead of deleting the variable, just set it to
blank or to zero and check for that in the if statement.  That way you can
param them to blank or whatever in application.cfm and not bite your nails
off trying to figure out why it exists when it shouldn't (or vice versa).
                                                    
Bryan Love ACP
Internet Application Developer
[EMAIL PROTECTED]
                                                    


-----Original Message-----
From: Parker, Kevin [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 3:14 PM
To: CF-Talk
Subject: Session variables


I am working on a quiz application. I have created an application.cfm file
which contains this:

<cfapplication name="SmartMoveTest"
           clientmanagement="Yes"
               sessionmanagement="Yes"
               setclientcookies="No"
               sessiontimeout="#CreateTimeSpan(0,0,30,0)#"
               clientstorage="Registry">


If I place the code below inside any given page in the quiz and say modify
the session timeout values does the code inside the page take precedence
over the code in application.cfm or not, or does it do something else, or
does it do nothing. I am thinking of varying the session timeout in one page
to effectively get rid of all session variables by changing the session
timeout to 1 second viz:

<cfapplication name="SmartMoveTest"
           clientmanagement="Yes"
               sessionmanagement="Yes"
               setclientcookies="No"
               sessiontimeout="#CreateTimeSpan(0,0,0,1)#"
               clientstorage="Registry">



TIA!!!!


****

Kevin Parker
Web Services Manager
WorkCover Corporation

[EMAIL PROTECTED]

www.workcover.com

p: +61 8 82332548
f: +61 8 82332000
m: 0418 800 287





****************************************************************************
This e-mail is intended for the use of the addressee only. It may contain
information that is protected by legislated confidentiality and/or is
legally privileged. If you are not the intended recipient you are prohibited
from disseminating, distributing or copying this e-mail. Any opinion
expressed in this e-mail may not necessarily be that of the WorkCover
Corporation of South Australia. Although precautions have been taken, the
sender cannot warrant that this e-mail or any files transmitted with it are
free of viruses or any other defect.
If you have received this e-mail in error, please notify the sender
immediately by return e-mail and destroy the original e-mail and any copies.
****************************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to