resp.setContentType("text/html");
PrintWriter out = resp.getWriter();
timesAccessed++;
out.println("<HTML>");
out.println("<HEAD>");
out.println("<TITLE>Life Cycle Servlet</TITLE>");
out.println("</HEAD><BODY>");
out.println("I have been accessed " + timesAccessed + " time[s]");
out.println("</BODY></HTML>");