my dog learned polymorphism
The moose likes Tomcat and the fly likes tomcat command line options Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat command line options" Watch "tomcat command line options" New topic

tomcat command line options

shobhit garg
Ranch Hand

Joined: Mar 07, 2004
Posts: 42

Is there any command line option using which we can set the tomcat server
port to run on some other port instead of 8080
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

This setting is configured in your {tomcat install}/conf/server.xml file.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Rama Krishna Ghanta
Ranch Hand

Joined: Nov 20, 2006
Posts: 59
The only way to change the default port 8080 is to modify the below code in {Tomcat root directry}/conf/server.xml.

Change the Connector port to "80" instead of "8080"

Neerav Narielwala
Ranch Hand

Joined: Dec 08, 2006
Posts: 106
Open server.xml in %TOMCAT_HOME%\conf directory and edit the <Connector> element.
For SimpleTcpConnector, change the sub-element "port" value to 80. Yes, You got it!

<a href="" target="_blank" rel="nofollow">Java Tutorials</a> | <a href="" target="_blank" rel="nofollow">Java Weblog</a> | <a href="" target="_blank" rel="nofollow">Computing Articles</a>
I agree. Here's the link:
subject: tomcat command line options
jQuery in Action, 3rd edition