contohnya dalam coding:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>JSTL Core Tags Example</title>
</head>
<body>
<c:set var="test" value="JSTL Core Tags"></c:set>
<c:out value="${test}"></c:out>
</body>
</html>
JSTL Core Tags ada banyak:
1. <c:out> : Tag to display message or content.
2. <c:forEach> : Tag to iterate over list or map of elements
3. <c:set> : Tag to set the value of variable
4. <c:if> : Tag to evaluate condition.
5. <c:choose> : Tag to evaluate multiple conditions.
6. <c:when> : Tag within c:choose tag.
7. <c:otherwise> : Tag withing c:choose tag that satisfies rest of all conditions other than c:when conditions.
8. <c:catch> : Tag to catch any exception.
9. <c:remove> : Tag to remove variable.
10. <c:import> : Tag to import.
11. <c:forTokens> : Similar to forEach but iterates over tokens.
12. <c:param> : Tag to pass parameters to the url.
13. <c:redirect> : Tag to redirect.
14. <c:url> : Tag for URL.
yang pernah gue pake sih: c:forEach, c:if, c:choose (c:when & c:otherwise)
sumber
P.S: ternyata klik masing2 link untuk tiap tag ada contohnya
No comments:
Post a Comment