四大域對象作用范圍:
pageContext < httpServletRequest < httpSession < servletContext
pageContext
作用范圍:當前jsp頁面;
作用:獲取九大內置對象;
常用方法:getAttribute()、setAttribute()、removeAttribute()、findAttribute()
httpServletRequest
作用范圍:一次請求范圍內,轉發有效重定向失效;
作用:將servlet中的數據通過request對象帶到jsp頁面;
httpSession
作用范圍:存活時間內(默認30分鍾),一次會話內有效,轉發和重定向都有效;
servletContext
作用范圍:整個web應用;
在jsp的九大內置對象中,servletContext對應application;