- 博客(9)
- 资源 (3)
- 收藏
- 关注
原创 hibernate 分页
package net.dao;/** * 封装显示房屋信息的参数 * @author hp * */public class houseParm {String title;Double price1;Double price2;Double floorage1;Double floorage2;Integer typeid;Integer s
2012-08-11 19:37:19 399
原创 hibernate 联级删除
public boolean delProduct(int id) { // TODO Auto-generated method stub Transaction tx=null; Session s=super.getSession(); try { sql="delete from AuctionBid a where a.auctionProduct
2012-08-11 19:31:31 1130
原创 hibernate 求最大值
public double getMaxBid(AuctionProduct pri) { // TODO Auto-generated method stub sql="select max(ab_price) from auction_bid where ap_prod_id=?"; Session s=super.getSession(); String max="";
2012-08-11 19:30:49 473
原创 spring mvc 路径传值 乱码处理
如提交路径为 下一页 路径中包含字符串里,不进行处理后台接收的值就是乱码 直接修改tomcat下的service 加上 URIEncoding="UTF-8"/这句话就可以了 --> connectionTimeout="20000" redirectPort="8443" URIEncoding
2012-08-05 09:46:43 778
原创 实现浏览历史查看
@RequestMapping(value="/book.do")//点击时public String book(Integer id,ModelMap map,HttpSession session){// 浏览历史 Goods good = goodService.getGoodById(id); if (id != null) { LinkedList list=
2012-08-01 22:26:34 711
原创 spring mvc +mybatis登录首页功能 实现
//image.jsp生成图片验证码的jsp import="java.awt.*,java.awt.image.*,java.util.*,javax.imageio.*"%> Random random = new Random(); if (fc > 255) fc = 255; if (bc > 255) bc = 255; int
2012-07-25 21:06:49 1724
原创 dwr 实现同步删除
function goodLoad(id){ var i=parseInt(id); var result=null; DWREngine.setAsync(false); goodService.delBooks(i,function(date){result=date;});//后台JAVA删除方法 DWREngine.setAsync(true); return re
2012-07-25 21:00:39 353
原创 mybatis 分页实现
//把分页用的数据全部封装到一个类中public class Page { private int pagesize;//单页记录 private int currentpage = 1;//当前页面 private int countdate;//总记录数 private int lastPage;//上一页 private int ne
2012-07-25 20:55:44 1227 2
原创 ibatis 过滤重复数据
mybatis sql语句如下:控制器类:list是连接查询两表所有的内容,map把重复的值去掉,type1(分类一)是type2(分类二)的外键,要做的效果是点击分类一显示出对应的分类列表2.显示map集合中的数据:
2012-07-24 23:01:02 1396 1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人