问题描述
我是这样想但是取不到privateList<Classes>classes;privateClassServerclassServer;publicStringGetClassesAll(){classes=classServer.getClassesAll();System.out.println(classes.size());return"classAll";}publicStringGetClassesAllaxjx(){classes=classServer.getClassesAll();System.out.println(classes.size());returnNONE;}publicvoidsetClassServer(ClassServerclassServer){this.classServer=classServer;}publicList<Classes>getClasses(){returnclasses;}publicvoidsetClasses(List<Classes>classes){this.classes=classes;}}<script>functioninit(){$("one").load("C_GetClassesAllaxjx.action?time="+newDate().getTime(),function(data,textStatus,XMLHttpRequest){alert("xxxxxxxxxx");$(".one").html(data);//window.document.write(date);returntrue;});}</script><bodyonload="init"><divid="one"></div><table><tr><th>ID</th><th>年级</th><th>专业</th><th>班级</th></tr><c:forEachvar="classAll"items="${classes}"><tr><td>${classAll.cid}</td><td>${classAll.province}</td><td>${classAll.dept}</td><td>${classAll.cname}</td></tr></c:forEach></table></body>