title: Call servlet on hyperlink
body: <p>When I click the log out button, request is re-directed to a servlet. However it doesn't seem to work fine. I did map the servlet at web.xml. </p>
  
  <p>The error that I am getting is</p>
  
  <blockquote>
    <p><strong>The requested resource (/LogoutServlet) is not available.</strong></p>
  </blockquote>
  
  <p>Below are my codes.</p>
  
  <p><strong>Web.xml</strong></p>
  
  <pre><code>&lt;servlet&gt;
     &lt;display-name&gt;LogoutServlet&lt;/display-name&gt;
     &lt;servlet-name&gt;LogoutServlet&lt;/servlet-name&gt;
     &lt;servlet-class&gt;servlet.LogoutServlet&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
     &lt;servlet-name&gt;LogoutServlet&lt;/servlet-name&gt;
     &lt;url-pattern&gt;/LogoutServlet&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p><strong>At JSP</strong></p>
  
  <pre><code>&lt;a href="/LogoutServlet"&gt;Log Off&lt;/a&gt;
  </code></pre>