JSP之JSTL(Java标准标签库)的简单使用

版权声明:《==study hard and make progress every day==》 https://blog.csdn.net/qq_38225558/article/details/83005003

如何使用??

①首先需要导入jar包:       jstl.jarstandard.jar                    点击下载jar包资源  密码:4k5a

jsp页面中引入标签库   <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

③几种JSTL常用标签的使用

判断语句

<c:if test=条件></c:if>  等同于java语法:if(条件){}

<c:choose>相当于if-else、switch语句

循环语句:<c:foreach>

普通for循环

增强for循环

注意:JSTL需要EL表达式配合使用

猜你喜欢

转载自blog.csdn.net/qq_38225558/article/details/83005003