![](https://iknow-base.cdn.bcebos.com/lxb/notice.png)
struts2和hibernate,jsp成功提交数据到action并且显示出来,但是无法插入到数据库,
在action中新建一个main方法,可以成功插入数据到数据库中typeExceptionreportmessageMethod"addTr"failedforobjec...
在action中新建一个main方法,可以成功插入数据到数据库中
type Exception report
message Method "addTr" failed for object
com.action.addAction@563ce497
description The server encountered an internal error that prevented
it from fulfilling this request.
exception 展开
type Exception report
message Method "addTr" failed for object
com.action.addAction@563ce497
description The server encountered an internal error that prevented
it from fulfilling this request.
exception 展开
1个回答
展开全部
额这个不难的 首先你数据库中要采用blob字段 然后就是hibernate中采用byte数组对应 存储的时候把图片转成byte数组应该不难吧 至于显示 页面中用<img src="这里写对应的action的方法" 上面那个action的方法中 你直接通...
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询