JSP内置对象又叫隐含对象;
在编写表达式或Scriptlet时,有九个对象可以直接使用而不需要声明或定义,按照JSP标准,JSP解析去器会自动在_jspService()方法中预定义这些变量(对象),在使用通常需要注意大小写。如图所示:
对象名 | 描述 |
---|---|
response | HttpServletResponse |
response | HttpServletResponse |
pageContext | 可以访问JSP页面的许多属性 |
session | HttpSession |
application | ServletContext |
config | 本页的ServletConfig |
out | 用于输出Writer |
page | 当前页的实例 |
exception | Throwable |