본문 바로가기
카테고리 없음

JSTL 사용법 (다운로드 및 사용법)

by 맛길만걷자 2024. 6. 26.
728x90
반응형

JSTL(Jsp Standarad Tag Library)

		JSP에서 자주 사용되거나 공통적으로 사용되는 Java코드를
		쉽고, 표기법을 간단히 할 수 있도록 태그화 하여
		표준(Standard)으로 제공함
		
		(if, for, scope 변수 선언, 데이터 파싱 등)

Apache Tomcat® - Apache Taglibs Downloads

 

Apache Tomcat® - Apache Taglibs Downloads

Welcome to the Apache Taglibs download page. This page provides download links for obtaining the latest version of the Apache Standard Taglib, as well as links to the archives of older releases. You must verify the integrity of the downloaded files. We pro

tomcat.apache.org

 

 

 

Apache Tomcat® - Apache Taglibs Downloads

Welcome to the Apache Taglibs download page. This page provides download links for obtaining the latest version of the Apache Standard Taglib, as well as links to the archives of older releases. You must verify the integrity of the downloaded files. We pro

tomcat.apache.org

 

클릭하여 다운 받고 원하는 위치로 옮기기.

 

이클립스
window > showview > navigator 
showview에없으면 other에서 검색


다이나믹 웹프로젝트에는 서버가 읽고 배포
webapp에 있는 내용을 읽고 배포시킴

(css, 등등 webapp에 넣어둠, 모든것의 기준)
즉 webapp에 넣어야함 web-inf >lib안에 넣어줌


정리

<h3>JSTL 라이브러리 등록방법</h3>
<ol>
      <li> https://tomcat.apache.org/download-taglibs.cgi 접속 </li>
      <li> jar files -> impl, EL, Spec 다운로드 </li>
      <li> WEB-INF/lib 폴더에 추가</li>
    </ol>

추가해서 끝이 아니라


JSTL을 사용하고자 하는 JSP가 있을 경우
 해당 JSP 최상단에 JSTL 라이브러리를 추가하는 지시가 taglib를 작성해야 한다.

 

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

uri 는 사용할 uri 선택하면됨.

 

JSTL을 사용하고자 하는 JSP가 있을 경우
     해당 JSP 최상단에 JSTL 라이브러리를 추가하는 지시가 taglib를 작성해야 한다.
    
     prefix : 접두사. 다른 태그와 구별할 수 있는 name space(태그앞에 붙는 태그명)
    
     url(Uniform Resource Locator) : 인터넷에서 특정 자원 위치를 지정(주소)
     uri(Uniform Resourced Identifier) : 네트워크 상에서 자원을 구별하는 식별자
     (자원을 구분하는 유일한 주소)
    
     -> uri에 작성하는 주소는 네트워크 상의 주소가 아닌 다운로드 받은 라이브러리 내부 구분 주소
    

 

728x90
반응형