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 閱讀(104) 評論(0)  編輯  收藏


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


          網站導航:
           

          公告

          希望有一天

          我能用鼠標雙擊我的錢包

          然后選中一張100元

          按住“ctrl+c”

          接著不停的“ctrl+v”

          嘻嘻~~~笑醒~~~



          導航

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

          統計

          常用鏈接

          留言簿(6)

          隨筆分類(102)

          隨筆檔案(398)

          文章分類

          文章檔案(10)

          有趣網絡

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 横山县| 浮山县| 临夏县| 尼勒克县| 密云县| 张家港市| 襄城县| 岱山县| 和龙市| 德州市| 巴林左旗| 灌云县| 修水县| 广昌县| 平定县| 云阳县| 阿城市| 贡觉县| 耒阳市| 潞城市| 双牌县| 海原县| 西乌珠穆沁旗| 井冈山市| 东乡族自治县| 黄龙县| 海淀区| 依安县| 永定县| 蕲春县| 新蔡县| 长顺县| 凯里市| 聂荣县| 聂拉木县| 游戏| 泽库县| 疏勒县| 屏山县| 汝阳县| 伊春市|