当前位置:网站首页>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

边栏推荐
- 微服务feign调用时候,token丢失问题解决方案
- Enterprise private network construction and operation and maintenance
- Regression analysis code implementation
- Rewriting and overloading
- Unity metaverse (II), mixamo & animator hybrid tree and animation fusion
- Open source management system based on ThinkPHP
- Using producer consumer model and dpkt to process pcap files
- Parameterization of JMeter performance test using CSV file
- Come across the sea to see you
- [uniapp] encapsulation of multiple payment methods
猜你喜欢

Web page basic label

Table fix specific rows

A tutorial for mastering MySQL database audit characteristics, implementation scheme and audit plug-in deployment

DADNN: Multi-Scene CTR Prediction via Domain-Aware Deep Neural Network

“尝鲜”元宇宙,周杰伦最佳拍档方文山将于7月25日官宣《华流元宇宙》

Excel file reading and writing (creation and parsing)

【uniapp】多种支付方式封装

Audio and video learning (10) -- PS streaming

爬虫->TpImgspider

Machine learning related competition website
随机推荐
"Door lock" ignites a heated discussion on the safety of living alone. The new poster picture is suffocating
一文掌握mysql数据库审计特点、实现方案及审计插件部署教程
From boosting to lamdamart
Implementation class under map interface
Come across the sea to see you
在线问题反馈模块实战(十四):实现在线答疑功能
Keras learning part: obtaining the output results of neural network middle layer
OVS underlying implementation principle
The difference between throw and throws?
Summary of distributed related interview questions
Web side 3D visualization engine hoops communicator reads 10g super large model test | digital twin Technology
Deep learning model deployment
Summary of common methods of string
给项目日志加上traceid
System architecture & microservices
Copy pcap file with producer consumer model
Sort: merge sort and quick sort
Pycharm code specification tool flake8
Speech at 2021 global machine learning conference
Summarize the common high-frequency interview questions of the software testing post