• 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: Newbie : Obtain the name of a server in Java
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie : Obtain the name of a server in Java


  • Subject: Re: Newbie : Obtain the name of a server in Java
  • From: shaun <email@hidden>
  • Date: Thu, 07 Sep 2006 14:58:54 +0930

James Cicenia wrote:
Jerry --

It works with Safari, IE6, and FireFox.

I use this to change style sheets for "branded" customers.

- James

On Sep 6, 2006, at 7:07 PM, Jerry W. Walker wrote:

Hi, James & Gilles,

On Sep 6, 2006, at 7:37 PM, James Cicenia wrote:

I do this in a Direct Action....

public WOActionResults defaultAction() {
            String domain = request().headerForKey("host");


It should be noted that this works only for some browsers. I beat my head against that wall more than once. The sad fact is that web browsers are not consistent in putting the host name in, and if so, with what key.


I seem to remember needing to use http_host sometimes rather than host, but I dont remember when this is the case.


_______________________________________________
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


References: 
 >Newbie : Obtain the name of a server in Java (From: Gilles MATHURIN <email@hidden>)
 >Re: Newbie : Obtain the name of a server in Java (From: James Cicenia <email@hidden>)
 >Re: Newbie : Obtain the name of a server in Java (From: "Jerry W. Walker" <email@hidden>)
 >Re: Newbie : Obtain the name of a server in Java (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Community Wish List
  • Next by Date: Re: Newbie : Obtain the name of a server in Java
  • Previous by thread: Re: Newbie : Obtain the name of a server in Java
  • Next by thread: Re: Newbie : Obtain the name of a server in Java
  • Index(es):
    • Date
    • Thread