user2584237
user2584237

Reputation:

how come a http://localhost:8080 given in browser directed to tomcat intallation folder(to public root dictory)

when i started tomcat container i am curious when we given `http://localhost:8080` in browser.

how come it is directed to tomcat installation folder to its public root directory. say to C:\apache-tomcat-6.0.35\webapps\ROOT

. here localhost is the server name. how can browser find a server running in my PC? when i run web container is it registering some where so that my browser will see its public directory?some how tomcat is registering as a server with name localhost.

Upvotes: 0

Views: 4884

Answers (1)

ash
ash

Reputation: 5165

localhost is a special network name that translates to IP address 127.0.0.1. That is a loop-back address.

Tomcat opens port 8080 and listens on it for connections. Telling the browser to open http://localhost:8080 causes it to open that port on the local system.

As for showing the ROOT directory, I'm not sure about Tomcat's default home page, but it seems reasonable that is it.

Upvotes: 1

Related Questions