上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 25 下一页
摘要: 转义字符:s2 = s2.replace("src=\"/","src=\""+url);\" => "以上代码含义: 将src="/ 替换成 src="http://localhost:8080/BNCAR2/ 阅读全文
posted @ 2014-02-17 10:20 全新时代-小小程序员大梦想 阅读(742) 评论(0) 推荐(0) 编辑
摘要: 1.将网页的title,keyword,description写成include包含文件,例如: top.jsp养车之家2.在前台页面的地方加上top.jsp3.jsp去除空白行方法在每个jsp页面上面加上: trimDirectiveWhitespaces="true"就可以实现效果了。 阅读全文
posted @ 2014-02-11 19:14 全新时代-小小程序员大梦想 阅读(2761) 评论(0) 推荐(0) 编辑
摘要: String _currentPage = request.getParameter("currentPage"); Integer currentPage = 0; if(_currentPage == null){ currentPage = 1; }else{ currentPage = Integer.valueOf(_currentPage); } log.info("导出excel页码: " + currentPage); /**map为空... 阅读全文
posted @ 2014-01-24 18:00 全新时代-小小程序员大梦想 阅读(878) 评论(0) 推荐(0) 编辑
摘要: /** * */package com.bn.car.common.report.excel;import java.io.FileInputStream;import java.io.IOException;import java.io.InputStream;import java.util.ArrayList;import java.util.List;import org.apache.poi.hssf.usermodel.HSSFCell;import org.apache.poi.hssf.usermodel.HSSFRow;import org.apache.poi.hssf.. 阅读全文
posted @ 2014-01-24 17:54 全新时代-小小程序员大梦想 阅读(309) 评论(0) 推荐(0) 编辑
摘要: checksession.jsp 在后台引用该jsp页面: 使用了frameset,需要使用window.parent来跳转。~!跳转的路径最好写成绝对路径才保证,相对路径在某些场合的情况下往往不可信。~! 阅读全文
posted @ 2014-01-23 19:12 全新时代-小小程序员大梦想 阅读(1041) 评论(0) 推荐(0) 编辑
摘要: try{}catch(Exception e){ e.printStackTrace(); log.error("配件导出excel错误:", e.fillInStackTrace());}以上在控制台打印的信息可以明确异常的位置,log写入信息没有实际价值信息。try{}catch(Exception e){e.printStackTrace();log.error("配件导出excel错误:", e);}这样写控制台与log错误信息一致。level 是日志记录的优先级,分为OFF、FATAL、ERROR、WARN、INFO、DEBUG、ALL或者您定 阅读全文
posted @ 2014-01-23 19:09 全新时代-小小程序员大梦想 阅读(1862) 评论(1) 推荐(0) 编辑
摘要: request.setCharacterEncoding("utf-8");//第一种情况 log.info("服务商名称:" + request.getParameter("networkName"));// log.info("服务商名称:" + new String(request.getParameter("networkName").getBytes("ISO8859-1"),"UTF-8"));//第二种情况 //第一种情况返回的结果//第二种 阅读全文
posted @ 2014-01-23 12:00 全新时代-小小程序员大梦想 阅读(228) 评论(2) 推荐(0) 编辑
摘要: 1.jstl.jar servlet.jar支持2.jsp引入标签库3.条件判断 ">配件商城 ">汽车用品 ${pic.picUrl}',largeimage: '${pic.picUrl}'}">${pic.picUrl}" width="58" height="58" /> 4.循环 ${question.questionTitle} --%>${question.questionTitle}回答(${questi... 阅读全文
posted @ 2014-01-23 11:53 全新时代-小小程序员大梦想 阅读(374) 评论(2) 推荐(0) 编辑
摘要: 1.jar包支持urlrewritefilter-4.0.3.jar http://files.cnblogs.com/simpledev/urlrewritefilter-4.0.3.rar2.在web.xml文件中加入: UrlRewriteFilter org.tuckey.web.filters.urlrewrite.UrlRewriteFilter logLevel WARN UrlRewriteFilter /* REQUES... 阅读全文
posted @ 2014-01-23 11:40 全新时代-小小程序员大梦想 阅读(1421) 评论(0) 推荐(0) 编辑
摘要: 方法1:在servlet中通过代码获取,然后放置在session会话中.String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";request.getSession().setAttribute("basePath", basePath);方法2:在系统常量类中定义 Constants.javapublic static String ROOT = "h 阅读全文
posted @ 2014-01-23 11:27 全新时代-小小程序员大梦想 阅读(313) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 25 下一页