title: Tomcat is installed with CATALINA_HOME in /usr/share/tomcat6 and CATALINA_BASE in /var/lib/tomcat6
body: <p>I think it is a good question.</p>
  
  <p>I found it also confusing. I installed tomcat few minutes ago (after a while) and I notice they are two different "webapps" places.</p>
  
  <p>at /usr/share/tomcat6/webapps/default_root/
  at /var/lib/tomcat6/webapps/ROOT/</p>
  
  <p>The content of both are the same but none of them are symlinks.</p>
  
  <p>When I started tomcat it says:</p>
  
  <p>Quote:</p>
  
  <blockquote>
    <p>This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat6/webapps/ROOT/index.html</p>
  </blockquote>
  
  <p>Tomcat6 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat6 and CATALINA_BASE in /var/lib/tomcat6
  So, based in this information, the /usr/share/... folder was kept for backward compatibility, right?</p>
  
  <p>But according to what you posted libs are being read from the CATALINA_HOME instead of CATALINA_BASE.</p>
  
  <p>Perhaps they still keep that default reference to prevent other systems to stop working after updating?</p>
  
  <p>Good observation!</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I read this at: /usr/share/tomcat6/bin/catalina.sh :</p>
  
  <p>Quote:</p>
  
  <pre><code># CATALINA_HOME May point at your Catalina "build" directory.
  #
  # CATALINA_BASE (Optional) Base directory for resolving dynamic portions
  # of a Catalina installation. If not present, resolves to
  # the same directory that CATALINA_HOME points to.
  </code></pre>
  
  <p>When we read at: /etc/init.d/tomcat6 :</p>
  
  <p>(at the beginning)</p>
  
  <pre><code>CATALINA_HOME=/usr/share/$NAME
  </code></pre>
  
  <p>(then...)</p>
  
  <pre><code># Directory for per-instance configuration files and webapps
  CATALINA_BASE=/var/lib/$NAME
  </code></pre>
  
  <p>However, If you try to start TOMCAT manually (as I did long time ago) with:
  sudo /usr/share/tomcat6/bin/startup.sh</p>
  
  <p>It displays:</p>
  
  <p>Quote:</p>
  
  <pre><code>Using CATALINA_BASE: /usr/share/tomcat6
  Using CATALINA_HOME: /usr/share/tomcat6
  Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
  Using JRE_HOME: /usr
  touch: cannot touch `/usr/share/tomcat6/logs/catalina.out': No such file or directory
  /usr/share/tomcat6/bin/catalina.sh: 357: cannot create /usr/share/tomcat6/logs/catalina.out: Directory nonexistent
  </code></pre>
  
  <p>So, why here CATALINA_BASE is set to the same as CATALINA_HOME?</p>
  
  <p>/usr/share/tomcat6/logs/ do not exist, but exists in /var/lib/tomcat6/logs/</p>
  
  <p>I see that my logs are writing into /var/lib/... when starting Tomcat from the init.d script. So its better starting it from there.</p>