Advertisement
andersonalmada

Untitled

Jun 27th, 2022
1,065
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. HttpSession session = request.getSession();
  2.  
  3.  
  4. if (session.getAttribute("first_name") == null) {
  5.   String firstName = request.getParameter("first_name");
  6.   session.setAttribute("first_name", firstName);
  7.   response.getWriter().append("Session created !");
  8. } else {
  9.   response.getWriter().append("Session exist !");
  10. }
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement