锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品V欧洲精品V日韩精品,亚洲国产日韩女人aaaaaa毛片在线,亚洲AV综合色区无码一二三区 http://www.tkk7.com/warrenwu/鎴戞槸java鐣岀殑涓鍙嚟铏?!!zh-cnSun, 11 May 2025 04:40:10 GMTSun, 11 May 2025 04:40:10 GMT60涓湅浣滃鏄偤浜嗕粈楹借屽嚭鏇革紵錛燂紵http://www.tkk7.com/warrenwu/archive/2007/01/24/95760.htmlWarren.WuWarren.WuWed, 24 Jan 2007 08:36:00 GMThttp://www.tkk7.com/warrenwu/archive/2007/01/24/95760.htmlhttp://www.tkk7.com/warrenwu/comments/95760.htmlhttp://www.tkk7.com/warrenwu/archive/2007/01/24/95760.html#Feedback1http://www.tkk7.com/warrenwu/comments/commentRss/95760.htmlhttp://www.tkk7.com/warrenwu/services/trackbacks/95760.html鎴戠湡鏄偛鍝鍟妦~~浣嗕笉鏄偤鎴戝戠殑浣滃鎮插搥,鑰屾槸鐐烘垜鐨勯將鎮插搥~~~


Warren.Wu 2007-01-24 16:36 鍙戣〃璇勮
]]>
鎭跺績鐨凞atehttp://www.tkk7.com/warrenwu/archive/2006/12/18/88605.htmlWarren.WuWarren.WuMon, 18 Dec 2006 10:49:00 GMThttp://www.tkk7.com/warrenwu/archive/2006/12/18/88605.htmlhttp://www.tkk7.com/warrenwu/comments/88605.htmlhttp://www.tkk7.com/warrenwu/archive/2006/12/18/88605.html#Feedback0http://www.tkk7.com/warrenwu/comments/commentRss/88605.htmlhttp://www.tkk7.com/warrenwu/services/trackbacks/88605.html鎶婃垜璐逛簡鍗婁釜灝忔椂瑙e喅鐨勫瀮鍦鵑棶棰樺啓涓嬫潵.

鐢↗DBC鏃?PreparedStatement灝變細鐢ㄥ埌set()鏂規硶,浣唖et榪涘幓鐨勫垯鏄痡ava.sql.Date綾誨瀷,鑰屼笉鏄痡ava.util.Date綾誨瀷,闂灝卞嚭鏉ヤ簡,姣斿褰撲綘set榪涘幓涓涓椂闂?鍋囪鏃墮棿2006-12-18 15:43:23),濡備笅:

java.sql.Date today = new java.sql.Date();

鎴戣鏌ュ湪榪欎釜鏃墮棿浠ュ墠鐨勬暟鎹?鍙粨鏋滃嵈榪斿洖浜?font color="#ff0000">17鍙蜂互鍓嶇殑緇撴灉,

鍦ㄦ暟鎹簱閲屾煡涔熸槸娌℃湁闂鐨?浣嗛棶棰樺嚭鍦ㄤ粈涔堝湴鏂瑰憿?鍚庢潵鎵懼埌鐨勭瓟妗堝氨鏄?閫氳繃榪欑鏂瑰紡java.sql.Date浼氱渷鐣ュ皬鏃?鍒?縐?杞垚鐨凷QL浼氶粯璁や負2006-12-18 00:00:00,璁や負鏄煡2006-12-18 00:00:00涔嬪墠鐨勭粨鏋?灝辮繖鏍鋒墠閫犳垚浜嗚繖嬈″ご鐥涚殑浜嬩歡,鑰岃繖涓浠g爜榪樹笉鏄湰浜烘墍鍐?鐪嬪埆浜虹殑浠g爜鐪熸槸绱?

鏈鍚庡彧濂藉湪鏃墮棿涓婂姞1澶?鍚﹀垯灝遍渶瑕佺敤瀛楃涓叉瘮杈?涓嶇煡閬撹繕鏈夊叾浠栨柟娉曟病?


Warren.Wu 2006-12-18 18:49 鍙戣〃璇勮
]]>
[杞琞java鏁版嵁搴撹繛鎺?/title><link>http://www.tkk7.com/warrenwu/archive/2006/10/08/73730.html</link><dc:creator>Warren.Wu</dc:creator><author>Warren.Wu</author><pubDate>Sun, 08 Oct 2006 03:11:00 GMT</pubDate><guid>http://www.tkk7.com/warrenwu/archive/2006/10/08/73730.html</guid><wfw:comment>http://www.tkk7.com/warrenwu/comments/73730.html</wfw:comment><comments>http://www.tkk7.com/warrenwu/archive/2006/10/08/73730.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/warrenwu/comments/commentRss/73730.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/warrenwu/services/trackbacks/73730.html</trackback:ping><description><![CDATA[ <p>榪欐槸涓綃囧熀紜鎬ф枃绔狅紝涓昏浠嬬粛浜唈dbc鍦ㄦ祦琛屾暟鎹簱(sql server,oracle)鏂歸潰鐨勫簲鐢ㄣ備絾鏄兘鏄釜浜鴻鐐癸紝鎵浠ヤ笉鑳戒繚璇佸畬鍏ㄦ紜紝浠呬緵鍙傝冿紝濡傛灉鏈変笉鍚屾剰瑙佸彲浠ュ湪璇勮涓寚鍑猴紝鎴戜細鍋氱浉搴旂殑淇敼銆?) <br />涓鑸儏鍐典笅,鐩存帴鐢╦dbc絳変笢瑗胯繛鏁版嵁搴撴椂,姣旇緝甯哥敤榪炴暟鎹簱鐨勪唬鐮佸彲鑳芥槸: <br />private Connection conn <br />private String poolURL = ""; <br />private String driverName =""; <br />private String user="" <br />private String pass=""; <br />private DBConnProxy Proxy; //鑷繁鍐欑殑class,璧鋒帶鍒舵暟鎹簱璁塊棶浣滅敤 <br />public Object getConn() <br />{ <br />try <br />{ <br />Properties prop=new Properties(); <br />prop.setProperty("user",user); <br />prop.setProperty("password",pass); <br />Driver mydriver=(Driver)Class.forName(driverName).newInstance(); <br />conn = mydriver.connect(poolURL,prop);//鎴栬卌onn = mydriver.connect(poolURL,null);鍏蜂綋浠涔堟椂鍊欑敤鎴戣繕鐨勮鏁欓珮鎵嬨?<br />/* <br />鎴栬? <br />Class.forName(driverName); <br />conn=DriverManager.getConnection(poolURL, user, pass); <br />*/ <br />} <br />catch ( Exception e ) <br />{ <br />System.out.println("鎵撳紑鏁版嵁搴撳嚭閿橽n" + e.getMessage()); <br />} <br /><br />if(!Proxy.getDB() ){ <br />this.Close() <br />return null; <br />} <br /><br />return conn; <br />} <br />鍏朵腑鐨?driverName,poolURL,user,pass閮藉彲浠ラ氳繃璇誨彇 xml鏂囦歡鎴栨櫘閫氬睘鎬ф枃浠惰幏鍙栥傝屾槸榪瀞qlserver榪樻槸oracle灝卞彧鏄敼鏀歸厤緗氨鍙互浜嗐?<br />瀹冧滑閮藉彲浠ョ敤 sun.jdbc.odbc.JdbcOdbcDriver 鏉ヨ繛銆傚搴攑oolURL="jdbc:odbc:test",user,pass鐣?<br />涔熷彲浠ョ敤鑷繁鐗規湁鐨? <br />sqlserver:weblogic.jdbc.mssqlserver4.Driver (緗戜笂涓? 瀵瑰簲poolURL="jdbc:weblogic:mssqlserver4:ceic@127.0.0.1" //ceic鏄暟鎹簱鍚嶏紝127.0.0.1鏄暟鎹簮浣嶇疆,鍙互鏄繙紼嬬殑鏁版嵁搴?user,pass鐣?<br />oracle:oracle.jdbc.driver.OracleDriver (class12.zip,瑁呬簡oracle灝卞簲璇ユ湁浜? 瀵瑰簲jdbc:oracle:thin:scott/tiger@10.1.103.234:1521:sp" scott/tiger榪炴帴韜喚鐨勭敤鎴峰悕/瀵嗙爜,10.1.103.234,鏁版嵁婧恑p,1521:绔彛(榛樿鏄?521). sp鎸囧悜鏁版嵁搴撳悕user,pass鐣?<br />濡傛灉鐢ㄧ殑weblogic閰嶇殑鏁版嵁搴撹繛鎺ワ紝鍙互閫氳繃 <br />Context ctx = new InitialContext(); <br />DataSource ds = (DataSource)ctx.lookup("forceicdatasource"); //forceicdatasource鏄厤鐨刣atasource.涔熷彲浠ラ氳繃鍜屼笂闈㈢粺涓鐨勬柟娉曟潵璋冪敤銆?<br />weblogic:weblogic.jdbc.pool.Driver //driverName <br />瀵瑰簲鐨刾oolURL="jdbc:weblogic:pool:poolname" //poolname鏄湪weblogic涓厤鐨刯dbc綾誨瀷鐨刢onnections pool鐨勫悕瀛椼倁ser,pass鏄痺eblogic鐢ㄦ埛錛坅dministrators鐢ㄦ埛緇勪腑鐨勭敤鎴鳳級鐨勭敤鎴峰悕鍜屽瘑鐮併?濡傛灉涓嶆槸鐢―riverManager灝辯敤涓嶄笂錛?conn = mydriver.connect(poolURL,null);"灝辨槸鍦ㄨ繖縐嶆儏鍐典笅鍙互鐢ㄣ傛垜鍦╳eblogic 6.1涓嬫祴璇曢氳繃) <br />緇間笂璇寸殑錛屽彲浠ョ湅鍑猴紝澶у鏁版暟鎹簱榪炴帴閮藉彲浠ラ氳繃閰嶇疆 灞炴ф枃浠?鏉ョ伒媧葷殑鑾峰彇銆傦紙縐繪璧鋒潵寰堟槸鏂逛究錛屽茍涓斿搴旂敤鍩烘湰娌℃湁浠涔堝獎鍝嶏紝褰撶劧涔熷彲浠ュじ騫沖彴)鎵浠ユ垜鍙互閫氳繃鍔ㄦ佽鍙栧睘鎬ф枃浠舵潵瑙e喅銆?<br />private String javaHome = System.getProperty("java.home"); <br />private final String FS = System.getProperty("file.separator"); <br />private String path = javaHome+FS+"db.properties"; //鎶奷b.properties鏀懼湪緋葷粺灞炴ava.home涓嬶紝涓鑸槸jdk鐩綍涓嬬殑 jre鐩綍閲屻?<br />public boolean getInfo(){ <br />File file=new java.io.File(path); <br />Properties pro=new Properties(); <br />boolean readsucced; <br />try{ <br />InputStream in=new BufferedInputStream(new FileInputStream(file)); <br />pro.load(in); <br />driverName=pro.getProperty("driverName"); <br />poolURL=pro.getProperty("poolURL") <br />user=pro.getProperty("user") <br />pass=pro.getProperty("pass") <br />//鑷繁鎶婂畠浠瑃rim()鎺夈傛垜灝卞伔鎳掍笉鍐欎簡銆?<br />readsucced=true; <br />}catch(Exception e){System.out.println("璇誨彇灞炴ф枃浠跺嚭閿?);readsucced=false;} <br />return readsucced; <br />} <br />涓嶈繃涓鑸彧鐢ㄨ涓嬈″氨鍙互浜嗐傛墍浠ュ彲浠ユ妸瀹冩斁鍦?static{}鍧楅噷錛屼篃鍙互鏀懼湪鏋勯犲櫒閲岄潰(鐒跺悗鍜屾斁鍦ㄩ潤鎬佽繛鎺ユ睜錛屽鏋滄槸鍗曠嫭鐨勫簲鐢紝搴旇鎶奼etInfo()浣滀負闈欐佺被鍜屾暟鎹簱榪炴帴綾誨垎寮)銆?<br />public DBConn() { <br />setDBConnProxy(ProxyFactory.DefaultType );//璁懼畾榪炴帴proxy,鎺у埗鏁版嵁搴撹繛鎺ラ鐜囷紝鍙兘浼氱壓鐗叉晥鍔涳紝涓嶈繃鍦ㄩ槻姝㈡伓鎰忕牬鍧忎笂鏈夌偣浣滅敤錛岃嚜宸卞啓鐨勬瘯绔熻刀涓嶄笂weblogic鐨勮繛鎺ユ睜浜嗐傛墍浠ュ彧濂藉仛鐐瑰皬鐨勯槻鑼冩帾鏂?濡傛灉鏄敤weblogic閰嶇殑榪炴帴姹狅紝鍙互鐩存帴鍦╬roxyFactory閲岄潰鍔犱釜浠涔堥兘涓嶅仛鐨刾roxy. <br />getInfo(); <br />} <br />灞炴ф枃浠禿b.properties鍐呭濡備笅: <br />driverName=sun.jdbc.odbc.JdbcOdbcDriver <br />poolURL=jdbc:odbc:test <br />user=sa <br />pass=1234Q_Q5678 <br />鑷繁鍙互鑰曞叿瀹為檯鎯呭喌鍘繪洿鏀瑰睘鎬ф枃浠躲?<br />娉? getConn()鏂規硶榪斿洖鐨勬槸 Object,鏄笉鍚岀殑鏁版嵁搴撹繛鎺ユ湁涓嶅悓鐨勬墿灞曞簲鐢紝姣斿oracle鐨勫氨鏈夐拡瀵筩lob,blob鐨勫簲鐢紙鐢╟lass12.zip鐨勬儏鍐典笅錛夛紝鏅氱殑connection涓嶈兘婊¤凍,鎵浠ュ彲浠ラ氳繃鍦ㄥ簲鐢ㄤ腑鎶奼etConn()榪斿洖鐨凮bject杞寲鎴怬racleConnection鏉ョ敤銆傦紙涓漢瑙傜偣錛屼笉鐭ラ亾鏈夋病鏈夋洿濂界殑瑙e喅鏂規硶錛?<br />涓婇潰鍐欑殑榪欎箞澶氾紝鍙兘鍙鏂版墜鏈夌偣鐢ㄥ錛屽湪j2ee椋庤鐨勪粖澶╁凡緇忓緢钀戒紞浜嗭紝榪樺笇鏈涢珮鎵嬫寚鍑洪棶棰樹竴璧瘋璁?榪樻病鏈夋湁鍏充簬mysql鐨勮繛鎺ュ姙娉曪紝娌℃湁鍋氳繃錛屽笇鏈涙湁浜鴻兘琛ュ厖涓婃潵)銆?<br /><br />杞澆璇鋒敞鏄庡嚭澶勪笌浣滆?<br /><br />鍚勫JDBC driver鐨勭幇琛岀増鏈強浣跨敤鐢ㄦ硶 airskys [鏀惰棌] <br />鍏抽敭瀛?JDBC <br />鍑哄 <br /><br />鏈夐壌浜庤澶氱増鍙嬪浜庡鎵綣DBC driver鎴栬呭浣曚嬌鐢╠river甯稿父鍙戦棶, <br />鍦ㄨ繖杈規垜綆鍗曟暣鐞嗕竴涓嬫瘮杈冧唬琛ㄦх殑driver璺熶嬌鐢ㄦ柟寮? <br /><br />Microsoft SQL Server series (6.5, 7.x and 2000) and Sybase 10 <br /><br />JDBC Name: jTDS <br />URL: <a ><font color="#002c99">http://jtds.sourceforge.net/</font></a><br />Version: 0.5.1 <br />Download URL: <a ><font color="#002c99">http://sourceforge.net/project/showfiles.php?group_id=33291</font></a><br /><br />璇硶: <br /><br />Class.forName("net.sourceforge.jtds.jdbc.Driver "); <br />Connection con = DriverManager.getConnection("jdbc:jtds:sqlserver://host:port/database","user","password"); <br />or <br />Connection con = DriverManager.getConnection("jdbc:jtds:sybase://host:port/database","user","password"); <br /><br />MySQL <br /><br />JDBC Name: Connector/J 3.0 <br />URL: <a ><font color="#002c99">http://www.mysql.com/</font></a><br />Version: 3.0.8-stable <br />Download URL: <a ><font color="#002c99">http://www.mysql.com/downloads/api-jdbc-stable.html</font></a><br /><br />璇硶: <br /><br />Class.forName("com.mysql.jdbc.Driver"); <br />Connection con = DriverManager.getConnection("jdbc:mysql://host:port/database","user","password"); <br /><br />Oracle <br /><br />JDBC Name: Connector/J 3.0 <br />URL: <a ><font color="#002c99">http://otn.oracle.com/</font></a><br />Version: 3.0.8-stable <br />Download URL: <a ><font color="#002c99">http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html</font></a><br /><br />璇硶: <br /><br />Class.forName("oracle.jdbc.driver.OracleDriver"); <br />Connection con = DriverManager.getConnection("jdbc:oracle:thin:@host:port:databse","user","password"); <br /><br />Sybase <br /><br />Driver: jConnect 4.5/5.5 (JDBC 2.0 璇蜂嬌鐢?.5) <br /><br />璇硶: <br /><br />Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance(); <br />DriverManager.getConnection("jdbc:sybase:Tds:IP鍦板潃:2638?ServiceName="+鏁版嵁搴撳悕縐?"璐﹀彿","瀵嗙爜"); <br /><br />Postgresql <br /><br />JDBC Name: PostgreSQL JDBC <br />URL: <a ><font color="#002c99">http://jdbc.postgresql.org/</font></a><br />Version: 7.3.3 build 110 <br />Download URL: <a ><font color="#002c99">http://jdbc.postgresql.org/download.html</font></a><br /><br />璇硶: <br /><br />Class.forName("org.postgresql.Driver"); <br />Connection con=DriverManager.getConnection("jdbc:postgresql://host:port/database","user","password"); <br /><br />IBM AS400涓繪満鍦ㄧ敤鐨凧DBC璇硶 <br /><br />鏈夎V4R4浠ヤ笂鐗堟湰鐨凜lient Access Express <br />鍙互鍦–:\Program Files\IBM\Client Access\jt400\lib <br />鎵懼埌 driver 妗f jt400.zip錛屽茍鏇存敼鎵╁睍鍚嶆垚涓?jt400.jar <br /><br />璇硶 <br /><br />java.sql.DriverManager.registerDriver (new com.ibm.as400.access.AS400JDBCDriver ()); <br />Class.forName("com.ibm.as400.access.AS400JDBCConnection"); <br />con = DriverManager.getConnection("jdbc:as400://IP","user","password"); <br /><br />鍚勫JDBC driver鐨勭幇琛岀増鏈強浣跨敤璇硶鍚勫JDBC driver鐨勭幇琛岀増鏈強浣跨敤璇硶鍚勫JDBC driver鐨勭幇琛岀増鏈強浣跨敤璇硶鍚勫JDBC driver鐨勭幇琛岀増鏈強浣跨敤璇硶鍚勫JDBC driver鐨勭幇琛岀増鏈強浣跨敤璇硶鍚勫JDBC driver鐨勭幇琛岀増鏈?/p> <img src ="http://www.tkk7.com/warrenwu/aggbug/73730.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/warrenwu/" target="_blank">Warren.Wu</a> 2006-10-08 11:11 <a href="http://www.tkk7.com/warrenwu/archive/2006/10/08/73730.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[杞琞Spring AOP Frameworkhttp://www.tkk7.com/warrenwu/archive/2006/09/27/72390.htmlWarren.WuWarren.WuWed, 27 Sep 2006 13:07:00 GMThttp://www.tkk7.com/warrenwu/archive/2006/09/27/72390.htmlhttp://www.tkk7.com/warrenwu/comments/72390.htmlhttp://www.tkk7.com/warrenwu/archive/2006/09/27/72390.html#Feedback0http://www.tkk7.com/warrenwu/comments/commentRss/72390.htmlhttp://www.tkk7.com/warrenwu/services/trackbacks/72390.html

Spring AOP Framework

Here's my little exploration to Spring's AOP framework - a little interceptor which just logs which class is called and which method is called, plus logging the method invocation time; however I hope this can help others to understand Spring's AOP and help them to write interceptors of their own.

-cptechno


An interceptor used in Spring need to implement the org.aopalliance.intercept.MethodInterceptor interface, which requires implementing this method:



public聽 Object聽invoke(MethodInvocation聽methodInvocation)聽 throws聽 Throwable;



And next, comes that little interceptor...



import聽 org.aopalliance.intercept.MethodInterceptor;
import聽 org.aopalliance.intercept.MethodInvocation;
import聽 org.apache.commons.logging.Log;
import聽 org.apache.commons.logging.LogFactory;

public聽class聽 MyInterceptor聽 implements聽 MethodInterceptor
{
聽聽 private聽final聽 Log聽logger聽=聽LogFactory.getLog(getClass());

聽聽 public聽 Object聽invoke(MethodInvocation聽methodInvocation)聽 throws聽 Throwable
聽聽 {
聽聽聽聽 logger.info( "Beginning聽method:聽"聽 +聽methodInvocation.getMethod().getDeclaringClass()聽+聽 "::"聽 +聽methodInvocation.getMethod().getName());
聽聽聽聽 long聽 startTime聽=聽System.currentTimeMillis();
聽聽聽聽 try
聽聽聽聽 {
聽聽聽聽聽聽 Object聽retVal聽=聽methodInvocation.proceed();
聽聽聽聽聽聽 return聽 retVal;
聽聽聽聽 }
聽聽聽聽 finally
聽聽聽聽 {
聽聽聽聽聽聽 logger.info( "Ending聽method:聽"聽聽 +聽methodInvocation.getMethod().getDeclaringClass()聽+聽 "::"聽 +聽methodInvocation.getMethod().getName());
聽聽聽聽聽聽 logger.info( "Method聽invocation聽time:聽"聽 +聽(System.currentTimeMillis()聽-聽startTime)聽+聽 "聽msecs." );
聽聽聽聽 }
聽聽 }

}



You can do anything as you like; but pay attention to these two lines:



Object聽retVal聽=聽methodInvocation.proceed();
return聽 retVal;



The execution sequence is as follows:

  1. Any statements placed before Object retVal = methodInvocation.proceed();
  2. Object retVal = methodInvocation.proceed(); , which gives control to the next interceptor in the interceptor stack, or the underlying method.
  3. Any statements placed before return retVal;
  4. return retVal; , which returns control to the interceptor above it, or exit the whole interceptor stack.

Next, to use the interceptor we wrote, we need to turn our business object as an AOP target, like this:



<bean聽id= "SearchBookBeanTarget"聽 class = "library.SearchBookBeanImpl"聽 init-method= "init"聽 />



As shown, we just need to change the bean's id.

Next we need to hang the interceptor on to Spring's ApplicationContext.



<bean聽id= "myInterceptor"聽 class = "library.MyInterceptor"聽 />



And the last step, we declare our business object actually in the ApplicationContext, via its interface we defined, via Spring's ProxyFactoryBean.



<bean聽id= "SearchBookBean"聽 class = "org.springframework.aop.framework.ProxyFactoryBean" >
聽聽 <property聽name= "proxyInterfaces" ><value>library.SearchBookBean</value></property>
聽聽聽聽 <property聽name= "interceptorNames" >
聽聽聽聽聽聽 <list>
聽聽聽聽聽聽聽聽 <value>myInterceptor</value>
聽聽聽聽聽聽聽聽 <value>SearchBookBeanTarget</value>
聽聽聽聽聽聽 </list>
聽聽聽聽 </property>
聽聽 </bean>

  • proxyInterfaces: the actual business interface of our business object.
  • interceptorNames: the execution sequence of the interceptors, with the business object's target as the end of the list. Remember to put the business object's target on the list, otherwise your business object will not work; on the other hand you'll receive an exception telling you that all interceptors had been invoked.

On the application code that will access the business object, no changes are necessary.



Then at your logging target (console, file, etc...) you can see the following output similar to this (time and level info trimmed here):



Beginning聽method:聽 interface聽 library.SearchBookBean::searchBook
....
(log聽messages聽about聽library.SearchBookBean.searchBook()....)
....
Ending聽method:聽 interface聽 library.SearchBookBean::searchBook
Method聽invocation聽time:聽 10聽 msecs.



Warren.Wu 2006-09-27 21:07 鍙戣〃璇勮
]]>
寮鍙戝墠鐨勭害瀹?/title><link>http://www.tkk7.com/warrenwu/archive/2006/09/27/72303.html</link><dc:creator>Warren.Wu</dc:creator><author>Warren.Wu</author><pubDate>Wed, 27 Sep 2006 06:48:00 GMT</pubDate><guid>http://www.tkk7.com/warrenwu/archive/2006/09/27/72303.html</guid><wfw:comment>http://www.tkk7.com/warrenwu/comments/72303.html</wfw:comment><comments>http://www.tkk7.com/warrenwu/archive/2006/09/27/72303.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/warrenwu/comments/commentRss/72303.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/warrenwu/services/trackbacks/72303.html</trackback:ping><description><![CDATA[ <p style="TEXT-INDENT: 2em">浠婂ぉ榪涘叆鍙紑鍙戝墠鐨勫噯澶囬樁孌點傚湪寮鍙戦」鐩墠錛岃姹傛瘡浣嶅紑鍙戝皬緇勬垚鍛橀兘蹇呴』鍏堥槄璇諱互涓嬬害瀹氾紝涓ユ牸鎸変互涓嬬害瀹氭潵榪涜寮鍙戙? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>緋葷粺妗嗘灦</strong> </font> </center> <p style="TEXT-INDENT: 2em">路緋葷粺鎬繪鏋墮噰鐢⊿UN J2EE妗嗘灦錛屼嬌鐢↗AVA/XML鎶鏈拰緇勪歡鎶鏈紝 鍩轟簬Application server寮鍙戙? </p> <p style="TEXT-INDENT: 2em">路欏圭洰涓殑紼嬪簭蹇呴』涓ユ牸鎸塉2EE1.3瑙勮寖鏉ョ紪鐮侊紝EJB寤鴻閲囩敤2.0瑙勮寖緙栫爜錛屽敖鍙兘澶氫嬌鐢‥JB 妯″紡璁捐錛屽弬鑰冩妧鏈枃妗e涓嬶細 </p> <p style="TEXT-INDENT: 2em">1.<a target="_blank">銆奐2EE Tutorial銆?/a></p> <p style="TEXT-INDENT: 2em"> <a target="_blank">j2ee-1_3-doc-tutorial-draft5.pdf</a> </p> <p style="TEXT-INDENT: 2em">2.<a target="_blank">銆奐Boss 3.0Quick Start Guide銆?/a></p> <p style="TEXT-INDENT: 2em">3.<a target="_blank">銆奅JB Design Patterns銆?/a></p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>寮鍙戠幆澧?/strong> </font> </center> <p style="TEXT-INDENT: 2em">路嫻嬭瘯鐢ˋpplication server閲囩敤JAS錛孞AS 閰嶇疆浜嶭inux OS涓嬶紝IP鍦板潃錛?92.168.0.6銆傜櫥褰曠敤鎴峰悕錛欽2EEOA錛屽瘑鐮侊細J2EEOA銆傜櫥褰昮tp宸ュ叿寤鴻浣跨敤SSH Secure Shell鎴朙eapFTP錛宖tp鍦板潃涓?92.168.0.6:22銆? </p> <p style="TEXT-INDENT: 2em">路欏圭洰寮鍙戞簮鐮佺洰褰曚負/home/local/jboss/applications/J2EEOA/src錛岄」鐩紑鍙戞枃妗g洰褰曚負/home/product/J2EEOA/銆? </p> <p style="TEXT-INDENT: 2em">路 鏁版嵁搴撴湇鍔″櫒IP涓?92.168.0.222錛屾暟鎹簱閲囩敤Mysql錛岀鐞嗗伐鍏蜂負phpadmin錛岀櫥褰曟暟鎹簱鐨勭敤鎴峰悕涓簍est錛屽瘑鐮佷負test銆? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>婧愪唬鐮佺洰褰曡鑼?/strong> </font> </center> <p style="TEXT-INDENT: 2em">姣忎綅寮鍙戝皬緇勬垚鍛樹竴瀹氳緇濆閬靛畧浠ヤ笅鍒涘緩婧愪唬鐮佺洰褰曠殑瑙勮寖銆? </p> <p style="TEXT-INDENT: 2em"> <b>欏圭洰寮鍙戠洰褰曠粨鏋勭畝鍥撅細</b> </p> <p style="TEXT-INDENT: 2em"> <ccid_nobr> <table cellspacing="0" bordercolordark="#ffffff" cellpadding="2" width="550" align="center" bordercolorlight="black" border="1"> <tbody> <tr> <td class="code" bgcolor="#e6e6e6"> <pre> <ccid_code>\ |--apps |--J2EEOA |--admin |--components |--a component |--modules |--a module |--lib |--ant |--build.properties</ccid_code> </pre> </td> </tr> </tbody> </table> </ccid_nobr> </p> <p style="TEXT-INDENT: 2em"> </p> <center> <img style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" src="http://developer.ccidnet.com/col/attachment/2002/10/36919.jpg" /> </center> <p style="TEXT-INDENT: 2em"> </p> <center>鍥劇墖6 欏圭洰寮鍙戠洰褰曠粨鏋勫浘</center> <p style="TEXT-INDENT: 2em"> <b>欏圭洰寮鍙戠洰褰曠粨鏋勮鏄庯細</b> </p> <p style="TEXT-INDENT: 2em"> <ccid_nobr> <table cellspacing="0" bordercolordark="#ffffff" cellpadding="2" width="550" align="center" bordercolorlight="black" border="1"> <tbody> <tr> <td class="code" bgcolor="#e6e6e6"> <pre> <ccid_code>\ (璇存槑錛氭牴鐩綍) |--apps (璇存槑錛氭鐩綍涓嬫斁搴旂敤紼嬪簭鐨勪唬鐮? |--J2EEOA (璇存槑錛氭鐩綍涓烘斁J2EEOA搴旂敤紼嬪簭鐨勪唬鐮? |--admin (璇存槑錛氭鐩綍涓烘斁欏圭洰鐨刟dmin搴旂敤紼嬪簭鐨勪唬鐮? |--components (璇存槑錛氭鐩綍涓嬫斁搴旂敤紼嬪簭緇勪歡鐨勪唬鐮? |--a component (璇存槑錛氭鐩綍涓烘斁涓涓粍浠剁殑浠g爜) |--modules (璇存槑錛氭鐩綍涓嬫斁搴旂敤紼嬪簭妯″潡鐨勪唬鐮? |--a module (璇存槑錛氭鐩綍涓烘斁涓涓ā鍧楃殑浠g爜) |--lib (璇存槑錛氭鐩綍涓嬫斁欏圭洰寮鍙戝伐鍏? |--ant (璇存槑錛欰nt宸ュ叿錛屽寘鎷琤in鍜宭in鐩綍) |--build.properties (璇存槑錛氭鏂囦歡瀹氫箟欏圭洰寮鍙戝叡鐢ㄧ殑鐜鍙橀噺錛? 濡俲boss.home銆乯boss.configuration銆乻ervlet-lib.path絳?</ccid_code> </pre> </td> </tr> </tbody> </table> </ccid_nobr> </p> <p style="TEXT-INDENT: 2em"> <b>妯″潡銆佺粍浠跺紑鍙戠洰褰曠粨鏋勭畝鍥撅細</b> </p> <p style="TEXT-INDENT: 2em"> <ccid_nobr> <table cellspacing="0" bordercolordark="#ffffff" cellpadding="2" width="550" align="center" bordercolorlight="black" border="1"> <tbody> <tr> <td class="code" bgcolor="#e6e6e6"> <pre> <ccid_code>\ |--build |--etc |--multi-langs |--lib |--docs |--ejb |-- META-INF |--j2ee |--META-INF |--web |--WEB-INF |--src |--ejb |--javabean |--servlet |--web |--build.bat |--build.sh |--build.xml</ccid_code> </pre> </td> </tr> </tbody> </table> </ccid_nobr> </p> <p style="TEXT-INDENT: 2em"> </p> <center> <img style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" src="http://developer.ccidnet.com/col/attachment/2002/10/36917.jpg" /> </center> <p style="TEXT-INDENT: 2em"> </p> <center>鍥劇墖7 妯″潡銆佺粍浠剁洰褰曠粨鏋勫浘</center> <p style="TEXT-INDENT: 2em">璇存槑錛歴rc銆乪tc鐩綍鍜宐uild.bat銆乥uild.sh銆乥uild.xml涓哄紑鍙戜漢鍛樺緩绔嬬殑鐩綍錛宐uild鍜宭ib鐩綍涓虹敱ant宸ュ叿鐢熸垚鐨勭洰褰曘? </p> <p style="TEXT-INDENT: 2em"> <b>妯″潡銆佺粍浠跺紑鍙戠洰褰曠粨鏋勮鏄?/b> </p> <p style="TEXT-INDENT: 2em"> <ccid_nobr> <table cellspacing="0" bordercolordark="#ffffff" cellpadding="2" width="550" align="center" bordercolorlight="black" border="1"> <tbody> <tr> <td class="code" bgcolor="#e6e6e6"> <pre> <ccid_code>\ (璇存槑錛氫竴涓ā鍧楁垨涓涓粍浠剁殑鏍圭洰褰? |--build (璇存槑錛氫繚瀛樼敱ant宸ュ叿鐢熸垚鐨勬墿灞曞悕涓簀ar銆亀ar銆乪ar絳夋枃浠? |--etc (璇存槑錛氬瓨鏀鵑儴緗叉枃浠訛紝濡倃eb.xml銆乪jb-jar.xml銆乤pplication.xml銆? jaws.xml銆乯bosscmp-jdbc.xml絳? |--multi-langs (璇存槑錛氬瓨鏀懼璇█璧勬簮鏂囦歡錛屾墿灞曞悕涓簆roperties錛? |--lib (璇存槑錛氫繚瀛樼敱ant宸ュ叿鐢熸垚鐨凙PI鏂囦歡銆乧lass鏂囦歡絳? |--docs |--api |--ejb |-- META-INF |--j2ee |--META-INF |--web |--WEB-INF |--src (璇存槑錛氬瓨鏀炬簮浠g爜錛屽寘鎷琷ava鍜宩sp浠g爜錛屼笅闈㈡湁鍥涗釜鐩綍銆? |--ejb (璇存槑錛氶噰鐢‥JB榪涜寮鍙戯紝瀛樻斁EJB鍜孒elper Classes婧愪唬鐮併? |--javabean (璇存槑錛氶噰鐢↗avabean榪涜寮鍙戯紝瀛樻斁Javabean鍜孒elper Classes婧愪唬鐮併? |--servlet (璇存槑錛氬瓨鏀維ervlet婧愪唬鐮併? |--web (璇存槑錛氬瓨鏀綣SP婧愪唬鐮併? |--build.bat (璇存槑錛氬湪Window OS涓嬶紝榪涜build鐨勬枃浠躲? |--build.sh (璇存槑錛氬湪Unix OS涓嬶紝榪涜build鐨勬枃浠躲? |--build.xml (璇存槑錛欰nt宸ュ叿瑕乥uild鐨勭洰鏍囨枃浠躲?</ccid_code> </pre> </td> </tr> </tbody> </table> </ccid_nobr> </p> <p style="TEXT-INDENT: 2em"> <b>搴旂敤紼嬪簭寮鍙戠洰褰曠粨鏋勭畝鍥撅細</b> </p> <p style="TEXT-INDENT: 2em"> <ccid_nobr> <table cellspacing="0" bordercolordark="#ffffff" cellpadding="2" width="550" align="center" bordercolorlight="black" border="1"> <tbody> <tr> <td class="code" bgcolor="#e6e6e6"> <pre> <ccid_code>\ |--build |--etc |--lib |--docs |--ejb |-- META-INF |--j2ee |--META-INF |--web |--WEB-INF |--team |--a member |--ejb |--javabean |--web |--build.bat |--build.sh |--build.xml |--build.properties</ccid_code> </pre> </td> </tr> </tbody> </table> </ccid_nobr> </p> <p style="TEXT-INDENT: 2em"> </p> <center> <img style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" src="http://developer.ccidnet.com/col/attachment/2002/10/36918.jpg" /> </center> <p style="TEXT-INDENT: 2em"> </p> <center>鍥劇墖8 搴旂敤紼嬪簭鐩綍緇撴瀯鍥?/center> <p style="TEXT-INDENT: 2em"> <b>搴旂敤紼嬪簭寮鍙戠洰褰曠粨鏋?/b> </p> <p style="TEXT-INDENT: 2em">1. 鐢變簬欏圭洰鐢卞涓▼搴忓憳涓璧鋒潵榪涜緙栫爜錛屾墍浠ュ簲鐢ㄧ▼搴忓紑鍙戠洰褰曠粨鏋勫拰妯″潡銆佺粍浠跺紑鍙戠洰褰曠粨鏋勭殑涓嶄竴鏍楓? </p> <p style="TEXT-INDENT: 2em">2. 搴旂敤紼嬪簭寮鍙戠洰褰曠粨鏋勬病鏈塻rc鐩綍錛屼絾澶氫簡涓涓猼eam鐩綍錛屾鐩綍瀛樻斁鎵鏈夌▼搴忓憳鐨刢lasses鍜孞sp浠g爜銆? </p> <p style="TEXT-INDENT: 2em">3. 搴旂敤紼嬪簭寮鍙戠洰褰曠粨鏋勪笅build.xml鍜屾ā鍧椼佺粍浠跺紑鍙戠洰褰曠粨鏋勪笅鐨刡uild.xml鏈夊緢澶т笉鍚屻? </p> <p style="TEXT-INDENT: 2em">4. 鐢遍」鐩粍闀胯礋璐g鐞唀tc鐩綍銆乥uild.xml銆乥uild.bat銆乥uild.sh銆乥uild.properties錛岀▼搴忓憳鍒嗗埆綆$悊team鐩綍涓嬬殑灞炰簬鑷繁鐨勭洰褰曪紝濡傜▼搴忓憳tom綆$悊team/tom鐩綍銆?<br /></p> <p style="TEXT-INDENT: 2em"> <b>build.xml緙栫爜瑙勮寖</b> </p> <p style="TEXT-INDENT: 2em">路 搴旂敤紼嬪簭鐩綍涓嬬殑build.xml </p> <p style="TEXT-INDENT: 2em">婧愪唬鐮侊細<a target="_blank">搴旂敤紼嬪簭鐩綍涓嬬殑build.xml瑙勮寖妯℃澘</a></p> <p style="TEXT-INDENT: 2em">璇存槑錛氬湪寤虹珛build.xml鏃訛紝緇勯暱鍙渶淇敼鍒涘緩鐨勬椂闂村拰鍙橀噺ProjectName絳夈? </p> <p style="TEXT-INDENT: 2em"> <b>妯″潡銆佺粍浠剁洰褰曚笅鐨刡uild.xml</b> </p> <p style="TEXT-INDENT: 2em">婧愪唬鐮侊細<a target="_blank">妯″潡銆佺粍浠剁洰褰曚笅鐨刡uild.xml瑙勮寖妯℃澘</a></p> <p style="TEXT-INDENT: 2em">璇存槑錛氬湪寤虹珛build.xml鏃訛紝寮鍙戜漢鍛樺彧闇淇敼鍒涘緩鐨勬椂闂村拰鍜屽彉閲廝rojectName銆乧omponentName絳夈? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>緙栫爜瑙勮寖</strong> </font> </center> <p style="TEXT-INDENT: 2em">路 欏圭洰涓殑JAVA婧愪唬鐮佸繀欏繪寜銆奐AVA寮鍙戣鑼冦嬨? </p> <p style="TEXT-INDENT: 2em">路欏圭洰涓殑JSP浠g爜蹇呴』鎸夈奐SP寮鍙戣鑼冦嬨? </p> <p style="TEXT-INDENT: 2em">路 姣忎綅寮鍙戝皬緇勬垚鍛樺湪寮鍙戦」鐩椂閮戒弗鏍兼寜姝よ鑼冩潵榪涜緙栧啓紼嬪簭錛岃欏圭洰涓墍鏈夌殑鏂囨。閮界湅璧鋒潵鍍忎竴涓漢鍐欑殑錛屽鍔犲彲璇繪э紝鍑忓皯欏圭洰緇勪腑鍥犱負鎹漢鑰屽甫鏉ョ殑鎹熷け銆? </p> <p style="TEXT-INDENT: 2em">路 姣忎綅寮鍙戝皬緇勬垚鍛樹竴瀹氳緇濆閬靛畧榪欎釜瑙勮寖銆傚綋瀹為檯搴旂敤涓庝笅闈㈢殑瑙勮寖鐩告姷瑙︽椂錛岃褰曚笅鍘熷洜銆佹綔鍦ㄥ悗鏋滐紝浠ュ強絎﹀悎瑙勮寖闇瑕佺殑鏉′歡錛屼絾蹇呴』鏄湪璁╃▼搴忔湁鑹ソ鐨勫彲璇繪х殑鍓嶆彁涓嬨? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>鍔熻兘妯″潡</strong> </font> </center> <p style="TEXT-INDENT: 2em">鍦ㄥ仛涓氬姟閫昏緫妯″潡鍓嶏紝鍏堟妸涓浜涘噯澶囧伐浣滃仛鍑烘潵錛? </p> <p style="TEXT-INDENT: 2em"> <b>寤虹珛涓浜涘叕鐢ㄧ殑bean</b>錛堥」鐩腑縐頒負緋葷粺鎺у埗鍣╟ontroller錛夛紝鍖呭悕涓篶om.cwap.oa.controller.*錛屾彁渚涚粰緋葷粺鍚勬ā鍧椾嬌鐢ㄣ傚寘鎷鏃墮棿銆佸瓧絎︾殑鎿嶄綔錛岃皟璇曞櫒錛岃蔣浠跺浗闄呭寲錛屽璇█鐗堟湰錛岀郴緇熺殑WEB澶栧3錛孧VC妯″紡鐨凷ervlet鍜孉ction錛屽WEB欏甸潰鏄劇ず鐨勬帶鍒跺鏍戠粨鏋勩佽礬寰勭粨鏋勶紱絳夌瓑銆? </p> <p style="TEXT-INDENT: 2em"> <b>寤虹珛涓涓簭鍒楀彂鐢熷櫒</b>錛屽寘鍚嶄負com.cwap.oa.sequencegenerator.*錛屾彁渚涚粰bean浣跨敤錛屽畠鐢ㄦ潵浜х敓涓涓敮涓鐨処D錛岃屼笖涔熷彲鐢ㄦ潵璁℃暟錛屼篃灝辨槸鎶婂畠褰撴垚璁℃暟鍣ㄤ嬌鐢ㄣ備粙緇嶅浣曞彇id鐨勬柟娉曠殑鏂囧瓧瑕佸啓鍦╞ean鐨勪唬鐮佸唴錛屼互渚跨敓鎴怉PI鍚庝緵鍏跺畠寮鍙戜漢鍛樺弬闃呫? </p> <p style="TEXT-INDENT: 2em"> <b>寤虹珛涓涓猄erverFacade</b>錛屽畠涓篍JB Home鎻愪緵緇熶竴鐨勬帴鍙c係erverFacade涓虹▼搴忚鐢ㄥ埌鐨勬墍鏈塃JB鐨刪ome handle鎻愪緵緙撳瓨錛屾彁楂樿闂晥鐜囥備互鍚庢煡鎵綣NDI Name鐨勬柟娉曢兘搴斿啓鍦ㄦ帴鍙i噷錛岃皟鐢ㄦ椂鐩存帴浠庢帴鍙h皟鐢ㄣ? </p> <p style="TEXT-INDENT: 2em"> <b>寤虹珛涓涓炕欏墊帶鍒跺櫒</b>錛屽寘鍚嶄負com.cwap.oa.controller.web.page*錛岀敤鏉ヨ繘琛屽垎欏墊樉紺虹殑綆$悊錛屼互鍚庨〉闈腑鐨勫垎欏甸兘鐢辯炕欏墊帶鍒跺櫒綆$悊銆? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>寮傚父澶勭悊鍜屾棩蹇?/strong> </font> </center> <p style="TEXT-INDENT: 2em">路 紼嬪簭涓墍鏈夌殑寮傚父澶勭悊浣跨敤緇熶竴鐨勮皟璇曞櫒錛宐ean鐨勫悕縐頒負com.cwap.oa.controller.util.Debug錛岀敤娉曡欏圭洰API銆? </p> <p style="TEXT-INDENT: 2em">路 紼嬪簭涓墍鏈夌殑鏃ュ織浣跨敤Jakarta-log4j綆$悊錛屽寘鐨勫悕縐頒負log4j-1.2.5.jar </p> <p style="TEXT-INDENT: 2em">瀹樻柟URL錛歨ttp://jakarta.apache.org/log4j/docs/index.html </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>Session</strong> </font> </center> <p style="TEXT-INDENT: 2em">路 鏀懼湪session涓殑鍙橀噺緇熶竴鏀懼湪涓涓猙ean閲屽瓨鍌紝涓嶇洿鎺ユ妸session鍙橀噺鍚嶇О鏀懼湪JSP銆丼ervlet鎴朆ean鍐咃紝瀛樺偍session鍙橀噺鍚嶇О鐨刡ean涓篶om.cwap.oa.controller.web.util.WebKeys錛屽彇session鍙橀噺鍚嶇殑鏂規硶涓篻etXX()銆? </p> <p style="TEXT-INDENT: 2em">路 鍙杝ession鍙橀噺鐨勫肩殑鏂規硶緇熶竴鏀懼湪涓涓猙ean閲岋紝bean鐨勫悕縐頒負com.cwap.oa.controller.web.util.JSPUtil錛屽彇session鍙橀噺鍊肩殑鏂規硶涓篻etXX()錛屼箣鍚庤鍙杝ession鍙橀噺鍊煎氨璋冪敤JSPUtil涓搴旂殑鏂規硶銆? </p> <p style="TEXT-INDENT: 2em">路 褰撳墠緋葷粺涓凡鐭ョ殑session鍙橀噺鍚嶆湁"userid"銆?userName"銆?locale"銆?skin"絳夛紝userid涓虹敤鎴鋒爣璇嗭紝userName涓虹敤鎴峰悕縐幫紝locale涓虹敤鎴烽夋嫨鐨勫湴鍩燂紝skin涓虹敤鎴烽夋嫨鐨勭晫闈㈤鏍箋? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>DAO</strong> </font> </center> <p style="TEXT-INDENT: 2em">浣跨敤DAO灝佽SQL璇█瀵規暟鎹簱鐨勭洿鎺ユ搷浣滐紝DAO閲囩敤Factory妯″紡緙栧啓銆? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>緇勪歡</strong> </font> </center> <p style="TEXT-INDENT: 2em">鎵鏈夌殑涓氬姟閫昏緫浣跨敤緇勪歡鎶鏈傛瘡涓粍浠跺唴鍚屾椂鎻愪緵EJB鐗堟湰鍜孌AO鐗堟湰涓ょ鐨勬柟娉?涓嶆帹鑽愮洿鎺ヤ嬌鐢‥JB鐗堟湰鍜孌AO鐗堟湰鐨勬柟娉曘? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>澶氳璦鐗堟湰</strong> </font> </center> <p style="TEXT-INDENT: 2em">路 Bean銆丼ervlet銆丣SP涓殑澶氳璦鏂囧瓧閲囩敤鍒嗙鎶鏈紝灝嗗璇█鏂囧瓧鏀懼湪璧勬簮鏂囦歡涓紝淇濆瓨鐩綍涓?WEB-INF/classes/multi-langs鎴栧叾瀹冪洰褰曘? </p> <p style="TEXT-INDENT: 2em">路 褰撳墠鏀寔鐨勮璦鏈変笁縐嶏細綆浣撲腑鏂囷紙zh_CN錛夈佺箒浣撲腑鏂囷紙zh_HK錛夈佽嫳鏂囷紙en_US錛夈? </p> <p style="TEXT-INDENT: 2em">路 澶氳璦綆$悊鍣ㄧ殑鍚嶇О涓篶om.cwap.oa.controller.util.MultiLangsString錛屼嬌鐢ㄦ柟娉曡鏈」鐩瓵PI銆? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>WEB澶栧3</strong> </font> </center> <p style="TEXT-INDENT: 2em">路 JSP欏甸潰涓殑鍥劇墖銆丆SS銆丣S絳夋枃浠墮兘搴旀斁鍦ㄧ粺涓鐩綍錛岀洰褰曚負/skin/skinName/skinLanguage錛屽叾涓璼kinName涓哄澹沖悕縐幫紝skinLanguage涓哄澹寵璦鐗堟湰錛屼緥濡?skin/green/zh_CN </p> <p style="TEXT-INDENT: 2em">路 鍥劇墖鏀懼湪images鐩綍閲岋紝CSS鏂囦歡鏀懼湪css鐩綍閲岋紝JS鑴氭湰鏀懼湪js鐩綍閲岋紝鍏跺畠璧勬簮(濡傚0闊熾佽棰戙丗lash鏂囦歡絳?瀛樻斁鏂規硶瑙侀」鐩瓵PI銆? </p> <p style="TEXT-INDENT: 2em">路 澶栧3綆$悊鍣ㄤ負com.cwap.oa.controller.web.skin.WebSkin錛岃皟鐢ㄦ柟娉曠粺涓鎺ュ彛涓篶om.cwap.oa.controller.web.util.JSPUtil銆? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>鍦ㄧ嚎甯姪</strong> </font> </center> <p style="TEXT-INDENT: 2em">路 鍦ㄧ嚎甯姪綆$悊鍣ㄤ負com.cwap.oa.help.*錛岃皟鐢ㄦ柟娉曠粺涓鎺ュ彛涓篶om.cwap.oa.help.client.HelpClientHelper銆? </p> <p style="TEXT-INDENT: 2em">路 姣忎竴涓狫SP欏甸潰涓彁渚涗竴涓湪綰垮府鍔╅摼鎺ワ紝鐢ㄦ埛鐐瑰嚮瀹冪洿鎺ヨ繘鍏ュ埌鍦ㄧ嚎甯姪涓績銆? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>鐢ㄦ埛綆$悊</strong> </font> </center> <p style="TEXT-INDENT: 2em">路 寤虹珛涓涓彇鐢ㄦ埛鍚嶇О鐨勯〉闈紝鍔熻兘鍖呮嫭鍙彇涓涓敤鎴峰拰鍙栧涓敤鎴楓? </p> <p style="TEXT-INDENT: 2em">路 鎵撳紑鍙栫敤鎴峰悕縐伴〉闈㈢殑鏂規硶錛屼嬌鐢ㄩ〉闈㈣剼鏈紝"javascript:return openWinToGetEmployee(frame,id,name,num)"錛屽綋num涓?錛屼唬琛ㄥ彲浠ュ彇澶氫釜鐢ㄦ埛錛屽惁鍒欙紝鍙兘鍙?涓敤鎴楓? </p> <p style="TEXT-INDENT: 2em"> </p> <center> <font color="#000099"> <strong>鏉冮檺綆$悊</strong> </font> </center> <p style="TEXT-INDENT: 2em">路 璋冪敤鏂規硶緇熶竴鎺ュ彛涓篶om.cwap.oa.controller.web.util.JSPUtil錛屾鏌ョ敤鎴鋒槸鍚︽湁鏉冮檺鐨勬柟娉曚負JSPUtil.isPermission(userid, permissions) </p> <p style="TEXT-INDENT: 2em">路 JSP涓楠岀敤鎴瘋韓浠介噰鐢╥nclude鏂瑰紡錛宨nclude鐨勬枃浠朵負checkUser.jsp </p> <p style="TEXT-INDENT: 2em">媯楠岀敤鎴瘋韓浠芥槸鍚︽槸涓鑸敤鎴鳳紝璋冪敤鏂規硶涓? </p> <p style="TEXT-INDENT: 2em"> <ccid_nobr> <table cellspacing="0" bordercolordark="#ffffff" cellpadding="2" width="550" align="center" bordercolorlight="black" border="1"> <tbody> <tr> <td class="code" bgcolor="#e6e6e6"> <pre> <ccid_code><jsp:include page="../include/checkUser.jsp"> <jsp:param name="type" value="user" /> </jsp:include></ccid_code> </pre> </td> </tr> </tbody> </table> </ccid_nobr> </p> <p style="TEXT-INDENT: 2em">媯楠岀敤鎴瘋韓浠芥槸鍚︽槸綆$悊鍛橈紝璋冪敤鏂規硶涓? </p> <p style="TEXT-INDENT: 2em"> <ccid_nobr> <table cellspacing="0" bordercolordark="#ffffff" cellpadding="2" width="550" align="center" bordercolorlight="black" border="1"> <tbody> <tr> <td class="code" bgcolor="#e6e6e6"> <pre> <ccid_code><jsp:include page="../include/checkUser.jsp"> <jsp:param name="type" value="manager" /> </jsp:include></ccid_code> </pre> </td> </tr> </tbody> </table> </ccid_nobr> </p> <p style="TEXT-INDENT: 2em">媯楠岀敤鎴瘋韓浠芥槸鍚︽槸瓚呯駭綆$悊鍛橈紝璋冪敤鏂規硶涓? </p> <p style="TEXT-INDENT: 2em"> <ccid_nobr> <table cellspacing="0" bordercolordark="#ffffff" cellpadding="2" width="550" align="center" bordercolorlight="black" border="1"> <tbody> <tr> <td class="code" bgcolor="#e6e6e6"> <pre> <ccid_code><jsp:include page="../include/checkUser.jsp"> <jsp:param name="type" value="administrator" /> </jsp:include></ccid_code> </pre> </td> </tr> </tbody> </table> </ccid_nobr> </p> <p style="TEXT-INDENT: 2em"> <br /> <br /> <br />鎽樿嚜璧涜開緗?http://developer.ccidnet.com/art/322/20021014/27601_1.html, http://developer.ccidnet.com/art/322/20021014/27601_2.html</p> <img src ="http://www.tkk7.com/warrenwu/aggbug/72303.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/warrenwu/" target="_blank">Warren.Wu</a> 2006-09-27 14:48 <a href="http://www.tkk7.com/warrenwu/archive/2006/09/27/72303.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>jdom璇誨彇xmlhttp://www.tkk7.com/warrenwu/archive/2006/09/25/71740.htmlWarren.WuWarren.WuMon, 25 Sep 2006 06:48:00 GMThttp://www.tkk7.com/warrenwu/archive/2006/09/25/71740.htmlhttp://www.tkk7.com/warrenwu/comments/71740.htmlhttp://www.tkk7.com/warrenwu/archive/2006/09/25/71740.html#Feedback0http://www.tkk7.com/warrenwu/comments/commentRss/71740.htmlhttp://www.tkk7.com/warrenwu/services/trackbacks/71740.html 聽1 package 聽cn.com;
聽2
聽3 import 聽java.io.FileInputStream;
聽4 import 聽java.io.FileNotFoundException;
聽5 import 聽java.io.IOException;
聽6 import 聽java.util.List;
聽7
聽8 import 聽org.jdom.Document;
聽9 import 聽org.jdom.Element;
10 import 聽org.jdom.JDOMException;
11 import 聽org.jdom.input.SAXBuilder;
12
13 public class 聽MyJDom聽 {
14 聽聽聽聽 public static void 聽main(String[]聽args)聽 throws 聽FileNotFoundException,聽JDOMException,聽IOException聽 {
15 聽聽聽聽聽聽聽聽SAXBuilder聽sab聽 = new 聽SAXBuilder();
16 聽聽聽聽聽聽聽聽Document聽doc聽 = 聽sab.build( new 聽FileInputStream( " ./data/myjdom.xml " ));
17 聽聽聽聽聽聽聽聽
18 聽聽聽聽聽聽聽聽Element聽element聽 = 聽doc.getRootElement();
19 聽聽聽聽聽聽聽聽List聽list聽 = 聽element.getChildren();
20 聽聽聽聽聽聽聽聽
21 聽聽聽聽聽聽聽聽 for ( int 聽i = 0 ;聽i < list.size();聽i ++ )聽 {
22 聽聽聽聽聽聽聽聽聽聽聽聽System.out.println( " ------------ " );
23 聽聽聽聽聽聽聽聽聽聽聽聽
24 聽聽聽聽聽聽聽聽聽聽聽聽Element聽ele2聽 = 聽(Element)聽list.get(i);
25 聽聽聽聽聽聽聽聽聽聽聽聽String聽id聽 = 聽ele2.getAttribute( " id " ).getValue();
26 聽聽聽聽聽聽聽聽聽聽聽聽System.out.println( " ID===>>> " + 聽id);
27 聽聽聽聽聽聽聽聽聽聽聽聽
28 聽聽聽聽聽聽聽聽聽聽聽聽Element聽ele3聽 = 聽ele2.getChild( " title " );
29 聽聽聽聽聽聽聽聽聽聽聽聽String聽title聽 = 聽ele3.getText();
30 聽聽聽聽聽聽聽聽聽聽聽聽System.out.println( " Title===>>> " + 聽title);
31 聽聽聽聽聽聽聽聽}

32 聽聽聽聽}

33 }

34

Warren.Wu 2006-09-25 14:48 鍙戣〃璇勮
]]>
鍐嶇湅JDBChttp://www.tkk7.com/warrenwu/archive/2006/09/25/71668.htmlWarren.WuWarren.WuMon, 25 Sep 2006 02:44:00 GMThttp://www.tkk7.com/warrenwu/archive/2006/09/25/71668.htmlhttp://www.tkk7.com/warrenwu/comments/71668.htmlhttp://www.tkk7.com/warrenwu/archive/2006/09/25/71668.html#Feedback0http://www.tkk7.com/warrenwu/comments/commentRss/71668.htmlhttp://www.tkk7.com/warrenwu/services/trackbacks/71668.html鍒氬紑濮嬫帴瑙DBC鏄簩銆佷笁騫村墠浠庝竴浣嶆湅鍙嬮偅閲屽惉鏉ョ殑璇嶏紝褰撴椂榪樹笉鏄▼搴忓憳錛屾繪劅瑙夋槸涓緢
闅懼鐨勬妧鏈紝灝變竴鐩存病澶湪鎰忥紝鍦ㄥ垰姣曚笟鐨勬嫑鑱樹細涓婃湁涓涓叕鍙告嫑鑱樻椂闂垜鏈嬪弸鍏充簬JDBC鐨?br />鐭ヨ瘑錛屽彲鏈嬪弸鍜屾垜閮芥病瀛﹁繃鍟婏紝緇撴灉灝變笉鐢ㄨ浜嗐傚叾瀹炰篃瑕佹劅璋㈣繖浣嶄粊鍏勶紝鍥犱負鎳掓儼鎵浠ユ病
鐪嬶紝榪樺ソ浠栨彁閱掍簡鎴戙傚懙鍛祣~~

浠婂ぉ鎵撴壂鍗敓錛屾暣鐞嗚嚜宸辯殑鍨冨溇涔︽椂鍙堟棤鎰忛棿緲誨埌浜咼DBC鐨勪功錛屽氨紿佺劧鎯寵搗榪欎簨錛岃屽悗灝辨槸
涓欏挎伓蹇冿紝鎰熻閭d綅浠佸厔瀹炲湪鏄瀮鍦俱傝秴綰у瀮鍦撅紒绔熺劧鑳介棶榪欎箞鍨冨溇鐨勯棶棰樸傞獋浠栦竴欏匡紝
鍙戞硠涓涓嬶紝鎰熻鑸掓湇澶氫簡銆?/p>

鍏跺疄瑕佸JDBC錛屽彧瑕佹槑鐧絁DBC鎵璧風殑浣滅敤閭d箞灝變笉浼氬緢闅俱?/p>

JDBC鐨勪綔鐢細

1 涓庢暟鎹簱寤虹珛榪炴帴
2 鍙戦伮燬QL聽璇彞
3 澶勭悊緇撴灉

鐪嬩簡瀹冪殑浣滅敤,浣犺繕瑙夊緱瀛﹀畠闅懼悧?

Warren.Wu 2006-09-25 10:44 鍙戣〃璇勮
]]>
Ant鐨勫弬鏁拌緭鍏ラ棶棰?/title><link>http://www.tkk7.com/warrenwu/archive/2006/09/22/71360.html</link><dc:creator>Warren.Wu</dc:creator><author>Warren.Wu</author><pubDate>Fri, 22 Sep 2006 09:37:00 GMT</pubDate><guid>http://www.tkk7.com/warrenwu/archive/2006/09/22/71360.html</guid><wfw:comment>http://www.tkk7.com/warrenwu/comments/71360.html</wfw:comment><comments>http://www.tkk7.com/warrenwu/archive/2006/09/22/71360.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.tkk7.com/warrenwu/comments/commentRss/71360.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/warrenwu/services/trackbacks/71360.html</trackback:ping><description><![CDATA[鎴戠殑鎯蟲硶: <br />-------------------------------------- <br />鍦ㄥ懡浠よ鎵ц ant <br />鎵ц瀵笻elloWorld.java鐨勭紪璇?鍗?javac <br />-------------------------------------- <br />鐒跺悗閲嶇偣鏉ュ暒!!! <br />--------------------------------------<br />ant鎵ц澶勪簬絳夊緟.鐩村埌鎴戝湪鍛戒護琛岃緭鍏K鍚? <br />鎵嶅紑濮嬫墽琛?鍗砵ava <br />-------------------------------------- <br /><br />鍓嶅嚑澶╂湁浜嗚繖涓兂娉?澶村ぉ涓婂崍鍦╣oogle涓婃悳浜嗕竴涓婂崍涔熸病鎼滃埌,浜庢槸灝變笉鐫浜?鍐欎簡涓椂闂村歡榪熺殑鍑戝悎鐫搴斾粯宸簨,紜疄鏄お鎳掍簡,鎴戣嚜宸遍兘榪欎箞璁や負,浜庢槸灝卞湪璁哄潧涓婂彂浜嗕釜甯栧瓙絳変漢甯繖瑙e喅,鍛靛懙~~~涓浣?楂樹漢"鎻愰啋淇虹湅ant api, 鍝~~閭e氨渚濈収楂樹漢鎸囩偣鍚?鍙嶆鐪嬬湅涔熸病浠涔堝潖澶?緇撴灉榪樼湡鏄彲浠?鐢ㄧ殑灝辨槸input鏍囩.<br /><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">聽1</span><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff"><?</span><span style="COLOR: #ff00ff">xml聽version="1.0"</span><span style="COLOR: #0000ff">?></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽2</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">聽3</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">project聽</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="firstbuild"</span><span style="COLOR: #ff0000">聽default</span><span style="COLOR: #0000ff">="run"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽4</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">target聽</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="compile"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽5</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">javac聽</span><span style="COLOR: #ff0000">srcdir</span><span style="COLOR: #0000ff">="."</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽6</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">echo</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000">===compilation聽complete!===</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">echo</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽7</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">target</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽8</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽<br /></span><span style="COLOR: #008080">聽9</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">target聽</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="checkok"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">10</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">input聽</span><span style="COLOR: #ff0000">message</span><span style="COLOR: #0000ff">="All聽data聽is聽going聽to聽be聽deleted聽from聽DB聽continue聽(y/n)?"</span><span style="COLOR: #ff0000">聽validargs</span><span style="COLOR: #0000ff">="y,n"</span><span style="COLOR: #ff0000">聽addproperty</span><span style="COLOR: #0000ff">="do.delete"</span><span style="COLOR: #ff0000">聽</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">11</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">condition聽</span><span style="COLOR: #ff0000">property</span><span style="COLOR: #0000ff">="do.abort"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">12</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">equals聽</span><span style="COLOR: #ff0000">arg1</span><span style="COLOR: #0000ff">="n"</span><span style="COLOR: #ff0000">聽arg2</span><span style="COLOR: #0000ff">="${do.delete}"</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">13</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">condition</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">14</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">fail聽</span><span style="COLOR: #ff0000">if</span><span style="COLOR: #0000ff">="do.abort"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000">Build聽aborted聽by聽user.</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">fail</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">15</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">target</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">16</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽<br /></span><span style="COLOR: #008080">17</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">target聽</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="check_time"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">18</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">sleep聽</span><span style="COLOR: #ff0000">seconds</span><span style="COLOR: #0000ff">="30"</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">19</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">target</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">20</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽<br /></span><span style="COLOR: #008080">21</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span><span style="COLOR: #008000"><!--</span><span style="COLOR: #008000">depends="compile"</span><span style="COLOR: #008000">--></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">22</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">target聽</span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="run"</span><span style="COLOR: #ff0000">聽depends</span><span style="COLOR: #0000ff">="checkok"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">23</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">java聽</span><span style="COLOR: #ff0000">classname</span><span style="COLOR: #0000ff">="Test"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">24</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">arg聽</span><span style="COLOR: #ff0000">value</span><span style="COLOR: #0000ff">="a"</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">25</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">classpath</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">26</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">pathelement聽</span><span style="COLOR: #ff0000">path</span><span style="COLOR: #0000ff">="."</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">27</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">classpath</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">28</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">java</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">29</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽<br /></span><span style="COLOR: #008080">30</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">echo</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000">===<img src="http://www.tkk7.com/images/dot.gif" /><img src="http://www.tkk7.com/images/dot.gif" />===</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">echo</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">31</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">target</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">32</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">project</span><span style="COLOR: #0000ff">></span></div><br />搴旂敤:<br /><br />铏界劧緇忔垜浠嬈$殑楠岃瘉,姣曠珶鏄釜欏圭洰,榪樻槸灝忓績涓哄,鎵撳畬鍖呭悗鍐嶉獙璇佷竴嬈″張浣曞Θ鍛?鐜板湪鎴戜滑閮芥槸闆嗕綋寮鍙戦」鐩?褰撶劧tomcat鏈嶅姟鍣ㄤ篃涓嶅彲鑳芥槸浣犵殑鏈満,閭e氨鐗墊壇鍒頒笂浼犱簡.榪欎釜涓滆タ鍙互鐢ㄦ潵瀵歸」鐩墦鍖呭悗榪涜浜哄伐楠岃瘉, 褰撶‘璁ゆ棤璇悗,杈撳叆鍙傛暟y灝卞彲浠ュ皢鎴戜滑鐨勯」鐩笂浼犱簡.浠ュ墠鎴戜滑鐨勯」鐩兘鏄痑nt鍚庣敤scp鏉ヤ紶,濡傛灉鎵撶増鏈殑浜轟笉鍦?鍏朵粬浜哄氨鍙兘騫茬潃鎬?榪欎笅鎴戜笉鍦ㄤ篃鏃犳墍璋撲簡.鍝堝搱~~~鐜板湪鐨勯」鐩彧瑕佷竴涓猘nt鍛戒護涓鍒囩殑涓鍒囧叏閮ㄦ悶瀹?<img src ="http://www.tkk7.com/warrenwu/aggbug/71360.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/warrenwu/" target="_blank">Warren.Wu</a> 2006-09-22 17:37 <a href="http://www.tkk7.com/warrenwu/archive/2006/09/22/71360.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>DOM緙栫▼璇﹁Вhttp://www.tkk7.com/warrenwu/archive/2006/09/22/71328.htmlWarren.WuWarren.WuFri, 22 Sep 2006 07:14:00 GMThttp://www.tkk7.com/warrenwu/archive/2006/09/22/71328.htmlhttp://www.tkk7.com/warrenwu/comments/71328.htmlhttp://www.tkk7.com/warrenwu/archive/2006/09/22/71328.html#Feedback0http://www.tkk7.com/warrenwu/comments/commentRss/71328.htmlhttp://www.tkk7.com/warrenwu/services/trackbacks/71328.html
浠un鍏徃鐨凧AXP涓轟緥鏉ョ湅鐪嬪叾涓拰DOM鐩稿叧鐨勫寘:

DOM鍖呯粨鏋?br />
銆銆 org.w3c.com錛氬畾涔変簡DOM鐨勬帴鍙c傝繖鏄痺3c鎵鎸囧埗瀹氱殑DOM瑙勮寖錛屽洜涓篋OM瑙勮寖鏄笌璇█鏃犲叧鐨勶紝鍥犺屽叾涓彧鏄畾涔変簡鎺ュ彛錛岃屾病鏈夊疄鐜頒換浣曞湴綾匯備換浣曞叿浣撶殑DOM瀹炵幇闇瑕佹湁鍏跺畠鐨勭被搴撶粰鍑恒?br />
銆銆 javax.xml.parser錛氬畾涔変簡DocumentBuilderFactory綾籇ocumentBuilder綾匯傜紪紼嬫椂鐢―ocumentBuilderFactory鏉ョ敓鎴愪竴涓叿浣撶殑鍜屽叿浣撶殑綾誨簱鐩歌仈緋葷殑DocumentBuilder綾葷殑瀹炰緥錛岀劧鍚庡啀鐢辮繖涓狣ocumentBuilder瀵硅薄鏉ョ敓鎴愪竴涓狣ocument瀹炰緥銆侱ocument瀵硅薄涓氨鍖呭惈浜咲OM鐨勬爲妯″瀷緇撴瀯錛屾槸DOM妯″瀷鐨勬牴銆傚悓SAXParserFactory涓鏍鳳紝鍏蜂綋鐨凞ocumentBuilder瀵硅薄鐨勫緩绔嬶紝鍙栧喅浜庝竴涓幆澧冨彉閲廽avax.xml.parsers.DocumentBuilderFactory鐨勫鹼紝鍚屾牱鐨勶紝涔熷彲浠ョ洿鎺ユ妸綾誨悕浼犻掔粰DocumentBuilderFactory鏉ュ緩绔嬩竴涓狣ocumentBuilder銆?br />
銆銆 com.sun.xml.tree錛歋un鐨凧ava XML鐨凞OM瀹炵幇錛屼粬瀵規爣鍑嗙殑DOM鎻愪緵浜嗕竴浜涙墿灞曪紝鍏朵腑澶ч儴鍒嗙殑涓滆タ騫朵笉鏄疍OM鏍囧噯銆傚寘鎷簡XMLDocument錛孍lementNode, XMLDocumentBuilder鍜孴reeWalker絳夌被銆俋MLDocument綾誨疄鐜頒簡DOM鐨凞ocument鐣岄潰錛屽畠鍚屾牱涔熸彁渚涗簡闈欐佺殑宸ュ巶鏂規硶鏉ュ緩绔嬩竴涓狣ocument瀵硅薄銆侲lementNode綾諱唬琛ㄤ簡鍦ㄤ竴涓狣OM鏍戜腑鐨勬瘡涓涓妭鐐瑰厓绱狅紝騫朵笖瀹冪粡甯歌緇ф壙錛屾潵瀹炵幇涓浜涜嚜瀹氱殑鍔熻兘銆?鑰孹MLDocumentBuilder瀹為檯涓婃槸涓涓狣ocumentHandler綾誨瀷鐨勭被錛屼篃灝辨槸璇達紝瀹冩帴鍙椾竴涓猄AX瑙f瀽鍣ㄤ紶閫掕繃鏉ョ殑浜嬩歡錛岀劧鍚庢牴鎹繖浜涗簨浠舵潵鍦ㄥ唴瀛樹腑寤虹珛涓涓狣OM妯″瀷銆?br />
DOM澶勭悊榪囩▼

銆銆 DOM鐨勫鐞嗚繃紼嬬浉瀵筍AX鑰岃█瑕佺畝鍗曚簺錛屽厛鐢―ocumentBuilderFactory鐨勯潤鎬佹柟娉昻ewInstance()寤虹珛涓涓狣ocumentBuilderFactory鐨勫疄渚嬶紝鐒跺悗鐢ㄥ畠鐨刵ewDocumentBuilder()鏂規硶寤虹珛涓涓狣ocumentBuilder銆傜劧鍚庡彲浠ョ敤DocumentBuilder鐨刾arser()鏂規硶鏉ヨВ鏋愪竴涓猉ML鏂囨。騫跺緩绔婦OM妯″瀷銆傚湪JAXP涓繕鎻愪緵浜嗘洿涓烘柟渚跨殑鍔熻兘鎵╁睍錛屽氨鏄嬌鐢╔MLDocument銆備綘鍙互涓轟竴涓猄AX瑙f瀽鍣ㄦ敞鍐屼竴涓簨浠跺鐞嗗櫒XMLDocumentBuilder錛屽湪瑙f瀽榪囧悗錛屽彲浠ヨ皟鐢╔MLDocumentBuilder鐨刧etDocument()鏂規硶灝卞彲浠ユ妸涓涓鍦ㄥ湴XML鏂囨。杞崲鎴愪竴涓唴瀛樹腑鐨凞OM鏍戜簡錛屽茍鐢熸垚涓涓狣ocument(XMLDocument)瀵硅薄錛屽悗闈㈢殑宸ヤ綔錛屽氨鏄皟鐢╔MLDocument瀵硅薄鍜孍lementNode瀵硅薄鐨勫悇涓柟娉曟潵瀵笵OM鏍戣繘琛屾搷浣滀簡銆傛渶鍚庯紝榪樺彲浠ヨ皟鐢╔MLDocument鐨剋irte()鏂規硶鏉ユ妸DOM鏍戣緭鍑轟負XML鏂囦歡銆傚洜涓哄湪鏍囧噯鐨凞OM妯″瀷涓茍娌℃湁鎻愪緵涓巜rite()鐩哥被浼肩殑鏂規硶錛屾墍浠ヨ澶勭悊杈撳嚭鐨勮瘽錛岀敤XMLDocument浼氭洿鏂逛究浜涖?br />
瀹炰緥DOM

銆銆 涓嬮潰鎴戜滑鍙互鏉ョ湅鐪嬩緥瀛愪簡銆?br />
棣栧厛褰撶劧鏄痠mport璇彞錛?br />

import javax.xml.parsers.DocumentBuilderFactory;銆

import javax.xml.parsers.FactoryConfigurationError;銆

import javax.xml.parsers.ParserConfigurationException;

import javax.xml.parsers.DocumentBuilder;
銆銆 涓轟簡鑳界粰浣犳洿澶氱殑鍗拌薄錛屾垜璇︾粏鍐呭嚭浜嗘墍鏈夌殑綾伙紝瀹為檯涓婁綘鍙渶瑕佷竴鍙ュ氨鍙互浜嗭細

import javax.xml.parsers.*;

浣犺繕闇瑕佺殑鏄疻3C瀵笵OM鍜孌OM渚嬪鐨勫畾涔夛細

import org.w3c.dom.Document; import org.w3c.dom.DOMException;
榪樻湁涓浜涘叾浠栫殑鐢ㄦ潵榪涜渚嬪鍜孖/O澶勭悊鐨勭被錛?br />

import org.xml.sax.SAXException;銆

import org.xml.sax.SAXParseException;

import java.io.File;

import java.io.IOException;



鍥犱負瑕佽緭鍑篨ML鏂囨。錛屾墍浠ヨ繕瑕佸紩鍏MLDocument錛?br />


import com.sun.xml.tree.XmlDocument;銆

public class DomEcho{



鍦ㄧ▼搴忛昏緫涓紝鍥犱負瑕佸鐞咲OM妯″瀷錛屾墍浠ュ綋鐒墮鍏堝簲璇ョ敵鏄庝竴涓狣ocument瀵硅薄錛?br />


static Document document;

public static void main (String argv [])

{

if (argv.length != 1) {

銆銆銆銆銆銆銆銆銆銆銆 System.err.println ("Usage: java DomEcho filename";

銆銆銆銆銆銆銆銆銆銆銆 System.exit (1);

銆銆銆銆銆銆銆 }
銆銆 鐢―ocumentBuilderFactory綾葷殑闈欐佹柟娉昻ewInstance()鏉ュ垱寤轟竴涓伐鍘傚疄渚嬶紝涔嬫墍浠ョО涓哄伐鍘傦紝鏄敱浜庡啀榪欏効搴旂敤鍒頒簡璁捐妯″紡錛圖esign Pattern錛変腑鐨勫伐鍘傛ā寮忥紝瀹為檯涓婂湪Java綾誨簱涓璁℃ā寮忕殑鑼冧緥闅忓鍙錛屽鏋滆兘澶熷璁捐妯″紡鏈変竴浜涗簡瑙o紝灝變細寰堝鏄撲負Java搴炴潅鐨勭被搴撶悊鍑轟竴鏉℃潯鑴夌粶鍒嗘槑鐨勭粡綰褲?
銆銆銆銆銆銆銆 DocumentBuilderFactory factory =

銆銆銆銆銆銆 銆銆銆銆DocumentBuilderFactory.newInstance();

銆銆銆銆銆銆銆 try {

銆銆銆銆銆銆銆銆銆銆 DocumentBuilder builder = factory.newDocumentBuilder();

銆銆銆銆銆銆銆銆銆銆 document = builder.parse( new File(argv[0]) );
銆銆 鍓嶉潰璇磋繃錛孌OM鏍囧噯妯″瀷涓茍娌℃湁瀹氫箟杈撳嚭鐨勬帴鍙o紝鍥犺屽鏋滈渶瑕佽繘琛屾枃妗h緭鍑虹殑璇濓紝灝遍渶瑕佺敤鍒癑AXP鐨勬墿灞曪紝浣跨敤鍒癤mlDocument銆傝繖鍎挎湁涓涓緝涓虹畝渚跨殑鏂規硶錛屽氨鏄敤寮哄埗綾誨瀷杞崲錛屾妸涓涓狣ocument綾昏漿鎹㈡垚XmlDocument錛岀劧鍚庯紝灝卞彲浠ヤ嬌鐢╔mlDocument鐨剋rite()鏂規硶浜?
銆銆銆銆銆銆銆銆銆銆 XmlDocument xdoc = (XmlDocument) document;

銆銆銆銆銆銆銆銆銆銆 xdoc.write (System.out);
銆銆 鍦ㄥ悗闈㈢殑閮芥槸渚嬪鐨勫鐞嗕簡錛屽湪DOM涓櫧鐒舵湁瀹氫箟浜咲OMException錛屼絾鏄疍OMException鍙槸鐢ㄥ湪閬嶅巻鍜屾搷浣淒OM鏍戞椂寮曞彂鐨勪緥澶栥傚湪瑙f瀽鏂囨。鍜屽垵濮嬪寲瑙f瀽鍣ㄦ椂鎵寮曞彂鐨勪緥澶栵紝榪樻槸鍊熷姪浜嶴AX涓殑渚嬪澶勭悊鏂規硶錛屼互浣跨▼搴忎笂鍏鋒湁涓鑷存э細

銆銆銆銆銆銆銆 } catch (SAXParseException spe) {

銆銆銆銆銆銆銆 銆銆銆銆銆// 澶勭悊瑙f瀽榪囩▼涓敓鎴愮殑渚嬪

銆銆銆銆銆銆銆銆銆銆 System.out.println ("\n** Parsing error"

銆銆銆銆銆銆銆銆銆銆銆銆銆銆+ ", line " + spe.getLineNumber ()

銆銆銆銆銆銆銆銆銆銆銆銆銆 + ", uri " + spe.getSystemId ());

銆銆銆銆銆銆 銆銆銆銆System.out.println("銆銆 " + spe.getMessage() );

銆銆銆銆銆銆銆銆銆銆 Exception銆 x = spe;

銆銆銆銆銆銆銆銆銆銆 if (spe.getException() != null)

銆銆銆銆銆銆銆銆銆銆銆銆銆銆 x = spe.getException();

銆銆銆銆銆銆銆銆銆銆 x.printStackTrace();

銆銆銆銆銆銆銆 } catch (SAXException sxe) {

銆銆銆銆銆銆銆銆銆銆 // 澶勭悊涓鑸殑紼嬪簭渚嬪鎴栬呰В鏋愬櫒鍒濆鍖栨椂寮曞彂鐨勪緥澶?br />
銆銆銆銆銆銆銆銆銆銆 Exception銆 x = sxe;

銆銆銆銆銆銆銆銆銆銆 if (sxe.getException() != null)

銆銆銆銆銆銆銆銆銆銆銆銆銆銆 x = sxe.getException();

銆銆銆銆銆銆銆銆銆銆 x.printStackTrace();

銆銆銆銆銆銆銆 } catch (IOException ioe) {

銆銆銆銆銆銆銆銆銆銆 // IO渚嬪

銆銆銆銆銆銆銆銆銆銆 ioe.printStackTrace();

銆銆銆銆銆銆 銆}

銆銆銆 }

銆銆 榪欒屽DOM璁茬殑姣旇緝綆鐣ワ紝浣嗘槸鍩烘湰鐨勭▼搴忕粨鏋勬垜浠凡緇忓彲浠ヤ粠涓湅鍑烘潵浜嗐?/span>


Warren.Wu 2006-09-22 15:14 鍙戣〃璇勮
]]>
瀛楃涓插垎鍓?/title><link>http://www.tkk7.com/warrenwu/archive/2006/09/22/71258.html</link><dc:creator>Warren.Wu</dc:creator><author>Warren.Wu</author><pubDate>Fri, 22 Sep 2006 02:26:00 GMT</pubDate><guid>http://www.tkk7.com/warrenwu/archive/2006/09/22/71258.html</guid><wfw:comment>http://www.tkk7.com/warrenwu/comments/71258.html</wfw:comment><comments>http://www.tkk7.com/warrenwu/archive/2006/09/22/71258.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/warrenwu/comments/commentRss/71258.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/warrenwu/services/trackbacks/71258.html</trackback:ping><description><![CDATA[ <font size="1">1.String.split()<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">1</span><img id="Codehighlighter1_31_181_Open_Image" onclick="this.style.display='none'; Codehighlighter1_31_181_Open_Text.style.display='none'; Codehighlighter1_31_181_Closed_Image.style.display='inline'; Codehighlighter1_31_181_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_31_181_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_31_181_Closed_Text.style.display='none'; Codehighlighter1_31_181_Open_Image.style.display='inline'; Codehighlighter1_31_181_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽testSplit()聽</span><span id="Codehighlighter1_31_181_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_31_181_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">2</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽String聽str聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">1.a.3</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">3</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽String[]聽strArray聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽str.split(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\\.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">4</span><span style="COLOR: #000000"><img id="Codehighlighter1_138_178_Open_Image" onclick="this.style.display='none'; Codehighlighter1_138_178_Open_Text.style.display='none'; Codehighlighter1_138_178_Closed_Image.style.display='inline'; Codehighlighter1_138_178_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_138_178_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_138_178_Closed_Text.style.display='none'; Codehighlighter1_138_178_Open_Image.style.display='inline'; Codehighlighter1_138_178_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽</span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;聽i</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">strArray.length;聽i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)聽</span><span id="Codehighlighter1_138_178_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_138_178_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">5</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽System.out.println(strArray[i]);<br /></span><span style="COLOR: #008080">6</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">7</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />聽}</span></span></div></font> <br /> <font size="1">2.StringTokenizer<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">1</span><img id="Codehighlighter1_35_233_Open_Image" onclick="this.style.display='none'; Codehighlighter1_35_233_Open_Text.style.display='none'; Codehighlighter1_35_233_Closed_Image.style.display='inline'; Codehighlighter1_35_233_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_35_233_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_35_233_Closed_Text.style.display='none'; Codehighlighter1_35_233_Open_Image.style.display='inline'; Codehighlighter1_35_233_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽testTokenizer()聽</span><span id="Codehighlighter1_35_233_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_35_233_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">2</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽String聽str聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">1.a.3</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">3</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽StringTokenizer聽strTokenizer聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽StringTokenizer(str,聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">4</span><span style="COLOR: #000000"><img id="Codehighlighter1_177_230_Open_Image" onclick="this.style.display='none'; Codehighlighter1_177_230_Open_Text.style.display='none'; Codehighlighter1_177_230_Closed_Image.style.display='inline'; Codehighlighter1_177_230_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_177_230_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_177_230_Closed_Text.style.display='none'; Codehighlighter1_177_230_Open_Image.style.display='inline'; Codehighlighter1_177_230_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(strTokenizer.hasMoreTokens())聽</span><span id="Codehighlighter1_177_230_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_177_230_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">5</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽System.out.println(strTokenizer.nextToken());<br /></span><span style="COLOR: #008080">6</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽聽聽聽聽}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">7</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />聽聽聽聽}</span></span></div></font> <br />OK.<br /><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">聽1</span><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff">package</span><span style="COLOR: #000000">聽test;<br /></span><span style="COLOR: #008080">聽2</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">聽3</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽java.util.StringTokenizer;<br /></span><span style="COLOR: #008080">聽4</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /></span><span style="COLOR: #008080">聽5</span><span style="COLOR: #000000"><img id="Codehighlighter1_79_600_Open_Image" onclick="this.style.display='none'; Codehighlighter1_79_600_Open_Text.style.display='none'; Codehighlighter1_79_600_Closed_Image.style.display='inline'; Codehighlighter1_79_600_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_79_600_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_79_600_Closed_Text.style.display='none'; Codehighlighter1_79_600_Open_Image.style.display='inline'; Codehighlighter1_79_600_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽TestStringSplit聽</span><span id="Codehighlighter1_79_600_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_79_600_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">聽6</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽String聽str聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">1.a.3</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">聽7</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽<br /></span><span style="COLOR: #008080">聽8</span><span style="COLOR: #000000"><img id="Codehighlighter1_145_271_Open_Image" onclick="this.style.display='none'; Codehighlighter1_145_271_Open_Text.style.display='none'; Codehighlighter1_145_271_Closed_Image.style.display='inline'; Codehighlighter1_145_271_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_145_271_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_145_271_Closed_Text.style.display='none'; Codehighlighter1_145_271_Open_Image.style.display='inline'; Codehighlighter1_145_271_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽testSplit()聽</span><span id="Codehighlighter1_145_271_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_145_271_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">聽9</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽String[]聽strArray聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽str.split(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\\.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">10</span><span style="COLOR: #000000"><img id="Codehighlighter1_228_268_Open_Image" onclick="this.style.display='none'; Codehighlighter1_228_268_Open_Text.style.display='none'; Codehighlighter1_228_268_Closed_Image.style.display='inline'; Codehighlighter1_228_268_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_228_268_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_228_268_Closed_Text.style.display='none'; Codehighlighter1_228_268_Open_Image.style.display='inline'; Codehighlighter1_228_268_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;聽i</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">strArray.length;聽i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)聽</span><span id="Codehighlighter1_228_268_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_228_268_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">11</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽System.out.println(strArray[i]);<br /></span><span style="COLOR: #008080">12</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽聽聽聽聽}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">13</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">14</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽<br /></span><span style="COLOR: #008080">15</span><span style="COLOR: #000000"><img id="Codehighlighter1_311_471_Open_Image" onclick="this.style.display='none'; Codehighlighter1_311_471_Open_Text.style.display='none'; Codehighlighter1_311_471_Closed_Image.style.display='inline'; Codehighlighter1_311_471_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_311_471_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_311_471_Closed_Text.style.display='none'; Codehighlighter1_311_471_Open_Image.style.display='inline'; Codehighlighter1_311_471_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽testTokenizer()聽</span><span id="Codehighlighter1_311_471_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_311_471_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">16</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽StringTokenizer聽strTokenizer聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽StringTokenizer(str,聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">.</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">17</span><span style="COLOR: #000000"><img id="Codehighlighter1_415_468_Open_Image" onclick="this.style.display='none'; Codehighlighter1_415_468_Open_Text.style.display='none'; Codehighlighter1_415_468_Closed_Image.style.display='inline'; Codehighlighter1_415_468_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_415_468_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_415_468_Closed_Text.style.display='none'; Codehighlighter1_415_468_Open_Image.style.display='inline'; Codehighlighter1_415_468_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(strTokenizer.hasMoreTokens())聽</span><span id="Codehighlighter1_415_468_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_415_468_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">18</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽System.out.println(strTokenizer.nextToken());<br /></span><span style="COLOR: #008080">19</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽聽聽聽聽}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">20</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">21</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽<br /></span><span style="COLOR: #008080">22</span><span style="COLOR: #000000"><img id="Codehighlighter1_515_598_Open_Image" onclick="this.style.display='none'; Codehighlighter1_515_598_Open_Text.style.display='none'; Codehighlighter1_515_598_Closed_Image.style.display='inline'; Codehighlighter1_515_598_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_515_598_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_515_598_Closed_Text.style.display='none'; Codehighlighter1_515_598_Open_Image.style.display='inline'; Codehighlighter1_515_598_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽main(String[]聽args)聽</span><span id="Codehighlighter1_515_598_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_515_598_Open_Text"><span style="COLOR: #000000">{<br /></span><span style="COLOR: #008080">23</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽testSplit();<br /></span><span style="COLOR: #008080">24</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽System.out.println(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">====================</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">25</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽testTokenizer();<br /></span><span style="COLOR: #008080">26</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">27</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">28</span><span style="COLOR: #000000"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span></div><img src ="http://www.tkk7.com/warrenwu/aggbug/71258.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/warrenwu/" target="_blank">Warren.Wu</a> 2006-09-22 10:26 <a href="http://www.tkk7.com/warrenwu/archive/2006/09/22/71258.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://cpsc-test.com" target="_blank">人人狠狠综合久久亚洲88</a>| <a href="http://zbr555sina.com" target="_blank">亚洲人成毛片线播放</a>| <a href="http://6006769.com" target="_blank">免费女人高潮流视频在线观看</a>| <a href="http://wwwwmmmm.com" target="_blank">亚洲视频免费在线播放</a>| <a href="http://ccc16938.com" target="_blank">日韩精品无码区免费专区</a>| <a href="http://ztsf6688.com" target="_blank">色吊丝免费观看网站</a>| <a href="http://lidajc.com" target="_blank">亚洲国产精品VA在线看黑人</a>| <a href="http://www779rr.com" target="_blank">人禽杂交18禁网站免费</a>| <a href="http://580jp.com" target="_blank">四虎影视永久在线精品免费</a>| <a href="http://nh-car.com" target="_blank">亚洲国产综合91精品麻豆</a>| <a href="http://tvnxl.com" target="_blank">日本牲交大片免费观看</a>| <a href="http://ddm88888.com" target="_blank">久久国产免费观看精品</a>| <a href="http://meinvtaotu.com" target="_blank">亚洲欧美日韩综合久久久久</a>| <a href="http://my55572.com" target="_blank">亚洲αv在线精品糸列</a>| <a href="http://my533.com" target="_blank">免费看的黄色大片</a>| <a href="http://mmm19.com" target="_blank">无码av免费网站</a>| <a href="http://bjycxy88.com" target="_blank">美女无遮挡免费视频网站</a>| <a href="http://449892.com" target="_blank">久久亚洲AV无码精品色午夜</a>| <a href="http://hnmxld.com" target="_blank">又粗又黄又猛又爽大片免费</a>| <a href="http://av56cc.com" target="_blank">最近中文字幕大全中文字幕免费</a>| <a href="http://519vip.com" target="_blank">国产精品亚洲一区二区三区久久</a>| <a href="http://szzrjk.com" target="_blank">久久精品国产亚洲77777</a>| <a href="http://lzhuiding.com" target="_blank">亚洲成AV人在线观看网址</a>| <a href="http://ccc16938.com" target="_blank">2021国内精品久久久久精免费</a>| <a href="http://ocn888.com" target="_blank">人妖系列免费网站观看</a>| <a href="http://meiluniao.com" target="_blank">亚洲福利秒拍一区二区</a>| <a href="http://livejimmy.com" target="_blank">激情97综合亚洲色婷婷五</a>| <a href="http://5s6b.com" target="_blank">全免费一级午夜毛片</a>| <a href="http://wlamyx.com" target="_blank">67pao强力打造国产免费</a>| <a href="http://shguojing.com" target="_blank">成在线人视频免费视频</a>| <a href="http://xww678.com" target="_blank">欧美激情综合亚洲一二区</a>| <a href="http://gujingyuye.com" target="_blank">亚洲精品无码久久毛片波多野吉衣</a>| <a href="http://www611rr.com" target="_blank">国产精品xxxx国产喷水亚洲国产精品无码久久一区 </a>| <a href="http://wwwav800.com" target="_blank">亚洲bt加勒比一区二区</a>| <a href="http://dajiaody.com" target="_blank">国产又大又黑又粗免费视频</a>| <a href="http://eee94.com" target="_blank">30岁的女人韩剧免费观看</a>| <a href="http://chaoxung.com" target="_blank">a级毛片免费播放</a>| <a href="http://142121.com" target="_blank">又黄又大的激情视频在线观看免费视频社区在线 </a>| <a href="http://jiggybaby.com" target="_blank">av在线亚洲欧洲日产一区二区</a>| <a href="http://pecbj.com" target="_blank">在线观看视频免费国语</a>| <a href="http://yjszhukao.com" target="_blank">最近中文字幕完整免费视频ww </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>