1。jsp里数据展示
<%
java.util.List l=(java.util.List)request.getAttribute("markList");
int size = l.size();
for(int i = 0; i < size; i++){
studentMark.Studentmark mark = (studentMark.Studentmark)l.get(i);
out.print("<TR>");
out.print("<TD>" + mark.getGrade());
out.print("<TD>" + mark.getYear());
out.print("<TD>" + mark.getTerm());
out.print("<TD>" + mark.getCourse());
out.print("<TD>" + mark.getMark());
String parm = "?garde=" + mark.getGrade();
parm += "&year="+mark.getYear();
parm += "&term="+mark.getTerm();
parm += "&course="+mark.getCourse();
parm += "&mark="+mark.getMark();
out.print("<TD><A href=\"/StudentMark/Del"+parm +"\" target=\"_self\">删除</A>");
out.print(" <A href=\"/StudentMark/Mod"+parm+"\" target=\"_self\">修改</A>");
out.print(" <A href=\"/StudentMark/Add"+parm+"\" target=\"_self\">新增</A>");
out.println();
}
%>
2。servlet
String grade = req.getParameter("grade").toString()//取不到参数,为空