# 四种属性范围 ## pageContext 只在一个页面中保存属性,跳转之后无效。 ## request 在进行服务器跳转时候有效,客户端跳转无效,可以多次服务器跳转 ## session 服务端客户端跳转均有效 ## application 只要服务器不关,随处可用 ``` 服务端跳转 跳转页面 客户端跳转 ``` # 属性操作方法: ## 设置属性名和内容 1.pblic void setAttribute(String name,Object o) ## 获取属性名和内容 2.public Object getAttribute(String name) ## 删除属性名和内容 3.public void removeAttribute(String name) Cookie的使用 Cookie c1 = new Cookie("name","soft1731"); response.addCookie("name"); 获取Cookie 在获取页面中输入: ``` Cookie[] c=request.getCookies(); if(c.length>0) { for(int i=-;icount=<%=count++%> Last modification:October 6, 2018 © Allow specification reprint Support Appreciate the author AliPayWeChat Like If you think my article is useful to you, please feel free to appreciate
One comment
Meeeeeeeeee