• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Correct "Logout" Action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Correct "Logout" Action
      • From: Chuck Hill <email@hidden>
References: 
 >Correct "Logout" Action (From: Goodbye Bill <email@hidden>)

  • Prev by Date: Correct "Logout" Action
  • Next by Date: Re: Correct "Logout" Action
  • Previous by thread: Correct "Logout" Action
  • Next by thread: Re: Correct "Logout" Action
  • Index(es):
    • Date
    • Thread