//标签的使用使得页面的代码更加简洁,jsp脚本的尽可能少的使用,所以熟练掌握标签对于开发是很有必要的
我的老天爷
良好
优秀
不及格
List list=new ArrayList();
list.add(new Student("张三",18,"20142853"));
list.add(new Student("李四",30,"20142854"));
list.add(new Student("王五",28,"20142855"));
pageContext.setAttribute("list", list);
Map map = new HashMap();
map.put("1001",new Student("张三",18,"20142853"));
map.put("1002",new Student("李四",30,"20142854"));
map.put("1003",new Student("王五",28,"20142855"));
pageContext.setAttribute("map", map);
%>
forEach 循环标签
begin:开始的位置
end:结束的位置
step:每次变化长度
var:变量的名字
varStatues:变量的状态
--%>
序号:${varSta.count }.-${student.name }-${student.age }
序号:${varSta.count }.-${stu.key }-${stu.value.name }-${stu.value.age }
String str = "hello-world-i-am-comming";
pageContext.setAttribute("string", str);
%>
${s }