Skip to main content

Tomcat : How to change default port 8080 of Tomcat

How to change default port 8080 of Tomcat

Look for the file server.xml in folder path-to-Tomcat/conf/

This file containes the configuration for tomcat. Look for the following lines in this file.

<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

Connector port="8080" defines the port on which the tomcat will run. If you want to run tomcat on any port other than 8080 then you can just change the port number here.

e.g Running Tomcat on port 8090

<Connector port="8090" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />


e.g Running Tomcat on port 9000

<Connector port="9000" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />


Also Read

Comments