Re: Correct "Logout" Action
Re: Correct "Logout" Action
- Subject: Re: Correct "Logout" Action
- From: Giorgio Valoti <email@hidden>
- Date: Tue, 29 Jul 2003 13:31:08 +0200
On Martedl, lug 29, 2003, at 12:44 Europe/Rome, Goodbye Bill wrote:
What is the correct (aka "preferred") method of providing a "Logout"
function to the end user? Does one simply call a "dispose" on the
editing
context? Maybe the session's "terminate" method?
I usually do something like this in the Session class.
public WOComponent logout() {
//<http://developer.apple.com/documentation/WebObjects/Reference/API/
com/webobjects/appserver/WOSession.html#terminate()>
terminate();
//<http://developer.apple.com/documentation/WebObjects/Reference/API/
com/webobjects/appserver/WORedirect.html>
WOComponent redirectPage = WOApplication.application().pageWithName(
"WORedirect", context() );
//
<http://developer.apple.com/documentation/WebObjects/Reference/API/com/
webobjects/directtoweb/
D2W.html#homeHrefInContext(com.webobjects.appserver.WOContext)>
( (WORedirect)redirectPage ).setUrl( D2W.factory().homeHrefInContext(
context() ) );
return redirectPage;
}
--
Giorgio Valoti
-------------
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.