jstl core and jstl fn
jstl标签使用时必须加taglib:
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
判定条件一般为一个EL表达式。
<c:if>并没有提供else子句,使用的时候可能有些不便,此时我们可以通过<c:choose>
tag来达到类似的目的:
<c:choose>
<c:when test="${var.index % 2 == 0}">
*
</c:when>
<c:otherwise>
*
</c:otherwise>
</c:choose>
foreach:
<c:forEach items="${userSort}" var="sort">
<td><input type="checkbox" name="usersort" value="${sort.id } ">${sort.name }</td>
</c:forEach>
EL表达式中获取list长度
在jsp页面中不能通过${list.size}取列表长度,而是
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
list的长度是:${fn:length(list)}
jstl core and jstl fn的更多相关文章
- JSTL c标签,fn标签,fmt标签 - 生活在爪洼岛上 - ITeye技术网站
jstl是sun定义的标准,由apache实现,所以要下载jar包的话去apache,要看api文档的话,去sun,API文档在此:http://java.sun.com/products/jsp/j ...
- JSTL中foreach与fn表达式
在jstl中的fn标签也是我们在网页设计中经常要用到的很关键的标签,在使用的时候要先加上头 <%@ taglib uri=" http://java.sun.com/jsp/jstl/ ...
- NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
今天调试SSM框架项目后台JSOn接口,报出来一个让人迷惑的错误:NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config 上网查了一下别人的博 ...
- JSTL函数标签库 fn标签
JSTL函数标签库 fn标签 在使用jstl的函数标签库之前需要在页面中引入: <%@ taglib prefix="fn" uri="http://java.su ...
- springMVC: java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config
springMVC开发web的时候,报错:java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config 原因:未引入jstl ...
- J2EE中使用jstl报http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar错
一.发现问题 运行引用了jstl的jsp页面 报http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or th ...
- The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved
偶在页面里引入了标签如下: <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core&q ...
- 使用Jstl异常:The absolute uri: http://java.sun.com/jsp/jstl/core cannot&nbs
错误提示是: org.apache.jasper.JasperException: This absolute uri http://java.sun.com/jsp/jstl/core ...
- java cannot find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"
出现java cannot find the tag library descriptor for "http://java.sun.com/jsp/jstl/core" 主要的愿 ...
随机推荐
- Python:代码单元、代码点介绍
转于:https://www.cnblogs.com/runwulingsheng/p/5106078.html 博主:你是那天边突然划过的一道闪电 代码点:指编码表(比如Unicode)中某个字符的 ...
- 【jQuery】CheckBox使用attr全选无法正确显示
今天编写JS脚本时,遇到如下的问题. 下面是源代码: <script src="../Scripts/jquery-2.1.3.js"></script> ...
- SpringMvc之参数绑定注解详解之一
引言: 前段时间项目中用到了REST风格来开发程序,但是当用POST.PUT模式提交数据时,发现服务器端接受不到提交的数据(服务器端参数绑定没有加 任何注解),查看了提交方式为application/ ...
- 使用 EntityFramework后把一个对象序列化成json字符串引起循环引用的问题
先看一个T4模板生成的model实体类 著作权归作者所有. 商业转载请联系作者获得授权,非商业转载请注明出处. 作者:卷猫 链接:http://anneke.cn/ArticleInfo/Detial ...
- Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Cannot open connection
Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceE ...
- NASA的CTO——开源软件使我们诚实
Chris C.Kemp,谷歌设置新职位CTO让他领导 原文: NASA's CTO: Open source software keeps us honest 作者: Shawn Freeman 译 ...
- hbase exporter importer 导出 导入
导出: bin/hbase org.apache.hadoop.hbase.mapreduce.Export bigtable /user/bigtable_bak/ 导入: bin/hbase or ...
- mac下已装virtualbox运行genymotion还报错找不到虚拟机的解决办法
sudo ln -s /usr/local/bin/VBoxManage /usr/bin/VBoxManage
- ARC097C K-th Substring
传送门 题目 You are given a string s. Among the different substrings of s, print the K-th lexicographical ...
- Struts2 资源配置文件国际化
Struts2 资源配置文件国际化 Struts2资源文件的命名规范:basename_language_country.properties Struts2国际化如果系统同时存在资源文件.类文件,系 ...