This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Tomcat and the fly likes what is localhost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "what is localhost" Watch "what is localhost" New topic

what is localhost

samdeep aarzoo
Ranch Hand

Joined: Jun 09, 2005
Posts: 160
when we start apache tomcat server

i want to ask
what is localhost ?
is it the first program server is starting to initiate itself?
or its local machine name

i know we run server on port no 80(logical concept)
than why we write 8080

please help???
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Localhost is the name given to the local machine.
It's mapped to in your machine's host file.

By default, Tomcat ships configured to run on port 8080.
This is most likely because it's first an app server and will often share a machine with a webserver (such as Apache httpd). You can configure Tomcat to run on port 80 by changing the port number in server.xml.

Note: On a Unix machine, only programs started by the root user can bind to ports below 1024. There are work arounds for this.
Search this forum to find them.
They've been discussed often here.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: what is localhost
It's not a secret anymore!