심플태그에서 getJspContext() 메소드는 JspContext를 반환합니다.
JspContext javax.servlet.jsp.tagext.SimpleTagSupport.getJspContext()
하지만 내부적으로는 PageContext 객체 입니다.
PageContext는 JspContext를 상속 받습니다.
때문에 getJspContext()가 반환하는 JspContext 객체를 PageContext로 형변환하여 쓸 수 있습니다.
(PageContext)getJspContext().getRequest()
JspContext javax.servlet.jsp.tagext.SimpleTagSupport.getJspContext()
하지만 내부적으로는 PageContext 객체 입니다.
PageContext는 JspContext를 상속 받습니다.
때문에 getJspContext()가 반환하는 JspContext 객체를 PageContext로 형변환하여 쓸 수 있습니다.
(PageContext)getJspContext().getRequest()
태그 : jsp




최근 덧글