본문 바로가기

반응형

JSTL

(3)
절대 URI인 [http://java.sun.com/jstl/core_rt]을(를), web.xml 또는 이 애플리케이션과 함께 JSTL 라이브러리가 없거나 구버전 사용시 발생함. build.gradle 에 추가 // JSTL implementation('javax.servlet:jstl:1.2') implementation('org.apache.tomcat.embed:tomcat-embed-jasper:10.0.14')
Spring Boot JSP View 설정하기 JSP의 위치 src/main/webapp/WEB-INF/jsp 기존 SpringBoot는 src/main/resources/teamplates에 타임리프가 들어가면 간단하게 조회된다. 그렇다면 JSP는 위치가 다른데 어떻게? 1. gradle, maven이면 디펜던시를 추가해야한다. gradle의 경우 compile("javax.servlet:jstl") compile("org.apache.tomcat.embed:tomcat-embed-jasper") - 필요하다면 버전을 추가한다, 필자의 경우 springboot 플러그인으로 알아서 버전을 찾아준다. maven의 경우 javax.servlet jstl org.apache.tomcat.embed tomcat-embed-jasper - maven도 마찬가..
JSTL 에서 JAVA로 개발된 함수 사용. ============================= 발췌 부분 시작 ======================================JSP 2.0의 el( ${} )과 jstl(c, fmt, fn)을 쓰다보면 이렇게 편할수 있구나 하고 느꼇는데... 뭔가 부족한게 있어서 fn관련 Soruce를 보게 되었는데.. 헉.... fn.tld를 보면 이라는 tag에 class명과 호출 방식으로 선언되어 있고 Classs를 보면 일반 Static function을 바로 불러 쓰고 있었습니다. 다음은 fn.tld의 예 인데.. 너무 단순하지요... taglib를 만든 다기 보다는 taglib에 기존 Class 함수를 정의만 해두면 되니까요. 예제 ------------------- [mi-html-util.tl..

반응형