🙆‍♂️ import 🙇‍♂️

WebLogic JSP Reference[Oracle]


EL Implicit Objects

JSP에서 사용되는 JSP EL(Expression Language)에는 사용할 수 있는 몇 가지 내장 객체들이 있다.

이러한 객체들은 아래 예시처럼 ${???}형식으로 사용할 수 있다.

${pageContext.request.requestURI}
// 요청 URL, HttpServletRequest를 호출하여 가져온다.

${sessionScope.gillog}
// session-scoped의 attribute 중 gillog이라는 이름의 Value
// 발견되지 않으면 null

${param.gillog}
// gillog라는 parameter의 String Value를 return
// 발견되지 않으면 null

${paramValues.gillogs}
// gillogs라는 parameter로 포함된 String[] Value를 return
// 발견되지 않으면 null

pageContext

pageContext object를 가져온다.

pageScope

page-scoped attribute의 이름Value에 Mapping 하는 Map을 가져온다.

requestScope

request-scoped attribute의 이름Value에 Mapping 하는 Map을 가져온다.

sessionScope

session-scoped attribute의 이름Value에 Mapping 하는 Map을 가져온다.

applicationScope

application-scoped attribute의 이름Value에 Mapping 하는 Map을 가져온다.

param

매개 변수 이름단일 String 매개 변수 값에 Mapping하는 Map을 나타낸다.
ServletRequest.getParameter(String name)을 호출하여 가져온다.

paramValues

매개 변수 이름String 배열 매개 변수 값에 Mapping하는 Map을 가져온다.
ServletRequest.getParameterValues(String name)을 호출하여 가져온다.

헤더 이름단일 String 헤더 값에 Mapping하는 Map을 가져온다.
ServletRequest.getHeader(String name)을 호출하여 가져온다.

headerValues

헤더 이름String 배열 헤더 값에 Mapping하는 Map을 가져온다.
ServletRequest.getHeaders(String name)을 호출하여 가져온다.

쿠키 이름단일 쿠키 개체에 Mapping하는 Map을 가져온다.
HttpServletRequest.getCookies()를 호출하여 가져온다.

동일한 이름을 여러 쿠키에서 공유하는 경우 구현은 getCookies() 메서드에 의해 반환된 쿠키 개체 배열에서 첫 번째 개체를 사용해야 한다.

반환되는 쿠키 순서는 현재 Servlet 규격에 맞게 지정되어 반환되지 않는다.

initParam

context 초기화 parameter name문자열 매개 변수 값에 Mapping하는 Map을 가져온다.
ServletRequest.getInitParameter(String name)를 호출하여 가져온다.

profile
🚀 기록보단 길록을 20.10 ~ 22.02 ⭐ Move To : https://gil-log.github.io/

1개의 댓글

comment-user-thumbnail
2023년 6월 7일

Returns a Map that maps context initialization parameter names to their string values.
It invokes ServletRequest.getInitParameter(String name).
These implicit objects provide convenient access to various aspects of the JSP environment, such as request parameters, session attributes, headers, and cookies. lol shot io

답글 달기