JSP, PHP 의 print_r 같은 기능
Server Side/JSP2017. 1. 20. 21:50
Enumeration enumeration = session.getAttributeNames();
int i = 0;
while(enumeration.hasMoreElements()){
i++;
String sName = enumeration.nextElements().toString();
String sValue = (String)session.getAttribute(sName);
out.println("sName : " + sName + "<br />");
out.println("sValue : " + sValue + "<br />");
}
if(i == 0)
세션 찍어볼 때 유용.
session.attribute 유틸을 임포트 할 것.
'Server Side > JSP' 카테고리의 다른 글
간단한 DB 연결 테스트 JSP 파일 (0) | 2017.02.21 |
---|---|
JSP 액션태그 -> EL 태그 (0) | 2017.02.07 |
JSP 세션 관련 메소드 (0) | 2017.01.20 |
JSP 쿠키 관련 메소드 (0) | 2017.01.19 |
JSP request 및 response 객체 (0) | 2017.01.17 |