Advertisement

Udemy WW Udemy WW

Thursday 26 January 2012

How to change the port number of tomcat

Default port number of tomcat is 8080, However there is  chances of port conflict with others program. Sometime we just need to change the Tomcat port number.
4 simple Steps to change the port number

1.Just search server.xml file in the conf directory [within  tomcat installation folder]

2.Search for content like following:

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

3. change the port attribute to any other port number.

4. save the server.xml file and Restart Tomcat.

15 comments:

  1. hi can we change it to 8443 or 8009

    ReplyDelete
    Replies
    1. yes we can but it should not conflict with other used port or redirectPort number

      Delete

Advertisement

Udemy WW