当前位置:网站首页>Nine built-in objects of JSP and four scopes of Servlet

Nine built-in objects of JSP and four scopes of Servlet

2022-06-25 20:40:00 As high as the wind

One 、JSP Nine built-in objects

1.request Request object type javax.servlet.ServletRequest Scope Request

2.response Corresponding object type javax.servlet.ServletResponse Scope Response

3.pageContext Page context object type javax.servlet.jsp.PageContext Scope Page

4.session Conversation object type javax.servlet.http.HttpSession Scope Session

5.application Application object type javax.servlet.ServletContext Scope Application

6.out Output object type javax.servlet.jsp.JspWriter Scope Page

7.config Configuration object type javax.servlet.ServletConfig Scope Page

8.page Page object type javax.lang.Object Scope Page

9.exception Exceptions type javax.lang.Throwable Scope Page

Two 、Servlet Four scopes

1. Scope definition : Refers to its Servlet The scope of the request and the corresponding process

2. classification :

Page Domain When one JSP page forward To another JSP, This scope does not exist

Request Domain Its scope is page refresh ( Re request )

Session Domain It refers to a conversation , Close the browser and it will not exist

Application Domain Means the whole of the works ( application ) Scope , Close the entire browser scope and it will no longer exist

3、 ... and 、 Database foundation

ACID: It means in the database management system (DBMS) The four characteristics of things in :

1.A: Atomicity (Atomicity) All operations of the whole thing , Either they all succeed , Or they all failed , If you fail , Will be rolled back (rollback) To the beginning of something

2.C: Uniformity (Consistency) Before and after the execution of things , The relevant data are consistent

3.I: Isolation, (Isolation) Before and after things executed concurrently , They don't influence each other

4.D: persistence (Durability) After the successful execution of things , The data related to the execution of this transaction will not be rolled back


原网站

版权声明
本文为[As high as the wind]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202181342079174.html