title: Getting empty screen when running servlet application
body: <p>I've just started working on servlets and i'm a newbie. I have developed a html page with a submit button which invokes the servlet.Here is the html code for it.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;A simple revision of servlets&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form method="POST" action="Idiot"&gt;
      &lt;input type="SUBMIT"&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The deployment descriptor is as follows named as web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  version="2.5"&gt;
  &lt;servlet&gt;
  &lt;servlet-name&gt;TangoCharlie&lt;/servlet-name&gt;
  &lt;servlet-class&gt;com.example.web.Revise&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;TangoCharlie&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/Idiot&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>The code for servlet is as follows which is named as :Revise.java</p>
  
  <pre><code>package com.example.web;
  
  import javax.servlet.*;
  import javax.servlet.http.*;
  import java.io.*;
  
  public class Revise extends HttpServlet
  {
  public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
  {
      response.setContentType("text/html");
      PrintWriter out=response.getWriter();
      //out.println("&lt;html&gt;&lt;body&gt;&lt;h3&gt;Hello&lt;/h3&gt;&lt;/body&gt;&lt;/html&gt;");
      out.println("Hello");
  }
  } 
  </code></pre>
  
  <p>I have maintained the following directories inside webapps of tomcat server.
      webapps->Revision->page.html</p>
  
  <pre><code>webapps-&gt;Revision-&gt;WEB-INF-&gt;web.xml
  
  webapps-&gt;Revision-&gt;WEB-INF-&gt;classes-&gt;com-&gt;example-&gt;web-&gt;Revise.class
  </code></pre>
  
  <p>When i run page.html in Mozilla Firefox and click on submit,i get a blank page.
  When i run page.html in Chrome ,i get the following message:</p>
  
  <pre><code>Server error
  The website encountered an error while retrieving http://localhost:8080/Revision/Idiot.It may be down for maintenance or configured incorrectly.
  Here are some suggestions:
  Reload this webpage later.
  HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
  </code></pre>
  
  <p>Where am i wrong ???</p>