Hibernate+struct web项目问题总结

问题一:

 ClassTable is not mapped [from ClassTable]

解决办法:在添加资源路径

<mapping resource="***/***/***/***/ClassTable.hbm.xml"/>

***为包名

问题二:写删除功能时jsp传ID值到action中,由于含有中文导致乱码,设置request.setCharacterEncoding("UTF-8");也无济于事,

解决办法:

String Cid = new String(request.getParameter("Cid").getBytes("iso-8859-1"),"UTF-8");

将传过来的值通过转码解决

猜你喜欢

转载自www.cnblogs.com/ttzz/p/9170382.html
今日推荐