亚洲精品无码久久一线,亚洲综合色一区二区三区,亚洲一区二区三区亚瑟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安裝備忘.(轉載)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.新建一個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那么需要設置SET SQLPATH=E:\OracleInstantClient
6.如果查詢結果為亂碼,設置set NLS_LANG=XXXX(我自己是SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280)

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



Joshua Yan 2008-04-27 20:07 發表評論
]]>
解惑 spring 嵌套事務 (轉載)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閱讀全文

Joshua Yan 2008-03-19 12:38 發表評論
]]>
struts2 error (轉載)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
當把struts2下所有的包放在lib下,啟動時的確會報錯(啥錯給忘了),最好是用到什么包自己加什么包,我最常用ssh所以~~~,一下錯誤經驗分享一下。
1。沒有加入spring包以前,只加入了struts2-spring-plugin-2.0.6.jar
  2007-3-21 17:37:29 org.apache.catalina.core.StandardContext filterStart
   嚴重: 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會自動在web-inf文件夾下尋找applicationcontext.xml文件,如果你的spring配置文件配置了好多,可以采取  context-param的參數來解決
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
   </listener>
4。struts2的標簽無法讀取
  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


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

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


Joshua Yan 2008-01-21 12:36 發表評論
]]>
轉載: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

Joshua Yan 2008-01-11 16:20 發表評論
]]>
注意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?


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


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

1.首先讓我們看下jdk中getProperty的源碼

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的實例就會返回null。


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

為了避免這種情況的出現,我們用Properties時應該使用setProperty和getProperty方法,但這樣會限制傳入的只能是String的實例。


Joshua Yan 2006-10-27 11:00 發表評論
]]>
編寫簡單SOAP客戶機(轉載)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
本文描述了一個用Java編寫的不使用專門SOAP庫的簡單通用SOAP客戶機。該客戶機可以讓您用任何 XML 編輯器(或文本編輯器)創建自己的請求, 而不是在暗中為您創建 SOAP 請求 XML 文檔。 該客戶機向您顯示實際的 SOAP 響應 XML 文檔,而不是僅僅提供遠程方法的返回值。 這個簡短的 Java 程序精確顯示了什么是 SOAP:打開 HTTP 連接、發送適當 XML 以調用遠程方法、接著讀取服務器返回的 XML 響應。


通用 Java SOAP 客戶機


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

與 HTML 類似,SOAP 提供一套標記來表示在Web上使用HTTP傳輸協議(從 SOAP 1.1 以來,SMTP 也可以)發送的不同信息塊的作用。但是,SOAP向您提供的能力遠遠強于HTML。使用SOAP,您的程序向 SOAP服務器發送“SOAP請求”(一個簡短的XML文檔,描述在遠程機器上要調用的方法和所有要傳遞給它的參數)。SOAP服務器將嘗試用那些參數執行該方法,并將SOAP響應發回程序。響應可以是執行的結果,也可以是相應的錯誤消息??梢允褂霉睸OAP服務器為提出請求的客戶機提供股票價格、最新的貨幣兌換率、FedEx 包裹跟蹤信息、代數表達式的解決方案以及其它各類信息。

在SOAP存在之前,嘗試使用這種信息的程序必須先捕獲Web頁面,然后“刮下”HTML,以查找適當的文本。 對這些Web頁面進行可視的重新設計(例如,將當前股票價格放到表中第三列而不是第二列中)就可以使這些程序無用。SOAP規范以及它所攜帶的簡要的SOAP請求和響應模式為客戶機和服務器之間的聯絡提供了一個框架,該框架是那些強健得多的信息收集工具的基礎。

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

· 程序傳遞要調用的遠程方法的名稱和所有必需參數。

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

· 庫將這一 XML 文檔傳遞給 SOAP 端點 URL 標識的 SOAP 服務器,這與通過指定服務器的 URL 將瀏覽器指向 Web 服務器地址很類似。

· SOAP 服務器嘗試執行方法后,它組裝包含執行結果的 SOAP 響應 XML 文檔,并將它發回 SOAP 客戶機。

· 接收SOAP響應時,客戶機庫對XML進行語法分析以獲得方法調用的結果,并將結果傳遞給使用庫的程序。


SOAPClient4XG


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

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

清單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);
        }
      }
    }
  }
}




Joshua Yan 2005-10-28 13:26 發表評論
]]>
Timer使用經歷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:處理接收到的數據,并構建為程序中所需的對象。
task2:解析task1所構建的對象,并作出相應處理,最終返回結果給請求端。
task3:處理外部請求隊列。
task4:發送應答信息(實時性要求不高)。
當接收到外部的請求時,把請求加入到請求隊列。但中間出現了一些問題,當task3處理請求時,由于需要和外部進行通信,它的通信結果需要task2來提供,這樣就造成得不到結果的情況。這是因為如果task3沒有完成,task2就不能執行,因此他們需要分開處理。用兩個Timer即可。

Joshua Yan 2005-09-15 20:20 發表評論
]]>
主站蜘蛛池模板: 最近中文字幕国语免费完整| 一区二区三区免费视频观看| 国产精品成人观看视频免费 | 日韩视频在线精品视频免费观看 | 四虎成人免费网址在线| 亚洲国产高清在线精品一区| 99视频精品全部免费观看| 亚洲av无码乱码国产精品| 久别的草原电视剧免费观看| 久久久亚洲欧洲日产国码是AV| 日本免费一区二区久久人人澡| 亚洲免费视频在线观看| 91嫩草免费国产永久入口| 亚洲中文无码亚洲人成影院| 日本免费电影一区| 色噜噜狠狠色综合免费视频| 亚洲国产精品尤物YW在线观看| 国产成人1024精品免费| 亚洲va在线va天堂va不卡下载| 1000部拍拍拍18勿入免费视频下载| 亚洲制服在线观看| 四虎影视精品永久免费| 国产精品小视频免费无限app | 男男AV纯肉无码免费播放无码| 亚洲一卡2卡三卡4卡无卡下载| 免费一级毛片在线播放| a级毛片毛片免费观看永久| 久久亚洲精品成人无码网站| 在线成人a毛片免费播放| 成人一级免费视频| 亚洲熟妇无码久久精品| 日韩高清在线免费观看| 99在线免费视频| 久久精品国产99国产精品亚洲| 免费一级毛片女人图片| 精品免费tv久久久久久久| 亚洲美女自拍视频| 一本久久综合亚洲鲁鲁五月天| 精品国产污污免费网站| 亚洲av永久无码| 久久青青成人亚洲精品|