Hi,

I use the following code which works as well on my local dev server as on the deployment servers :

String myserver= WOApplication.application().directConnectURL() + "/" + context().request().applicationNumber();
        if( null != context().request().headerForKey("host") ) {
            myserver= "http://" + context().request().headerForKey("host") + context().request().applicationURLPrefix();
        }

Regards

Fred

Gilles MATHURIN a écrit :
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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/f.jecker%40ch-rouffach.fr

This email sent to [EMAIL PROTECTED]



--


________________________________________

Frédéric JECKER
Direction des systèmes d’information
Centre Hospitalier Rouffach
F- 68250  ROUFFACH
Tél : +33 (0)3 89 78 74 21
Fax : +33 (0)3 89 78 74 35
Courriel : [EMAIL PROTECTED]
Web : http://www.ch-rouffach.fr
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to