1. <%--
    2. Created by IntelliJ IDEA.
    3. User: 23839
    4. Date: 2021/11/22
    5. Time: 8:37
    6. To change this template use File | Settings | File Templates.
    7. --%>
    8. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    9. <%@ page import="java.util.ArrayList" %>
    10. <%@ page import="com.zcc.pojo.*"%>
    11. <html>
    12. <head>
    13. <title>El表达式显示</title>
    14. </head>
    15. <body>
    16. <b><%= ((User)request.getAttribute("user")).toString()%></b>
    17. <b><%= ((ArrayList)request.getAttribute("uList")).get(1).toString()%></b><br>
    18. <b><%= ((ArrayList)request.getAttribute("uList")).get(0).toString()%></b><br>
    19. <b><%= ((ArrayList)request.getAttribute("uList")).size()%></b>
    20. <b>我知道这个El怎么使用的!${str}</b>
    21. <b>${uList[0]}</b>
    22. <b>${uList[1]}</b>
    23. <b>${uList[2]}</b>
    24. <%
    25. pageContext.setAttribute("hello","helloPagContext");
    26. request.setAttribute("hello","helloRequest");
    27. session.setAttribute("hello","helloSession");
    28. application.setAttribute("hello","helloApplication");
    29. %>
    30. ${sessionScope.hello}
    31. ${requestScope.hello}
    32. ${pageScope.hello}
    33. ${applicationScope.hello}
    34. ${1+2}--${1*2}--${1/2}--${1%3}
    35. <br>${empty str}
    36. <hr>${header.entrySet()}
    37. <hr>${headerValues["Accept-Language"][0]}
    38. <hr>${cookie}
    39. <hr>${cookie.JSESSIONID}
    40. <hr>${cookie.JSESSIONID.name}
    41. <hr>${cookie.JSESSIONID.value}
    42. </body>
    43. </html>