el表达式和jstl整理
来源:互联网 发布:手机淘宝搜索不到店铺 编辑:程序博客网 时间:2024/06/05 16:59
<c:if test="${empty var1}">
var1 is empty or null.
</c:if>
<c:if test="${not empty var1}">
var1 is NOT empty or null.
</c:if>
<c:if test="${fn:length(list)==0}">数组为空</c:if>
<c:choose>
<c:when test="${empty var1}">
var1 is empty or null.
</c:when>
<c:otherwise>
var1 is NOT empty or null.
</c:otherwise>
</c:choose>
<c:forEach items="${vectors}" var="vector">
<c:out value="${vector}"/>
</c:forEach>
<c:import url="http://www.url.com/edit.js" var="newsfeed"/>
重定向
<c:redirect url="http://www.yourname.com/login.jsp"/>
重定向带参数
<c:redirect url="login.jsp">
<c:param name="id" value="888"/>
</c:redirect>
当要存取的属性名称中包含一些特殊字符,如.或?等并非字母或数字的符号,就一定要使用 []。
例如:${user.My-Name}应当改为${user["My-Name"] }
<%@ taglib prefix="fmt" http://java.sun.com/jsp/jstl/fmt">http://java.sun.com/jsp/jstl/fmt" %>
1)格式化日期<fmt:formatDate value=“” pattern=“yyyy-MM-dd HH:mm:ss”/>
<fmt:formatDate value="${date }" pattern="yyyy-MM-dd"/>
<fmt:formatDate value="${date }" pattern="yyyy年MM月dd日"/>
2) 格式化数字<fmt:formatNumber value="${number}" pattern="###,###.##" />
var1 is empty or null.
</c:if>
<c:if test="${not empty var1}">
var1 is NOT empty or null.
</c:if>
<c:if test="${fn:length(list)==0}">数组为空</c:if>
<c:choose>
<c:when test="${empty var1}">
var1 is empty or null.
</c:when>
<c:otherwise>
var1 is NOT empty or null.
</c:otherwise>
</c:choose>
<c:forEach items="${vectors}" var="vector">
<c:out value="${vector}"/>
</c:forEach>
<c:import url="http://www.url.com/edit.js" var="newsfeed"/>
重定向
<c:redirect url="http://www.yourname.com/login.jsp"/>
重定向带参数
<c:redirect url="login.jsp">
<c:param name="id" value="888"/>
</c:redirect>
当要存取的属性名称中包含一些特殊字符,如.或?等并非字母或数字的符号,就一定要使用 []。
例如:${user.My-Name}应当改为${user["My-Name"] }
<%@ taglib prefix="fmt" http://java.sun.com/jsp/jstl/fmt">http://java.sun.com/jsp/jstl/fmt" %>
1)格式化日期<fmt:formatDate value=“” pattern=“yyyy-MM-dd HH:mm:ss”/>
<fmt:formatDate value="${date }" pattern="yyyy-MM-dd"/>
<fmt:formatDate value="${date }" pattern="yyyy年MM月dd日"/>
2) 格式化数字<fmt:formatNumber value="${number}" pattern="###,###.##" />
0 0
- el表达式和jstl整理
- el表达式和jstl
- EL和JSTL表达式
- EL和JSTL表达式
- JSTL和EL表达式
- EL和JSTL表达式
- jstl和el表达式
- JSTL和EL表达式
- el和jstl表达式
- JSTL和EL表达式
- EL表达式和JSTL
- EL表达式和JSTL
- el表达式和jstl
- EL和JSTL表达式
- EL表达式和JSTL
- JSTL和EL表达式
- EL表达式和JSTL表达式
- EL表达式和JSTL表达式
- oracle常用函数
- 反射获取 application对象
- Android 时间统计工具,
- 快乐工作,认真生活
- java.lang.Enum.valueOf()方法实例
- el表达式和jstl整理
- Android APP压力测试(一) 之Monkey工具介绍
- Android消息机制Handler的实现原理解析
- Ubuntu 下常见问题解决办法
- Android Butterknife的使用
- 堆和栈的区别
- 简化ERP
- 打开VB出现窗体名称冲突解决方法
- 机器学习最佳入门学习资源