1. A session is created by the web container when you call HttpServletRequest.getSession() or HttpServletRequest(boolean create). A JSP by default will make a getSession call and create a session,. The second sentence is not complete right. A jsp by default contains
<%@ page session="true" %>, which tells jsp that the page participates in a session。If no session exits , getSession() will create a session.
session
最新推荐文章于 2024-10-24 06:00:00 发布
本文详细介绍了在JSP中,默认情况下如何管理和创建HTTP会话。通过调用HttpServletRequest.getSession()方法,如果当前请求没有会话,则会自动创建一个新的会话。此外,还解释了JSP页面中%@page session=true指令的作用。
21万+

被折叠的 条评论
为什么被折叠?



