Detailed tutorial on Java Web practice (XXIV) practice of JSTL tags and El expressions

Miss Zhu 2022-02-13 08:36:55 阅读数:999

detailed tutorial java web practice

         In the last article , We explained JSTL Labels and EL Expression usage , This article , We apply what we have learned to the whole project .
         The following students will show the of the interface JSP Replace with JSTL and EL.
 Insert picture description here
among EL Expression is Java Web Self contained ,JSTL Need to add jar package , Need to be in lib Lower join jstl.jar.
 Insert picture description here
In use JSTL Introduce new pages into the core library :

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

Building tables :

<table id="data" class="table table-striped table-bordered">
<tr>
<th>ID</th>
<th> full name </th>
<th> Gender </th>
<th> Age </th>
</tr>
<c:forEach items="${list}" var="stu">
<tr class="stu">
<td>${
stu.id }</td>
<td>${
stu.name }</td>
<td>${
stu.gender }</td>
<td>${
stu.age }</td>
</tr>
</c:forEach>
</table>
copyright:author[Miss Zhu],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130836536278.html