当前位置:网站首页>JSP built-in object (implicit object)
JSP built-in object (implicit object)
2022-07-26 07:58:00 【Super Qi】
jsp Implicit objects
1. Definition :
It refers to that it can be used in... Without declaration and creation jsp The object used directly by the page script
2. characteristic :
a. jsp Implicit objects cannot pass new Go to get the instance , It's directly in the java Objects used in scripts
b. jsp Use java Define an implicit object to access the dynamic content of the web page
c. The name of the implicit object is jsp Reserved words
3. effect :
These objects make it easier for users to send requested information to mobile clients , And respond to client requests and store customer information , Greatly simplified jsp The complexity of development
4. classification
page 、 request、 response、 session、 application、out、config、pageContext、exception
5. By function
a. Input / Output object
- request
- response
- out
b. Scope object
- session
- application
- page
- request
c. Servlet object
- pageContent
- config
d. Error object

6. Important method ( When forwarding web pages )
a. Set properties :
public void setAttribute(String name, Object o){
}
b. Get attributes :
public java.lang.Object getAttribute(String name)
example :
<body>
<%
request.setAttribute("username"," Zhang San ");
request.setAttribute("password","123456")
%>
user name :<%=request.getAttribute("username")%><br>
password :<%=request.getAttribute("password")%>
</body>
7. Save scope of implicit object
a. page Range : Only related to the current page
b. request Range : Only related to pages between the same request , This object will be deleted automatically after the request
c. session Range : Session scope allows objects to be created and bound to a session , Objects bound to the session scope are deleted when they are not needed
d. application Range : If the object is non session related , Then define it in the scope of application .* It is mainly used for different sessions to share data

边栏推荐
- Shardingsphere data slicing
- Common templates for web development
- From boosting to lamdamart
- Excel file parsing
- Next item recommendations in short sessions
- Network ()
- Rewriting and overloading
- Summary of common methods of string
- MySQL之执行计划
- Practice of online question feedback module (XIV): realize online question answering function
猜你喜欢

动态性能视图概述

MMOE multi-objective modeling

爬虫->TpImgspider

shardingjdbc踩坑记录

Logical volume management (LVM)

Dynamic performance view overview

Enterprise private network construction and operation and maintenance

总结软件测试岗的那些常见高频面试题

Traversal mode of list, set, map, queue, deque, stack

Selenium: detailed explanation of browser crawler use (I)
随机推荐
The bigger the project is, the bigger it is. This is how I split it
总结软件测试岗的那些常见高频面试题
The difference between ArrayList and LinkedList
The difference between FileInputStream and bufferedinputstream
Open source management system based on ThinkPHP
ARIMA model for time series analysis and prediction
Copy pcap file with producer consumer model
MMOE multi-objective modeling
Add traceid to the project log
Dynamic performance view overview
shardingjdbc踩坑记录
table 固定特定行
The difference between equals() and = =
Web page basic label
Common templates for web development
MySQL implementation plan
Unity Metaverse(二)、Mixamo & Animator 混合树与动画融合
A tutorial for mastering MySQL database audit characteristics, implementation scheme and audit plug-in deployment
Table fix specific rows
Rack server expansion memory