• 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: Webobjects-dev Digest, Vol 5, Issue 761
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Webobjects-dev Digest, Vol 5, Issue 761


  • Subject: Re: Webobjects-dev Digest, Vol 5, Issue 761
  • From: "Shravan Kumar. M" <email@hidden>
  • Date: Tue, 15 Jul 2008 17:57:24 +0530
  • Organization: effigent India Pvt Ltd.,

Thanks Mike. We are struggling around this issue since long time with some workarounds, but we did not have any good solution yet. Your solution worked out well.
Thank You
Shravan Kumar. M
effigent India Pvt., Ltd.,
----------------------------------------




Subject:
One Less Mystery
From:
Mike Schrag <email@hidden>
Date:
Mon, 14 Jul 2008 19:27:04 -0400
To:
WebObjects Development <email@hidden>
To:
WebObjects Development <email@hidden>

One of our guys got tripped up because his hostname was floating between what we expected it to be and his IP address.  After some digging, I've resolved a mystery (well, it was a mystery to me .. maybe other people knew about it :) ).

If your CGI adaptor URL is http://127.0.0.1/cgi-bin/WebObjects, at runtime, WOApplication converts that to http://<application.hostAddress()>/cgi-bin/WebObjects.
If you CGI adaptor URL is http://localhost/cgi-bin/WebObjects, at runtime, WOApplication converts that to http://<application.host()>/cgi-bin/WebObjects.

application.host() considers your -WOHost setting, hostAddress uses InetAddress.getByName(host()).  So if you've ever been confused and perplexed as to why your app keeps using your IP address even when you set WOHost, this is why.  This is especially a problem when you're testing with cookies on your local machine, which is really sensitive to host name changing.

Part of the confusing part here is that WOLips defaults to 127.0.0.1.  I think this is wrong and I'm about to change it (unless someone has a good reason behind it).  In the meantime, you can to several things:

1) Change the WOAdaptorURL in your launch config (to change this on a per-app basis)
2) Change the WOAdaptorURL in Preferences=>WOLips=>Launch.  This will change the defaults globally.  I don't recall if this cascades to existing run configs or not.

So to be safe and make sure your app works in dev like it does in deployment (which would have a consistent hostname), set WOAdaptorURL to http://localhost/cgi-bin/WebObjects and add a -WOHost yourhost.local (or whatever your fixed hostname is).

ms
 _______________________________________________
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

  • Prev by Date: Migration errors: unable to reference session and application variables in the wod
  • Next by Date: Re: processing incoming e-mails
  • Previous by thread: Re: Migration errors: unable to reference session and application variables in the wod
  • Next by thread: Prefetching relationship issue
  • Index(es):
    • Date
    • Thread