摘要: GalleryGallery大本钟咖啡烟火玫瑰目的是在点击大本钟的时候img替代位大本钟。在此中,出现2个问题导致失败1,脚本var new=---‘new是关键字失败2,old.setAttribute("src",newPic); old敲成olc失败 阅读全文
posted @ 2013-09-26 23:07 xxyyjj 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 1+n问题当一个对象关联着另外一个对象,Fetchtype是eager的话;取个对象的时候,被关联的对象就会单独再发sql语句解决方法1.FetchType设为LAZY(fetch=FetchType.LAZY)2.BATCHSIZE3用createCretira(join fetch) 阅读全文
posted @ 2013-08-22 21:59 xxyyjj 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 是一个显示所有数据库数据的逻辑在UserAction public String list() throws Exception{ users=userService.list(); return "list"; }然后listSuccess.jsp 结果java.lang.ClassCastException: com.reg.model.User cannot be cast to java.lang.String at org.apache.struts2.components.Property.start(Property.java:... 阅读全文
posted @ 2013-08-13 00:13 xxyyjj 阅读(187) 评论(0) 推荐(0) 编辑
摘要: name pass check 在Action里是用User user @Override public String execute() throws Exception { user.setUsername(user.getUsername()); user.setPassword(user.getPassword()); return "success"; } 然后报空指针异常处理:在表单改为namepass 阅读全文
posted @ 2013-08-06 22:24 xxyyjj 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Unable to load configuration. - bean - jar:file:/E:/apache-tomcat-6.0.18/apache-tomcat-6.0.18/webapps/Reg_05/WEB-INF/lib/struts2-spring-plugin-2.3.14.2.jar!/struts-plugin.xml:29:132 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) at org.apache.st 阅读全文
posted @ 2013-07-25 20:49 xxyyjj 阅读(241) 评论(0) 推荐(0) 编辑
摘要: hibernate.cfg.xml这个配置文件;从以前项目中copy来的文件,之前一直报错,后来替换了这个文件便好了 阅读全文
posted @ 2013-07-22 23:58 xxyyjj 阅读(99) 评论(0) 推荐(0) 编辑
摘要: copy工程后,加入hibernate,然而hibernate.cfg.xml没有改动,数据库也是错的;实体类也没有注入,但是单体测试居然通过了 阅读全文
posted @ 2013-07-22 23:42 xxyyjj 阅读(140) 评论(0) 推荐(0) 编辑
摘要: copy一个web项目,先在poperties->web里把项目名改掉,然后add如tomcat里面,此时就可以http:localhost:8080/xxx了。但是这次出问题了,做完几个步骤之后,发现连不上。404了,删掉重来还是如此,tomcat的webapps有这个项目,但是在在works文件夹里面却有些问题。只有SESSIONS.ser。出现这个情况原因到现在还是不明。后来觉得copy的那个项目没有加到tomcat里面,于是先把本项目add进tomcat,再copy,这次就可以了。 阅读全文
posted @ 2013-07-22 00:02 xxyyjj 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 之前"select count(*) from user where username="+username ;一直报错,随便输入什么username,全部都报错,说没有对应的column,于是吧语句在mysql上敲,发现,要加如'';"select count(*) from user where username='"+username + "'"; 阅读全文
posted @ 2013-07-17 23:37 xxyyjj 阅读(126) 评论(0) 推荐(0) 编辑
摘要: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63) at org.hibernate.impl.SessionFactoryImpl.getCurrentS 阅读全文
posted @ 2013-07-14 17:29 xxyyjj 阅读(169) 评论(0) 推荐(0) 编辑