aspose file tools*
The moose likes Tomcat and the fly likes Tomcat:Works fine with localhost but not with ip Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat:Works fine with localhost but not with ip" Watch "Tomcat:Works fine with localhost but not with ip" New topic
Author

Tomcat:Works fine with localhost but not with ip

amit sharma
Ranch Hand

Joined: Jul 19, 2006
Posts: 129
I just install Apache tomcat using windows installer .It installed successfully .I am able to access it with localhost but not with ip.
Thanks
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What IP?
You haven't given us much to work with.

If Tomcat is working with localhost then it's running OK.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
amit sharma
Ranch Hand

Joined: Jul 19, 2006
Posts: 129
The ip is static .it works when i type 127.0.0.1 .I am able to ping that static ip from my machine.
Thanks
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14345
    
  22

What do you mean exactly? Do you mean that if you type "http://<ipaddr>:8080/...", where <ipaddr> is the IP address of your machine on your network, it doesn't work? Are you trying to access it from the same machine or from a different machine?

Maybe this is because you have a firewall switched on. Are you using Windows? Try going to Start / Control Panel / Security / Windows Firewall then go to the Exceptions tabsheet and add the port that Tomcat uses as an exception, so that Windows Firewall doesn't block communication.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
If you're connecting with your browser with a proxy.

Check if an exception is made for localhost and 127.0.0.1

When I switched 127.0.0.1 out of the exception list I had the same problem.


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
amit sharma
Ranch Hand

Joined: Jul 19, 2006
Posts: 129
It was my silly mistake .When i switch the port to 80 it is also accessible from other machine.
 
jQuery in Action, 2nd edition
 
subject: Tomcat:Works fine with localhost but not with ip