Jsp页面获取session值时间:2022-03-28 19:15:56 servlet里面首先先获取session: HttpSession session = request.getSession(); JSTL标签获取Session: session.setAttribute("age","123"); ${ sessionScope.age} 在页面上显示的就是123了 Jsp中获取Session: <% String M = session.getAttribute(“a”).toString(); //从session里把a拿出来,并赋值给M %>