<session-config> <session-timeout> 30 </session-timeout> </session-config>
要在中设置变量session,无需编辑Web.xml
session
Web.xml
HttpSession session = request.getSession(); String al="am session variable" session.setAttribute("al", al);
并访问它,您只需 ${sessionScope.al}
${sessionScope.al}