- <%
pageContext.setAttribute("username", "root24");
request.setAttribute("username", "root");
session.setAttribute("username", "root2");
application.setAttribute("username", "root23");
%>
${ requestScope.username }
- 特殊的
pageContext.setAttribute("hello-world", "123");
%>
${ requestScope.username }
${ pageScope['hello-world'] }
- 如果调用的是对象的属性 直接 user.name 就可以了