📄 e1052. preventing the creation of a session in a jsp page.txt
字号:
By default, a JSP page will automatically create a session for the request if one does not exist. However, sessions consume resources and if it is not necessary to maintain a session, one should not be created. For example, a marketing campaign may suggest the reader visit a web page for more information. If it is anticipated that a lot of traffic will hit that page, you may want to optimize the load on the machine by not creating useless sessions.
The page directive is used to prevent a JSP page from automatically creating a session:
<%-- Prevent the creation of a session --%>
<%@ page session="false">
<html>
<head><title>A Session-less JSP Page</title></head>
<body>
...
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -