title: How to allow a particular referrer page in servlet?
body: <p>I have a HTML page:</p>
  
  <pre><code>&lt;form method="post" action="Servlet" name="frm"&gt;
      Enter your name: &lt;input type="text" name="name" id="name" /&gt;&lt;br/&gt;
      &lt;input type="submit" name="sub" value="Submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>A servlet will get value from that HTML page but I want to a servlet doesn’t accept from external page other than this HTML page. 
  <strong>If the request doesn’t come from the HTML page</strong>, a warning message would be shown saying that the user are not allow to access the page this way. What should I do? </p>