title: when i am trying to call a servlet page from my jsp page using anchor tag it showing an error
body: <p>i have a simple jsp page with one anchor tag which will call the servlet page:
  The following is the jsp code</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  &lt;title&gt;Download Data&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  View data in following format:&lt;br&gt;
  
  &lt;a href = "Filedownload"&gt;MS-Excel&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is my servlet page :</p>
  
  <pre><code>package com.primeki.devlopment.usm.view;
  
  import java.io.IOException;
  import java.io.PrintWriter;
  
  import javax.servlet.ServletException;
  import javax.servlet.annotation.WebServlet;
  import javax.servlet.http.HttpServlet;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  @WebServlet("/ExcelServlet")
  public class Filedownload extends HttpServlet {
      private static final long serialVersionUID = 1L;
  
      public Filedownload() {
          super();
      }
  
      protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          doPost(request,response);
      }
  
      protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          response.setContentType("application/vnd.ms-excel");
          PrintWriter out = response.getWriter();
          out.println("Name\tJob\tSalary");
          out.println("Raj\tAccountant\t20000");
          out.println("Vinay\tAccountant\t20000");
          out.println("Rajesh\tAccountant\t20000");
          out.println("\tTotal:\t=sum(c2:c3)");
          out.close();
      }
  
  }
  </code></pre>
  
  <p>I am getting an error when i am clicking the anchor tag ...
  i want to make an excel sheet to get download by click on the anchor tag .. but i am getting an error ... plz help in this....</p>