Jair Rillo Junior wrote:Chec it out the port number.
localhost:8080 is different than 127.0.0.1 (the second address has not the port number, hence, by default it uses port 80). Try out also: http://localhost
I'm facing the same problem in my case neither http://localhost nor http://locahost:8080/ nor http://127.0.0.1 work but the moment I do http://127.0.0.1:8080 i'm able to see the docs, examples pages from the webapps folder.
I have tomcat 7 on windows 7. Earlier it was working now everything has stopped working...does any body have a clue?
my server.xml(snippet) is as below -
A few helpful hints on JavaRanch etiquette: We prefer that you would start a new message thread instead of reviving one that hasn't been used in several years. It's less confusing.
Also, there's a "Code" button on the message editor. You can use it to generate tags to wrap code, XML, and other pre-formatted text and make it easier to read.
To understand your problem, you have to understand URLs and hostname resolution. Every web request has to be sent to a TCP/IP port that's listening for data in the format that the client is using. For HTTP requests, by default, that's port 80 and for HTTPS requests, it's port 443.
Tomcat isn't normally set up to use port 80, since port numbers less than 4096 are privileged and require Tomcat to be privileged as well in order to use them and that's a security risk. When a URL is parsed and used to target a webserver, the port selection is not available from the hostname resolution mechanism - it ONLY resolves host addresses. So if you don't want the default port (80), you have to explicitly provide a port ID (8080).
That's part of your problem. The second part has to do with hostname resolution. TCP/IP systems support a number of different ways to convert a domain name such as "www.coderanch.com" to the IP address that gets the request; it's a very flexible system. One of the more popular ways involves 2 primary resolvers: DNS services and a hostnames file.
DNS services refers to a resolver that queries one or more Domain Name Servers which have been defined for the local machine's network configuration. The machine sends out a query to the DNS server on UDP port 53 and gets back a response consisting of the corresponding IP address.
Certain domains, however, are best served by a more immediate mechanism. An example are the critical hosts that a machine may need services from even when the DNS system is down. However, and even more important one is the hostname "localhost" and its related fully-qualified domain name "localhost.localdomain". These hostnames are almost always expected to resolve to 127.0.0.1, so they are hard-coded into a local hostnames file. This file is usually named "hostnames" or "HOSTS", but Windows has been known to use LMHOSTS. So when you cannot get "localhost" to resolve to 127.0.0.1, you need to find out the name and location of your local system's host names file and check it.
Customer surveys are for companies who didn't pay proper attention to begin with.
subject: http://localhost:8080 not working but http://127.0.0.1 is working