文章分类 -  B1-java

摘要:jsp页面 上传文件地址: 后台接收 //excel文件批量导入短信 @RequestMapping("/importToContent.aa") public ModelAndView importToContent(HttpServletRequest request,@RequestParam("excelFile") MultipartFile file) throws Exception{ scm.readExcelWriteData(file.getInputStream()); return new ModelAndView(... 阅读全文
posted @ 2013-10-25 16:14 暖流 阅读(452) 评论(0) 推荐(0)
摘要:web.xml中有各种各样的标签,了解一下具体标签的具体用途.1,站点的名称和说明.2,针对环境参数初始化3,Servlet的名称和映射4,Session生命周期的设定5,Tag library的对映6,Jsp的设定7,Mime Type处理8,错误处理9,利用JDNI取得站台资源...等等;这里介绍了这个xml的版本,xml概括的来源xsi:schema...DevelopJSP 2.0 Tech Book's Examples /images/small.gif /images/large.gir站点名称,站点描述,站点小\中图标的路径.元素应指向web站台中某个小图标的路径,大小 阅读全文
posted @ 2013-10-25 16:10 暖流 阅读(294) 评论(0) 推荐(0)
摘要://要是真的想转换可以都试试out.println( " 1: "+ "中文 "); out.println( " 2: "+ "中文 ".getBytes()); out.println( " 3: "+ "中文 ".getBytes( "GB2312 ")); out.println( " 4: "+ "中文 ".getBytes( "ISO8859_1 ")); out.println( & 阅读全文
posted @ 2013-10-25 16:03 暖流 阅读(590) 评论(0) 推荐(0)
摘要://消除jsp中get方法传递中文参数的乱码问题//首先,进入tomcat目录(:/usr/local/jakarta-tomcat-5.0.28/conf)//sudo vim server.xml //保存,重启tomcat即可//注意//统一资源标识符 (Uniform Resource Identifier, URI)//统一资源定位符 (Uniform Resource Locator, URL) 阅读全文
posted @ 2013-10-25 16:02 暖流 阅读(255) 评论(0) 推荐(0)
摘要:今天我在myeclipse写了一些测试数据提供给同事用,本地测试没问题,但是部署到liunx上就404无法访问查看logs下日志文件SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListenerjava.lang.NoClassDefFoundError: javax/el/ExpressionFactory at java.lang.Class.getDeclaredConstructors0(Native Method) at java.... 阅读全文
posted @ 2013-10-25 15:59 暖流 阅读(357) 评论(0) 推荐(0)
摘要:css图片拼合生成器: http://cn.spritegen.website-performance.org/CssSprite百度百科CSSSprites在国内很多人叫css精灵,是一种网页图片应用处理方式。它允许你将一个页面涉及到的所有零星图片都包含到一张大图中去,这样一来,当访问该页面时,载入的图片就不会像以前那样一幅一幅地慢慢显示出来了。对于当前网络流行的速度而言,不高于200KB的单张图片的所需载入时间基本是差不多的,所以无需顾忌这个问题。 加速的关键,不是降低重量,而是减少个数。传统切图讲究精细,图片规格越小越好,重量越小越好,其实规格大小无所谓,计算机统一都按byte计算。客. 阅读全文
posted @ 2013-10-25 15:55 暖流 阅读(330) 评论(0) 推荐(0)
摘要:http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/examples/infobox-basic.htmlhttp://code.google.com/intl/zh-CN/apis/maps/documentation/javascript/services.html#Geocodinghttp://code.google.com/intl/zh-CN/apis/maps/documentation/javascript/reference.html#MarkerOptionshttp://code.g 阅读全文
posted @ 2013-10-25 15:50 暖流 阅读(180) 评论(0) 推荐(0)
摘要:public class LatLonUtil { private static final double PI = 3.14159265; //老祖真理 private static final double EARTH_RADIUS = 6378137; //赤道半径 private static final double RAD = Math.PI / 180.0; //@see http://snipperize.todayclose.com/snippet/php/SQL-Query-to-Find-All-Retailers-Within-a-... 阅读全文
posted @ 2013-10-25 15:48 暖流 阅读(4151) 评论(0) 推荐(0)
摘要:数据解析,保存遗产!强大内涵一些看不懂的数据首先要确定他的编码格式,其次才能准确作出解析,可以拿一些数据,我博客里有一个小方法来判断是什么可是!!BufferedReader是继承于Reader对象,从字符输入流中读取文本,缓冲各个字符,从而提供字符,数组和行的高效读取.private String getRequestBody(HttpServletRequest request) throws IOException{ StringBuilder stringBuilder = new StringBuilder(); BufferedReader buffe... 阅读全文
posted @ 2013-09-17 16:33 暖流 阅读(303) 评论(0) 推荐(0)
摘要:Timer计时new Timer().schedule(new LuceneTask(),10000,60*60000);问题:用 计时器Timer 的时候 每隔 30分钟执行一次 直接改系统时间调整到下个30分钟 咋不执行jvm在启动的时候读取下系统时间,然后自己维护。在jvm不中断过程中,你改系统时间,不会影响到jvm内部时间//给当前时间加4个小时SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");Date date = new Date();Calendar c = Calendar.ge 阅读全文
posted @ 2013-09-17 16:32 暖流 阅读(419) 评论(0) 推荐(0)
摘要:1.属性的动态getter,setter在这框架满天飞的年代,不能事事都保证执行getter,setter函数了,有时候属性是要需要根据名字动态取得的,就像这样: BeanUtils.getProperty(myBean,"code");而BeanUtils更强的功能是直接访问内嵌对象的属性,只要使用点号分隔。BeanUtils.getProperty(orderBean, "address.city");相比之下其他类库的BeanUtils通常都很简单,不能访问内嵌的对象,所以经常要用Commons BeanUtils替换它们。BeanUtils还支持 阅读全文
posted @ 2013-09-17 16:28 暖流 阅读(480) 评论(0) 推荐(0)
摘要:FusionCharts参数说明功能特性animation 是否动画显示数据,默认为 1(True)showNames 是否显示横向坐标轴(x轴)标签名称rotateNames 是否旋转显示标签,默认为0(False):横向显示showValues 是否在图表显示对应的数据值,默认为1(True)yAxisMinValue 指定纵轴(y轴)最小值,数字yAxisMaxValue 指定纵轴(y轴)最大值,数字showLimits 是否显示图表限值(y轴最大、最小值),默认为1(True)showColumnShadow 是否显示各条形图间的阴影(若柱面图在一起并列的话)showAlternate 阅读全文
posted @ 2013-09-17 16:22 暖流 阅读(824) 评论(0) 推荐(0)
摘要:package com.util;import java.text.DateFormat;import java.util.Calendar;import java.util.Date;public class Test { public void getTimeByDate(){ Date date = new Date(); DateFormat df1 = DateFormat.getDateInstance();//日期格式,精确到日 System.out.println(df1.format(date)); DateFor... 阅读全文
posted @ 2013-09-17 16:15 暖流 阅读(252210) 评论(4) 推荐(2)
摘要:public abstract class Singleton { private T mInstance; protected abstract T create(); public final T get() { synchronized (this) { if (mInstance == null) { mInstance = create(); } return mInstance; } }} 一,java下载文件格式 public... 阅读全文
posted @ 2013-09-17 09:32 暖流 阅读(386) 评论(0) 推荐(0)