[JSP] JSTL 사용하기 - Tags[펌]
[JSP] JSTL 사용하기 - Tags[펌]
JSTL 태그 분류
* Core tags
* Formatting tags
* SQL tags
* XML tags
* JSTL Functions
1
* Core tags
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- 핵심 Tags
1-1. <c:out>
1-2. <c:set>
1-3. <c:remove>
1-4. <c:catch>
1-5. <c:if>
1-6. <c:choose>
1-7. <c:when>
1-8. <c:otherwise>
1-9. <c:import>
1-10. <c:forEach>
1-11. <c:forTokens>
1-12. <c:param>
1-13. <c:redirect>
1-14. <c:url>
2
* Formatting tags
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
- 핵심 Tags
2-1. <fmt:formatNumber>
2-2. <fmt:parseNumber>
2-3. <fmt:formatDate>
2-4. <fmt:parseDate>
2-5. <fmt:bundle>
2-6. <fmt:setLocale>
2-7. <fmt:setBundle>
2-8. <fmt:timeZone>
2-9. <fmt:setTimeZone>
2-10. <fmt:message>
2-11. <fmt:requestEncoding>
3
* SQL tags
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
- 핵심 Tags
3-1. <sql:setDataSource>
3-2. <sql:query>
3-3. <sql:update>
3-4. <sql:param>
3-5. <sql:dateParam>
3-6. <sql:transaction>
4
* XML tags
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
- 핵심 Tags
4-1. <x:out>
4-2. <x:parse>
4-3. <x:set>
4-4. <x:if>
4-5. <x:forEach>
4-6. <x:choose>
4-7. <x:when>
4-8. <x:otherwise>
4-9. <x:transform>
4-10. <x:param>
5
* JSTL Functions
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
- 핵심 Tags
5-1. fn:contains()
5-2. fn:containsIgnoreCase()
5-3. fn:endsWith()
5-4. fn:escapeXml()
5-5. fn:indexOf()
5-6. fn:join()
5-7. fn:length()
5-8. fn:replace()
5-9. fn:split()
5-10. fn:startsWith()
5-11. fn:substring()
5-12. fn:substringAfter()
5-13. fn:substringBefore()
5-14. fn:toLowerCase()
5-15. fn:toUpperCase()
5-16. fn:trim()