This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Tomcat and the fly likes Using ip address in place of localhost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Using ip address in place of localhost" Watch "Using ip address in place of localhost" New topic
Author

Using ip address in place of localhost

Orton K Randy
Ranch Hand

Joined: Aug 12, 2011
Posts: 41

The title says it all, I tried to access my webapp through ip, something like :

It says:

'course
works just fine.
Obviously, it has something to configure in tomcat conf files, unfortunately I'm not that good at them. Just so you know, I could ping to the IP(without port no. perhaps) in question successfully, firewall has been disabled. Any help would be appreciated in this regard.


Coderanch, best ever forum on the net. Hands down.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

"Ping" isn't a tcp/ip request, it's ICMP. Same transport, different protocol. So the ability to PING an IP address simply means that the PING ICMP packet isn't firewalled, and tells nothing about tcp/ip port blocking.

The first place to look when you have connectivity problems, is to use a "netstat" command. Use "netstat -ln" for Unix/Linux and "netstat -an" for Windows. If the port is being listened to on 0.0.0.0, it's available at other addresses that just localhost and that's your cue to look at the firewall.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using ip address in place of localhost