How to change the default port of Tomcat

By default Apache Tomcat consumes 8080 port number of Windows. As an example, I am using Tomcat 8.5 version to change the default port of but the process of changing the port of Tomcat is the same for all versions. This 8080 port is the default port for other web application servers as well. Often, the organizations do not prefer to go with the default port to avoid conflicts with other applications.

Tomcat default port

If you want to change Tomcat port, here are the steps.

Steps to change the default port of Tomcat: 

  1. Go to %CATALINA_HOME%\conf\ folder
    CATALINA_HOME is the folder where you have extracted Tomcat.
  2. Look for server.xml and open it in any text editor
  3. Search for connector port in the server.xml
    You will find something like below.
    <Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />
  4. Change the default port from 8080 to whatever you want.
    In this example, I am changing it to 9090.
    <Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />
  5. Save the file and restart Tomcat.
Change default port of Tomcat

You may want to read this: 3 Ways on How to Disable Windows Defender Antivirus Permanently

This is how you can change the default 8080 port of tomcat. Easy right?

Happy learning 🙂

Please follow and like us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top