能堅持到這一步,真的不錯了。。TT總算搞明白了。不容易啊
最新回答 / 慕娘6184833
struts.xml是沒有數(shù)據(jù)庫配置的,數(shù)據(jù)庫配置在hibernate.cfg.xml下,struts.xml用來配置頁面的跳轉(zhuǎn)。。。。
六月 11, 2017 10:00:19 上午 org.hibernate.tool.hbm2ddl.SchemaExport perform
ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 7,
居然說我的SQL語句錯了。。。。。。。
ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 7,
居然說我的SQL語句錯了。。。。。。。
2017-06-11
老師的方法過期了
if(sessionFactory==null){
Configuration config=new Configuration().configure();
ServiceRegistry serviceRegistry = (ServiceRegistry) new StandardServiceRegistryBuilder().configure().build();
sessionFactory = config.buildSessionFactory(serviceRegistry);
return sessionFactory;
if(sessionFactory==null){
Configuration config=new Configuration().configure();
ServiceRegistry serviceRegistry = (ServiceRegistry) new StandardServiceRegistryBuilder().configure().build();
sessionFactory = config.buildSessionFactory(serviceRegistry);
return sessionFactory;
2017-06-08
SchemaExport export = new SchemaExport(serviceRegistry, metadataImplementor);
export.create(true, true);
}
export.create(true, true);
}
2017-06-08
報錯了,后來發(fā)現(xiàn)是這方法過時了
public void testSchemaExport() {
ServiceRegistry serviceRegistry = (ServiceRegistry) new StandardServiceRegistryBuilder().configure().build();
MetadataImplementor metadataImplementor = (MetadataImplementor) new MetadataSources(serviceRegistry).buildMetadata();
public void testSchemaExport() {
ServiceRegistry serviceRegistry = (ServiceRegistry) new StandardServiceRegistryBuilder().configure().build();
MetadataImplementor metadataImplementor = (MetadataImplementor) new MetadataSources(serviceRegistry).buildMetadata();
2017-06-08
最新回答 / 丶子非魚
?<result?name="query_success">students/Students_query_success.jsp</result> 路勁不對 ??<result?name="query_success">/students/Students_query_success.jsp</result>students包前面加一個斜杠
最新回答 / qq_微笑向暖_0
并沒有報錯,只是添加的是空字符串可以前臺添加javascript驗證,或者后臺添加validate方法驗證
看視頻首先自己跟著做,遇到問題首先自己解決,如果還是解決不了,你可以查找對應(yīng)章節(jié)的問答,這里有一些共性的問題,以及老師忽略的一些地方,或者有更加優(yōu)秀的做法,如果還是沒有,這個問題很有可能還是你沒有仔細(xì),代碼里面還是有問題
這里我的建議是作為初學(xué)者最好是將所有的jar包拷貝到工程webroot下的webinf下的lib文件中,這樣可能比較麻煩一點,屬于笨辦法,老師的屬于在全局進行配置,所有工程都可以使用,我的這種只是對目前工程起作用,所使用的版本對于工程來說很重要,自己沒有太多的經(jīng)驗,還是簡單一些比較好
2017-06-07
工程中所用到的包樓下已經(jīng)發(fā)了,注意所用的版本,比如struts2最新的和2.3中的用法有區(qū)別,還有就是mysql的jdbc驅(qū)動包,這個最好在你本機的mysql安裝目錄下去找,才是最適合你的版本的
關(guān)于素材中的jsp文件夾中的js文件,將文件夾也復(fù)制到webroot目錄下即可
2017-06-07
這里無法顯示主要有兩個問題:
有可能Struts.xml上少了一個
<result name="input">/students/Students_query_success.jsp</result>
調(diào)整瀏覽器的頁面的大小Chrome內(nèi)核的需要100%以下
有可能Struts.xml上少了一個
<result name="input">/students/Students_query_success.jsp</result>
調(diào)整瀏覽器的頁面的大小Chrome內(nèi)核的需要100%以下
2017-06-07