`
zxs19861202
  • 浏览: 908898 次
  • 性别: Icon_minigender_1
  • 来自: 湖北—》上海
社区版块
存档分类
最新评论
文章列表
  import java.io.IOException;import java.io.UnsupportedEncodingException; import org.apache.commons.httpclient.Header;import org.apache.commons.httpclient.HttpClient;import org.apache.commons.httpclient.HttpException;import org.apache.commons.httpclient.HttpStatus;import org.apache.commons.httpcl ...
import java.io.StringReader;import java.util.HashMap; import org.dom4j.Document;import org.dom4j.DocumentException;import org.dom4j.Element;import org.dom4j.XPath;import org.dom4j.io.SAXReader;import org.xml.sax.InputSource;   public class Test {   //获取document对象  public Document getDocument(Strin ...
转载:http://blog.csdn.net/xieboshi/archive/2009/05/20/4204439.aspx public class ConventPFX {       public static final String PKCS12 = "PKCS12";       public static final String JKS = "JKS";       public static final String PFX_KEYSTORE_FILE = "c:\\test.pfx";       public ...
在链接中有中文参数取出会乱码,下面是一种解决方法:   1、js转码  var tag=document.getElementById("shopname").value; tag=encodeURI(encodeURI(tag));    document.location=view.do?method=viewShop&tag="+tag;     2、在action中解码 String tag = request.getParameter("tag").toString(); tag = java.net.URLD ...
google map js采有的编码为'utf-8'   我们的页面一般采用gb2312   当我们这种菜鸟在调用时往往会出现这样的情况   1.页面乱码,地图正常 2.地图不正常,页面正常     而在这之前我只知道在文档头定议编码格式 <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>风雪之隅 </title> </
Axis2可以通过模块(Module)进行扩展。Axis2模块至少需要有两个类,这两个类分别实现了Module和Handler接口。开发和使用一个Axis2模块的步骤如下:1. 编写实现Module接口的类。Axis2模块在进行初始化、销毁等动作时会调用该类中相应的方法)。2. 编写实现Handler接口的类。该类是Axis2模块的业务处理类。3. 编写module.xml文件。该文件放在META-INF目录中,用于配置Axis2模块。4. 在axis2.xml文件中配置Axis2模块。5. 在services.xml文件中配置Axis2模块。每一个Axis2模块都需要使用<module& ...
  最近项目中要用到google map,以下是研究api时整理的文档! 
import java.io.IOException;import java.io.StringReader;import java.util.List; import org.jdom.Document;import org.jdom.Element;import org.jdom.JDOMException;import org.jdom.Namespace;import org.jdom.input.SAXBuilder;import org.xml.sax.InputSource; public class DuXMLDoc {    public List xmlElements( ...
用 Axis2实现 Web Service,虽然可以将 POJO类放在 axis2\WEB-INF\pojo目录中直接发布成 Web Service,这样做不需要进行任何配置,但这些 POJO类不能在任何包中。这似乎有些不方便,为此, Axis2也允许将带包的 POJO类发布成 Web Service。    先实现一个 POJO类,代码如下: package  service;public   class  MyService{     public  String getGreeting(String name)    {         return   " 您好  &quo ...
采用配置文件方式的Quartz调度: 1、所需的第三方包 commons-beanutils.jar commons-collections-3.2.jar commons-digester.jar commons-logging.jar jta.jar quartz.jar   2、自定被调度的Job package com.allen; import java.text.SimpleDateFormat;import java.util.Date; import org.quartz.Job;import org.quartz.JobExecutionContex ...
  Axis2是一套崭新的WebService引擎,该版本是对Axis1.x重新设计的产物。Axis2不仅支持SOAP1.1和SOAP1.2,还集成了非常流行的REST WebService,同时还支持Spring、JSON等技术。这些都将在后面的系列教程中讲解。在本文中主要介绍了如何使用Axis2开发一个不需要任何配置文件的WebService,并在客户端使用Java和C#调用这个WebService。 一、Axis2的下载和安装     读者可以从如下的网址下载Axis2的最新版本:     http://ws.apache.org/axis2/     在本文使用了目前Axis2的 ...
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Google maps API 查询路线,任何地点到任何地点</title><script src="http://ditu.google.cn/maps?file=api&amp; ...
最近做的项目需要把生成的静态页面同步到静态页面服务器上,采用rsync+inotify实现目录实时同步当然就成了很好的方式了。环境:ubuntu-9.01生成静态页面的机器作为客户端采用上传的方式,地址为:192.168.18.12静态页面服务器作为服务器端,地址为:192.168.18.14同步目录为:/usr/ROOT rysnc的下载地址为:http://rsync.samba.org/目前最新的版本为:3.0.7inotify下载地址为:http://inotify-tools.sourceforge.net/最新版本为:3.13服务器端安装:   tar -zxvf rsync- ...
 今天把以前的项目移植到linux上了,我装的是ubuntu,web服务器是tomcat,发现用freemark模板生成的静态页面全   乱码了,在windows都是正常的,猜想可能是linux字符集的问题,用locale查看ubuntu默认字符集为en_US.UTF-8,需   要修改为zh_CN.GB2312.   首先vi /var/lib/locales/supported.d/local 将zh_CN.GB2312加入到后面,保存   执行:locale-gen   然后:vi /etc/profile  加入   LC_ALL="zh_CN.GB2 ...
1、jdk-1_5_0_06-linux-i586.bin下载到/usr/soft,赋予可执行权限:chmod 755 jdk-1_5_0_06-linux-i586.bin   2、执行:./jdk-1_5_0_06-linux-i586.bin    空格键翻页,到最后输入yes   3、配置环境变量:在/etc/profile 中加入: export  PATH=/usr/soft/jdk1.5.0_06/bin:$PATH export JAVA_HOME=/usr/soft/jdk1.5.0_06     4、运行:source /etc/profile  使配置文件 ...
Global site tag (gtag.js) - Google Analytics