java
a1008223
这个作者很懒,什么都没留下…
展开
-
定时器使用Timer,timerTask
1.每隔10分钟触发[color=red]web.xml[/color] com.listener.GoodsListener [color=red]Listener里面定义Timer[/color] public class GoodsListener implements ServletContextListener{ privat...原创 2012-02-01 17:14:11 · 102 阅读 · 0 评论 -
unicdoe 转码
开始以为是乱码,我日。http://www.faqs.org/rfcs/rfc2781.html http://www.itpub.net/thread-902397-2-1.html Java代码 收藏代码public class TEST{ public static void main(String args[]){ System.out.p...原创 2015-12-04 16:15:07 · 116 阅读 · 0 评论 -
手动构建xml xls 日期 datetime number type
http://ewbi.blogs.com/develops/2005/01/create_excels_s.html ...原创 2014-10-28 19:07:58 · 213 阅读 · 0 评论 -
压缩 inputstream to zipoutputstream to bytearrayoutputstream
http://stackoverflow.com/questions/20221128/convert-zipoutputstream-to-bytearrayinputstreaminputstream 可以存到本地zip file但是为了存到数据库,使用 zipoutputstream 压缩到 bytearrayoutputstream,转换成byte[] 存到数据库...原创 2014-10-21 20:06:39 · 1697 阅读 · 0 评论 -
eclipse中取消show in Breadcrumb方法
eclipse中取消show in Breadcrumb方法2013年11月16日 ⁄ 综合 ⁄ 共 222字 ⁄ 字号 小 中 大 ⁄ 评论关闭 使用eclipse时, 不小心按了快捷键Alt + Shift + B 或者右键单击后选中了show in Breadcrumb时,就会出现一个快速导航条,如果想去掉它可以这样来解决:点击: Window -> Customize ...原创 2015-11-23 18:01:30 · 348 阅读 · 0 评论 -
url 二级域名匹配
private static void urlMatche(String websiteAddress, String refererAddr) throws BusinessException { String[] websites = websiteAddress.split(","); for (String website : websites) { String mw...原创 2016-10-14 16:32:15 · 453 阅读 · 0 评论 -
sqserver order by 与java compareTo ,xml sting getBytes乱码
1.sqlsever orderby 顺序,取出list, 然后java 直接采用compareTo,两个结果集进行排序,对比,结果发现有些大小顺序和java 的eqauls 不一致,导致了数据问题。java compareTo:当指定按字典排序时应用其排序规则的字母表或语言db Order by: collate = " collate Latin1_General_BIN2...原创 2015-08-04 23:10:37 · 139 阅读 · 0 评论 -
jsp out.print 乱码
response.setContentType( "text/html;charset=GBK "); PrintWriter out = response.getWriter(); out.println( "中国画 ");//不是中文就没救了; out.println(request.getParameter( "param "));//不是中文正常 下面那个问题是...原创 2014-02-07 11:07:31 · 543 阅读 · 0 评论 -
xsl dom 一个xml 引用另一个xml的某些节点
http://www.coderanch.com/t/126301/XML/xslt-transformation-DOMSource-Streamsourcehttp://stackoverflow.com/questions/5821567/xml-how-to-load-the-contents-of-one-xml-file-into-another -Includ...原创 2014-02-07 11:07:19 · 254 阅读 · 0 评论 -
JMX demo
http://docs.oracle.com/javase/6/docs/technotes/guides/jmx/examples.html原创 2014-02-07 11:05:45 · 103 阅读 · 0 评论 -
xerces jar和dom,jaxb解析冲突的解决方法
1.采用dom解析的时候,遇到Xerces.jar,会出现Exception in thread "main" java.lang.AbstractMethodError: org.apache.crimson.tree.ElementNode.getTextContent()Ljava/lang/String; 去掉xerces.jar或者构建dom之前加上System.setP...原创 2012-10-12 22:41:06 · 621 阅读 · 0 评论 -
jaxb style
http://www.coderanch.com/t/495263/Web-Services/java/type-marshalling-does-JAXB原创 2012-10-12 11:55:10 · 91 阅读 · 0 评论 -
sj22
Organizations 字段名 含义 类型 缺省值 备注Org_ID 机构编号 VC(20) PKOrg_Name 机构名称 VC(500) 必填项Org_Type 机构类别 VC(2) 0 中心UserUsr_ID 用户编号 VC(10) PKUsr_Name 用户姓名 VC(20) ' ' 必填项Usr_LoginID 登录名 VC(20)...原创 2013-01-09 21:37:07 · 101 阅读 · 0 评论 -
excel 导入导出
else if (type.equalsIgnoreCase("import")){ // 需要插入的表名 String tableName = LxForm.getString("table"); DBConn dbconn = new DBConn(); // 获取流 response.setContentType("text/html;cha...原创 2013-03-20 21:35:15 · 97 阅读 · 0 评论 -
servlet 线程安全 application.setattribute,加上synchronized
http://www.alixixi.com/Dev/Web/JSP/jsp7/2007/2007020914328.htmlservletContext application=getServletContext();后面的一段函数是env.java的片断,可以看看在servlet中如何使用application变量的。Integer count = null;s...原创 2013-03-20 20:35:20 · 204 阅读 · 0 评论 -
Https Basic Auth
最近测试 Https 连接,遇到了些问题。1. Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated对方使用的是JDK 1.8,他们默认的是TLSV1.2, 我使用的是1.7, 我这边是1.0 的。造成一直认证失败,开始以为要导入证书。设置请求默认1.2,就可以了。Sys...原创 2016-03-21 15:16:27 · 1037 阅读 · 0 评论