JSTL
- JSTL(JSP Standard Tag Library)은 JSP page에서 조건문 처리, 반복문 처리 등을 html tag 형태로 작성할 수 있게 도와준다.
set, remove
- set | 1
 | <c:set var="varName" scope="session" value="someValue"/>
 |  
 
| 12
 3
 
 | <c:set var="varName" scope="request">someValue
 </c:set>
 
 |  
 
- remove | 1
 | <c:remove var="varName" scope="request"/>
 |  
 
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 
 | <%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
 <c:set var="value1" scope="request" value="kim"/>
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="UTF-8">
 <title>Insert title here</title>
 </head>
 <body>
 성: ${value1 }<br>
 <c:remove var="value1" scope="request"/>
 성: ${value1 }<br>
 </body>
 </html>
 
 | 
Property, Map
  | 1
 | <c:set target="${some}" property="propertyName" value="anyValue"/>
 | 
- some 객체가 Java bin일 경우
- some 객체가 map일 경우: some.put(propertyName, anyValue);
if
| 12
 3
 4
 
 | <c:if test="조건">...
 ...
 </c:if>
 
 | 
choose
- if-- else혹은- switch- casestatement 처럼 조건에 맞게 사용 될 수 있다.
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 
 | <c:choose><c:when test="${score >= 90}">
 A학점 입니다.
 </c:when>
 <c:when test="${score >=80 }">
 B학점입니다.
 </c:when>
 <c:when test="${score >=70 }">
 C학점입니다.
 </c:when>
 <c:when test="${score >=60 }">
 D학점입니다.
 </c:when>
 <c:otherwise>
 F학점 입니다.
 </c:otherwise>
 </c:choose>
 
 | 
forEach
- 배열 및 Collection에 저장된 요소를 차례대로 처리한다.
| 1
 | <c:forEach var="변수" items="아이템" [begin="시작번호"] [end="끝번호"]>
 | 
import
- 지정한 URL에 연결하여 결과를 지정한 변수에 저장한다.
| 12
 3
 
 | <c:import url="URL" charEncoding="캐릭터 인코딩" var="변수명" scope="scope"><c:param name="파라미터 이름", value="파라미터값"/>
 </c:import>
 
 | 
- url: 결과를 읽어올 URL
- charEncoding: 읽어온 결과를 저장할 때 사용할 character encoding
- var: 읽어온 결과를 저장할 영역
- scope: 변수를 저장할 영역
- <c:param> 태그는 url 속성에 지정한 사이트에 연결할 때 전송할 파라미터를 입력한다.
redirect
response.sendRedirect() 와 비슷
| 12
 3
 
 | <c:redirect url="리다이렉트할URL"><c:param name="파라미터이름" value="파라미터값"/>
 </c:redirect>
 
 | 
- url: 리다이렉트 URL
- <c:param>은 리다이렉트 할 페이지에 전달할 파라미터 지정
out
| 1
 | <c:out value="value" escapeXml="{true|false}" default="defaultValue" />
 | 
- excapeXml 값이 true 일경우 아래와 같이 문자를 변경한다. 생략할 수 있으며, 생략할 경우 기본 값은 true이다.
| 문자 | 변환된 형태 | 
| < | < | 
| > | > | 
| & | & | 
| ' | ' | 
| " | " |