title: Error in compiling java servlet program
body: <p>I have created a java servlet program name <strong>FirstServlet</strong>.</p>
  
  <p>I put it on <strong>Tomcat 7.0\webapps\ROOT\WEB-INF\classes\FirstServlet.java</strong> and also I set the class path for <strong>servlet-api.jar</strong> but when I compile it</p>
  
  <p>I am finding some error.</p>
  
  <p>Code is :</p>
  
  <pre><code>import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
  
  public class FirstServlet extends HttpServlet {
  
     // Runs when the servlet is loaded onto the server.
     public void init() {
        //......
     }
  
     public void doGet(HttpServletRequest request, HttpServletResponse response)
           throws IOException, ServletException {
  
        // Set the MIME type for the response message
        response.setContentType("text/html");
        // Write to network
        PrintWriter out = response.getWriter();
  
        // Your servlet's logic here
        out.println("&lt;html&gt;");
        out.println(" ...... ");
        out.println("&lt;/html&gt;");
     }
  
  
     public void doPost(HttpServletRequest request, HttpServletResponse response)
           throws IOException, ServletException {
        // do the same thing as HTTP GET request
        doGet(request, response);
     }
  
     public void destroy() {
      //  ......
     }
  
  }
  </code></pre>
  
  <p>error is :</p>
  
  <p><img src="https://i.stack.imgur.com/fyARh.png" alt="enter image description here"></p>