기본 콘텐츠로 건너뛰기

라벨이 jstl인 게시물 표시

2022 08 26 회사 워크샵

jstl:fmt 정리

출처 : http://noritersand.tistory.com/256 기능 : 지역, 메시지 형식, 숫자 및 날짜형식 directive : <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 목차 requestEncoding setLocale bundle setBundle message formatNumber parseNumber formatDate parseDate setTimeZone, timeZone 국제화 및 지역화 태그로 다국어 문서를 처리할 때 유용하고, 날짜와 숫자 형식을 다룰 때 사용된다. I18N - 국제화(Internationalization) 태그라고도 한다. requestEncoding request.setCharacterEncoding() 역할이 같다. <fmt:requestEncoding [value="charsetName"]/>  setLocale 다국어를 지원하는 페이지를 만들때 ResourceBundle로 불러오는 properties 파일들과 연계하여 사용한다. <fmt:setLocale value="locale"         [variant="variant"]         [scope="{page|request|session|application}"]/> <% @   page  language = "java"  contentType = "text/html; charset=UTF-8"  pageEncoding = "UTF-8" %>      <% @  taglib prefix = "c"  uri = "http://java.sun.com/jsp/jstl...

jstl 태그 기본 사용법

10.JSTL 목차 설정 EL core function fmt sql xml 설정 # web.xml <taglib>     <taglib-uri>jstl-c</taglib-uri>     <taglib-location>/WEB-INF/tlds/jstl/c.tld</taglib-location> </taglib> <taglib>     <taglib-uri>jstl-fmt</taglib-uri>     <taglib-location>/WEB-INF/tlds/jstl/fmt.tld</taglib-location> </taglib> <taglib>     <taglib-uri>jstl-fn</taglib-uri>     <taglib-location>/WEB-INF/tlds/jstl/fn.tld</taglib-location> </taglib> jsp 에서 <%@ taglib uri="jstl-c" prefix="c" %> <%@ taglib uri="jstl-fmt" prefix="fmt" %> <%@ taglib uri="jstl-fn" prefix="fn" %> EL # 생존범위 속성 맵 pageScope requestScope sessionScope applicationScope 요청 파라미터 맵 param paramValues 요청 헤더 맵 header headerValues 쿠키 맵 cookie 컨텍스트 초기화 파라미터 맵(서블릿 초기화 파라미터 아님) initParam 실제 pageCon...