Ask a Question related to Macromedia ColdFusion, Design and Development.
-
MMForums #1
Keeping a session alive
If I create a session on page 1, like this:
<cfif IsDefined ("Form.txtFirstName")>
<cfset Session.first_name=#FORM.txtFirstName#>
<cflocation url="testsession2.cfm">
</cfif>
And on page 2 I have this:
<cfoutput>#Session.first_name#</cfoutput>
It outputs the session variable as expected.
If I create a page 3 with this code:
<cfoutput>#Session.first_name#</cfoutput>
Shouldn't it still output the session variable? I'm getting an error saying
"Element fist_name is undefined in SESSION"
MMForums Guest
-
Live streams keeping alive
Hello, I'm using HTTP Administration API to poll for a list of live streams and their status (getLiveStreams, getLiveStreamStats). I'm doing it... -
Keeping server-side object alive
I'm trying to wrap a protocol behind a web service, the problem is that part of this protocol involves a thread that waits for asynchronous events... -
SoapHttpClientProtocol and Keep-Alive
My client application uses an instance of System.Web.Services.Protocols.SoapHttpClientProtocol. I would like to use the HTTP 1.1 Keep Alive header... -
[PHP-DEV] before beta2 (is alive again) :-)
----- Original Message ----- MB>From: "Marcus Börger" <marcus.boerger@t-online.de> MB>To: "Cristiano Duarte" <cunha17@uol.com.br> MB>Sent:... -
Help with session keep alive code using .asp as img src
I've got a standard form on an ASP page to collect resumes from visitors. The page can be accessed only after the visitor has logged into the site.... -
Laksma #2
Re: Keeping a session alive
You need to create Application.cfm (CFAPPLICATION) and determine the session
variable life time. Like this:
<cfapplication name="YourApplicationName" clientmanagement="Yes"
sessionmanagement="Yes" setclientcookies="Yes"
sessiontimeout="#CreateTimeSpan(0,0,1,0)#"
applicationtimeout="#CreateTimeSpan(0,0,1,0)#">
In this example, the session timedout after one hour.
Laksma
Laksma Guest
-
Bill Horvath .:CMX:. #3
Re: Keeping a session alive
I have an application.cfm file already:
<cfapplication
name = "PSIntranetAPP"
setClientCookies = "No"
ClientManagement = "Yes"
sessionManagement = "Yes"
sessionTimeout = "#CreateTimeSpan(0,0,20,0)#"So, should the code I outlined work the way I think it should?>
--
Bill Horvath
Free Tutorials for Studio MX
[url]http://www.communitymx.com/free.cfm[/url]
Free 10 Day Trial
[url]http://www.communitymx.com/joincmx.cfm[/url]
"Laksma" <webforumsuser@macromedia.com> wrote in message
news:d958dv$9op$1@forums.macromedia.com...session> You need to create Application.cfm (CFAPPLICATION) and determine the> variable life time. Like this:
>
> <cfapplication name="YourApplicationName" clientmanagement="Yes"
> sessionmanagement="Yes" setclientcookies="Yes"
> sessiontimeout="#CreateTimeSpan(0,0,1,0)#"
> applicationtimeout="#CreateTimeSpan(0,0,1,0)#">
>
> In this example, the session timedout after one hour.
>
>
> Laksma
>
Bill Horvath .:CMX:. Guest
-
JMGibson3 #4
Re: Keeping a session alive
So, should the code I outlined work the way I think it should?
Yes it should. Any page that runs the application.cfm (anything in the
folder) should have all variables until the Session times out (or if its the
first time in). On first-time in (after CFAPPLICATION) you should default all
Session variables that you'll be using. A pain but it will avoid errors, when
people leave a page up and the session times out.
Did you notice the spelling error, Fist vs. First? "Element fist_name is
undefined in SESSION"
JMGibson3 Guest



Reply With Quote

