package fr.ensimag.biblio.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.*; @WebServlet(name = "Bilan", urlPatterns = {"/bilan"}) public class Bilan extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { /* On vérifie dans la session que l’utilisateur est bien connecté */ HttpSession sess = request.getSession(false); if (sess != null) { String name = (String) sess.getAttribute("utilisateur"); if (name != null) { /* L’utilisateur est bien connecté, on envoie la réponse */ response.setContentType("text/html;charset=UTF-8"); try (PrintWriter out = response.getWriter()) { out.println(""); out.println(""); out.println("
"); out.println(""); out.println("