上一页 1 2 3 4 5 6 7 ··· 10 下一页

2014年8月18日

jxls使用模版导出Excel

摘要: ** * 用excel模版模版导出excel * * @param templeteSrc * 模版路径(含名称) * @param params * 模版参数 * @param newExcelPath * 生成excel路径 */ public static void createExcel(String templeteSrc, Map params, String newExcelPath,String cre_FileName) { try { XLSTransformer transformer = new XLSTransformer(); File file=new File(newExcelPath); if(!file.exists() 阅读全文

posted @ 2014-08-18 12:20 qgc 阅读(793) 评论(0) 推荐(0)

IText 生成pdf,处理table cell列跨页缺失的问题

摘要: /** * 创建(table)PDF,处理cell 跨页处理 * @param savePath(需要保存的pdf路径) * @param pmbs (数据库查询的数据) * @return   *http://www.cnblogs.com/qgc88/ */ private String createPDFTable(String savePath, LinkedList pmbs){ try{ Document document = new Document(); // String separator = System.getProperties().getProperty("file.separator"); FileOutputStream out = new FileOutputStream(savePath); PdfWriter.getInstance 阅读全文

posted @ 2014-08-18 11:59 qgc 阅读(2895) 评论(0) 推荐(0)

2014年5月30日

Java使用IText(VM模版)导出PDF

摘要: public String createPDF(ProjectManageBase projectManageBase) { Map map = new HashMap();// velocity模板中的变量 try { //模版vm的路径 String tmPath = ServletActionContext.getServletContext() .getRealPath(“/pdf/vm”); String pdfPath = ServletActionContext.getServletContext() .getRealPath(“/pdf”);//用于生成pdf,存放pdf的路径 String facePath = pdfPath + "/test.vm.pdf";// 生成的pdf 阅读全文

posted @ 2014-05-30 16:50 qgc 阅读(924) 评论(0) 推荐(0)

2014年5月28日

js ajax post提交 ie和火狐、谷歌提交的编码不一致,导致中文乱码

摘要: 今天遇到一个问题找了很久发现: 使用js ajax post提交 ie和火狐、谷歌提交的编码不一致,导致中文乱码 //http://www.cnblogs.com/QGC88 $.ajax({ url:'saveProjectManageBaseKepu.action', type:'post', data:$('#projectManageBaseForm').serialize(), contentType:"application/x-www-form-urlencoded; charset=UTF-8",//意外发现,把这句话加上,可以了 cache:false, success:function(data){ closeDialog(); if(data=='error'){ alert('操作失败'); }else { alert('操作成功'); }); 阅读全文

posted @ 2014-05-28 10:26 qgc 阅读(435) 评论(0) 推荐(0)

2014年3月13日

Spring4.0+Hibernate4.0+Struts2.3整合包括增删改查案例,解决整合中出现的异常

摘要: 源码下载:http://download.csdn.net/detail/cmcc_1234/7034775 beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema 阅读全文

posted @ 2014-03-13 16:10 qgc 阅读(538) 评论(0) 推荐(0)

2014年3月4日

JVM的内存管理机制

摘要: JVM的内存管理机制,从JVM的垃圾回收机制和JVM中对象的生命周期、析构方法finalize、静态变量和内存管理有许多技巧和方式等方面为大家介绍JVM的内存管理机制。 阅读全文

posted @ 2014-03-04 16:35 qgc 阅读(280) 评论(0) 推荐(0)

2014年1月4日

jquery easyui-linkButton获取和设置按钮text并且解决火狐不支持innerText的方法

摘要: jquery easyui-linkButton获取和设置按钮text并且解决火狐不支持innerText的方法....... 阅读全文

posted @ 2014-01-04 12:50 qgc 阅读(1622) 评论(0) 推荐(0)

2013年12月28日

解决sqlserver使用IP无法连接的问题,用localhost或者‘“.”可以连接

摘要: 打开mssql配置管理器==》网络配置工具==》点击协议==》开启Named Pipes服务就可以了 阅读全文

posted @ 2013-12-28 19:12 qgc 阅读(4151) 评论(0) 推荐(0)

2013年12月19日

将字符串写入文本并下载该文本

摘要: /** * 字节流,传入的字符串,输出文件;服务器不保存文件,不用指定文件路径 * * @param response * @param count * 传入的字符串 * @param fileName * 要保存的文件名 * @return success or error * @throws Exception */ public static String downStream(HttpServletResponse response, String count, String fileName) throws Exception { String msg = null; try { ServletOutputStream ou = response.getOutputStream(); // 下载文件 byte bb[] = count.getBytes();//获取内容的字节 // ByteArrayInputStr 阅读全文

posted @ 2013-12-19 12:34 qgc 阅读(525) 评论(0) 推荐(0)

2013年12月11日

JPA 原生态SQL 的复杂查询之createNamedQuery

摘要: @NamedNativeQueries({ @NamedNativeQuery( name = "getNativeNutShellInfo", //需要调用的name query = "{call cp_syslogin_web(?,?,?)}", //存储过程,返回的List字段对应的值@EntityResult此处填充实体的属性值 resultSetMapping = "ReturnColumnEntityList" ) }) @SqlResultSetMappings({ @SqlResultSetMapping( name = "ReturnColumnEntityList", entities = { @EntityResult(entityClass = NutShellInfo.class,fields={ //返回的List字段对应的值此处填充实体的属性值 阅读全文

posted @ 2013-12-11 12:40 qgc 阅读(2376) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 10 下一页

导航