Solved

onSessionEnd and cflocation

Posted on 2006-11-21
5
955 Views
Last Modified: 2013-12-24
is there a way for the onSessionEnd function of the Application.cfc file redirect the user to a different url when the session ends...i tried just using the <cflocation url="login.cfm"> tag but that ddidnt seem to work
thanks
0
Comment
Question by:jduawa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
pigmentarts earned 125 total points
ID: 17990512
from what i understand (still learning cf) the application.cfc is only served when a request is made for a page. this is why the onSessionEnd cflocation bit does not work straight away when the sessions ends or times out because I had this issue awhile back.

i.e. you're on a page for a while, you then logout, and its not until you try and do something else ilike  access another page that the app.cfc runs and the redirect works because the session has ended.

If that’s what you’re implying and not sure.
0
 
LVL 1

Author Comment

by:jduawa
ID: 17990528
i was doing more googling and since onSessionEnd occurs asynchronously it cannot do a cflocation call
0
 
LVL 12

Expert Comment

by:pigmentarts
ID: 17990734
thats what i was saying above.  onSessionEnd occurs but its not until the next request to the server the broswer would know about it, at at points it too late.

why not use javascript to inform the users when the session is going to time out?
0
 
LVL 1

Author Comment

by:jduawa
ID: 17990749
that too is a possibility, it just would have bene more convenient to use the onsessionend.  I will award the pts for the effort
0
 
LVL 12

Expert Comment

by:pigmentarts
ID: 17990796
if i have not answered you're question then dont, i am sure someone can jump in and help.

i used a counter in javascript in the app file, every time the app.cfc is run (every page request) the counter is reset to 0, if the counter get to a set limited it informs the user the session is about to timeout and gives them a change to do something.

becuase app.cfc is done server side i dont think it will work how you want it.
0

Featured Post

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question