JSTL
-
JSTL 과 EL(Expression Language)으로 다르게 "출력"해보자web( jsp, servlet )/jsp 2024. 7. 24. 22:54
▤ 목차" data-ke-type="html">HTML 삽입미리보기할 수 없는 소스 ✔ EL(Expression Language) jsp페이지에서 데이터를 출력하고 조작하는 간편한 방법을 제공한다. EL은 주로 jsp 코드 내에서 사용되며 다양한 내장 객체를 통해 데이터를 접근하고 제어할 수 있다.jsp 코드의 가독성을 높이고 유지보수를 용이하게 할 수 있다. ⌨ 기본 개념1. 변수 접근 el을 사용하여 jsp 페이지의 범위(scope)에 있는 변수에 쉽게 접근할 수 있다.예를 들어, ${user.name}으로 사용하면 user 객체에 name 속성에 접근할수 있다. 2. 컬렉션 접근배열이나 리스트와 같은 컬렉션 객체의 요소에 접근할 때 유용하다.${employees[0].name}과 같이 인덱스..