Package servlet

Source Code of servlet.S_UserRefresh

package servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import business.Utilisateur;
import dao.DaoUtilisateur;


public class S_UserRefresh extends HttpServlet {
  private static final long serialVersionUID = 1L;


  @Override
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doPost(request, response);
  }

  @Override
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("html");
   
    Utilisateur utilisateur = (Utilisateur) request.getSession().getAttribute("utilisateur");
    if(utilisateur != null) {
      utilisateur = DaoUtilisateur.getUtilisateur(utilisateur.getId_utilisateur());
      request.getSession().setAttribute("utilisateur", utilisateur);
      request.getRequestDispatcher("/pageComponent/menu_top.jsp").forward(request, response);
    }
  }
}
TOP

Related Classes of servlet.S_UserRefresh

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.