title: Manual deployment of  Tomcat app by copying to webapps
body: <p>I'm trying to deploy a Tomcat application by copying it to the <code>webapps</code> directory. My <code>webapps</code> directory looks like:</p>
  
  <pre><code>webapps/test
             |_ index.jsp
             |_ WEB-INF
                      |_ lib
                           |_ test.jar
  </code></pre>
  
  <p>The contents of <code>index.jsp</code> are:</p>
  
  <pre><code>&lt;html&gt;
      Test App&lt;br&gt;
      &lt;%= com.stevekuo.Test.test() %&gt;
  &lt;/htm&gt;
  </code></pre>
  
  <p><code>test.jar</code> has the <code>Test</code> class with the static <code>test()</code> method that just returns a string.</p>
  
  <p>When I access my app via <code>http://tomcatserver:8080/test/</code>, all I get is:</p>
  
  <pre><code>HTTP Status 500 -
  
  type Exception report
  
  message
  
  description The server encountered an internal error () that prevented it from fulfilling this request.
  
  exception
  
  org.apache.jasper.JasperException: Unable to compile class for JSP: 
  
  An error occurred at line: 3 in the jsp file: /index.jsp
  com.stevekuo.Test cannot be resolved to a type
  1: &lt;html&gt;
  2:     Test&lt;br&gt;
  3:     &lt;%= com.stevekuo.Test.test() %&gt;
  4: &lt;/html&gt;
  </code></pre>
  
  <p>I've also tried packaging the above directory structure into a WAR file and copying to <code>webapps</code>, but it still gives the same error.</p>
  
  <p>I'm running standard out-of-the-box Tomcat 6 on Ubuntu 10.04. Tomcat came installed by Ubuntu. All files have <code>-rw-r--r--</code> permissions, and directories are <code>drwxr-xr-x</code>. Why can't Tomcat resolve the <code>Test</code> class located in <code>WEB-INF/lib/test.jar</code>?</p>