輸入賬號密碼后按登陸出現(xiàn)404搞了一天~,后面把struts.xml里的class="action.{1}Action"改為class="{1}Action.action"就能運行了~
2017-05-23
樓下這些說什么復(fù)制粘貼的不要講之類的,先去了解struts框架、hibernate的基礎(chǔ)知識再來學(xué)啊,你學(xué)過后會發(fā)現(xiàn)這些是很簡單的。
2017-05-23
<property name="hibernate.connection.url">
<![CDATA[
jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8
]]>
</property> 此舉解決編碼問題
<![CDATA[
jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8
]]>
</property> 此舉解決編碼問題
2017-05-22
出異常不應(yīng)該是回滾嗎 tx.rollback()
2017-05-21
myeclipse2015環(huán)境,Struts2,Hibernate4,修改了老師代碼中不能用的Hibernate語法,代碼在下面
http://www.bufferoverflow.cn/index.php/2017/05/20/struts2hibernate4-demo/
http://www.bufferoverflow.cn/index.php/2017/05/20/struts2hibernate4-demo/
2017-05-20
在hibernate.cfg.xml 那里方言估計要改成<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
2017-05-20
最新回答 / 慕粉1450415155
通過from 表單 把數(shù)據(jù)傳到action(控制器)的addStudent方法中<form name="addForm" action="<%=path%>/students/addStudent.action" method="post">
2017-05-20
最新回答 / qq_我是一只勤快鳥兒_03479056
你用老師的代碼hql查詢不報錯嗎????
最贊回答 / 商無鹽
父類的作用就是讓繼承的子類都擁有父類的某些屬性和方法,這里的作用就是在子類里可以直接使用父類里已經(jīng)獲取并封裝好的session,application等常用屬性,不用每一個子類都實現(xiàn)獲得這些屬性的方法,因為已經(jīng)在父類實現(xiàn)了。通俗的理解就是可以少寫一些代碼。
2017-05-18
創(chuàng)建注冊對象那里,hibernate5.xx以上的現(xiàn)在用這個
//服務(wù)注冊對象
ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().applySettings(config.getProperties()).build();
//服務(wù)注冊對象
ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().applySettings(config.getProperties()).build();
2017-05-18