<%@include file="top.jsp"%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><!-- --><%-- --%>| 变量名 | 真实类型 | 作用 |
|---|---|---|
| pageContext | PageContext | 当前页面共享数据,还可以获取其他八个内置对象 |
| request | HttpServletRequest | 一次请求访问的多个资源(转发) |
| session | HttpSession | 一次会话的多个请求间 |
| application | ServletContext | 所有用户间共享数据 |
| response | HttpServletResponse | 响应对象 |
| page | Object | 当前页面(Servlet)的对象 this |
| out | JspWriter | 输出对象,数据输出到页面上 |
| config | ServletConfig | Servlet的配置对象 |
| exception | Throwable | 异常对象 |
${表达式}
isELIgnored="true" 忽略当前页面中的所有el表达式${empty list} :判断字符串、集合、数组对象是否为null或者长度为0${not empty str} :表示判断字符串、集合、数组对象是否不为null 并且 长度>0List集合:${域名称.键名[索引]}
${pageContext.request.contextPath}:动态获取虚拟目录JSP标准标签库
if
<c:if test=""></c:if>choose
<c:choose>
<c:when test="">情况1</c:when>
<c:when test="">情况2</c:when>
<c:otherwise>其他情况</c:otherwise>
</c:choose>foreach
for(int i = 0; i < 10; i ++)
for(User user : list)
原文:https://www.cnblogs.com/yxmhl/p/10660501.html