은은하게 코드 뿌시기

jstl 연동/CORE태그/연동예제 본문

웹/JSP

jstl 연동/CORE태그/연동예제

은은하게미친자 2022. 7. 18. 10:31
728x90

메이븐 저장소 : "https://mvnrepository.com

 

메이븐 저장소에 접속합니다.
jstl 을 검색
1.2 버전선택
jar파일 다운로드
해당 이클립스에서 build path /configure 선택
java build path / libraris 선택/ modutepath/ add external jars에서
다운로드 받은 jar파일 추가 및 apply and close

혹은 

직접 아래 사진처럼 해당 경로에 

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

 

 

jstl-1.2.jar
0.40MB

 

 

 

728x90
Comments