How to change tomcat port number

I am developing a web application in JSP so that for some purposes I need to change the tomcat access port.

Is there a possibility?

+46
java tomcat port
Aug 24 '13 at 6:13
source share
4 answers

Simple !! ... you can do it easily through server.xml

  • Go to tomcat> conf folder
  • Change server.xml
  • Search " Connector Port
  • Replace "8080" with your port number
  • Reboot the tomcat server.

You are done !.

+114
Aug 24 '13 at 6:15
source share

Go to the / tomcat -root / conf folder. Inside you will find the server.xml file.

Open server.xml in your preferred editor. Find the instructions below (not exactly as shown below)

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

Transition to port number up to 9090

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

Save the file and restart the server. Now the cat will listen in port 9090

+10
Aug 24 '13 at 6:25
source share

You need to edit Tomcat/conf/server.xml and change the connector port. The connector setup should look something like this:

 <Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" /> 

Just change the default connector port to 8080 to another valid port number.

+3
Aug 24 '13 at 6:15
source share

1) Locate the server.xml file in the Tomcat installation folder \ conf \ 2) Locate the following similar instruction

  <!-- Define a non-SSL HTTP/1.1 Connector on port 8180 --> <Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" /> 

for example

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

Edit and save the server.xml file. Restart Tomcat. Done

Further link: http://www.mkyong.com/tomcat/how-to-change-tomcat-default-port/

+2
Aug 24 '13 at 6:37 on
source share



All Articles