title: The requested resource is not available in Tomcat 8.0.2
body: <p>wel.html file</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;title&gt;Welcome Page&lt;/title&gt;&lt;/head&gt;
  &lt;body&gt;
  Welcome HTML Page
  &lt;form action="Welcome" method="post"&gt;
  &lt;input type="submit" value="submit"/&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>web.xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app&gt;
  &lt;servlet&gt;
  &lt;servlet-name&gt;S1&lt;/servlet-name&gt;
  &lt;servlet-class&gt;Welcome&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;S1&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/Welcome&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Welcome.java Servlet file</p>
  
  <pre><code>import java.io.*;
  import javax.servlet.*;
  
  public class Welcome implements Servlet
  {
  ServletConfig config;
  
  public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
  {
  System.out.println("...init...");
  this.config=config;
  }
  
  public javax.servlet.ServletConfig getServletConfig() 
  {
  System.out.println("...getServletConfig...");
  return config;
  }
  
  public void service(javax.servlet.ServletRequest req,javax.servlet.ServletResponse res) throws javax.servlet.ServletException,java.io.IOException
  {
  System.out.println("...service...");
  res.setContentType("text/html");
  PrintWriter out=res.getWriter();
  out.println("&lt;html&gt;");
  out.println("&lt;body&gt;");
  out.println("&lt;h1&gt;Welcome&lt;/h1&gt;");
  out.println("&lt;/body&gt;");
  out.println("&lt;/html&gt;");
  }
  
  public java.lang.String getServletInfo()
  {
  
  System.out.println("...getServletInfo...");
  return "";
  }
  
  public void destroy()
  {
  System.out.println("...destroy...");
  }
  
  }
  </code></pre>
  
  <p>Directory Structure
  C:\apache-tomcat-8.0.22\webapps\MyApp\WEB-INF\classes</p>
  
  <p>web.xml in WEB-INF</p>
  
  <p>compiled java class in classes folder</p>
  
  <p>wel.html in MyApp folder</p>
  
  <p>When I deploy the project,its working upto wel.html.But after clicking submit button,the following error page is getting displayed</p>
  
  <p>HTTP Status 404 - /MyApp/Welcome</p>
  
  <p>type Status report</p>
  
  <p>message /MyApp/Welcome</p>
  
  <p>description The requested resource is not available.</p>
  
  <p>Apache Tomcat/8.0.22</p>
  
  <p>I am at a loss as to what is causing this problem.Please help me.
  Thanks in advance.</p>