웹/JSP
jstl 연동/CORE태그/연동예제
은은하게미친자
2022. 7. 18. 10:31
728x90
메이븐 저장소 : "https://mvnrepository.com"
혹은
직접 아래 사진처럼 해당 경로에
jar파일 넣어줘도 됨
태그라이브 |
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
jstl 예제
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import = "java.util.Date" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>page 디렉티브 태그</title>
</head>
<body>
Today is
<%= new Date() %>
<%@ include file="include/top.jsp" %>
<h1>jstl 태그라이브러리</h1>
<c:forEach var="i" begin="1" end="10" step="1">
<c:out value="${i}"/>
<br/>
</c:forEach>
</body>
</html>
|
cs |
728x90