• 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: One Less Mystery
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One Less Mystery


  • Subject: Re: One Less Mystery
  • From: Rams <email@hidden>
  • Date: Mon, 14 Jul 2008 22:10:24 -0400

Nice tip! :-)

Thanks Mike,

I've been wondering how to fix that for a while now.

On Jul 14, 2008, at 7:27 PM, Mike Schrag wrote:

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:
@mac.com


This email sent to email@hidden

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:
    • Re: One Less Mystery
      • From: Anjo Krank <email@hidden>
References: 
 >One Less Mystery (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: processing incoming e-mails
  • Next by Date: Re: processing incoming e-mails
  • Previous by thread: Re: One Less Mystery
  • Next by thread: Re: One Less Mystery
  • Index(es):
    • Date
    • Thread