본문 바로가기

Java/Spring

프로필 사진 설정

프로젝트경로 구하기 (JSTL 활용)

jsp 페이지에서

 

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath}"/>    

실제 활용 : <img id="profile_img" class="profile_img"
src="${path}/resources/img/profile.jpg"/>

'Java > Spring' 카테고리의 다른 글

AOP  (0) 2023.08.11
log4j pattern 모음  (0) 2023.08.11
file upload 구현  (0) 2023.08.08
project 신규 설정하는 법, REST 댓글 구현  (0) 2023.08.07
8.4까지 workspace  (0) 2023.08.04