本文并未把所有的JSTL标签罗列出来,只是写下了几个相对使用量较大的标签 1、流程控制:if,choose,when,otherwise [html] view plaincopyprint? 1. <%@taglib prefix=%uri=\> 2. 4. 5.
6.
7.
8.
10.
11.
14.
No choice
15.2、迭代:forEach 遍历集合
[html] view plaincopyprint?
1.
2. ${i} ${index} 3.
遍历Map
[html] view plaincopyprint?
1.
打印1到10
[html] view plaincopyprint?
1.
[html] view plaincopyprint?
1. <%@page import=\>
2. <%@taglib prefix=%uri=\> 3. <%
4. Collection students = new ArrayList();
5. students.add(new Student(\6. students.add(new Student(\7. students.add(new Student(\8. request.setAttribute(\9. %>
10.
| ${stu.id} | 13.${stu.name} | 14.${stu.age} | 15.
19. <%
20. Map stus = new HashMap();
21. stus.put(\22. stus.put(\23. stus.put(\24. request.setAttribute(\25. %>
26.
27. ${stu.value.id} ${stu.value.name} ${stu.value.age}
28. 29.
30.
31. ${status.count} ${status.current.name} ${status.current.age}
32. 33.
34.
35. No.${i} ${stus[i].id} ${stus[i].name} ${stus[i].age}
36. 37.

