亚洲婷婷五月综合狠狠爱,亚洲另类无码一区二区三区,亚洲日本在线观看视频http://m.tkk7.com/jhyan/category/3870.htmlzh-cnSun, 27 Apr 2008 12:49:54 GMTSun, 27 Apr 2008 12:49:54 GMT60最輕便的客戶端oracle instant client安裝備忘.(轉(zhuǎn)載)http://m.tkk7.com/jhyan/archive/2008/04/27/196619.htmlJoshua YanJoshua YanSun, 27 Apr 2008 12:07:00 GMThttp://m.tkk7.com/jhyan/archive/2008/04/27/196619.htmlhttp://m.tkk7.com/jhyan/comments/196619.htmlhttp://m.tkk7.com/jhyan/archive/2008/04/27/196619.html#Feedback0http://m.tkk7.com/jhyan/comments/commentRss/196619.htmlhttp://m.tkk7.com/jhyan/services/trackbacks/196619.html最輕便的客戶端oracle instant client安裝備忘.

輕便的客戶端oracle instant client安裝備忘:
假定instant client 解壓到E:\OracleInstantClient
1.SET PATH=E:\OracleInstantClient;
2.SET TNS_ADMIN=E:\OracleInstantClient
3.新建一個(gè)tnsnames.ora,然后填入
for example:
192.168.0.20 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
)
4.SET LD_LIBRARY_PATH=E:\OracleInstantClient

5.如果要安裝SQL plus那么需要設(shè)置SET SQLPATH=E:\OracleInstantClient
6.如果查詢結(jié)果為亂碼,設(shè)置set NLS_LANG=XXXX(我自己是SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280)

原地址:http://m.tkk7.com/rocky/archive/2007/09/13/oracle_instant_client.html



]]>
解惑 spring 嵌套事務(wù) (轉(zhuǎn)載)http://m.tkk7.com/jhyan/archive/2008/03/19/187216.htmlJoshua YanJoshua YanWed, 19 Mar 2008 04:38:00 GMThttp://m.tkk7.com/jhyan/archive/2008/03/19/187216.htmlhttp://m.tkk7.com/jhyan/comments/187216.htmlhttp://m.tkk7.com/jhyan/archive/2008/03/19/187216.html#Feedback0http://m.tkk7.com/jhyan/comments/commentRss/187216.htmlhttp://m.tkk7.com/jhyan/services/trackbacks/187216.html閱讀全文

]]>
struts2 error (轉(zhuǎn)載)http://m.tkk7.com/jhyan/archive/2008/01/21/176725.htmlJoshua YanJoshua YanMon, 21 Jan 2008 04:36:00 GMThttp://m.tkk7.com/jhyan/archive/2008/01/21/176725.htmlhttp://m.tkk7.com/jhyan/comments/176725.htmlhttp://m.tkk7.com/jhyan/archive/2008/01/21/176725.html#Feedback0http://m.tkk7.com/jhyan/comments/commentRss/176725.htmlhttp://m.tkk7.com/jhyan/services/trackbacks/176725.html
當(dāng)把struts2下所有的包放在lib下,啟動(dòng)時(shí)的確會(huì)報(bào)錯(cuò)(啥錯(cuò)給忘了),最好是用到什么包自己加什么包,我最常用ssh所以~~~,一下錯(cuò)誤經(jīng)驗(yàn)分享一下。
1。沒有加入spring包以前,只加入了struts2-spring-plugin-2.0.6.jar
  2007-3-21 17:37:29 org.apache.catalina.core.StandardContext filterStart
   嚴(yán)重: Exception starting filter struts2
   Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory
2。加入了spring包以后的工程
    java.lang.NullPointerException
   at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance  (SpringObjectFactory.java:188)at    com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType   (XmlConfigurationProvider.java:479)
3。/在web.xml文件中加入,問題解決
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
//listenre會(huì)自動(dòng)在web-inf文件夾下尋找applicationcontext.xml文件,如果你的spring配置文件配置了好多,可以采取  context-param的參數(shù)來解決
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
   </listener>
4。struts2的標(biāo)簽無法讀取
  Servlet.service() for servlet jsp threw exception
   java.lang.NullPointerException
   at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
   at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)
   在web.xml中加入
<filter-mapping>
  <filter-name>struts2</filter-name>
  <url-pattern>/*</url-pattern>
 </filter-mapping〉


From: http://blog.csdn.net/qiuxiao1981/archive/2007/10/19/1832852.aspx


經(jīng)過本人測試主要是由于web.xml中少了如下listener的配置:

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>


]]>
轉(zhuǎn)載:dW 中國 2007 年 TOP 10 最受歡迎的文章和教程http://m.tkk7.com/jhyan/archive/2008/01/11/174652.htmlJoshua YanJoshua YanFri, 11 Jan 2008 08:20:00 GMThttp://m.tkk7.com/jhyan/archive/2008/01/11/174652.htmlhttp://m.tkk7.com/jhyan/comments/174652.htmlhttp://m.tkk7.com/jhyan/archive/2008/01/11/174652.html#Feedback0http://m.tkk7.com/jhyan/comments/commentRss/174652.htmlhttp://m.tkk7.com/jhyan/services/trackbacks/174652.html

]]>
注意properties的使用http://m.tkk7.com/jhyan/archive/2006/10/27/77567.htmlJoshua YanJoshua YanFri, 27 Oct 2006 03:00:00 GMThttp://m.tkk7.com/jhyan/archive/2006/10/27/77567.htmlhttp://m.tkk7.com/jhyan/comments/77567.htmlhttp://m.tkk7.com/jhyan/archive/2006/10/27/77567.html#Feedback4http://m.tkk7.com/jhyan/comments/commentRss/77567.htmlhttp://m.tkk7.com/jhyan/services/trackbacks/77567.html
例子:

1?Properties?prop=new?Properties();
2?prop.put("id","12");
3?prop.put("price",new?BigDecimal(4));
4?System.out.println("prop="+prop.toString());
5?String?price=prop.getProperty("price");
6?System.out.println("price="+price);
7?


打印的結(jié)果可能象下面所示
第4行的結(jié)果:prop={id=12,price=4}
第6行的結(jié)果:price=null


為什么取出來的price為null,而不是我們傳入的值4??

1.首先讓我們看下jdk中g(shù)etProperty的源碼

1?public?String?getProperty(String?key)?{
2????Object?oval?=?super.get(key);
3????String?sval?=?(oval?instanceof?String)???(String)oval?:?null;
4????return?((sval?==?null)?&&?(defaults?!=?null))???defaults.getProperty(key)?:?sval;
5????}

從第3行可以看出,如果Properties中的value不是String的實(shí)例就會(huì)返回null。


2。在例子中,我們用put方法傳入了BigDecimal的實(shí)例,因此取出的時(shí)候返回了null。

為了避免這種情況的出現(xiàn),我們用Properties時(shí)應(yīng)該使用setProperty和getProperty方法,但這樣會(huì)限制傳入的只能是String的實(shí)例。


]]>
編寫簡單SOAP客戶機(jī)(轉(zhuǎn)載)http://m.tkk7.com/jhyan/archive/2005/10/28/17162.htmlJoshua YanJoshua YanFri, 28 Oct 2005 05:26:00 GMThttp://m.tkk7.com/jhyan/archive/2005/10/28/17162.htmlhttp://m.tkk7.com/jhyan/comments/17162.htmlhttp://m.tkk7.com/jhyan/archive/2005/10/28/17162.html#Feedback0http://m.tkk7.com/jhyan/comments/commentRss/17162.htmlhttp://m.tkk7.com/jhyan/services/trackbacks/17162.html
本文描述了一個(gè)用Java編寫的不使用專門SOAP庫的簡單通用SOAP客戶機(jī)。該客戶機(jī)可以讓您用任何 XML 編輯器(或文本編輯器)創(chuàng)建自己的請求, 而不是在暗中為您創(chuàng)建 SOAP 請求 XML 文檔。 該客戶機(jī)向您顯示實(shí)際的 SOAP 響應(yīng) XML 文檔,而不是僅僅提供遠(yuǎn)程方法的返回值。 這個(gè)簡短的 Java 程序精確顯示了什么是 SOAP:打開 HTTP 連接、發(fā)送適當(dāng) XML 以調(diào)用遠(yuǎn)程方法、接著讀取服務(wù)器返回的 XML 響應(yīng)。


通用 Java SOAP 客戶機(jī)


SOAP(簡單對(duì)象訪問協(xié)議)是 IBM、Microsoft、DevelopMentor 和 UserLand Software 為在網(wǎng)絡(luò)上交換信息而開發(fā)的一種已在發(fā)展的 W3C 標(biāo)準(zhǔn)。 隨著Web上可以公開使用的SOAP服務(wù)器的不斷增加,SOAP幾乎對(duì)用任何語言編寫的程序——即使是用流行的簡單語言(如 Visual Basic、JavaScript 和 perl)編寫的非常短小的程序——執(zhí)行著HTML對(duì)Web瀏覽器所做的事:它為這些程序提供一個(gè)簡單的方法來利用萬維網(wǎng)上不斷增加的可用信息源。

與 HTML 類似,SOAP 提供一套標(biāo)記來表示在Web上使用HTTP傳輸協(xié)議(從 SOAP 1.1 以來,SMTP 也可以)發(fā)送的不同信息塊的作用。但是,SOAP向您提供的能力遠(yuǎn)遠(yuǎn)強(qiáng)于HTML。使用SOAP,您的程序向 SOAP服務(wù)器發(fā)送“SOAP請求”(一個(gè)簡短的XML文檔,描述在遠(yuǎn)程機(jī)器上要調(diào)用的方法和所有要傳遞給它的參數(shù))。SOAP服務(wù)器將嘗試用那些參數(shù)執(zhí)行該方法,并將SOAP響應(yīng)發(fā)回程序。響應(yīng)可以是執(zhí)行的結(jié)果,也可以是相應(yīng)的錯(cuò)誤消息。可以使用公共SOAP服務(wù)器為提出請求的客戶機(jī)提供股票價(jià)格、最新的貨幣兌換率、FedEx 包裹跟蹤信息、代數(shù)表達(dá)式的解決方案以及其它各類信息。

在SOAP存在之前,嘗試使用這種信息的程序必須先捕獲Web頁面,然后“刮下”HTML,以查找適當(dāng)?shù)奈谋尽?對(duì)這些Web頁面進(jìn)行可視的重新設(shè)計(jì)(例如,將當(dāng)前股票價(jià)格放到表中第三列而不是第二列中)就可以使這些程序無用。SOAP規(guī)范以及它所攜帶的簡要的SOAP請求和響應(yīng)模式為客戶機(jī)和服務(wù)器之間的聯(lián)絡(luò)提供了一個(gè)框架,該框架是那些強(qiáng)健得多的信息收集工具的基礎(chǔ)。

有許多SOAP客戶機(jī)可用于大多數(shù)的流行編程語言;有關(guān)詳盡列表,請參閱 SOAP::Lite for Perl 主頁上的 SOAP Toolkits 部分(請參閱參考資料)。大多數(shù) SOAP 客戶機(jī)都提供類庫、COM 對(duì)象或從您自己程序調(diào)用的等同對(duì)象。通常,使用這些客戶機(jī)庫遵循以下模式:

· 程序傳遞要調(diào)用的遠(yuǎn)程方法的名稱和所有必需參數(shù)。

· 庫組裝 SOAP 請求的適當(dāng) XML 文檔以將這一信息打包。

· 庫將這一 XML 文檔傳遞給 SOAP 端點(diǎn) URL 標(biāo)識(shí)的 SOAP 服務(wù)器,這與通過指定服務(wù)器的 URL 將瀏覽器指向 Web 服務(wù)器地址很類似。

· SOAP 服務(wù)器嘗試執(zhí)行方法后,它組裝包含執(zhí)行結(jié)果的 SOAP 響應(yīng) XML 文檔,并將它發(fā)回 SOAP 客戶機(jī)。

· 接收SOAP響應(yīng)時(shí),客戶機(jī)庫對(duì)XML進(jìn)行語法分析以獲得方法調(diào)用的結(jié)果,并將結(jié)果傳遞給使用庫的程序。


SOAPClient4XG


SOAP 的介紹(請參閱 developerWorks 上 Graham Glass 編寫得極佳的“ Web 服務(wù)革命”專欄)總是討論用于 SOAP 請求和響應(yīng)的 XML 的結(jié)構(gòu),但是我接觸到的 SOAP 客戶機(jī)總是會(huì)暗中進(jìn)行 XML 組裝和語法分析,所以我從來不用知道。 作為使用 XML 的人員,我曾想自己執(zhí)行 XML 部分;我認(rèn)為如果 SOAP 這樣簡單,那么我應(yīng)該能夠編寫一個(gè)簡單的 SOAP 客戶機(jī)來讀取 SOAP 請求的 XML 文檔、將它發(fā)送到命令行上指定的 SOAP 端點(diǎn) URL、讀回響應(yīng)文檔并輸出該響應(yīng)。這將使它成為一個(gè)真正的通用 SOAP 客戶機(jī),因?yàn)樗{(diào)用任何 SOAP 服務(wù)器上的任何方法。

清單1中顯示的 SoapClient4XG(“SOAP Client for XML Geeks”)Java類執(zhí)行該任務(wù),而不使用早先提到的 SOAP Toolkits 頁面上列出的任何專用 Java SOAP 類(請參閱參考資料)。 檢查了必需的 SOAP 端點(diǎn) URL 和 SOAP XML 文檔文件名參數(shù)及可選的 SOAP 操作參數(shù)后,讀入文件,將它發(fā)送到 SOAP 服務(wù)器,讀回響應(yīng),然后將其輸出到標(biāo)準(zhǔn)出口。

清單1

Listing 1. The complete SOAP client
/**
* SOAPClient4XG. Read the SOAP envelope file passed as the second
* parameter, pass it to the SOAP endpoint passed as the first parameter, and
* print out the SOAP envelope passed as a response.  with help from Michael
* Brennan 03/09/01
*
*
* @author  Bob DuCharme
* @version 1.1
* @param   SOAPUrl      URL of SOAP Endpoint to send request.
* @param   xmlFile2Send A file with an XML document of the request.  
*
* 5/23/01 revision: SOAPAction added
*/
import java.io.*;
import java.net.*;
public class SOAPClient4XG {
    public static void main(String[] args) throws Exception {
        if (args.length  < 2) {
            System.err.println("Usage:  java SOAPClient4XG " +
                               "http://soapURL soapEnvelopefile.xml" +
                               " [SOAPAction]");
                                System.err.println("SOAPAction is optional.");
            System.exit(1);
        }
        String SOAPUrl      = args[0];
        String xmlFile2Send = args[1];
                  String SOAPAction = "";
        if (args.length  > 2)
                                SOAPAction = args[2];
        // Create the connection where we&#39;re going to send the file.
        URL url = new URL(SOAPUrl);
        URLConnection connection = url.openConnection();
        HttpURLConnection httpConn = (HttpURLConnection) connection;
        // Open the input file. After we copy it to a byte array, we can see
        // how big it is so that we can set the HTTP Cotent-Length
        // property. (See complete e-mail below for more on this.)
        FileInputStream fin = new FileInputStream(xmlFile2Send);
        ByteArrayOutputStream bout = new ByteArrayOutputStream();    
        // Copy the SOAP file to the open connection.
        copy(fin,bout);
        fin.close();
        byte[] b = bout.toByteArray();
        // Set the appropriate HTTP parameters.
        httpConn.setRequestProperty( "Content-Length",
                                     String.valueOf( b.length ) );
        httpConn.setRequestProperty("Content-Type","text/xml; charset=utf-8");
                  httpConn.setRequestProperty("SOAPAction",SOAPAction);
        httpConn.setRequestMethod( "POST" );
        httpConn.setDoOutput(true);
        httpConn.setDoInput(true);
        // Everything&#39;s set up; send the XML that was read in to b.
        OutputStream out = httpConn.getOutputStream();
        out.write( b );    
        out.close();
        // Read the response and write it to standard out.
        InputStreamReader isr =
            new InputStreamReader(httpConn.getInputStream());
        BufferedReader in = new BufferedReader(isr);
        String inputLine;
        while ((inputLine = in.readLine()) != null)
            System.out.println(inputLine);
        in.close();
    }
  // copy method from From E.R. Harold&#39;s book "Java I/O"
  public static void copy(InputStream in, OutputStream out)
   throws IOException {
    // do not allow other threads to read from the
    // input or write to the output while copying is
    // taking place
    synchronized (in) {
      synchronized (out) {
        byte[] buffer = new byte[256];
        while (true) {
          int bytesRead = in.read(buffer);
          if (bytesRead == -1) break;
          out.write(buffer, 0, bytesRead);
        }
      }
    }
  }
}




]]>
Timer使用經(jīng)歷http://m.tkk7.com/jhyan/archive/2005/09/15/13106.htmlJoshua YanJoshua YanThu, 15 Sep 2005 12:20:00 GMThttp://m.tkk7.com/jhyan/archive/2005/09/15/13106.htmlhttp://m.tkk7.com/jhyan/comments/13106.htmlhttp://m.tkk7.com/jhyan/archive/2005/09/15/13106.html#Feedback0http://m.tkk7.com/jhyan/comments/commentRss/13106.htmlhttp://m.tkk7.com/jhyan/services/trackbacks/13106.htmltask1:處理接收到的數(shù)據(jù),并構(gòu)建為程序中所需的對(duì)象。
task2:解析task1所構(gòu)建的對(duì)象,并作出相應(yīng)處理,最終返回結(jié)果給請求端。
task3:處理外部請求隊(duì)列。
task4:發(fā)送應(yīng)答信息(實(shí)時(shí)性要求不高)。
當(dāng)接收到外部的請求時(shí),把請求加入到請求隊(duì)列。但中間出現(xiàn)了一些問題,當(dāng)task3處理請求時(shí),由于需要和外部進(jìn)行通信,它的通信結(jié)果需要task2來提供,這樣就造成得不到結(jié)果的情況。這是因?yàn)槿绻鹴ask3沒有完成,task2就不能執(zhí)行,因此他們需要分開處理。用兩個(gè)Timer即可。

]]>
主站蜘蛛池模板: 亚洲女人被黑人巨大进入| 成人亚洲国产va天堂| 好吊妞视频免费视频| 在线视频免费观看爽爽爽| 麻豆成人久久精品二区三区免费| 久久亚洲精品无码网站| 亚洲日产乱码一二三区别| 久久青青成人亚洲精品| 国产亚洲精品一品区99热| 亚洲精品无码MV在线观看 | 亚洲国产精品一区二区三区久久 | 中文文字幕文字幕亚洲色| 亚洲国模精品一区| 亚洲黄黄黄网站在线观看| 1024免费福利永久观看网站| 黄色永久免费网站| 最近2019中文字幕mv免费看 | 亚洲视频在线观看网站| 亚洲欧洲校园自拍都市| 国产精品亚洲片在线| 亚洲午夜精品一区二区| 亚洲成aⅴ人片在线影院八| 亚洲依依成人精品| 亚洲乱色伦图片区小说| 黄人成a动漫片免费网站| 女人隐私秘视频黄www免费| 日韩插啊免费视频在线观看| 97视频免费在线| 暖暖免费高清日本一区二区三区| 黄网站色在线视频免费观看| 成人超污免费网站在线看| 成人免费的性色视频| 日本视频免费在线| 国产综合精品久久亚洲| 亚洲国产精品狼友中文久久久| 国产一区二区三区免费视频| 亚洲综合精品网站在线观看| 亚洲国产第一页www| 亚洲性无码一区二区三区| 亚洲av无码久久忘忧草| 精品视频免费在线|