It's not a secret anymore!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Difference between port 8080 and 80 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Difference between port 8080 and 80" Watch "Difference between port 8080 and 80" New topic

Difference between port 8080 and 80

Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 422
Hi, I am sure port 80 is used for HTTP and it runs on top of TCP/IP (Port numbers from 0 to 1023)..What about 8080 and when should we use it ?

OCPJP 6.0-81% | Preparing for OCWCD | |
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60785

Port 80 is the default port. It's what gets used when no port is specified. 8080 is Tomcat's default port so as not to interfere with any other web server that may be running.

If you are going to run Tomcat as your web server, the port can be changed to 80 so that visitors do not need to specify it.

If you are going to front Tomcat with IIS or Apache for some reason, that server will listen on port 80.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: Difference between port 8080 and 80
Similar Threads
Running Tomcat without port number
how do I install 2 web servers on same box using same IP address?
how to change port while JBoss is HTTP Server?
URL and mapping to servlets