728x90

HttpSession 객체의 주요 메소드


- setAttribute(String name, Object )

- getAttribute(String name)

- removeAttribute(String name)

- invalidate() : session 객체를 소멸시킨다. 로그아웃할때 많이 쓰이는듯 하다.

- setMaxInactiveInterval(int초) : 클라이언트가 마지막 요청을 한 뒤 인수로 받은 시간만큼 지나도 요청이 들어오지 않으면, 세션을 소멸시킨다.


등등...


추후 내용을 점점 더 보강하는 방향으로 가야할듯 싶다.


내용에 참고가 된 출처

http://stellan.tistory.com/entry/HttpSession%EC%9D%84-%EC%9D%B4%EC%9A%A9%ED%95%9C-Session-%EA%B4%80%EB%A6%AC

http://cozyplace.kr/entry/JSP-%EC%84%B8%EC%85%98


이외 세션을 이해하는데 도움이 될 사이트

http://mohwaproject.tistory.com/entry/HTTP-Session-%EC%9D%B4%EB%9E%80

http://egloos.zum.com/mars0717/v/1078685

728x90

'개발 > JAVA' 카테고리의 다른 글

JAVA에서 자주 쓰게 되는 형변환  (0) 2016.04.14
728x90

php에서 java로 넘어가니 형변환을 해야 할 일이 많아졌다..

근데 하도 자주 쓰던 것들이 아니다보니 계속 까먹는다.

해서 메모한다.


String to int

String str = "123";

int num = Integer.parseInt(str);  

int to String

int num = 111;

String str = Interger.toString(num); 


이외 float, double, long등등도 있긴한데,

생각보다 자주 안써서 추후..


혹시 다른 자료형을 형변환 해야 한다면  http://theeye.pe.kr/archives/457 여기를 참고한다.

728x90

'개발 > JAVA' 카테고리의 다른 글

Session 관련 - HttpSession  (0) 2016.04.26

+ Recent posts