Well, for Application.cfc, here is my solution:
<cffunction name="onError" returntype="void" access="public" hint="">
<cfargument name="exception" type="any" required="true" hint=""/>
<cfargument name="eventName" type="string" required="true" hint=""/>
<!--- --->
<cfset var redirectUrl = cgi.scriptName>
<cfset var expirationDateTime = NULL>
<cfif arguments.exception.message IS "Session is invalid" AND
IsDefined("cookie.jsessionid")>
<cfset expirationDateTime = GetHttpTimeString(DateAdd("d", -1,
Now()))>
<cfheader statuscode="302" statustext="Moved Temporarily"/>
<cfheader name="location" value="#redirectUrl#"/>
<cfheader name="Set-Cookie"
value="JSESSIONID=;expires=#expirationDateTime#;path=/"/>
<cfelse>
<cfoutput>
<h3>Sorry, but there seems to have been an error:</h3>
<p>#arguments.exception.message#</p>
</cfoutput>
</cfif>
</cffunction>
I'm using for my own sites at CrystalTech... let me know if this works for you
On Sat, 12 Mar 2005 14:04:18 -0600, James Edmunds
<[EMAIL PROTECTED]> wrote:
> Update.
>
> No, this isn't good, because once you get past the "Session is
> invalid" period (60 minutes), you get sessions that change with each
> page load, and are therefore useless as they do not persist from page
> to page.
>
> All the workarounds I have seen for this problem either (1) have you
> rename the applicaton, on failure, therefore restarting the entire
> application (!!!), or (2) don't let sessions work properly once you
> get into the time when J2EE throws the invalid session error.
>
> Oh, well.
>
> For now I am letting site visitors see the nice narrative error
> message served up from my CFACTCH, and hoping for the best with CT and
> MM somehow getting the issue resolved.
>
> FWIW, here is the text of my error message, whose tone and purpose I
> hope are self-explanatory:
>
> ----
> NEW SOFTWARE UNDER TESTING
>
> Currently, we are testing the new Version 7 of ColdFusion MX on the
> site jamesedmunds.com, prior to deploying it on any of our client
> sites.
>
> This also affects the weblog Poor Clio.
>
> One issue we have encountered is an "Session is invalid" error when a
> page is reloaded on a web browser after a length of idle time, or even
> in browsing away from this site and returning to it. If you are
> reading this message, it is likely because of that condition.
>
> A solution that sometimes works during this test period is to
> completely exit your browser program, then re-open it and browse to
> this site again, at which point it should load normally.
>
> We are in touch with our CFMX host's support team to attempt to
> resolve this issue. Though there are many attractive new features in
> this version of ColdFusion, we quite naturally will not move any
> client sites into this version of CFMX until all such issues are
> resolved.
>
> Meanwhile, thank you for your patience with the fact that we are
> testing the new
> software on this site, which will ultimately bring us the benefit of
> resolving problem issues so that the attractive features of the new
> software are available to our clients.
> ----
>
> Cheers to all,
>
> James Edmunds
>
> On Fri, 11 Mar 2005 21:58:33 -0600, James Edmunds
> <[EMAIL PROTECTED]> wrote:
> > Yes, I seem to be having good luck with this fix,also.
> > -JE
> >
> > On Fri, 11 Mar 2005 11:20:06 -0700, Connie DeCinko <[EMAIL PROTECTED]>
> > wrote:
> > > So far, this seems to be working for me. Have not seen an error... Yet.
> > >
> > > <cftry>
> > > <cfapplication name="theName"
> > > applicationtimeout="#createtimespan(1,0,0,0)#"
> > > clientmanagement="Yes"
> > > sessionmanagement="Yes"
> > > sessiontimeout="#createtimespan(0,0,20,0)#"
> > > setclientcookies="Yes">
> > >
> > > <cfcatch type="Any">
> > > <cfapplication name="theName"
> > > applicationtimeout="#createtimespan(1,0,0,0)#"
> > > clientmanagement="Yes"
> > > sessionmanagement="Yes"
> > > sessiontimeout="#createtimespan(0,0,0,0)#"
> > > setclientcookies="Yes">
> > > </cfcatch>
> > > </cftry>
> > >
> > >
> > > -----Original Message-----
> > > From: Nando [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, March 11, 2005 11:10 AM
> > > To: CF-Talk
> > > Subject: Re: Problems at CrystalTech have gotten ugly!
> > >
> > > I have the Session is Invalid error happen on my development machine
> > > from time to time, and i've seen it on 6.1, so it seems this has
> > > nothing to do with the webhost, or with mx 7.0 in particular. I've
> > > made a few stabs at fixing it, but since it occurs kinda out of the
> > > blue, it's been a little hard for me to figure out what's been going
> > > on.
> > >
> > > Bud, thanks for nailing this issue, at least to the extent that i can
> > > deal with it gracefully.
> > >
> > > :-)
> > >
> > > Nando
> > >
> > >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198558
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54