jstl在maven中使用

jstl的使用有两个依赖
<dependency>
  <groupId>jstl</groupId>
    <artifactId>jstl</artifactId>
      <version>1.2</version>
</dependency>

<dependency>
    <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>

在jsp页面中的使用为:
引入:  <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
另外对于request传来的LinkedList应该用forEach显示
方法为:<c:forEach items="${List}" var="t" step="1">  ${t.name} ${t.price}
List是request传来的值,t为List的元素。name和price是t元素的属性。

你可能感兴趣的:(maven,C++,c,jsp,sun)