목록세션 (2)
삶 가운데 남긴 기록 AACII.TISTORY.COM

로그인 html 프로젝트의 WebContent 폴더 아래에 새 html 파일을 생성하고 이름을 login.html 으로 설정합니다. ID: PW: 로그아웃 로그인/로그아웃 서블릿 작업중인 패키지 경로에 새 서블릿 LoginOut.java 를 생성합니다. package net.aacii.test; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import j..

세션은 클라이언트 마다 개별적으로 생성되어 클라이언트의 브라우저를 종료할 때까지 서버쪽에서 그 객체(정보)를 유지합니다. HttpSession 생성 HttpSession객체는 개발자가 수동으로 생성하는게 아니라 HttpServletRequest의 getSession() 메서드를 이용해서 객체를 획득합니다. 새 서블릿 SessionTest.java를 생성합니다. package net.aacii.test; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpSe..