tag:blogger.com,1999:blog-85747452467261357942024-03-08T06:17:57.307-08:00Session Management in ColdfusionRaghuram Reddyhttp://www.blogger.com/profile/05022027577008290171noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-8574745246726135794.post-56228021179594350482008-12-12T06:22:00.000-08:002008-12-12T07:08:47.811-08:00Raghuram Reddy Gottimukkula Feel the fusionSession Management Sample Application<br /><br />---------------------------ramSession.cfm------------------------------------------------------------<br /><span style=";font-family:Arial,Helvetica,sans-serif;font-size:85%;" ><br /><!---Sample Session Management Application ---><br /><!--- session timeout 10 sec ---><br /><cfapplication name = "#cgi.server_name#"<br />sessionmanagement = "yes"<br />sessiontimeout = "#CreateTimeSpan(0,0,10,0)#"<br />setclientcookies = "yes"<br />setdomaincookies = "yes"><br /><br /><cfset appsessiontimeout=APPLICATION.GetApplicationSettings().sessiontimeout><br /><cfdump var="#APPLICATION.GetApplicationSettings()#"><br /><cfset appsessiontimeout= appsessiontimeout/60><br /><cfoutput>Minutes : #appsessiontimeout#</cfoutput><br /><html><br /><head><br /><script type="text/javascript"><br /> var appsessiontimeout=<cfoutput>#appsessiontimeout#</cfoutput>;<br /> fnenableTimer();<br /> function displayAlert()<br />{<br /> alert("Your Application time Expired")<br /> }<br /> function fnenableTimer()<br />{<br /> var manualtimeout_mili=appsessiontimeout * 1000;<br /> global_warning =setTimeout("displayAlert()",manualtimeout_mili);<br />}<br /></script><br /></head><br /><body><br /><form><br />Write the logic here based on the session timeout(redirecting to Login etc..)<br /></form><br /></body><br /></html><br /></span>----------------------------------------<br /><span style="font-size:85%;"><br />Mail me to raghuramgreddy@gmail.com for suggestions,queries.<br />Have a great day,<br /><br />Thanks,<br />Raghuram Reddy.Gottimukkula<br />Adobe certified Coldfusion Developer<br />Bangalore<br />Special Thanks to Bharathi Raja<br /></span>Raghuram Reddyhttp://www.blogger.com/profile/05022027577008290171noreply@blogger.com0