EL表达式
1.EL表达式
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>EL</title> </head> <body> <% pageContext.setAttribute("uname","zhangsan"); request.setAttribute("uname","lisi"); session.setAttribute("uname","wangwu"); application.setAttribute("uname","zhaoliu"); %> <%--获取数据--%> <%--会默认去范围最小的那个uname值--%> 获取域对象:${uname}<br> <%--要想取特定范围的域对象的值--%> page范围:${pageScope.uname}<br> request范围:${requestScope.uname}<br> session范围:${sessionScope.uname}<br> application范围:${applicationScope.uname}<br> </body> </html>