Paul,

I don't understand why that wouldn't work for application.cfm as well?
I seem to think that the exact same type of thing could be wrapped
around the cfapplication tag, then use the snippet you give to kill
the J2EE session and redirect to cgi.script_name, or to a simple error
page that says "Your session has expired, please log in again," or...
whatever.

If the CF session has expired, there should be no harm in killing the
Jrun session via the same method, then reinstating a CF session.
Admittedly, I've been paying minimal (but some) attention to this
thread, but I haven't seen anyone post code snippets that would do
that. It seems that this would actually be a viable workaround instead
of something as likely to break as the original problem.

As far as application.cfc though, why not use the CF onSessionEnd to
kill the Jrun session instead of the onError? It would make sense to
me that CF could quite easily trap the end of the session and reset
the Jrun session to die instantly... then when the next session is
instituted, it should start clean...

Or... and this is most likely... am I missing something here??

J

On Sat, 12 Mar 2005 14:27:40 -0800, Paul Kenney <[EMAIL PROTECTED]> wrote:
> 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
 


-- 
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://cfobjective.neo.servequake.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:198564
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to