+package compbio.listeners;
+
+import java.io.IOException;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import compbio.statistic.StatisticsProt;
+
+/**
+ * Servlet implementation class LogServlet
+ */
+public class LogServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ final long startTime = System.currentTimeMillis();
+ String id = request.getParameter("IdJob");
+ StatisticsProt sp = new StatisticsProt();
+// request.setAttribute("result", sp.readJobLog(id));
+ final long endTime = System.currentTimeMillis();
+ request.setAttribute("timeExecution", (endTime - startTime));
+ request.setAttribute("IdJob", id);
+ RequestDispatcher rd = request.getRequestDispatcher("/ReportLog.jsp");
+ rd.forward(request, response);
+ }
+
+ /**
+ * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ doGet(request, response);
+ }
+
+}