jsp Chapter

Application: the current server (can contain multiple sessions):
When the server starts, it will create an application object that is shared by all users
page, request, session, application objects have four scopes
setAttribute () and getAttribute () method
and scope increasing the scope

page scope: within a valid page range pageContext object accessed by
the request scope: requesting a valid range in the server
session scope: the scope of the content in one session active
application scope: application server effectively in a range of

JSP uses cookie:
Create Object cookie
Cookie newCookie = new Cookie (String key , String value);
write cookie
response.addCookie (newCookie);
read cookie
cookies [] = request.getCookies cookie ();

The cookie:
the cookie was invented by Netscape, the most common way to track user sessions. It
is generated by the server, sent to the client browser, the browser will save it as a
text file in the directory, the next request convenience

the cookie to:
(1) to track a specific object: such as visits from people who, last access time, path
(2) Statistics page views
(3) in the cookie expiration date, record user login information
(4) for the user recommend different content preferences

Benefits JAVA Bean: The data package
---------------------
Author: cb19980902
Source: CSDN
Original: https: //blog.csdn.net/cb19980902/article/ details / 80474584
copyright: This article is a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin www.cnblogs.com/rzbwyj/p/11139351.html
jsp