el表达式获取作用域:
<%
pageContext.setAttribute("hello","helloPagContext");
request.setAttribute("hello","helloRequest");
session.setAttribute("hello","helloSession");
application.setAttribute("hello","helloApplication");
%>
${sessionScope.hello}
${requestScope.hello}
${pageScope.hello}
${applicationScope.hello}
el表达式进行计算:
${1+2}--${1*2}--${1/2}--${1%3}
el表达式获取请求信息:
<br>${empty str}
el表达式获取响应信息
<hr>${header.entrySet()}
<hr>${headerValues["Accept-Language"][0]}
el表达式获取cookie
<hr>${cookie}
<hr>${cookie.JSESSIONID}
<hr>${cookie.JSESSIONID.name} --cookie名称
<hr>${cookie.JSESSIONID.value} -- cookie值