毕业设计使用SSH框架遇到的问题及解决方法

1. 严重: Servlet.service() for servlet jsp threw exception

javax.el.PropertyNotFoundException: Property 'Birthdate' not found on type com.house.model.Employee

在Employee实体中是定义了Birthdate这个字段的,也有get和set方法。

但是Birthdate是Date类型的,我是想在JSP中的input控件中显示该值,我的写法是:

<input type="text"  name="employee.Birthdate" value="${employee.Birthdate}"/> ,然后就报找不到Birthday的错误。

解决办法:

在JSP页面中取值都是使用<s:property value="#employee.Birthdate"/>,在input控件中的value中也是:

<input type="text"  name="employee.Birthdate" value="<s:property value=‘employee.Birthdate’/>"/>,注意value中使用单引号,注意employee.Birthdate前面没有#。

注意在<s:iterator value="employeeList" id="allemployee">下面,取值时的格式为:<td><s:property value="#allemployee.employeeid"/></td>;

而在取单个值时是:<td><s:property value="employee.id"/></td>,没有#。


2.

HTTP Status 500 - could not execute native bulk manipulation query

 ERROR JDBCExceptionReporter:234 - 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 'where id = 17' at line 1

这个是因为在daoImpl中的update函数实现有错


3.Source not found for Class.getDeclaredConstructors0(boolean) line: not available [native method]

启动工程的时候跳到Ecplise Dug视图,并提示Source not found for Class<T>.getDeclaredConstructors0(boolean) line: not available [native method]。

原因:我在DaoImpl类开始处不小心设置了断点。'

4.

 Null value was assigned to a property of primitive type setter of com.house.model.Rent.deposit

原因:Rent类的deposit字段的类型为简单类型double,简单类型在java bean中的不能为空,所以注意要给简单类型的数据设置值

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值