JSP九大内置对象

来源:互联网 发布:sql2000数据库备份 编辑:程序博客网 时间:2024/06/05 16:14

JSP九大内置对象

在jsp中无需创建使用的9个对象

对象 idea out(JspWriter) 于response.getWriter(),用来向客户端发送文本数据 config(ServletConfig) 对应”真身”中的ServletConfig page(当前JSP的真身类型) 当前JSP页面的”this”,即当前对象;Object pa pageContext(PageContext) 页面上下文对象域对象 exception(Throwable) 只有在错误的页面中可以使用这个对象 request(HttpServletRequest) 即HttpServletRequest类对象 response(HttpServletResponse) 即HttpServletResponse类对象 application(ServletContext) 即ServletContext类对象 session(HttpSession) 即HttpSession类对象,不是每个JSP页面中都可以使用,如在某个JSP页面中设置<%@page session=”false”%>, 说明这个页面不能使用session.

注意:
在这9 个对象中很多被极少用到,eg:config page exception 基本不会用
在这9 个对象中有两个对像不是每个JSP页面都可以使用:exception session
有很多前面已经学过的对象: out request response application session config

原创粉丝点击