본문 바로가기

Wanna be a Programmer/Servlet & JSP

Servlet & JSP day13 - 내장 객체

 

내장 객체(Implicit Variable)

JSP에서 기본적으로 제공해 주는 객체

변수의 선어느 객체의 생성, 할당 없이 JSP 태그에서 사용할 수 있는 객체

JSP가 서블릿으로 변환될 때 Web Container가 생성해서 제공

종류

request : HttpServletRequest

response : HttpServletResponse

out : JspWriter - Servlet에서의 PrintWriter 역할

session : HttpSession - <% @ page session="false" %>로 설정하면 안생긴다.

application : ServletContext

config : ServletConfig

pageContext : Servlet에는 없는 객체로 다른 내장 객체들을 생성할 수 있다.

page : this - 서블릿 객체 자신

exception : Throwable - <% @ page isErrorPage = "true" %>로 설정된 경우만 생성(default는 false)

 

web.xml

folder : WebContent

 

소스보기

 

init_param.jsp

folder : WebContent/implicit_var

 

소스보기