el表达式初步 ${}

2017-10-05  本文已影响6人  SmallTwo
  1. <%
    pageContext.setAttribute("username", "root24");
    request.setAttribute("username", "root");
    session.setAttribute("username", "root2");
    application.setAttribute("username", "root23");

%>

${ requestScope.username }

  1. 特殊的
    pageContext.setAttribute("hello-world", "123");
    
%>

${ requestScope.username }

${ pageScope['hello-world'] }
  1. 如果调用的是对象的属性 直接 user.name 就可以了
上一篇 下一篇

猜你喜欢

热点阅读