Category: Java

자바 개발 관련 카테고리입니다.

Java

[JAVA] 세션정보(session)를 가져오는 방법

1. 세션정보 가져오는 방법  ServletRequestAttributes servletRequestAttribute = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes(); HttpSession httpSession = servletRequestAttribute.getRequest().getSession(true);   2. 스프링 시큐리티 사용중인 경우 세션정보...
Java

[SPRING+JSP] 파일 업로드 샘플 예제 코드

스프링 환경에서 파일 업로드 기능을 구현하는 예제코드이다. [fileUploader.jsp] <%@ page contentType="text/html;charset=UTF-8" %> <%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title>...