• 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: context().hasSession() returns false... then true?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: context().hasSession() returns false... then true?


  • Subject: Re: context().hasSession() returns false... then true?
  • From: Don Lindsay <email@hidden>
  • Date: Thu, 26 Jun 2008 20:07:15 -0400

Hello;

Are there any errors in your catalina.out or localhost_ÚTETIME%.log files? Is this an application that requires a user to login?

Don

Sorry this was supposed to apply to this message not Wonder/Tomcat Documentation.

Don
On Jun 26, 2008, at 7:21 PM, Rams wrote:

Hi Everyone...

I have an app deployed on Tomcat 6.0.16 and it appears that context().hasSession() is failing to produce reliable results. In my Main WO I have:

public Boolean authenticated() {
return (context().hasSession() && session().valueForKey(User.ENTITY_NAME.toLowerCase()) != null);
}


and in my Main WO, that resolves to false, and then true. I'm not calling session() anywhere. I'm logging session creation in my Application.createSessionForRequest method and the session *should* exist before the first call. It's also failing in my logout direct action

public WOActionResults logoutAction() {
if(context().hasSession()) {
NSLog.out.appendln("Terminating session: " + session().sessionID());
session().terminate();
} else {
NSLog.out.appendln("logoutAction(): context().hasSession() == FALSE");
}


WORedirect mainPage = (WORedirect) pageWithName(WORedirect.class.getName());
mainPage.setUrl(
context().directActionURLForActionNamed(
"default", new NSDictionary<Object,Object>(Boolean.FALSE, "wosid")));


	    return mainPage;
	}

All of this works fine in WOLips. It's failing on Tomcat. I'm using WO 5.3.3 and Wonder. Is this a known bug with a known workaround? Am I doing something dumb? Any help/advice/insight would be appreciated.

Thanks all!


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


This email sent to email@hidden

_______________________________________________ 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:
    • Re: context().hasSession() returns false... then true?
      • From: Rams <email@hidden>
References: 
 >context().hasSession() returns false... then true? (From: Rams <email@hidden>)

  • Prev by Date: Re: Wonder/Tomcat Deployment
  • Next by Date: Re: context().hasSession() returns false... then true?
  • Previous by thread: context().hasSession() returns false... then true?
  • Next by thread: Re: context().hasSession() returns false... then true?
  • Index(es):
    • Date
    • Thread