2021年6月17日

在struts2中用标签并给其 value赋值

摘要: 就是如何在用在struts2中用<s:textfield />标签并给其 value赋值。试过很多种方法都不行<s:textfield name="username" value="${user.username}"> </s:textfield> <s:textfield name="user.u 阅读全文

posted @ 2021-06-17 12:21 Holw 阅读(128) 评论(0) 推荐(0)

2021年5月25日

换个新版本的jar包 Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.

摘要: javaweb报错:Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNo 报错内容:Could not get JDBC Connection; nested except 阅读全文

posted @ 2021-05-25 21:07 Holw 阅读(455) 评论(0) 推荐(0)

The reference to entity "characterEncoding" must end with the ';' delimiter.

摘要: 纠错 在配置一个访问数据库的Url时,第一次设置的内容如下: jdbc:mysql://localhost:3306/photo?useUnicode=true&characterEncoding=UTF-8,注意中间那个“&”,在xml中这个是读不出的,正确写法将“&”转义“&amp;”: jdb 阅读全文

posted @ 2021-05-25 20:22 Holw 阅读(61) 评论(0) 推荐(0)

2021年5月21日

Android安卓SharedPreferences使用 增删改查

摘要: 1.创建SharedPreferences对象: SharedPreferences dataBase = getSharedPreferences("SharedPreferences", Activity.MODE_PRIVATE); SharedPreferences.Editor edit 阅读全文

posted @ 2021-05-21 21:21 Holw 阅读(252) 评论(0) 推荐(0)

2021年5月19日

hibernate使用外键查询

摘要: 记住重要的一点是:hql不操作数据库,他操作的是类对象。 这里有两张表 User(id,name) 对应User类(int id,String name) Score(id,math,user_id),user_id为外键,对应User表中的id 对应Score类(int id,int math,U 阅读全文

posted @ 2021-05-19 22:10 Holw 阅读(385) 评论(0) 推荐(0)

2021年5月12日

安卓中match_parent、fill_parent、wrap_content

摘要: Android中所有的控件都具有这两个属性,可选值有3种:match_parent、fill_parent、wrap_content. 其中match_parent和fill_parent的意义相同,但官方更推荐match_parent. match_parent表示让当前控件的大小和父布局的大小一 阅读全文

posted @ 2021-05-12 20:10 Holw 阅读(278) 评论(0) 推荐(0)

通过href传值到action

摘要: 假如action的namespace='/company';action的名字为xx则应该写为:<a href="/company/xx.action">链接<a>如果需要传参数a,且a的值为1:<a href="/company/xx.action?a=1">链接<a>如果传参个数大于1,则将参数 阅读全文

posted @ 2021-05-12 09:37 Holw 阅读(210) 评论(0) 推荐(0)

导航