Showing posts with label Tomcat. Show all posts
Showing posts with label Tomcat. Show all posts

Monday, March 9, 2020

How to change tomcat port number

Tomcat will be by default configured to run on port 8080, sometimes our system/machine may already using port 8080. so that time we need to change the port.

Following simple steps help to change the tomcat port. but before changing make sure a new port is in used.

check used ports from machine/system: netstat –aon ( run this from command prompt) then choose which is not used from range.
For example, if 9090 is not in use.

Updation steps:
  •       Go to tomcat_home>conf folder
  •       Edit server.xml
  •       Search for "Connector port"

<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
 redirectPort="8443" />
  •       Replace "8080" by your port number ex: 9090
               <Connector port="9090" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

  •       Restart tomcat server

Happy learningJ