How to Run Tomcat Server on a Different Port

Tomcat Default Port number is 8080.When this port number is being used by other  Popular servers like Wamp Server,JBoss Microsoft SQl Server etc,you are likely to get this error

Ports to Run Tomcat Server if Default fails

<div class="line number1 index0 alt2">logs/catalina.2007-01-09.log:
INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
Jan 11, 2007 9:36:12 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 11, 2007 9:36:13 AM org.apache.coyote.http11.Http11BaseProtocol start
SEVERE: Error starting endpoint Address already in use: JVM_Bind:8080
at org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.
at org.apache.coyote.http11.Http11Protocol.start( org.apache.catalina.connector.Connector.start(
at org.apache.catalina.core.StandardService.start(
at org.apache.catalina.core.StandardServer.start(
at org.apache.catalina.startup.Catalina.start(</div>
<div class="line number1 index0 alt2"></div>
<div class="line number1 index0 alt2">
Correcting this error is very simple.You just need to go to the Tomcat Installation folder and find Config Folder
Find a  file called Server.xml file and get this code
<div class="line number1 index0 alt2">&lt;Connector port="8080" protocol="HTTP/1.1"
redirectPort="8443" /&gt;</div>
<div class="line number1 index0 alt2">
Change the Port 8080 to 8081
<div class="line number1 index0 alt2">&lt;Connector port="8081" protocol="HTTP/1.1"
redirectPort="8443" /&gt;</div>
<div class="line number1 index0 alt2">
Restart your Tomcat and everything should work fine.If this fails consider using other servers like Wamp Server

About the Author: Eric K

Kenyan Developer and Blogger with Interests in Java,Javascript,Node.js, Wordpress, Android, PHP and Making Money Online. Solving world problems through programming is my passion. Hire me: Email :