How to change tomcat port number?


To change the port number from which your tomcat server receives HTTP requests, do the following –

1.Open the folder where tomcat is installed. If you use Tomcat with Eclipse then open the folder into which tomcat has been ‘un’archived. Navigate through the folder structure till you reach the folder which contains the following subfolders – conf,lib,bin,webapps,temp,logs.

2. Open the “conf” folder. Inside this open the server.xml file.

3. Locate the following lines and make appropriate changes to the port number specified here

<Connector port=”8081″ protocol=”HTTP/1.1″  maxThreads=”150″ connectionTimeout=”20000″ redirectPort=”8443″ />

Change the value of the port parameter, save your file in the same location, and try running your application specifying the new port.

 

Advertisements

About vatsalad

Hi, I'm Vatsala
This entry was posted in Tomcat and tagged , , , . Bookmark the permalink.

One Response to How to change tomcat port number?

  1. Pingback: How to setup a Servlet based Restlet Webservice? « Vatsala's Tech Blog

Comments are closed.