title: Can't get a .jsp file to run on Tomcat 7 ubuntu server
body: <p>I installed Tomcat 7 on my Ubuntu 12.04 server using <code>apt-get</code>.
  As I understand it I just need to upload the project directory containing the <code>.jsp</code> file and <code>WEB-INF</code> directory containing the <code>web.xml</code> file.</p>
  
  <p>The base path: <code>/usr/share/tomcat7-root/default-root/test/</code></p>
  
  <p>index.jsp: <code>/usr/share/tomcat7-root/default-root/test/index.jsp</code></p>
  
  <p>web.xml: <code>/usr/share/tomcat7-root/default-root/test/WEB-INF/web.xml</code></p>
  
  <p>The index.jsp file contents:</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=utf-8"
      pageEncoding="utf-8"%&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;% out.println("this is a test"); %&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>The web.xml contents:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"&gt;
    &lt;display-name&gt;test&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>When I go to </p>
  
  <blockquote>
    <p>mydomain:8080/test/index.jsp</p>
  </blockquote>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>HTTP Status 404 - /test/index.jsp</p>
    
    <p>type Status report</p>
    
    <p>message /test/index.jsp</p>
    
    <p>description The requested resource (/test/index.jsp) is not available.</p>
    
    <p>Apache Tomcat/7.0.26</p>
  </blockquote>
  
  <p>Have I navigated to the correct directory? The Tomcat landing page loads the <code>its fine!</code> page with no errors so I'm assuming Tomcat is running properly.</p>
  
  <p>Am I doing something wrong with the web.xml attributes or the file structure?</p>
  
  <p>edit - typo</p>