A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Sockets and Internet Protocols
Author
Basic Doubt
Vishnu Prakash
Ranch Hand
Joined: Nov 15, 2004
Posts: 1026
posted
Apr 04, 2005 01:00:00
0
InetAddress
class is used to encapsulate the numerical IP Address
and the domain name.
InetAddress
address = InetAddress.getByName("javaranch.com");
System.out.println("Javaranch: " + address);
the output I got was
Javaranch: javaranch.com/64.78.181.41
Doesn't this "64.78.181.41" represent an IP Address.
I copied this value "64.78.181.41" and tries like
http://64.78.181.41.com/
and I endedup getting the below.
Client error
Host name lookup for '64.78.181.41.com' failed
Someone please explain me whether this 64.78.181.41 represents an
IP Address
Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1
-
JSTL Tag Documentation
Steven Bell
Ranch Hand
Joined: Dec 29, 2004
Posts: 1071
posted
Apr 04, 2005 01:07:00
0
when you use the IP address you do not use the .com extension.
There is another problem in that the hosting used by javaranch apparently does not allow access by IP address only name.
so if you do type only 64.78.181.41 into a web browser it will attempt to get javaranch, but the hosting service will give you an error page.
Vishnu Prakash
Ranch Hand
Joined: Nov 15, 2004
Posts: 1026
posted
Apr 04, 2005 01:31:00
0
Thank you very much.
But I got one more doubt. What u mean by
hosting used by javaranch apparently does not allow access by IP address only name.
Can u please elobarate it. And also do get me some web site that allows IP Address to access it.
Note: Is there any particular reason for not allowing IP Address to access the website
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Basic Doubt
Similar Threads
tcp/ip address v. DNS name
Getting IP Address of Machine...
WA #1.....word association
about IP
IP address
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter