posts - 48, comments - 13, trackbacks - 0, articles - 0
            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          2009年10月20日

          spket - http://www.spket.com/update

          subclipse - http://subclipse.tigris.org/update

          posted @ 2010-12-02 09:39 董銳 閱讀(295) | 評論 (0)編輯 收藏

          Tomcat啟動(dòng)時(shí)classloader加載順序
            Tomcat的class加載的優(yōu)先順序一覽  
            1.最先是$JAVA_HOME/jre/lib/ext/下的jar文件。  
            2.環(huán)境變量CLASSPATH中的jar和class文件。  
            3.$CATALINA_HOME/common/classes下的class文件。  
            4.$CATALINA_HOME/commons/endorsed下的jar文件。  
            5.$CATALINA_HOME/commons/i18n下的jar文件。  
            6.$CATALINA_HOME/common/lib   下的jar文件。  
            (JDBC驅(qū)動(dòng)之類的jar文件可以放在這里,這樣就可以避免在server.xml配置好數(shù)據(jù)源卻出現(xiàn)找不到JDBC   Driver的情況。)  
            7.$CATALINA_HOME/server/classes下的class文件。  
            8.$CATALINA_HOME/server/lib/下的jar文件。  
            9.$CATALINA_BASE/shared/classes   下的class文件。  
            10.$CATALINA_BASE/shared/lib下的jar文件。  
            11.各自具體的webapp   /WEB-INF/classes下的class文件。  
            12.各自具體的webapp   /WEB-INF/lib下的jar文件。

          posted @ 2010-11-03 11:31 董銳 閱讀(1014) | 評論 (0)編輯 收藏

          What this means is that leadership involves setting direction, communicating that vision passionately to those they work with, and helping the people they lead understand and commit to that vision. Managers, on the other hand, are responsible for ensuring that the vision is implemented efficiently and successfully.

          posted @ 2010-08-23 16:29 董銳 閱讀(451) | 評論 (0)編輯 收藏

          I know how to send by jquery post method $.post("test.php", { name: "John", time: "2pm" } );

          but what if my form field name is array

          <input type=text name="n1[]" id="n1[]" value='12345">   <input type=text name="n1[]" id="n1[]" value="14454">  

          how to send these 2 field value send to url by jquery post method?

           

          You can pass in an array as a value in the object:

          {name: 'John', 'nl[]': ['12345', '14454']}  

          (This is documented at ajax but also works for post.)

           

          var fields = $(":input").serializeArray();      $.post("test.php",fields);

          from:http://stackoverflow.com/questions/1656267/how-to-send-multi-field-value-by-jquery-post

          posted @ 2010-07-14 11:46 董銳 閱讀(741) | 評論 (0)編輯 收藏

          string.replace(new RegExp(oldString,"gm"),newString))

          posted @ 2010-07-14 11:20 董銳 閱讀(209) | 評論 (0)編輯 收藏

          在網(wǎng)上看到解決方案是把注冊表里(因?yàn)槭莣indows操作系統(tǒng))\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE 下的NLS_lang 的NA值修改為SIMPLIFIED CHINESE_CHINA.ZHS16GBK;
           但是我在操作的時(shí)候,只把Oracle目錄下所有能找到的NLS_Lang值修改了,偏偏沒有修改Oracle目錄所對應(yīng)的NLS_Lang值,導(dǎo)致一直測試不通過,始終報(bào)錯(cuò),最后終于發(fā)現(xiàn)原來Oracle目錄本身對應(yīng)的NLS_lang值沒有修改,修改過后,測試通過,成功!

          posted @ 2010-01-14 14:45 董銳 閱讀(13497) | 評論 (2)編輯 收藏

          If you got this message: "Warning: Cannot modify header information - headers already sent by ...."
          如果在執(zhí)行php程序時(shí)看到這條警告:"Warning: Cannot modify header information - headers already sent by ...."

          Few notes based on the following user posts:
          有以下幾種解決方法:

          1. Blank lines (空白行):
          Make sure no blank line after <?php ... ?> of the calling php script.
          檢查有<?php ... ?> 后面沒有空白行,特別是include或者require的文件。不少問題是這些空白行導(dǎo)致的。

           

           

          2. Use exit statement (用exit來解決):
          Use exit after header statement seems to help some people
          在header后加上exit();
          header ("Location: xxx");
          exit();

           

          3. PHP has this annoying problem, if your HTML goes before any PHP code or any header modification before redirecting to certain page, it'll said "Warning: Cannot modify header information - headers already sent by ...." Basically anytime you output to browser, the header is set and cannot be modified.   So two ways to get around the problem:

          3a. Use Javascript (用Javascript來解決):
          <? echo "<script> self.location(\"file.php\");</script>"; ?>
          Since it's a script, it won't modify the header until execution of Javascript.
          可以用Javascript來代替header。但是上面的這段代碼我沒有執(zhí)行成功... 另外需要注意,采用這種方法需要瀏覽器支持Javascript.

          3b. Use output buffering (用輸出緩存來解決):
          <?php ob_start(); ?>
          ... HTML codes ...
          <?php
          ... PHP codes ...
          header ("Location: ....");
          ob_end_flush();
          ?>
          This will save the output buffer on server and not output to browser yet, which means you can modify the header all you want until the ob_end_flush() statement.   This method is cleaner than the Javascript since Javascript method assumes the browser has Javascript turn on.   However, there are overhead to store output buffer on server before output, but with modern hardware I would imagine it won't be that big of deal.   Javascript solution would be better if you know for sure your user has Javascript turn on on their browser.

          就像上面的代碼那樣,這種方法在生成頁面的時(shí)候緩存,這樣就允許在輸出head之后再輸出header了。


          ————————————————————————————————————————————
          結(jié)果最后還是這個(gè)問題:
          原來是php.ini里面的配置出了問題,output_buffering參數(shù)默認(rèn)為off的,現(xiàn)在將它設(shè)為”on”就OK了。

          posted @ 2009-12-02 10:02 董銳 閱讀(7401) | 評論 (1)編輯 收藏

          1、要安裝java jdk,安裝tomcat
          2、安裝好apache,php
          3、下載php-java-bridge_5.5.4_documentation.zip
          4、解壓縮php-java-bridge_5.5.4_documentation.zip
          5、將解壓縮后根目錄下JavaBridge.war拷貝到tomcat服務(wù)器的webapp目錄下
          6、啟動(dòng)tomcat服務(wù)器
          7、在php中使用java只需增加下面一行語句:
          <php? require_once(http://127.0.0.1:8080/JavaBridge/java/Java.inc); ?>

          可以了:
          <php?
              $date=new Java('java.util.Date');
          echo $date->getDate();
          ?>
          運(yùn)行通過,OK!

          posted @ 2009-10-20 15:03 董銳 閱讀(587) | 評論 (2)編輯 收藏

          主站蜘蛛池模板: 新巴尔虎左旗| 湟中县| 北京市| 司法| 安图县| 锡林浩特市| 莆田市| 巩义市| 新河县| 锦屏县| 霍州市| 营口市| 唐海县| 南开区| 深水埗区| 安义县| 涿鹿县| 眉山市| 南溪县| 井冈山市| 承德县| 常州市| 错那县| 武川县| 邵武市| 南投县| 东宁县| 阳江市| 土默特左旗| 白河县| 宝清县| 博爱县| 拜城县| 内丘县| 海淀区| 门源| 沙田区| 盘锦市| 旬阳县| 崇阳县| 吴川市|