Loading...

          java .net

          2007年11月6日 星期二

          //**讀取properties配置文件的類

          import java.util.*;
          import java.io.*;

          public final class ParseProperties {
          private static Properties properties = null;

              private ParseProperties() {
              }

              public static String getProperties(String propStr){
              if(properties==null){
                 try{
                  InputStream is=ParseProperties.class.getClassLoader().getResourceAsStream("runqianServ.properties");
                  properties = new Properties();
                       properties.load(is);
                       is.close();
                 }catch(Exception e){
                          e.printStackTrace();
                      }
              }
                  return properties.getProperty(propStr);
              }
             
              public static void main(String[] args) {
                  String driver=ParseProperties.getProperties("runqianServ");
                  System.out.println(driver);
              }


          }

          在apache-tomcat-5.5.17使用Struts Tag會拋出Failer to load or instantiate TagExtraInfo class:org.apache.struts.taglib.bean.CookieTei的異常。(這只是bean標簽,其它標簽異常略)
              解決方法:刪除WEB_INF/lib/javax.servlet.jsp.jar。(jsp jar包會引起沖突)

          posted on 2008-08-26 22:06 閱讀(108) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          公告

          希望有一天

          我能用鼠標雙擊我的錢包

          然后選中一張100元

          按住“ctrl+c”

          接著不停的“ctrl+v”

          嘻嘻~~~笑醒~~~



          導航

          <2008年8月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          統計

          常用鏈接

          留言簿(6)

          隨筆分類(102)

          隨筆檔案(398)

          文章分類

          文章檔案(10)

          有趣網絡

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 大名县| 石城县| 怀集县| 略阳县| 化德县| 梅州市| 金山区| 邯郸县| 闽侯县| 师宗县| 图木舒克市| 图们市| 河曲县| 文安县| 邯郸市| 沈阳市| 龙井市| 西城区| 平利县| 丹凤县| 大新县| 顺平县| 乐亭县| 呼图壁县| 游戏| 临高县| 肥城市| 翁源县| 和林格尔县| 吴江市| 南华县| 梅河口市| 都江堰市| 乌海市| 晋江市| 平果县| 页游| 常熟市| 鄢陵县| 中西区| 苗栗市|