Obtain "Localhost" in Jetty start

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Obtain "Localhost" in Jetty start

Lebing Xie
Hallo,
When Jetty start, how does it obtain the server IP adresse(if not setted
in config file). The Socket is opened at 0.0.0.0:8080, what does 0.0.0.0
mean?

I just try to programm a simple text server, I use
"InetAddress.getLocalHost()" to obtain MY IP address. In windows it
works ok, but in LINUX it works depends on setting(seemed that). Is
there any universal solution to obtain a propel MY LAN IP Address?
Especially on the Server with more than one Network interface.

ur Lebing



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Obtain "Localhost" in Jetty start

Greg Wilkins-5
0.0.0.0 means no specified interface and the server socket will listen
on all available interfaces on the machine.

regards



Lebing Xie wrote:

> Hallo,
> When Jetty start, how does it obtain the server IP adresse(if not setted
> in config file). The Socket is opened at 0.0.0.0:8080, what does 0.0.0.0
> mean?
>
> I just try to programm a simple text server, I use
> "InetAddress.getLocalHost()" to obtain MY IP address. In windows it
> works ok, but in LINUX it works depends on setting(seemed that). Is
> there any universal solution to obtain a propel MY LAN IP Address?
> Especially on the Server with more than one Network interface.
>
> ur Lebing
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss