![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
文章平均质量分 82
huqiub
这个作者很懒,什么都没留下…
展开
-
spring下得到资源文件
操作如下 : spring的bean配置文件: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/s原创 2009-08-03 11:58:00 · 793 阅读 · 0 评论 -
spring mail
做了一个简单的spring mail的功能,使用Freemarker模板创建HTML内容: java代码: import java.io.UnsupportedEncodingException;import java.util.Map;import javax.mail.MessagingException;import javax.mail.internet.Mim原创 2010-05-04 15:18:00 · 357 阅读 · 0 评论 -
读取资源配置文件
前面说过通过spring得到资源文件,现在我在说下直接得到直接得到资源文件 1.通过ResourceBundle得到。 eg:ResourceBundle rb = ResourceBundle.getBundle("test"); String test1 = rb.getString("tset1"); String test2 = rb.getSt原创 2010-01-03 23:33:00 · 224 阅读 · 0 评论 -
struts1的tiles的使用
1。定义tiles_defs.xml的配置文件: <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" "../dtd/tiles-config_1_1.dtd">原创 2010-03-05 11:45:00 · 641 阅读 · 0 评论 -
Spring集成管理SQL
1。首先定义一个XML Sql 组装解析类: public class SQLentity { private String select; private String update; private Map updateColNm; private String body; private String orderBy; private String count原创 2010-03-05 11:17:00 · 1075 阅读 · 0 评论 -
SpringJdbc调用存储过程
public class NMRStoredProcedure extends StoredProcedure{ public NMRStoredProcedure(DataSource dataSource, String spname) { super(dataSource, spname);// declareParameter(new S原创 2010-03-02 13:19:00 · 1477 阅读 · 0 评论 -
将数据导入文本文件
首先封装了一个工具类: public class UtilsFileWriter { private PrintWriter out; /** * @param filePath * @throws IOException */ public UtilsFileWriter(String filePath) throws IOException { ou原创 2010-03-02 12:07:00 · 325 阅读 · 0 评论 -
模拟spring的Ioc
其实原理简单说就是把信息从配置文件中读取出来,在根据Java的反射机制实现它。下面是一个模拟的过程,这个是传智播客spring视频中提到的,简单列一下: beans.xml<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.原创 2010-02-02 12:09:00 · 429 阅读 · 0 评论 -
Javamail的开发与应用总结经验
环境配置。为了运行Javamail。我们需要在classpath里导入两个包:mail.jar和activation.jar,这是在纯DOS里或者其它简单工具使用时才需要这个classpath。如果使用像Eclipse这样的工具就不需要配置。因为myEclipse已经帮你做好了。为了要发送邮件和接收邮件,我们必须要遵守smtp和pop3协议,不过还有其它协议也可执行(如IMAP)。转载 2010-01-22 13:24:00 · 301 阅读 · 0 评论 -
LDAP使用
两个Java类 一个XML配置:1.LdapAuthenticate.Javaimport java.util.Hashtable;import javax.naming.Context;import javax.naming.NamingException;import javax.naming.directory.原创 2010-01-22 16:29:00 · 496 阅读 · 0 评论 -
Jxl导出Excel表 仅供参考
public class JxlExcelExport{ private Logger logger = Logger.getLogger(this.getClass()); private int[] createHeader(WritableSheet sheet,String[] attributes) throws RowsExceededException,原创 2009-07-09 15:10:00 · 760 阅读 · 1 评论 -
层控制
首先是JS代码: /* * Thickbox 3.1 - One Box To Rule Them All. * By Cody Lindley (http://www.codylindley.com) * Copyright (c) 2007 cody lindley * Licensed under the MIT License: http://www.opens原创 2009-09-07 14:29:00 · 357 阅读 · 0 评论 -
jQuery用法和结合struts2.0使用
一、jQuery的基本用法: 随着WEB2.0及ajax思想在互联网上的快速发展传播,陆续出现了一些优秀的Js框架,其中比较著名的有Prototype、YUI、 jQuery、mootools、Bindows以及国内的JSVM框架等,jQuery是继prototype之后的又一个优秀的Javascript框架。它是由 John Resig 于 2006 年初创建的,它有助于简化 J转载 2009-08-31 17:46:00 · 2456 阅读 · 0 评论 -
Java反射机制深入研究
Normal 0 0 2 false false false MicrosoftInternetExplorer4 <!-- /* Style Defini转载 2009-07-31 11:03:00 · 278 阅读 · 0 评论 -
比较时间的大小
function test(){ comptime('2010-06-08 20:01','2010-06-08 21:01'); } function comptime(beginTime,endTime){ var beginTimes=beginTime.substring(0,10).split('-'); var endTimes=endTime.substring(0,10).split('-'); beginTime=beginTimes[1原创 2010-06-08 18:29:00 · 223 阅读 · 0 评论