title: Managing Web applications in Tomcat by command line
body: <p>I have configured Tomcat6 on RHEL6. I have several war files deployed and the web server is up and running. I could log into the "Tomcat Web Application Manager" after configuring $catalina.home/conf/tomcat-user.xml appropriately, which looks like below :</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
    &lt;tomcat-users&gt;
  
     &lt;role rolename="tomcat"/&gt;
     &lt;role rolename="role1"/&gt;
     &lt;user username="tomcat" password="tomcat" roles="tomcat"/&gt;
     &lt;user username="both" password="tomcat" roles="tomcat,role1"/&gt;
     &lt;user username="role1" password="tomcat" roles="role1"/&gt;
  
     &lt;user name="tomcat" password="password" roles="manager" /&gt;
  
   &lt;/tomcat-users&gt;
  </code></pre>
  
  <p>I used the following to command to stop the "/httpif" application, but didn't work. </p>
  
  <pre><code> wget http://tomcat:password@localhost:8080/manager/html/stop?path=/httpif
  </code></pre>
  
  <p>Error what I got was 401 unauthorized.</p>
  
  <pre><code>--2014-03-05 14:28:23--  http://localhost:8080/manager/html/stop?path=/httpif
  Resolving localhost (localhost)... ::1, 127.0.0.1
  Connecting to localhost (localhost)|::1|:8080... connected.
  HTTP request sent, awaiting response... 401 Unauthorized
  Authorization failed.
  </code></pre>
  
  <p>Can anyone help me how do I get through this.? Thanks in advance.</p>