• 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
WO Context() null in Session Constructor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WO Context() null in Session Constructor


  • Subject: WO Context() null in Session Constructor
  • From: Joe Moreno <email@hidden>
  • Date: Mon, 25 Oct 2010 10:55:41 -0700

Hi all,

I'm probably not remembering my WO request/response loop correctly.

When a WO Session is created I'd like to find out the host name of the request so I tried to log that info in the Session's constructor (see code snippet below). Unfortunately, the context() is null at this point.

Where's the best place to figure out the remote host that created a session if not in the session's constructor?

Thanks,
Joe


    public Session()
    {
        super();
NSLog.debug.appendln("========== Session Created ==========");
this.setStoresIDsInCookies(true);
this.setStoresIDsInURLs(false);

        this.setDefaultEditingContext( ERXEC.newEditingContext() );

String remoteHostName = this.context().request().headerForKey("remote_host");
NSLog.debug.appendln("Remote host name = " + remoteHostName);
    }



 _______________________________________________
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: WO Context() null in Session Constructor
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: new to D2W
  • Next by Date: OpenJDK, Java and Mac
  • Previous by thread: Re: new to D2W
  • Next by thread: Re: WO Context() null in Session Constructor
  • Index(es):
    • Date
    • Thread