最新回答 / 慕粉3278787
老師代碼沒有判斷list為空的時候的取值,判斷一下就好了。if (list!=null && list.size()>0) { session.setAttribute("students_list", list); }else { session.setAttribute("students_list", null); }
2016-05-16
最新回答 / 慕蓋茨7185558
我的是把hibernate.cfg.xml里面的方言換成了<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>就好了,好像因為我的mysql里面存儲引擎是engine=innodb,所以方言哪里換成這個對應的就好了。
2016-05-14
最新回答 / Asheng12311
那是因為你import 的包不對,你可能import了junit.framework.Assert; 按道理是import org.junit.Assert;這樣就正常了<...圖片...>
2016-05-13
已采納回答 / Nomo_Air
我之前用的eclipse自己生成的web.xm就會報這個錯誤,找了好久也沒成功,后來我用myeclipse 2015 做了同樣的項目竟然沒有錯誤,我就用myeclipse 2015 生成的xml拷貝到了eclipse中就沒有錯誤了,原因是eclipse用的2.3版本,myeclipse用的是web.xml 2.5版本。
2016-05-11