• 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: James Cicenia <email@hidden>
  • Date: Wed, 6 Sep 2006 20:46:12 -0500

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.


Regards,
Jerry

On Sep 6, 2006, at 6:28 PM, Gilles MATHURIN wrote:

Hello list,

Is there a way to obtain programmaticaly the name of the server in order to put it in a ivar ?

Example : "http://g-five.local/cgi-bin/Webobjects/WOapp.woa";

i'd like to be able to have the "g-five.local" part in a programmatic way, in that way my method and component would be more reusable…

Thanks.

P.S : As a newbie, i think of participating to the WO Community as i can. So i thought to put a tutorial based on my small project (a simplified version) for the other newbie like me if they exist. I would like to know how the organization on the WO Community go on, so that i could put it in the right place.

WARNING : this tutorial would be for the very beginner in :
1 - dynamic java website design
2 - java developpment as i am a hobbyist developer with very basic knowledge in programmation (my background is Basic language, Pascal, Delphi all this at a basic level)
3 - By tutorial, i mean telling in a blogging way, what i did and why, so the more experienced dev would be able to enhance the level of the App with tricks and other methods.


As i don't follow very well the discussion on this subject, i wonder if the idea of a website like "Project Omega" focused on WO has been emitted.

Last but not least, i am not a english native speaker, so i, in advance, apologize for the grammatical mistakes that's why i'll do a french version of this tutorial first.



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40jimijon.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:
40gmail.com


This email sent to email@hidden


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems


    email@hidden
    203 278-4085        office




_______________________________________________ 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: Newbie : Obtain the name of a server in Java
      • From: shaun <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>)

  • Prev by Date: Another newbie question concerning Hyperlink
  • Next by Date: Re: Another newbie question concerning Hyperlink
  • 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