JavaGian java tutorial and java interview question and answer

JavaGian , Free Online Tutorials, JavaGian provides tutorials and interview questions of all technology like java tutorial, android, java frameworks, javascript, ajax, core java, sql, python, php, c language etc. for beginners and professionals.

How to run tomcat in default HTTP port 80

By default, tomcat is configured to run on port 8080. That’s why all your deployed web applications are accessible though URLs like http://localhost:8080/yourapp. If you want to run your applications on URL like http://localhost/yourapp, then you will need to change the default port 8080 to 80, which is default port for HTTP connectors.
To make this port change, open server.xml and find below entry :
<Connector           port="8080"         //Change this
                protocol="HTTP/1.1"
                connectionTimeout="20000"
                redirectPort="8443"
/>
and change it to below entry:
<Connector           port="80"       //Changed
                protocol="HTTP/1.1"
                connectionTimeout="20000"
                redirectPort="8443"
/>
You are all set to access your applications using root path “http://localhost/“.

.