From: Jérôme Benoit Date: Wed, 11 Apr 2018 16:56:09 +0000 (+0200) Subject: exo10: code cleanups. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4569f51616326aa25a7a169d80df7bcdf799cc31;p=TD_webapps.git exo10: code cleanups. Signed-off-by: Jérôme Benoit --- diff --git a/ROOT/exo10/WEB-INF/src/date/DateRefresh.java b/ROOT/exo10/WEB-INF/src/date/DateRefresh.java index 24cbd5f..32aa39a 100644 --- a/ROOT/exo10/WEB-INF/src/date/DateRefresh.java +++ b/ROOT/exo10/WEB-INF/src/date/DateRefresh.java @@ -10,13 +10,8 @@ import javax.servlet.annotation.WebServlet; // Extend HttpServlet class public class DateRefresh extends HttpServlet { - //private java.util.Date d; - //private Integer count; - public void init() throws ServletException { // Do required initialization - //d = new java.util.Date(); // DateRefresh at init time, do not change - //count = 0; } public void doGet(HttpServletRequest request, HttpServletResponse response) @@ -27,18 +22,14 @@ public class DateRefresh extends HttpServlet { response.addHeader("Refresh", "1"); // Actual logic goes here. - //count++; PrintWriter out = response.getWriter(); out.println(""); out.println(""); out.println("Date " + new java.util.Date().toString()); - //out.println("
"); - //out.println("GET call number " + count); out.println(""); out.println(""); } public void destroy() { - //count = 0; } }