Programming Tips - What does a basic Java servlet look like?

Date: 2013nov22 Language: Java Keywords: minimal Q. What does a basic Java servlet look like? A.
import javax.servlet.*; import javax.servlet.http.*; public class MyServlet extends HttpServlet { @Override public void init(ServletConfig sconfig) throws ServletException { super.init(sconfig); // Do stuff } @Override public void doGet(HttpServletRequest request_in, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println("hello <b>World</b>"); } @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } }