关于WEB域内置对象:[存值取值-传递数据用]:
setAttribute/getAttribute
page/pageContext: 只在当前界面有效,离开无效
request: 在一次请求转发中有效
session: 在一次会话当中有效
applicationContext:在服务器范围内有效
其他:
response: 相应setContextType("text/html;charSet=UTF-8");
out: 输出,不建议使用
exception: 异常
config:读取初始化的信息 -- web.xml[部署描述符]
session常用方法:
<h2>session:一次会话当中有效</h2><%=session.isNew() %><%=session.getId() %>
application常用的方法:
<h2>application:浏览器范围内有效</h2><%=application.getRealPath("/") %><hr/><%=application.getRealPath("") %>
JSP的九个内置对象
原文地址:https://www.cnblogs.com/blogofcookie/p/8343625.html