![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcKRuda%2FbtsqPZ89YKz%2FXKBgyV4TJXn15dbOQK2mMK%2Fimg.png)
서블릿 (servlet) - Scope
·
Programming Language/SERVLET
Scope ( 범위, lifecycle ) 1️⃣ 개요 임의의 데이터를 특정 객체에 저장할 수 있다. 객체가 3가지 형태가 있고 lifecycle가 다르다. ★★ 2️⃣ 종류 3가지 ✅ HttpServletRequest ( request scope 라고 부른다. ) // Attributes are reset between requests // request.getParameter(key) 구별해야 된다. -저장방법: request.setAttribute(String key, Object value); -조회: request.getAttribute(key); 형변환 필요 -삭제: request.removeAttribute(key); ✅ HttpSession ( session scope 라고 부른다. ) H..