


| Category | Identifier | Type | Description |
|---|---|---|---|
| JSP | pageContext | Java Bean | 현재 페이지의 프로세싱과 상응하는 PageContext instance. |
| 범위 (scope) | pageScope | Map | page scope에 저장된 객체를 추출. |
| requestScope | Map | request scope에 저장된 객체를 추출. | |
| sessionScope | Map | session scope에 저장된 객체를 추출. | |
| applicationScope | Map | application scope에 저장된 객체를 추출. | |
| 요청 매개변수 | param | Map | ServletRequest.getParameter(String)을 통해 요청 정보를 추출. |
| paramValues | Map | ServletRequest.getParameterValues(String)을 통해 요청 정보를 추출. | |
| 요청 헤더 | header | Map | HttpServletRequest.getHeader(String)을 통해 헤더 정보를 추출. |
| headerValues | Map | HttpServletRequest.getHeaders(String)을 통해 헤더의 정보를 추출. | |
| 쿠키 | cookie | Map | HttpServletRequest.getCookies()를 통해 쿠키 정보를 추출. |
| 초기화 매개변수 | initParam | Map | ServletContext.getInitParameter(String)를 통해 초기화 파라미터를 추출. |
| library | prefix | function | URI |
|---|---|---|---|
| core | c | 변수 지원, 흐름제어, URL처리 | http://java.sun.com/jsp/jstl/core |
| XML | x | XML 코어, 흐름제어, XML 변환 | http://java.sun.com/jsp/jstl/xml |
| 국제화 | fmt | 지역, 메시지 형식, 숫자 및 날짜 형식 | http://java.sun.com/jsp/jstl/fmt |
| database | sql | SQL | http://java.sun.com/jsp/jstl/sql |
| 함수 | Collection, String 처리 | http://java.sun.com/jsp/jstl/functions |
| function | tag | description |
|---|---|---|
| 변수지원 | set | jsp page에서 사용할 변수 설정. |
| remove | 설정한 변수를 제거. | |
| 흐름제어 | if | 조건에 따른 코드 실행. |
| choose, when, otherwise | 다중 조건을 처리할 때 사용.(if ~ else if ~ else) | |
| forEach | array나 collection의 각 항목을 처리할 때 사용. | |
| forTokens | 구분자로 분리된 각각의 토큰을 처리할 때 사용.(StringTokenizer) | |
| URL처리 | import | URL을 사용하여 다른 자원의 결과를 삽입. |
| redirect | 지정한 경로로 redirect. | |
| url | URL 작성. | |
| 기타태그 | catch | Exception 처리에 사용. |
| out | JspWriter에 내용을 처리한 후 출력. |

<c:forEach items="${ List }" var="ob">
<tr>
<td>${ ob.code }</td>
<td>
<form id="form-detail" action="${ root }/note/detail.jsp" method="POST">
<input type="hidden" name="code" value="${ ob.code }">
<input type="hidden" name="title" value="${ ob.title }">
<input type="hidden" name="price" value="${ ob.price }">
<input type="hidden" name="author" value="${ ob.author }">
<a href="#" onclick="document.querySelector('#form-detail').submit()">${ ob.title }</a>
</form>
</td>
<td>${ ob.price }</td>
<td>${ ob.author }</td>
</tr>
</c:forEach>
<c:set var="root" value="${ pageContext.request.contextPath }" scope="session" />
var : 변수명 지정.
scope : 변수가 저장될 scope. 기본값은 page.
<c:choose>
<c:when test="${ 조건 }">
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
when : if, case문, test="${ }" 내의 조건에 맞는다면 내부 실행.
otherwise : else, default문
<fmt:requestEncoding value=""/>