Formoat's Open Blog
EL(Expression Language) 표현 언어 본문
EL(Expression Language)
값을 표현하는 스크립트 언어로 JSP페이지에서 기본적으로 제공하는 스크립틀릿 (<%%>), 표현식 (<%=%>)을 대체해 사용된다.
기본 문법
${식}
${변수}
${객체.속성}
${객체["속성"]}
${배열객체[인덱스값]}
${내장객체.키}
내장 객체 | 설명 | 비고 |
pageContext | JSP 페이지의 내장 객체인 pageContext와 같다. | |
pageScope | pageContext 영역에 저장된 Map객체 | pageContext.getAttribute("key") |
requestScope | request 영역에 저장된 Map 객체 | request.getAttribute("key") |
sessionScope | session 영역에 저장된 Map 객체 | session.getAttribute("key") |
applicationScope | application 영역에 저장된 Map 객체 | application.getAttribute("key") |
param | 요청 파라미터 값을 얻어올 때 사용 | request.getParameter("key") |
paramValues | 요청 파라미터 배열 값을 얻어올 떄 사용 | request.getParameterValues("key") |
header | 요청 정보의 헤더 값을 얻어올 때 사용 | request.getHeader("key") |
headerValues | 요청 정보의 헤더 값(배열)을 얻어올 때 사용 | request.getHeaders("key") |
cookie | 요청 클라이언트의 쿠키 Map 객체 | request.getCookie(); |
initParam | 초키 파라미터의 Map 객체 | application.getInitParameter("key") |
<표> EL 표현언어 내장 객체 종류
A
'Java > JSP & Servlet' 카테고리의 다른 글
JSTL - 코어 태그 (0) | 2019.09.06 |
---|---|
JSTL(JSP Standard Tag Library) (0) | 2019.09.06 |
JSP (Java Server Page) (0) | 2019.09.04 |
DBCP (DataBase Connection Pool) (0) | 2019.09.04 |
JDBC (Java DataBase Connectivity) (0) | 2019.09.04 |
Comments