Pre-Requisites:
- apache-tomcat-6.0.18 (works with previous versions of Tomcat)
Tomcat will run by default on TCP/IP port number 8080. But there can be situations where there are some other servers running on this same port forcing you to change the port of one of the servers. This article explains how to change the port number from 8080 to some other port number.
Steps
Steps
- 1. Navigate to
C:\apache-tomcat-6.0.18\conf\server.xml
(The place where you have installed tomcat)
- 2. In server.xml file locate
- <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
- <connector port="8080" maxthreads="150" minsparethreads="25" maxsparethreads="75" enablelookups="false" redirectport="8443" acceptcount="100" debug="0" connectiontimeout="20000" disableuploadtimeout="true">
- <!-- Note : To disable connection timeouts, set connectionTimeout value to 0 -->
- </connector>
Or
- <connector port="8080" protocol="HTTP/1.1" connectiontimeout="20000" redirectport="8443">
- </connector>
(You can find something similar to the above snippet in server.xml. It varies according to tomcat version)
change Connector port="8080" to Connector port="8081" or some other port number. Make sure that the port number in not used by some other application.
- 3. Save and restart tomcat.
- 4 .Now try running with the new port number i.e. http://localhost:8081
No comments:
Post a Comment