Tomcat Configuration with Admin UI

Tomcat Configuration with Admin UI

Set JAVA_HOME and PATH variables
JAVA_HOME                      C:\Program Files\Java\jdk1.7.0_71 (Don’t put; at end)
PATH                                     .;%PATH%.;%JAVA_HOME%\bin.;%CATALINA_HOME%\bin;
CATALINA_HOME            D:\Servers\apache-tomcat-7.0.42

Change Tomcat Users List
Go to D:\Servers\apache-tomcat-7.0.42\conf
Open tomcat-users.xml
<role rolename="manager-gui"/>
  <role rolename="admin-gui"/>
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
  <user username="admin" password="admin" roles="tomcat,role1,manager-gui,admin-gui"/>
  <user username="root" password="root" roles="tomcat,role1,manager-gui,admin-gui"/>

Go to D:\Servers\apache-tomcat-7.0.42\bin
Run in command promote startup.bat
If any occurs Stop the servers which are running currently. Like Eclipse Etc.,

Steps of changing the Tomcat Port
1) Locate server.xml in {Tomcat installation folder}\ conf \

2) Find following similar statement

 <!-- 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" />
    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    <Connector port="8080" protocol="HTTP/1.1"
               redirectPort="8443" />
3) About Tomcat’s server.xml file cites it’s runs on port 8080. Change the Connector port=”8080″ port to any other port number.
For example
 <Connector port="8181" protocol="HTTP/1.1"
               redirectPort="8443" />
Above statement instruct Tomcat server runs on port 8181.
4) Edit and save the server.xml file. Restart Tomcat. Done