Write the required servlet methods

After the class declaration, add the method declaration (in black text below):

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class ServletSample extends HttpServlet
{

   public void doGet (HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException
   {

   }
}

The important parts of the above code snippet are:

The servlet communicates with the HTTP server and ultimately with the client through these objects. The servlet can invoke the HttpServletRequest object's (request) methods to get information about the client environment, the HTTP server environment, and any information provided by the client (for example, HTML form information set by GET or POST).

The servlet invokes the HttpResponse object's (response) methods to send the response that it has prepared back to the client. These same objects are also passed to the service() method.