• 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: WOA, Building a Login form
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOA, Building a Login form


  • Subject: Re: WOA, Building a Login form
  • From: Ondra Cada <email@hidden>
  • Date: Mon, 4 Apr 2005 00:20:11 +0200

Drew,

On 3.4.2005, at 23:58, Drew Thoeni wrote:

I have an object in the session called currentUser. I set this to the user fetched from the database (see snipit below). On logout, I nullify that object. Again, there may be a better way.

There is... in a sense. Since the more complicated the application, the more probable the session may contain some user's important data, it's better to kill the session instead.


Myself, I tend to use something like this (with the very same disclaimer: there may be much better way still :))

	public WOComponent logout() {
		session().terminate();
		WORedirect wor=new WORedirect(context());
		wor.setUrl(context().directActionURLForActionNamed("default",null));
		return wor;
	}


And, I have an outstanding question to myself whether this is just making a reference, or really copying the data.

Uh-oh? *All* Java objects are references, if that's what we are speaking of. To copy one, you have to do that manually (like by using the clone method).
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Create&initialize a session programmatically?
      • From: Ondra Cada <email@hidden>
    • Re: WOA, Building a Login form
      • From: Drew Thoeni <email@hidden>
References: 
 >WOA, Building a Login form (From: Amedeo Mantica <email@hidden>)
 >Re: WOA, Building a Login form (From: Drew Thoeni <email@hidden>)
 >Re: WOA, Building a Login form (From: Amedeo Mantica <email@hidden>)
 >Re: WOA, Building a Login form (From: Drew Thoeni <email@hidden>)

  • Prev by Date: Re: Timestamps awry with daylight savings time
  • Next by Date: Re: WOA, Building a Login form
  • Previous by thread: Re: WOA, Building a Login form
  • Next by thread: Re: WOA, Building a Login form
  • Index(es):
    • Date
    • Thread