锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久精品国产亚洲αv忘忧草,一区二区亚洲精品精华液,亚洲日本在线观看http://m.tkk7.com/czcode/category/17964.htmlzh-cnWed, 28 Feb 2007 07:49:01 GMTWed, 28 Feb 2007 07:49:01 GMT60Struts涓父瑙侀敊璇?/title><link>http://m.tkk7.com/czcode/articles/85044.html</link><dc:creator>宕旀尟</dc:creator><author>宕旀尟</author><pubDate>Sat, 02 Dec 2006 08:31:00 GMT</pubDate><guid>http://m.tkk7.com/czcode/articles/85044.html</guid><wfw:comment>http://m.tkk7.com/czcode/comments/85044.html</wfw:comment><comments>http://m.tkk7.com/czcode/articles/85044.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/czcode/comments/commentRss/85044.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/czcode/services/trackbacks/85044.html</trackback:ping><description><![CDATA[ <p> <font color="#000080">浠ヤ笅鎵璇寸殑struts-config.xml鍜孉pplicationResources.properties絳夋枃浠跺悕鏄己鐪佹椂浣跨敤鐨勶紝濡傛灉浣犱嬌鐢ㄤ簡(jiǎn)澶氭ā鍧楋紝鎴栨寚瀹氫簡(jiǎn)涓嶅悓鐨勮祫婧愭枃浠跺悕縐幫紝榪欎簺鍚嶅瓧瑕佸仛鐩稿簲鐨勪慨鏀廣?/font> </p> <p> <font color="#000080">1銆佲淣o bean found under attribute key XXX鈥?br />鍦╯truts-config.xml閲屽畾涔変簡(jiǎn)涓涓狝ctionForm錛屼絾type灞炴ф寚瀹氱殑綾諱笉瀛樺湪錛宼ype灞炴х殑鍊煎簲璇ユ槸Form綾葷殑鍏ㄥ悕銆傛垨鑰呮槸錛屽湪Action鐨勫畾涔変腑錛宯ame鎴朼ttribute灞炴ф寚瀹氱殑ActionForm涓嶅瓨鍦ㄣ?/font> </p> <p> <br /> <font color="#000080">2銆佲淐annot find bean XXX in any scope鈥?br />鍦ˋction閲屼竴鑸細(xì)request.setAttribute()涓浜涘璞★紝鐒跺悗鍦ㄨ漿鍚戠殑jsp鏂囦歡閲岋紙鐢╰ag鎴杛equest.getAttribute()鏂規(guī)硶錛夊緱鍒拌繖浜涘璞″茍鏄劇ず鍑烘潵銆傝繖涓紓甯告槸璇磈sp瑕佸緱鍒頒竴涓璞★紝浣嗗墠闈㈢殑Action閲屽茍娌℃湁灝嗗璞¤緗埌request錛堜篃鍙互鏄痵ession銆乻ervletContext錛夐噷銆?br />鍙兘鏄悕瀛楅敊浜?jiǎn)锛岃h鏌sp閲岀殑tag鐨勪竴鑸槸name灞炴э紝鎴杇etAttribute()鏂規(guī)硶鐨勫弬鏁板鹼紱鎴栬呮槸Action閫昏緫鏈夐棶棰樻病鏈夋墽琛宻etAttribute()鏂規(guī)硶灝卞厛杞悜浜?jiǎn)銆?br />榪樻湁鍙﹀涓涓彲鑳斤紝綰補(bǔ)鏄痡sp鏂囦歡鐨勯棶棰橈紝渚嬪<logic:iterate>浼?xì)鎸囧畾涓涓猧d鍊鹼紝鐒跺悗鍦ㄥ驚鐜噷<bean:write>浣跨敤榪欎釜鍊間綔涓簄ame鐨勫鹼紝濡傛灉榪欎袱涓間笉鍚岋紝涔熶細(xì)鍑虹幇姝ゅ紓甯搞傦紙閮芥槸涓涓亾鐞嗭紝request閲屾病鏈夊搴旂殑瀵硅薄銆傦級(jí)</font> </p> <p> <br /> <font color="#000080">3銆佲淢issing message for key "XXX"鈥?br />緙哄皯鎵闇鐨勮祫婧愶紝媯(gè)鏌pplicationResources.properties鏂囦歡閲屾槸鍚︽湁jsp鏂囦歡閲岄渶瑕佺殑璧勬簮錛屼緥濡傦細(xì)</font> </p> <p> <br /> <font color="#000080"><bean:message key="msg.name.prompt"/></font> </p> <p> <font color="#000080">榪欒浠g爜浼?xì)鎵緈sg.name.prompt璧勬簮錛屽鏋淎ppliationResources.properties閲屾病鏈夎繖涓祫婧愬氨浼?xì)鍑虹幇鏈紓甯搞傚湪浣跨敤澶氭ā鍧楁椂錛岃娉ㄦ剰鍦ㄦā鍧楃殑struts-config-xxx.xml閲屾寚瀹氳浣跨敤鐨勮祫婧愭枃浠跺悕縐幫紝鍚﹀垯褰撶劧浠涔堣祫婧愪篃鎵句笉鍒幫紝榪欎篃鏄竴涓緢瀹規(guī)槗鐘殑閿欒銆?/font> </p> <p> <font color="#000080">4銆佲淣o getter method for property XXX of bean teacher鈥?br />榪欐潯寮傚父淇℃伅璇村緱寰堟槑鐧斤紝jsp閲岃鍙栦竴涓猙ean鐨勫睘鎬у嚭鏉ワ紝浣嗚繖涓猙ean騫舵病鏈夎繖涓睘鎬с備綘搴旇媯(gè)鏌sp涓煇涓爣絳劇殑property灞炴х殑鍊箋備緥濡備笅闈唬鐮佷腑鐨刢ade搴旇鏀逛負(fù)code鎵嶅錛?/font> </p> <p> <font color="#000080"><bean:write name="teacher" property="cade" filter="true"/></font> </p> <p> <br /> <font color="#000080">5銆佲淐annot find ActionMappings or ActionFormBeans collection鈥?br />寰呰В鍐熾?/font> </p> <p> <font color="#000080">6銆佲淐annot retrieve mapping for action XXX鈥?br />鍦?jsp鐨?lt;form>鏍囩閲屾寚瀹歛ction='/XXX'錛屼絾榪欎釜Action騫舵湭鍦╯truts-config.xml閲岃緗繃銆?/font> </p> <p> <font color="#000080">7銆丠TTP Status 404 - /xxx/xxx.jsp<br />Forward鐨刾ath灞炴ф寚鍚戠殑jsp欏甸潰涓嶅瓨鍦紝璇鋒鏌ヨ礬寰勫拰妯″潡錛屽浜庡悓涓妯″潡涓殑Action杞悜錛宲ath涓笉搴斿寘鍚ā鍧楀悕錛涙ā鍧楅棿杞悜錛岃浣忎嬌鐢╟ontextRelative="true"銆?/font> </p> <p> <font color="#000080">8銆佹病鏈変換浣曞紓甯鎬俊鎭紝鏄劇ず絀虹櫧欏甸潰<br />鍙兘鏄疉ction閲屼嬌鐢ㄧ殑forward涓巗truts-config.xml閲屽畾涔夌殑forward鍚嶇О涓嶅尮閰嶃?/font> </p> <p> <br /> <font color="#000080">9銆佲淭he element type "XXX" must be terminated by the matching end-tag "XXX".鈥?br />榪欎釜鏄痵truts-config.xml鏂囦歡鐨勬牸寮忛敊璇紝浠旂粏媯(gè)鏌ュ畠鏄惁鏄壇鏋勭殑xml鏂囦歡錛屽叧浜巟ml鏂囦歡鐨勬牸寮忚繖閲屽氨涓嶈禈榪頒簡(jiǎn)銆?/font> </p> <p> <font color="#000080">10銆佲淪ervlet.init() for servlet action threw exception鈥?br />涓鑸嚭鐜拌繖縐嶅紓甯稿湪鍚庨潰浼?xì)鏄窘C轟竴涓叧浜嶢ctionServlet鐨勫紓甯稿爢鏍堜俊鎭紝鍏朵腑鎸囧嚭浜?jiǎn)寮傚父鍏蜂綋鍑虹幇鍦ㄤ唬鐮佺殑鍝竴琛屻傛垜鏇劇粡閬囧埌鐨勪竴嬈℃彁紺哄涓嬶細(xì)</font> </p> <p> <font color="#000080">java.lang.NullPointerException<br />聽(tīng)聽(tīng)聽(tīng) at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1003)<br />聽(tīng)聽(tīng)聽(tīng) at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)</font> </p> <p> <br /> <font color="#000080">涓鴻В鍐抽棶棰橈紝鍏堜笅杞絪truts鐨勬簮鐮佸寘錛岀劧鍚庡湪ActionServlet.java鐨勭1003琛屾彃鍏ユ柇鐐癸紝騫跺鍚勫彉閲忚繘琛岀洃瑙嗐傚緢涓漢錛屾垜绔熺劧鎶妔truts-config.xml鏂囦歡寮勪涪浜?jiǎn)锛屽洜姝ゅ嚭鐜颁簡(jiǎn)涓婇潰鐨勫紓甯稿Q屽簲璇ユ槸鍜孋VS鍚屾鏃朵笉灝忓績(jī)鍒犻櫎鐨勩?/font> </p> <p> <font color="#000080">11銆佲淩esources not defined for Validator鈥?br />榪欎釜鏄埄鐢╒alidator鎻掍歡鍋氶獙璇佹椂鍙兘鍑虹幇鐨勫紓甯革紝榪欐椂浣犺媯(gè)鏌alidation.xml鏂囦歡錛岀湅閲岄潰浣跨敤鐨勮祫婧愭槸鍚︾‘瀹炴湁瀹氫箟錛宖orm鐨勫悕縐版槸鍚︽紜紝絳夌瓑銆?/font> </p> <img src ="http://m.tkk7.com/czcode/aggbug/85044.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/czcode/" target="_blank">宕旀尟</a> 2006-12-02 16:31 <a href="http://m.tkk7.com/czcode/articles/85044.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>璁捐妯″紡18縐?/title><link>http://m.tkk7.com/czcode/articles/85043.html</link><dc:creator>宕旀尟</dc:creator><author>宕旀尟</author><pubDate>Sat, 02 Dec 2006 08:27:00 GMT</pubDate><guid>http://m.tkk7.com/czcode/articles/85043.html</guid><wfw:comment>http://m.tkk7.com/czcode/comments/85043.html</wfw:comment><comments>http://m.tkk7.com/czcode/articles/85043.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/czcode/comments/commentRss/85043.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/czcode/services/trackbacks/85043.html</trackback:ping><description><![CDATA[     鎽樿: 涓銆佽璁℃ā寮忎箣Flyweight鈥斺旀墦鐞冪瘒 聽(tīng)聽(tīng) 鍛ㄦ湯娌′簨錛屽拰鏈嬪弸綰﹀ソ鍘諱綋鑲查錛圙ymnasium錛夋墦鐞冿紝榪欎釜浣撹偛棣嗭紙Gymnasium錛夋彁渚涘悇縐嶇悆縐嶏紝鍥犱負(fù)鎴戜滑浜哄錛屽洜姝ら夋嫨浜?jiǎn)缇芥瘺鐞冨Q坆adminton錛夛紝鍏典箵鐞冿紙pingpangball錛夈佹帓鐞冿紙vollyball錛夌瓑鐞冪錛屾垜浠鍏堣濉啓閫夌悆娓呭崟錛坧layBallList錛夛紝鐒跺悗鍘誨櫒鏉愰儴棰嗙悆銆備笅闈㈡垜浠湅鐪嬭濡備綍瀹炵幇榪欎釜榪?..  <a href='http://m.tkk7.com/czcode/articles/85043.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/czcode/aggbug/85043.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/czcode/" target="_blank">宕旀尟</a> 2006-12-02 16:27 <a href="http://m.tkk7.com/czcode/articles/85043.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Junithttp://m.tkk7.com/czcode/articles/85041.html宕旀尟宕旀尟Sat, 02 Dec 2006 08:23:00 GMThttp://m.tkk7.com/czcode/articles/85041.htmlhttp://m.tkk7.com/czcode/comments/85041.htmlhttp://m.tkk7.com/czcode/articles/85041.html#Feedback0http://m.tkk7.com/czcode/comments/commentRss/85041.htmlhttp://m.tkk7.com/czcode/services/trackbacks/85041.html JUnit鏄竴涓狾penSource鐨勮蔣浠躲?br />涓嬭澆junit.jar銆傚皢榪欎釜jar鏂囦歡鍔犲叆浣犵殑CLASSPATH緋葷粺鍙橀噺錛堣幏IDE CLASSPATH璺緞錛夊氨O(jiān)K浜?jiǎn)銆?br />緙栧啓嫻嬭瘯綾葷殑鍩烘湰姝ラ錛?br />1> 鎵╁睍TestCase綾伙紱
2> 瑕嗙洊runTest()鏂規(guī)硶錛堝彲閫夛級(jí)錛?br />3> 鍐欎竴浜泃estXXXXX()鏂規(guī)硶錛?br />濡傛灉浣犺瀵逛竴涓垨鑻ュ共涓殑綾繪墽琛屽涓祴璇曪紝璇ユ庝箞鍔烇紵JUnit瀵規(guī)鏈夌壒孌婄殑瑙e喅鍔炴硶銆?br />濡傛灉闇瑕佸湪涓涓垨鑻ュ共涓殑綾繪墽琛屽涓祴璇曪紝榪欎簺綾誨氨鎴愪負(fù)浜?jiǎn)娴嬭瘯鐨刢ontext銆?br />鍦↗Unit涓縐頒負(fù)Fixture銆?br />
protected void setUp() throws java.lang.Exception
瑕嗙洊setUp()鏂規(guī)硶錛屽垵濮嬪寲鎵鏈夋祴璇曠殑Fixture
protected void tearDown() throws java.lang.Exception
瑕嗙洊tearDown() 閲婃斁浣犲湪setUp()涓垎閰嶇殑姘鎬箙鎬ц祫婧愶紝
褰揓Unit鎵ц嫻嬭瘯鏃訛紝瀹冨湪鎵ц姣忎釜testXXXXX()鏂規(guī)硶鍓嶉兘璋冪敤setUp()錛岃屽湪鎵ц姣忎釜testXXXXX()鏂規(guī)硶鍚庨兘璋冪敤tearDown()鏂規(guī)硶錛岀敱姝や繚璇佷簡(jiǎn)嫻嬭瘯涓嶄細(xì)鐩鎬簰褰卞搷銆?br />
JUnit鎻愪緵浜?jiǎn)涓壙U嶇晫闈㈡潵榪愯嫻嬭瘯
[Text UI] junit.textui.TestRunner
[AWT UI] junit.awtui.TestRunner
[Swing UI] junit.swingui.TestRunner

鐣岄潰寰堢畝鍗曪紝閿叆綾誨悕錛峵estClass銆傛垨鍦ㄥ惎鍔║I鐨勬椂鍊欓敭鍏ョ被鍚嶏細(xì)
c:>java junit.swingui.TestRunner testClass

涓嬮潰鏄竴浜涘叿浣撶殑緙栧啓嫻嬭瘯浠g爜鐨勬妧宸ф垨杈冨ソ鐨勫疄璺墊柟娉曪細(xì)聽(tīng)

1. 涓嶈鐢═estCase鐨勬瀯閫犲嚱鏁板垵濮嬪寲Fixture錛岃岃鐢╯etUp()鍜宼earDown()鏂規(guī)硶銆偮?br />
2. 涓嶈渚濊禆鎴栧亣瀹氭祴璇曡繍琛岀殑欏哄簭錛屽洜涓篔Unit鍒╃敤Vector淇濆瓨?gòu)箣璇曟栆?guī)硶銆傛墍浠ヤ笉鍚岀殑騫沖彴浼?xì)鎸変笉鍚岀殑椤哄簭浠嶸ector涓彇鍑烘祴璇曟柟娉曘偮?br />
3. 閬垮厤緙栧啓鏈夊壇浣滅敤鐨凾estCase銆備緥濡傦細(xì)濡傛灉闅忓悗鐨勬祴璇曚緷璧栦簬鏌愪簺鐗瑰畾鐨勪氦鏄撴暟鎹紝灝變笉瑕佹彁浜や氦鏄撴暟鎹傜畝鍗曠殑浼?xì)婊殲鍙互浜?jiǎn)銆偮?br />
4. 褰撶戶鎵夸竴涓祴璇曠被鏃訛紝璁板緱璋冪敤鐖剁被鐨剆etUp()鍜宼earDown()鏂規(guī)硶銆偮?br />
5. 灝嗘祴璇曚唬鐮佸拰宸ヤ綔浠g爜鏀懼湪涓璧鳳紝涓杈瑰悓姝ョ紪璇戝拰鏇存柊銆傦紙浣跨敤Ant涓湁鏀寔junit鐨則ask.錛壜?br />
6. 嫻嬭瘯綾誨拰嫻嬭瘯鏂規(guī)硶搴旇鏈変竴鑷寸殑鍛藉悕鏂規(guī)銆傚鍦ㄥ伐浣滅被鍚嶅墠鍔犱笂test浠庤屽艦鎴愭祴璇曠被鍚嶃偮?br />
7. 紜繚嫻嬭瘯涓庢椂闂存棤鍏籌紝涓嶈渚濊禆浣跨敤榪囨湡鐨勬暟鎹繘琛屾祴璇曘傚鑷村湪闅忓悗鐨勭淮鎶よ繃紼嬩腑寰堥毦閲嶇幇嫻嬭瘯銆偮?br />
8. 濡傛灉浣犵紪鍐欑殑杞歡闈㈠悜鍥介檯甯?jìng)鍦哄Q岀紪鍐欐祴璇曟椂瑕佽冭檻鍥介檯鍖栫殑鍥犵礌銆備笉瑕佷粎鐢ㄦ瘝璇殑Locale榪涜嫻嬭瘯銆偮?br />
9. 灝藉彲鑳藉湴鍒╃敤JUnit鎻愪緵鍦癮ssert/fail鏂規(guī)硶浠ュ強(qiáng)寮傚父澶勭悊鐨勬柟娉曪紝鍙互浣夸唬鐮佹洿涓虹畝媧併?br />聽(tīng)
10.嫻嬭瘯瑕佸敖鍙兘鍦板皬錛屾墽琛岄熷害蹇?br />---------------------------------------------------
聽(tīng)聽(tīng)聽(tīng) JUnit鏄崟鍏冩祴璇曞伐鍏鳳紝鎴戠殑鐞嗚В鏄敤鏉ユ祴璇曞崟涓ā鍧楀姛鑳界殑宸ュ叿錛岄潪甯擱傚悎嫻嬭瘯姣旇緝鐙珛鐨勬ā鍧椼?br />聽(tīng)聽(tīng)聽(tīng) 嫻嬭瘯鐨勭敤閫旀槸鐢ㄦ潵媯(gè)鏌ラ敊璇紝鎴戣涓鴻繖涓伐鍏峰茍涓嶅彧鏄府鍔╃紪紼嬫椂鏌ラ敊銆傚浜庝紶緇熺殑緙栫▼鏂瑰紡錛屼竴鑸兘璁捐濂戒簡(jiǎn)鍚勪釜妯″潡錛岄氬父妯″潡嫻嬭瘯涓嬈″氨鍙互浜?jiǎn)锛屼絾鏄洰鍓嶈璁℃繪槸鍥犱負(fù)鍔熻兘涓嶆柇鐨勫鍔犲拰淇敼鑰屾敼鍙橈紝濡傛灉澶氭榪欐牱錛岀▼搴忕殑璐ㄩ噺鍜宐ug淇灝嗘槸涓涓箒閲嶅洶闅劇殑宸ヤ綔銆侸Unit鍦ㄨ繖縐嶆儏鍐典笅錛屽彲浠ュぇ澶х殑鎻愰珮宸ヤ綔鏁堢巼錛屽彧瑕佸湪絎竴嬈″啓浠g爜鐨勬椂鍊欓澶栫紪鍐欐祴璇曚唬鐮侊紝浠ュ悗鎵鏈夌殑淇敼閮藉彲浠ュ疄鐜拌嚜鍔ㄧ殑嫻嬭瘯銆?br />聽(tīng)聽(tīng)聽(tīng) 鍚屾椂鍥犱負(fù)鑷姩嫻嬭瘯鐨勫疄鐜幫紝XP緙栫▼鏂規(guī)硶鎵嶆湁浜?jiǎn)瀹炵幇鐨勫彲鑳姐傞氳繃鍏堝啓濂芥祴璇曚唬鐮侊紝鍙︿竴涓搴︾湅涔熷氨鏄垜浠瀹炵幇鐨勫姛鑳斤紝鐒跺悗鍐欎竴涓渶綆鍗曠殑浣挎祴璇曢氳繃鐨勪唬鐮侊紝鍐嶈繘琛屼竴涓驚鐜細(xì)鏀硅繘錛嶆祴璇曪紞閫氳繃錛嶆敼榪涳紝鐩村埌浠g爜婊℃剰錛屽嵆浣夸笉澶弧鎰忎絾鍐欏嚭鐨勪唬鐮佷篃鏄彲榪愯鐨勩?/p>

宕旀尟 2006-12-02 16:23 鍙戣〃璇勮
]]>
璇誨彇properties鐨勫嚑縐嶆柟娉?/title><link>http://m.tkk7.com/czcode/articles/85036.html</link><dc:creator>宕旀尟</dc:creator><author>宕旀尟</author><pubDate>Sat, 02 Dec 2006 08:16:00 GMT</pubDate><guid>http://m.tkk7.com/czcode/articles/85036.html</guid><wfw:comment>http://m.tkk7.com/czcode/comments/85036.html</wfw:comment><comments>http://m.tkk7.com/czcode/articles/85036.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/czcode/comments/commentRss/85036.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/czcode/services/trackbacks/85036.html</trackback:ping><description><![CDATA[ <p>1.<br /></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <span style="COLOR: #008080">聽(tīng)1</span>聽(tīng)<span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">聽(tīng)</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽(tīng)getContextParam(){<br /></span><span style="COLOR: #008080">聽(tīng)2</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)I(yíng)nputStream聽(tīng)is</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.getClass().getClassLoader().getResourceAsStream(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">clientConfig.properties</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">聽(tīng)3</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)Properties聽(tīng)prop</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽(tīng)</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽(tīng)Properties();<br /></span><span style="COLOR: #008080">聽(tīng)4</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)</span><span style="COLOR: #0000ff">try</span><span style="COLOR: #000000">聽(tīng){<br /></span><span style="COLOR: #008080">聽(tīng)5</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)prop.load(is);<br /></span><span style="COLOR: #008080">聽(tīng)6</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.classForName</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">prop.getProperty(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">classForName</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">聽(tīng)7</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.connectStr</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">prop.getProperty(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">connectStr</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">聽(tīng)8</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.userName</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">prop.getProperty(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">userName</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">聽(tīng)9</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.psw</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">prop.getProperty(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">psw</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">10</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)}聽(tīng)</span><span style="COLOR: #0000ff">catch</span><span style="COLOR: #000000">聽(tīng)(IOException聽(tīng)e)聽(tīng){<br /></span><span style="COLOR: #008080">11</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)e.printStackTrace();<br /></span><span style="COLOR: #008080">12</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)}<br /></span><span style="COLOR: #008080">13</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)}<br /></span><span style="COLOR: #008080">14</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">娉細(xì)鍙兘灝哻lientConfig.properties鏀懼叆src涓?/span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">15</span>聽(tīng)<span style="COLOR: #008000"></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">16</span>聽(tīng)<span style="COLOR: #000000"></span></div> <br />2.<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">聽(tīng)1</span>聽(tīng)<span style="COLOR: #000000">String聽(tīng)realName</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.getServletContext().getRealPath(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">WEB-INF</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">聽(tīng)2</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)Properties聽(tīng)prop</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽(tīng)</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽(tīng)Properties();<br /></span><span style="COLOR: #008080">聽(tīng)3</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)I(yíng)nputStream聽(tīng)is</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">null</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">聽(tīng)4</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)</span><span style="COLOR: #0000ff">try</span><span style="COLOR: #000000">聽(tīng){<br /></span><span style="COLOR: #008080">聽(tīng)5</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)is聽(tīng)</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽(tīng)</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽(tīng)BufferedInputStream(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽(tīng)FileInputStream(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽(tīng)File(realName</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/clientConfig.properties</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)));<br /></span><span style="COLOR: #008080">聽(tīng)6</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)prop.load(is);<br /></span><span style="COLOR: #008080">聽(tīng)7</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)}聽(tīng)</span><span style="COLOR: #0000ff">catch</span><span style="COLOR: #000000">聽(tīng)(FileNotFoundException聽(tīng)e)聽(tīng){<br /></span><span style="COLOR: #008080">聽(tīng)8</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">logger.info("娌℃湁鍙戠幇鎵闇瑕佺殑閰嶇疆鏂囦歡錛?+e);</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">聽(tīng)9</span>聽(tīng)<span style="COLOR: #008000"></span><span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)e.printStackTrace();<br /></span><span style="COLOR: #008080">10</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)}聽(tīng)</span><span style="COLOR: #0000ff">catch</span><span style="COLOR: #000000">聽(tīng)(IOException聽(tīng)e)聽(tīng){<br /></span><span style="COLOR: #008080">11</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">logger.info("璇誨彇鏂囦歡鐨勮繃紼嬩腑鍑洪敊錛?+e);</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">12</span>聽(tīng)<span style="COLOR: #008000"></span><span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)e.printStackTrace();<br /></span><span style="COLOR: #008080">13</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)}<br /></span><span style="COLOR: #008080">14</span>聽(tīng)<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">15</span>聽(tīng)<span style="COLOR: #000000"></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">娉細(xì)鍚屾牱闇瑕佸畾鍒舵枃浠跺瓨鏀劇殑鐩綍</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">16</span>聽(tīng)<span style="COLOR: #008000"></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">17</span>聽(tīng)<span style="COLOR: #000000"></span></div><p>3.</p><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">聽(tīng)1</span>聽(tīng)<span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽(tīng)</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽(tīng)String聽(tīng)getValue(String聽(tīng)key)聽(tīng){<br /></span><span style="COLOR: #008080">聽(tīng)2</span>聽(tīng)<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽(tīng)3</span>聽(tīng)<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">聽(tīng)</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽(tīng)Properties聽(tīng)propertie;<br /></span><span style="COLOR: #008080">聽(tīng)4</span>聽(tīng)<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽(tīng)5</span>聽(tīng)<span style="COLOR: #000000">String聽(tīng)path聽(tīng)</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽(tīng)(Configuration.</span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">.getResource(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)聽(tīng)</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽(tīng)</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">).substring(</span><span style="COLOR: #000000">6</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">聽(tīng)6</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)Configuration聽(tīng)rc聽(tīng)</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽(tīng)</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽(tīng)Configuration(path聽(tīng)</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽(tīng)</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">//config.properties</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">聽(tīng)7</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽(tīng)(propertie.containsKey(key))聽(tīng){<br /></span><span style="COLOR: #008080">聽(tīng)8</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)String聽(tīng)value聽(tīng)</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽(tīng)propertie.getProperty(key);</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽(tīng)寰楀埌鏌愪竴灞炴х殑鍊?/span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">聽(tīng)9</span>聽(tīng)<span style="COLOR: #008000"></span><span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽(tīng)value;<br /></span><span style="COLOR: #008080">10</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)}聽(tīng)</span><span style="COLOR: #0000ff">else</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">11</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)聽(tīng)聽(tīng)</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽(tīng)</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">12</span>聽(tīng)<span style="COLOR: #000000">聽(tīng)}<br /></span><span style="COLOR: #008080">13</span>聽(tīng)<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">14</span>聽(tīng)<span style="COLOR: #000000"></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">娉細(xì)鍙傜敤鍦╳indows涓嬶紝涓嶅悓鐨勬搷浣滅郴緇熼渶瑕佷嬌鐢‵ile.pathSeparatorChar榪涜鍒嗗壊<br /></span><span style="COLOR: #008080">15</span>聽(tīng)<span style="COLOR: #008000"></span></div><img src ="http://m.tkk7.com/czcode/aggbug/85036.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/czcode/" target="_blank">宕旀尟</a> 2006-12-02 16:16 <a href="http://m.tkk7.com/czcode/articles/85036.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://shunfk.com" target="_blank">精品无码AV无码免费专区</a>| <a href="http://18jko.com" target="_blank">日本一区二区三区在线视频观看免费 </a>| <a href="http://sdhgjscl.com" target="_blank">成人黄色免费网址</a>| <a href="http://228609.com" target="_blank">亚洲春色另类小说</a>| <a href="http://tv695.com" target="_blank">四虎1515hh永久久免费</a>| <a href="http://by11gun.com" target="_blank">亚洲一区二区三区精品视频</a>| <a href="http://zisewang.com" target="_blank">狼人大香伊蕉国产WWW亚洲</a>| <a href="http://yunyitai.com" target="_blank">日本在线看片免费人成视频1000</a>| <a href="http://88ww99.com" target="_blank">久久久久久久尹人综合网亚洲</a>| <a href="http://dddd20.com" target="_blank">成全视成人免费观看在线看</a>| <a href="http://ytsp88.com" target="_blank">亚洲成A人片在线观看无码不卡</a>| <a href="http://66qiqi.com" target="_blank">亚在线观看免费视频入口</a>| <a href="http://qq-gm.com" target="_blank">1区1区3区4区产品亚洲</a>| <a href="http://henhenluc.com" target="_blank">久久久久久免费视频</a>| <a href="http://wankufan.com" target="_blank">亚洲av无码av在线播放</a>| <a href="http://www-33758.com" target="_blank">亚洲AV蜜桃永久无码精品</a>| <a href="http://tccqdy.com" target="_blank">a级毛片无码免费真人久久</a>| <a href="http://96j6.com" target="_blank">亚洲精品福利网泷泽萝拉</a>| <a href="http://91packing.com" target="_blank">在线精品免费视频</a>| <a href="http://zgbeian.com" target="_blank">色哟哟国产精品免费观看</a>| <a href="http://317777aa.com" target="_blank">久久亚洲国产欧洲精品一</a>| <a href="http://alodaba.com" target="_blank">我的小后妈韩剧在线看免费高清版</a>| <a href="http://16lds.com" target="_blank">亚洲免费网站观看视频</a>| <a href="http://941sese.com" target="_blank">亚洲人成人无码网www国产</a>| <a href="http://g8zb.com" target="_blank">97公开免费视频</a>| <a href="http://074g8.com" target="_blank">亚洲精品无码久久久久秋霞</a>| <a href="http://www6yg6yg.com" target="_blank">亚洲成av人片不卡无码久久</a>| <a href="http://www04ggg.com" target="_blank">免费在线看污视频</a>| <a href="http://thinkchating.com" target="_blank">亚洲av无码专区在线</a>| <a href="http://eddiekidd.com" target="_blank">亚洲AV无码成H人在线观看</a>| <a href="http://langse3.com" target="_blank">一级毛片不卡片免费观看</a>| <a href="http://scdsrq.com" target="_blank">亚洲精品无码av片</a>| <a href="http://yutuzb.com" target="_blank">亚洲国产美女精品久久久久∴</a>| <a href="http://81am.com" target="_blank">67194熟妇在线永久免费观看</a>| <a href="http://mm1131.com" target="_blank">免费国产va在线观看</a>| <a href="http://gzmcmy.com" target="_blank">亚洲视频一区网站</a>| <a href="http://chinahongfeng.com" target="_blank">国产jizzjizz视频免费看</a>| <a href="http://50077995.com" target="_blank">无码国产精品一区二区免费模式</a>| <a href="http://lwjiheng.com" target="_blank">亚洲AV无码一区二区三区牛牛</a>| <a href="http://zengzeyu.com" target="_blank">亚洲色中文字幕无码AV</a>| <a href="http://286513.com" target="_blank">成人黄18免费视频</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>