锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲成色在线影院,亚洲网红精品大秀在线观看 ,国产91成人精品亚洲精品http://m.tkk7.com/patterns/鍒漢絎戞垜蹇掔柉鐧紝鎴戠瑧鍒漢鐪嬩笉絀?.. zh-cnMon, 12 May 2025 13:00:15 GMTMon, 12 May 2025 13:00:15 GMT60鎸佺畫灞傚璞$殑hashCode鍜宔quals鏂規硶http://m.tkk7.com/patterns/archive/2007/01/13/po_hashCode_equals.html閲庤崏閲庤崏Sat, 13 Jan 2007 11:13:00 GMThttp://m.tkk7.com/patterns/archive/2007/01/13/po_hashCode_equals.htmlhttp://m.tkk7.com/patterns/comments/93630.htmlhttp://m.tkk7.com/patterns/archive/2007/01/13/po_hashCode_equals.html#Feedback1http://m.tkk7.com/patterns/comments/commentRss/93630.htmlhttp://m.tkk7.com/patterns/services/trackbacks/93630.html

浣跨敤 hibernate 蹇竴騫翠簡錛屼竴鐩翠嬌鐢ㄥ緱姣旇緝鑲ゆ祬錛岀敋鑷蟲病鏈夋寮忎嬌鐢ㄨ繃瀵硅薄鍏崇郴銆傝繎孌墊椂闂存兂娣卞叆鐮旂┒涓涓嬶紝浠ヤ究鍦ㄩ」鐩腑鎺ㄥ箍錛屽噺灝戜笉蹇呰鐨勫璞$淮鎶ゅ拰緙栫▼銆傞棶棰樹笉鏈熻岄亣錛屽湪澶氬澶氬叧緋諱腑錛屽嚭鐜頒簡閫掕鍔犺澆鐨勭幇璞★紝渚嬪錛氱敤鎴峰拰瑙掕壊鐨勫叧緋伙紝涓涓敤鎴峰彲鑳芥湁澶氫釜瑙掕壊錛屼竴涓鑹蹭腑鍖呭惈澶氫釜鐢ㄦ埛銆傛垜鏄氳繃甯︽湁榪炴帴琛ㄧ殑澶氬澶氬叧緋誨疄鐜扮殑錛岀敤鎴峰拰瑙掕壊瀵硅薄涓兘緇存寔浜嗕竴涓?/span> Set 瀵硅薄錛岀敤浠ュ歡榪熷姞杞藉叧緋匯備絾鏄紝鍦ㄦ垜寤惰繜鍔犺澆鐢ㄦ埛鎷ユ湁鐨勮鑹叉椂錛岃鍔犺澆鐨勮鑹插張鍔犺澆瀹冩墍鍖呭惈鐨勭敤鎴鳳紝琚姞杞界殑鐢ㄦ埛鍙堝姞杞芥墍鎷ユ湁鐨勮鑹詫紝榪欐牱閫掕鍔犺澆涓嬪幓錛岀敱浜?/span> session 鐨勫叧闂細鎶涘嚭寮傚父瀵艱嚧紼嬪簭涓銆傚紑濮嬬櫨鎬濅笉寰楀叾瑙o紝鍦ㄤ粩緇嗘煡鐪嬫姏鍑虹殑寮傚父鍫嗘爤鏃訛紝緇堜簬鍙戠幇浜嗛棶棰樻墍鍦ㄣ備範鎯紒閿欒鐨勪範鎯傛垜浠墍浣跨敤鐨勬寔緇眰瀵硅薄浼氱戶鎵夸竴涓熀紜綾伙紝璇ョ被鈥滃疄鐜扳濅簡 hashCode 鍜?/span> equals 鏂規硶錛屼唬鐮佸涓嬶細

public boolean equals(Object o) {

聽聽聽 return EqualsBuilder.reflectionEquals(this, o);

}

public int hashCode() {

return HashCodeBuilder.reflectionHashCode(this);

}

hibernate 灝嗙敤鎴鋒墍鎷ユ湁鐨勮鑹插璞℃斁榪?/span> Set 涓紝瀹為檯 Set 浼氳皟鐢?/span> hashCode 鍜?/span> equals 鏉ュ垽鏂袱涓璞℃槸鍚︾浉絳夛紝榪欐牱闂灝辨潵浜嗭紝 HashCodeBuilder.reflectionHashCode(this) 鏂規硶浣跨敤鍙嶅皠璋冪敤瑙掕壊瀵硅薄鐨?/span> getUsers() 鏂規硶錛?/span> hibernate 鍙堝姞杞借鑹叉墍鍖呭惈鐨勭敤鎴鳳紝鑳芥病鏈夐棶棰樺悧錛熺戶鑰屾垜浠緱鍙嶆濅竴涓嬫寔緇眰瀵硅薄鏈夋病鏈夐氱敤鐨?/span> hashCode 鍜?/span> equals 鏂規硶銆?/span>

聽聽聽聽聽聽 鍙傝冦婃繁鍏ユ祬鍑?/span> Hibernate 銆嬪 hashCode 鍜?/span> equals 鏂規硶鐨勫鐞嗘湁涓ゅぇ縐嶏細

1銆?span style="FONT: 7pt 'Times New Roman'">聽 涓嶈鐩?/span>

闂錛氬疄浣撳璞$殑璺?/span> session 璇嗗埆闂錛屾牴鏈湪浜?/span> hashCode 榛樿璋冪敤 System.identityHashCode() 鏂規硶銆?/span>

2銆?span style="FONT: 7pt 'Times New Roman'">聽 瑕嗙洊

聽聽聽聽聽聽聽聽 浣跨敤瀵硅薄 pk

闂錛氭柊澧炲璞℃椂錛屾病鏈?/span> pk 錛岄偅涔堟墍鏈夌殑瀵硅薄閮界浉絳変簡錛屼篃灝辨槸鍙兘鍔犲叆鐨勪竴鏉°?/span>

聽聽聽聽聽聽聽聽 鍊兼瘮瀵癸紙瀵瑰疄浣撳璞$殑鎵鏈夊睘鎬у艱繘琛屾瘮瀵癸紝鍙互浣跨敤 Commonclipse 鑷姩鐢熸垚錛?/span>

闂錛氳繃浜庝弗鏍箋?/font>

聽聽聽聽聽聽聽聽 涓氬姟鍏抽敭淇℃伅鍒ゅ畾

鏄兼瘮瀵圭殑涓涓瓙闆嗭紝鍙仛涓氬姟鍏抽敭灞炴х殑姣斿銆?/font>

涓漢瑙夊緱涓氬姟鍏抽敭淇℃伅鍒ゅ畾鐨勬柟娉曟瘮杈冨悎鐞嗭紝浣跨敤 Commonclipse 鑷姩鐢熸垚鍊兼瘮瀵癸紝娉ㄦ剰涓ょ偣錛?/span>

1銆?span style="FONT: 7pt 'Times New Roman'">聽 鍘繪帀瀹炰綋鍏寵仈闆嗗悎灞炴х殑姣斿錛屼笉鐒跺張浼氬嚭鐜版垜涓婅堪鐨勨滈掕鍔犺澆鈥濈幇璞°?/span>

2銆?span style="FONT: 7pt 'Times New Roman'">聽 鑷姩鐢熸垚鐨?/span> hashCode 鏂規硶鍘繪帀 appendSuper(super.hashCode()) 錛岃嚜鍔ㄧ敓鎴愮殑 equals 鏂規硶鍘繪帀 appendSuper(super.equals(object)) 錛屼笉鐒朵綘鐨勫璞℃瘮杈冨拰鍔犲叆 collection 閮芥湁闂鐨勶紝銆婃繁鍏ユ祬鍑?/span> Hibernate 銆嬩功涓病鏈夊己璋冦?/span>



閲庤崏 2007-01-13 19:13 鍙戣〃璇勮
]]>
濡備綍鎶奌ibernate2.1鍗囩駭鍒癏ibernate3.0 http://m.tkk7.com/patterns/archive/2006/12/30/hibernate2_1_to_hibernate3.html閲庤崏閲庤崏Sat, 30 Dec 2006 01:37:00 GMThttp://m.tkk7.com/patterns/archive/2006/12/30/hibernate2_1_to_hibernate3.htmlhttp://m.tkk7.com/patterns/comments/90941.htmlhttp://m.tkk7.com/patterns/archive/2006/12/30/hibernate2_1_to_hibernate3.html#Feedback0http://m.tkk7.com/patterns/comments/commentRss/90941.htmlhttp://m.tkk7.com/patterns/services/trackbacks/90941.html 1.1 Hibernate API 鍙樺寲
1.1.1 鍖呭悕
1.1.2 org.hibernate.classic鍖?
1.1.3 Hibernate鎵渚濊禆鐨勭涓夋柟杞歡鍖?
1.1.4 寮傚父妯″瀷
1.1.5 Session鎺ュ彛
1.1.6 createSQLQuery()
1.1.7 Lifecycle 鍜?Validatable 鎺ュ彛
1.1.8 Interceptor鎺ュ彛
1.1.9 UserType鍜孋ompositeUserType鎺ュ彛
1.1.10 FetchMode綾?
1.1.11 PersistentEnum綾?
1.1.12 瀵笲lob 鍜孋lob鐨勬敮鎸?
1.1.13 Hibernate涓緵鎵╁睍鐨凙PI鐨勫彉鍖?
1.2 鍏冩暟鎹殑鍙樺寲
1.2.1 媯绱㈢瓥鐣?
1.2.2 瀵硅薄鏍囪瘑絎︾殑鏄犲皠
1.2.3 闆嗗悎鏄犲皠
1.2.4 DTD
1.3 鏌ヨ璇彞鐨勫彉鍖?
1.3.1 indices()鍜宔lements()鍑芥暟

灝界Hibernate 3.0 涓嶩ibernate2.1鐨勬簮浠g爜鏄笉鍏煎鐨勶紝浣嗘槸褰揌ibernate寮鍙戝皬緇勫湪璁捐Hibernate3.0鏃訛紝涓虹畝鍖栧崌綰ibernate鐗堟湰浣滀簡鍛ㄥ埌鐨勮冭檻銆傚浜庣幇鏈夌殑鍩轟簬Hibernate2.1鐨凧ava欏圭洰錛屽彲浠ュ緢鏂逛究鐨勬妸瀹冨崌綰у埌Hibernate3.0銆?/font>

鏈枃鎻忚堪浜咹ibernate3.0鐗堟湰鐨勬柊鍙樺寲錛孒ibernate3.0鐗堟湰鐨勫彉鍖栧寘鎷笁涓柟闈細
錛?錛堿PI鐨勫彉鍖栵紝瀹冨皢褰卞搷鍒癑ava紼嬪簭浠g爜銆?br />錛?錛夊厓鏁版嵁錛屽畠灝嗗獎鍝嶅埌瀵硅薄-鍏崇郴鏄犲皠鏂囦歡銆?br />錛?錛塇QL鏌ヨ璇彞銆?/font>

鍊煎緱娉ㄦ剰鐨勬槸錛?Hibernate3.0騫朵笉浼氬畬鍏ㄥ彇浠ibernate2.1銆傚湪鍚屼竴涓簲鐢ㄧ▼搴忎腑錛屽厑璁窰ibernate3.0鍜孒ibernate2.1騫跺瓨銆?/font>

1.1 Hibernate API 鍙樺寲

1.1.1 鍖呭悕

Hibernate3.0鐨勫寘鐨勬牴璺緞涓? 鈥渙rg.hibernate鈥?錛岃屽湪Hibernate2.1涓負鈥渘et.sf.hibernate鈥濄傝繖涓鍛藉悕鍙樺寲浣垮緱Hibernate2.1鍜孒ibernate3.0鑳藉鍚屾椂鍦ㄥ悓涓涓簲鐢ㄧ▼搴忎腑榪愯銆?/font>

濡傛灉甯屾湜鎶婂凡鏈夌殑搴旂敤鍗囩駭鍒癏ibernate3.0錛岄偅涔堝崌綰х殑絎竴姝ユ槸鎶奐ava婧愮▼搴忎腑鐨勬墍鏈夆渘et.sf.hibernate鈥濇浛鎹負鈥渙rg.hibernate鈥濄?/font>

Hibernate2.1涓殑鈥渘et.sf.hibernate.expression鈥濆寘琚敼鍚嶄負鈥渙rg.hibernate.criterion鈥濄傚亣濡傚簲鐢ㄧ▼搴忎嬌鐢ㄤ簡Criteria API錛岄偅涔堝湪鍗囩駭鐨勮繃紼嬩腑錛屽繀欏繪妸Java婧愮▼搴忎腑鐨勬墍鏈夆渘et.sf.hibernate.expression鈥濇浛鎹負鈥渙rg.hibernate.criterion鈥濄?/font>

濡傛灉搴旂敤浣跨敤浜嗛櫎Hibernate浠ュ鐨勫叾浠栧閮ㄨ蔣浠訛紝鑰岃繖涓閮ㄨ蔣浠跺張寮曠敤浜咹ibernate鐨勬帴鍙o紝閭d箞鍦ㄥ崌綰ф椂蹇呴』鍗佸垎灝忓績銆備緥濡侲HCache鎷ユ湁鑷繁鐨凜acheProvider錛?net.sf.ehcache.hibernate.Provider錛屽湪榪欎釜綾諱腑寮曠敤浜咹ibernate2.1涓殑鎺ュ彛錛屽湪鍗囩駭搴旂敤鏃訛紝鍙互閲囩敤浠ヤ笅鍔炴硶涔嬩竴鏉ュ崌綰HCache:

錛?錛夋墜宸ヤ慨鏀筺et.sf.ehcache.hibernate.Provider綾伙紝浣垮畠寮曠敤Hibernate3.0涓殑鎺ュ彛銆?br />錛?錛夌瓑鍒癊HCache杞歡鏈韓鍗囩駭涓轟嬌鐢℉ibernate3.0鍚庯紝浣跨敤鏂扮殑EHCache杞歡銆?br />錛?錛変嬌鐢℉ibernate3.0涓唴緗殑CacheProvider錛歰rg.hibernate.cache.EhCacheProvider銆?/font>

1.1.2 org.hibernate.classic鍖?/font>

Hibernate3.0鎶婁竴浜涜搴熷純鐨勬帴鍙i兘杞Щ鍒皁rg.hibernate.classic涓?/font>

1.1.3 Hibernate鎵渚濊禆鐨勭涓夋柟杞歡鍖?/font>

鍦℉ibernate3.0鐨勮蔣浠跺寘鐨刲ib鐩綍涓嬬殑README.txt鏂囦歡涓紝鎻忚堪浜咹ibernate3.0鎵渚濊禆鐨勭涓夋柟杞歡鍖呯殑鍙樺寲銆?/font>

1.1.4 寮傚父妯″瀷

鍦℉ibernate3.0涓紝HibernateException寮傚父浠ュ強瀹冪殑鎵鏈夊瓙綾婚兘緇ф壙浜唈ava.lang.RuntimeException銆傚洜姝ゅ湪緙栬瘧鏃訛紝緙栬瘧鍣ㄤ笉浼氬啀媯鏌ibernateException銆?/font>

1.1.5 Session鎺ュ彛

鍦℉ibernate3.0涓紝鍘熸潵Hibernate2.1鐨凷ession鎺ュ彛涓殑鏈変簺鍩烘湰鏂規硶涔熻搴熷純錛屼絾涓轟簡綆鍖栧崌綰э紝榪欎簺鏂規硶渚濈劧鏄彲鐢ㄧ殑錛屽彲浠ラ氳繃org.hibernate.classic.Session瀛愭帴鍙f潵璁塊棶瀹冧滑錛屼緥濡傦細


org.hibernate.classic.Session session=sessionFactory.openSession();
session.delete("delete from Customer ");


鍦℉ibernate3.0涓紝org.hibernate.classic.Session鎺ュ彛緇ф壙浜唎rg.hibernate.Session鎺ュ彛錛屽湪org.hibernate.classic.Session鎺ュ彛涓寘鍚簡涓緋誨垪琚簾寮冪殑鏂規硶錛屽find()銆乮nterate()絳夈係essionFactory鎺ュ彛鐨刼penSession()鏂規硶榪斿洖org.hibernate.classic.Session綾誨瀷鐨勫疄渚嬨傚鏋滃笇鏈涘湪紼嬪簭涓畬鍏ㄤ嬌鐢℉ibernate3.0錛屽彲浠ラ噰鐢ㄤ互涓嬫柟寮忓垱寤篠ession瀹炰緥錛?/font>

org.hibernate.Session session=sessionFactory.openSession();

濡傛灉鏄宸叉湁鐨勭▼搴忚繘琛岀畝鍗曠殑鍗囩駭錛屽茍涓斿笇鏈涗粛鐒惰皟鐢℉ibernate2.1涓璖ession鐨勪竴浜涙帴鍙o紝鍙互閲囩敤浠ヤ笅鏂瑰紡鍒涘緩Session瀹炰緥錛?/font>

org.hibernate.classic.Session session=sessionFactory.openSession();

鍦℉ibernate3.0涓紝Session鎺ュ彛涓搴熷純鐨勬柟娉曞寘鎷細
* 鎵ц鏌ヨ鐨勬柟娉曪細find()銆乮terate()銆乫ilter()鍜宒elete(String hqlSelectQuery)
* saveOrUpdateCopy()

Hibernate3.0涓寰嬮噰鐢╟reateQuery()鏂規硶鏉ユ墽琛屾墍鏈夌殑鏌ヨ璇彞錛岄噰鐢―ELETE 鏌ヨ璇彞鏉ユ墽琛屾壒閲忓垹闄わ紝閲囩敤merge()鏂規硶鏉ユ浛浠?saveOrUpdateCopy()鏂規硶銆?


鎻愮ず錛氬湪Hibernate2.1涓紝Session鐨刣elete()鏂規硶鏈夊嚑縐嶉噸杞藉艦寮忥紝鍏朵腑鍙傛暟涓篐QL鏌ヨ璇彞鐨刣elete()鏂規硶鍦℉ibernate3.0涓搴熷純錛岃屽弬鏁頒負Ojbect綾誨瀷鐨勭殑delete()鏂規硶渚濈劧琚敮鎸併俤elete(Object o)鏂規硶鐢ㄤ簬鍒犻櫎鍙傛暟鎸囧畾鐨勫璞★紝璇ユ柟娉曟敮鎸佺駭鑱斿垹闄ゃ?

Hibernate2.1娌℃湁瀵規壒閲忔洿鏂板拰鎵歸噺鍒犻櫎鎻愪緵寰堝ソ鐨勬敮鎸侊紝鍙傝<<綺鵑欻ibernate>>涓涔︾殑絎?3绔犵殑13.1.1鑺傦紙鎵歸噺鏇存柊鍜屾壒閲忓垹闄わ級錛岃孒ibernate3.0瀵規壒閲忔洿鏂板拰鎵歸噺鍒犻櫎鎻愪緵浜嗘敮鎸侊紝鑳藉鐩存帴鎵ц鎵歸噺鏇存柊鎴栨壒閲忓垹闄よ鍙ワ紝鏃犻渶鎶婅鏇存柊鎴栧垹闄ょ殑瀵硅薄鍏堝姞杞藉埌鍐呭瓨涓備互涓嬫槸閫氳繃Hibernate3.0鎵ц鎵歸噺鏇存柊鐨勭▼搴忎唬鐮侊細

Session session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();

String hqlUpdate = "update Customer set name = :newName where name = :oldName";
int updatedEntities = s.createQuery( hqlUpdate )
.setString( "newName", newName )
.setString( "oldName", oldName )
.executeUpdate();
tx.commit();
session.close();

浠ヤ笅鏄氳繃Hibernate3.0鎵ц鎵歸噺鍒犻櫎鐨勭▼搴忎唬鐮侊細

Session session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();

String hqlDelete = "delete Customer where name = :oldName";
int deletedEntities = s.createQuery( hqlDelete )
.setString( "oldName", oldName )
.executeUpdate();
tx.commit();
session.close();

1.1.6 createSQLQuery()

鍦℉ibernate3.0涓紝Session鎺ュ彛鐨刢reateSQLQuery()鏂規硶琚簾寮冿紝琚Щ鍒皁rg.hibernate.classic.Session鎺ュ彛涓侶ibernate3.0閲囩敤鏂扮殑SQLQuery鎺ュ彛鏉ュ畬鎴愮浉鍚岀殑鍔熻兘銆?/font>

1.1.7 Lifecycle 鍜?Validatable 鎺ュ彛

Lifecycle鍜孷alidatable 鎺ュ彛琚簾寮冿紝騫朵笖琚Щ鍒皁rg.hibernate.classic鍖呬腑銆?/font>

1.1.8 Interceptor鎺ュ彛

鍦↖nterceptor 鎺ュ彛涓姞鍏ヤ簡涓や釜鏂扮殑鏂規硶銆?鐢ㄦ埛鍒涘緩鐨処nterceptor瀹炵幇綾誨湪鍗囩駭鐨勮繃紼嬩腑錛岄渶瑕佷負榪欎袱涓柊鏂規硶鎻愪緵鏂規硶浣撲負絀虹殑瀹炵幇銆傛澶栵紝instantiate()鏂規硶鐨勫弬鏁頒綔浜嗕慨鏀癸紝isUnsaved()鏂規硶琚敼鍚嶄負isTransient()銆?/font>

1.1.9 UserType鍜孋ompositeUserType鎺ュ彛

鍦║serType鍜孋ompositeUserType鎺ュ彛涓兘鍔犲叆浜嗕竴浜涙柊鐨勬柟娉曪紝榪欎袱涓帴鍙h縐誨埌org.hibernate.usertype鍖呬腑錛岀敤鎴峰畾涔夌殑UserType鍜孋ompositeUserType瀹炵幇綾誨繀欏誨疄鐜拌繖浜涙柊鏂規硶銆?

Hibernate3.0鎻愪緵浜哖arameterizedType鎺ュ彛錛岀敤浜庢洿濂界殑閲嶇敤鐢ㄦ埛鑷畾涔夌殑綾誨瀷銆?

1.1.10 FetchMode綾?/font>

FetchMode.LAZY 鍜?FetchMode.EAGER琚簾寮冦傚彇鑰屼唬涔嬬殑鍒嗗埆涓篎etchMode.SELECT 鍜孎etchMode.JOIN銆?/font>

1.1.11 PersistentEnum綾?/font>

PersistentEnum琚簾寮冨茍鍒犻櫎銆傚凡緇忓瓨鍦ㄧ殑搴旂敤搴旇閲囩敤UserType鏉ュ鐞嗘灇涓劇被鍨嬨?/font>

1.1.12 瀵笲lob 鍜孋lob鐨勬敮鎸?/font>

Hibernate瀵笲lob鍜孋lob瀹炰緥榪涜浜嗗寘瑁咃紝浣垮緱閭d簺鎷ユ湁Blob鎴朇lob綾誨瀷鐨勫睘鎬х殑綾葷殑瀹炰緥鍙互琚父紱匯佸簭鍒楀寲鎴栧弽搴忓垪鍖栵紝浠ュ強浼犻掑埌merge()鏂規硶涓?/font>

1.1.13 Hibernate涓緵鎵╁睍鐨凙PI鐨勫彉鍖?/font>

org.hibernate.criterion銆?org.hibernate.mapping銆?org.hibernate.persister鍜宱rg.hibernate.collection 鍖呯殑緇撴瀯鍜屽疄鐜板彂鐢熶簡閲嶅ぇ鐨勫彉鍖栥傚鏁板熀浜嶩ibernate
2.1 鐨勫簲鐢ㄤ笉渚濊禆浜庤繖浜涘寘錛屽洜姝や笉浼氳褰卞搷銆傚鏋滀綘鐨勫簲鐢ㄦ墿灞曚簡榪欎簺鍖呬腑鐨勭被錛岄偅涔堝繀欏婚潪甯稿皬蹇冪殑瀵瑰彈褰卞搷鐨勭▼搴忎唬鐮佽繘琛屽崌綰с?/font>

1.2 鍏冩暟鎹殑鍙樺寲

1.2.1 媯绱㈢瓥鐣?/font>

鍦℉ibernate2.1涓紝lazy灞炴х殑榛樿鍊間負鈥渇alse鈥濓紝鑰屽湪Hibernate3.0涓紝lazy灞炴х殑榛樿鍊間負鈥渢rue鈥濄傚湪鍗囩駭鏄犲皠鏂囦歡鏃訛紝濡傛灉鍘熸潵鐨勬槧灝勬枃浠朵腑鐨勬湁鍏沖厓绱狅紝濡?lt;set>銆?lt;class>絳夋病鏈夋樉寮忚緗甽azy灞炴э紝閭d箞蹇呴』鎶婂畠浠兘鏄懼紡鐨勮緗負lazy=鈥渢rue鈥濄傚鏋滆寰楄繖縐嶅崌綰ф柟寮忓緢楹葷儲錛屽彲浠ラ噰鍙栧彟涓綆鍗曠殑鍗囩駭鏂瑰紡錛氬湪<hibernate-mapping>鍏冪礌涓緗? default-lazy=鈥渇alse鈥濄?

1.2.2 瀵硅薄鏍囪瘑絎︾殑鏄犲皠

unsaved-value灞炴ф槸鍙夌殑錛屽湪澶氭暟鎯呭喌涓嬶紝Hibernate3.0灝嗘妸unsaved-value="0" 浣滀負榛樿鍊箋?/font>

鍦℉ibernate3.0涓紝褰撲嬌鐢ㄨ嚜鐒朵富閿拰娓哥瀵硅薄鏃訛紝涓嶅啀寮鴻揩瀹炵幇Interceptor.isUnsaved()鏂規硶銆?濡傛灉娌℃湁璁劇疆榪欎釜鏂規硶錛屽綋Hibernate3.0鏃犳硶鍖哄垎瀵硅薄鐨勭姸鎬佹椂錛屼細鏌ヨ鏁版嵁搴擄紝鏉ュ垽鏂繖涓璞″埌搴曟槸涓存椂瀵硅薄錛岃繕鏄父紱誨璞°備笉榪囷紝鏄懼紡鐨勪嬌鐢↖nterceptor.isUnsaved()鏂規硶浼氳幏寰楁洿濂界殑鎬ц兘錛屽洜涓鴻繖鍙互鍑忓皯Hibernate鐩存帴璁塊棶鏁版嵁搴撶殑嬈℃暟銆?/font>

1.2.3 闆嗗悎鏄犲皠

<index>鍏冪礌鍦ㄦ煇浜涙儏鍐典笅琚?lt;list-index>鍜?lt;map-key>鍏冪礌鏇夸唬銆傛澶栵紝Hibernate3.0鐢?lt;map-key-many-to-many> 鍏冪礌鏉ユ浛浠e師鏉ョ殑<key-many-to-many>.鍏冪礌錛岀敤<composite-map-key>鍏冪礌鏉ユ浛浠e師鏉ョ殑<composite-index>鍏冪礌銆?/font>

1.2.4 DTD

瀵硅薄-鍏崇郴鏄犲皠鏂囦歡涓殑DTD鏂囨。錛岀敱鍘熸潵鐨勶細
http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd
鏀逛負錛?br />
http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd

1.3 鏌ヨ璇彞鐨勫彉鍖?/font>

Hibernate3.0 閲囩敤鏂扮殑鍩轟簬ANTLR鐨凥QL/SQL鏌ヨ緲昏瘧鍣紝涓嶈繃錛孒ibernate2.1鐨勬煡璇㈢炕璇戝櫒涔熶緷鐒跺瓨鍦ㄣ傚湪Hibernate鐨勯厤緗枃浠朵腑錛宧ibernate.query.factory_class灞炴х敤鏉ラ夋嫨鏌ヨ緲昏瘧鍣ㄣ備緥濡傦細
錛?錛夐夋嫨Hibernate3.0鐨勬煡璇㈢炕璇戝櫒錛?br />hibernate.query.factory_class= org.hibernate.hql.ast.ASTQueryTranslatorFactory
錛?錛夐夋嫨Hibernate2.1鐨勬煡璇㈢炕璇戝櫒
hibernate.query.factory_class= org.hibernate.hql.classic.ClassicQueryTranslatorFactory


鎻愮ず錛欰NTLR鏄敤綰疛ava璇█緙栧啓鍑烘潵鐨勪竴涓紪璇戝伐鍏鳳紝瀹冨彲鐢熸垚Java璇█鎴栬呮槸C++鐨勮瘝娉曞拰璇硶鍒嗘瀽鍣紝騫跺彲浜х敓璇硶鍒嗘瀽鏍戝茍瀵硅鏍戣繘琛岄亶鍘嗐侫NTLR鐢變簬鏄函Java鐨勶紝鍥犳鍙互瀹夎鍦ㄤ換鎰忓鉤鍙頒笂錛屼絾鏄渶瑕丣DK鐨勬敮鎸併?

Hibernate寮鍙戝皬緇勫敖鍔涗繚璇丠ibernate3.0鐨勬煡璇㈢炕璇戝櫒鑳藉鏀寔Hibernate2.1鐨勬墍鏈夋煡璇㈣鍙ャ備笉榪囷紝瀵逛簬璁稿宸茬粡瀛樺湪鐨勫簲鐢紝鍦ㄥ崌綰ц繃紼嬩腑錛屼篃涓嶅Θ浠嶇劧浣跨敤Hibernate2.1鐨勬煡璇㈢炕璇戝櫒銆?br />鍊煎緱娉ㄦ剰鐨勬槸錛?Hibernate3.0鐨勬煡璇㈢炕璇戝櫒瀛樺湪涓涓狟ug錛氫笉鏀寔鏌愪簺theta-style榪炵粨鏌ヨ鏂硅█錛氬Oracle8i鐨凮racleDialect鏂硅█銆丼ybase11Dialect銆傝В鍐寵繖涓闂鐨勫姙娉曟湁涓ょ錛氾紙1錛夋敼涓轟嬌鐢ㄦ敮鎸丄NSI-style榪炵粨鏌ヨ鐨勬柟璦錛屽 Oracle9Dialect,錛?錛夊鏋滃崌綰х殑鏃跺欓亣鍒拌繖涓闂錛岄偅涔堣繕鏄敼涓轟嬌鐢℉ibernate2.1鐨勬煡璇㈢炕璇戝櫒銆?/font>

1.3.1 indices()鍜宔lements()鍑芥暟

鍦℉QL鐨剆elect瀛愬彞涓簾寮冧簡indices()鍜宔lements()鍑芥暟錛屽洜涓鴻繖涓や釜鍑芥暟鐨勮娉曞緢璁╃敤鎴瘋垂瑙o紝鍙互鐢ㄦ樉寮忕殑榪炴帴鏌ヨ璇彞鏉ユ浛浠?select elements(...) 銆傝屽湪HQL鐨剋here瀛愬彞涓紝浠嶇劧鍙互浣跨敤elements()鍑芥暟銆?/font>



閲庤崏 2006-12-30 09:37 鍙戣〃璇勮
]]>
閫氱敤濂楁墦web绔В鍐蟲柟娉?/title><link>http://m.tkk7.com/patterns/archive/2006/12/16/cert_print_20061216.html</link><dc:creator>閲庤崏</dc:creator><author>閲庤崏</author><pubDate>Sat, 16 Dec 2006 13:29:00 GMT</pubDate><guid>http://m.tkk7.com/patterns/archive/2006/12/16/cert_print_20061216.html</guid><wfw:comment>http://m.tkk7.com/patterns/comments/88240.html</wfw:comment><comments>http://m.tkk7.com/patterns/archive/2006/12/16/cert_print_20061216.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://m.tkk7.com/patterns/comments/commentRss/88240.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/patterns/services/trackbacks/88240.html</trackback:ping><description><![CDATA[ <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <font size="2"> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">綾諱技浜庤瘉浠舵墦鍗扮殑濂楁墦妯″紡錛屽湪</span> <span lang="EN-US">web</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">欏甸潰瑙e喅鏂規硶涓瘮杈冩鎵嬨傝繖孌墊椂闂村繖閲屽伔闂詫紝濂藉ソ鐮斾範浜?/span> <span lang="EN-US">dhtml</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鐨勭浉鍏蟲妧鏈啓浜嗕竴涓互姝ゆ姏鐮栧紩鐜夈?br /><br /></span> </font> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <b style="mso-bidi-font-weight: normal"> <font size="2"> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">瀹炵幇鐨勫姛鑳?/span> <span lang="EN-US"> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?> <o:p> </o:p> </span> </font> </b> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <font size="2"> <span lang="EN-US">1</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">銆佸彲浠ヨ皟鏁存樉紺烘暟鎹殑浣嶇疆銆佸瓧浣撳拰澶у皬錛坈ertprint.css錛夛紱</span> </font> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <font size="2"> <span lang="EN-US">2</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">銆佸彲浠ヨ緗儗鏅浘鐗囧拰鍥劇墖澶у皬錛?/span> </font> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <font size="2"> <span lang="EN-US">3</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">銆佸彲浠ヨ幏寰楁暟鎹皟鏁村悗鐨勪綅緗紙鏂逛究鏁版嵁搴撲繚瀛橈紝鏃犻渶姣忔閮借緗級錛?/span> </font> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <font size="2"> <span lang="EN-US">4</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">銆佸彲浠ヨ緗墦鍗板睘鎬э紙浠呴檺</span> <span lang="EN-US">IE</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">錛夛細</span> <span lang="EN-US">header/footer</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">銆佹í鍚?/span> <span lang="EN-US">/</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">綰靛悜銆佹墦鍗伴〉杈硅窛錛?/span> </font> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <font size="2"> <span lang="EN-US">5</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">銆佸彲浠ヨ法嫻忚鍣ㄤ嬌鐢紙闄ゆ墦鍗拌緗級錛?/span> <span lang="EN-US">IE</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">銆?/span> <span lang="EN-US">FireFox</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">銆?/span> <span lang="EN-US">Netscape;<br /><br /></span> </font> <b style="mso-bidi-font-weight: normal"> <font size="2"> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鎶鏈偣</span> <span lang="EN-US"> <o:p> </o:p> </span> </font> </b> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"> <font size="2"> <span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"> <span style="mso-list: Ignore">1銆?span style="FONT: 7pt 'Times New Roman'">聽 </span></span> </span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鍏冪礌鎷栨嫿鎶鏈?/span> <span lang="EN-US">dragdrop.js</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">錛?/span> </font> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"> <font size="2"> <span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"> <span style="mso-list: Ignore">2銆?span style="FONT: 7pt 'Times New Roman'">聽 </span></span> </span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">瀵硅薄搴忓垪鍖?/span> <span lang="EN-US">json.js</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">錛?/span> </font> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"> <font size="2"> <span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"> <span style="mso-list: Ignore">3銆?span style="FONT: 7pt 'Times New Roman'">聽 </span></span> </span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鎺у埗鎵撳嵃</span> <span lang="EN-US">ScriptX</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">錛?/span> </font> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"> <font size="2"> <span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"> <span style="mso-list: Ignore">4銆?span style="FONT: 7pt 'Times New Roman'">聽 </span></span> </span> <span lang="EN-US">DHTML</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">錛?/span> </font> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"> <font size="2"> <span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"> <span style="mso-list: Ignore">5銆?span style="FONT: 7pt 'Times New Roman'">聽 </span></span> </span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">嫻忚鍣ㄥ吋瀹?/span> <span lang="EN-US">w3c</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">錛?br /><br /></span> </font> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <b style="mso-bidi-font-weight: normal"> <font size="2"> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">浣跨敤鏂規硶</span> <span lang="EN-US"> <o:p> </o:p> </span> </font> </b> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"> <font size="2"> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鍦ㄤ綘鐨勯」鐩腑寤虹珛涓涓被浼間簬</span> <span lang="EN-US">certprint.html</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鐨勫姩鎬侀〉闈紝鍙傜収</span> <span lang="EN-US">toInit()</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鏂規硶璁劇疆鎵撳嵃灞炴у拰闇瑕佹墦鍗版暟鎹紝鍦ㄦ墦鍗版暟鎹皟鏁村畬姣曞彲浠ヨ皟鐢?/span> <span lang="EN-US">collectDataPos()</span> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鑾峰緱璋冩暣鍚庣殑鏁版嵁浣嶇疆錛屽彲浠ヤ繚瀛樺埌鏁版嵁搴撱?br /><br /></span> </font> </p> <font size="2"> <b style="mso-bidi-font-weight: normal"> <span style="FONT-SIZE: 10.5pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">婧愮爜涓嬭澆</span> </b> <span style="FONT-SIZE: 10.5pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">錛?/span> <span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 瀹嬩綋; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"> <a href="/Files/patterns/CertificatePrint_0.3.1.rar"> <span style="FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">閫氱敤濂楁墦</span> </a> </span> </font> <img src ="http://m.tkk7.com/patterns/aggbug/88240.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/patterns/" target="_blank">閲庤崏</a> 2006-12-16 21:29 <a href="http://m.tkk7.com/patterns/archive/2006/12/16/cert_print_20061216.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>velocity妯℃澘璺緞鍙堜竴瑙?/title><link>http://m.tkk7.com/patterns/archive/2006/11/28/velocity_template_path_another_method.html</link><dc:creator>閲庤崏</dc:creator><author>閲庤崏</author><pubDate>Tue, 28 Nov 2006 06:21:00 GMT</pubDate><guid>http://m.tkk7.com/patterns/archive/2006/11/28/velocity_template_path_another_method.html</guid><wfw:comment>http://m.tkk7.com/patterns/comments/84041.html</wfw:comment><comments>http://m.tkk7.com/patterns/archive/2006/11/28/velocity_template_path_another_method.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/patterns/comments/commentRss/84041.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/patterns/services/trackbacks/84041.html</trackback:ping><description><![CDATA[ <font size="2">鐮旂┒hibernatesynchronizer鐨勬簮鐮侊紝鐪嬪埌浠栧皢velocity妯℃澘鍜岀紪璇戠殑綾諱竴璧鋒墦鍖呭湪jar鍖呬腑錛屽湪鑾峰緱妯℃澘鏃朵嬌鐢?br />Xobject.class.getClassLoader().getResourceAsStream("/templates/xx.vm")鑾峰緱嫻侊紝鐒跺悗鍐嶅皢杞彉鎴愬瓧絎︿覆<br />public static String getStringFromStream(InputStream is) throws IOException {<br />聽聽聽聽聽聽聽 if (null == is)<br />聽聽聽聽聽聽聽聽聽聽聽 return null;<br />聽聽聽聽聽聽聽 try {<br />聽聽聽聽聽聽聽聽聽聽聽 InputStreamReader reader = new InputStreamReader(is);<br />聽聽聽聽聽聽聽聽聽聽聽 char[] buffer = new char[1024];<br />聽聽聽聽聽聽聽聽聽聽聽 StringWriter writer = new StringWriter();<br />聽聽聽聽聽聽聽聽聽聽聽 int bytes_read;<br />聽聽聽聽聽聽聽聽聽聽聽 while ((bytes_read = reader.read(buffer)) != -1) {<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 writer.write(buffer, 0, bytes_read);<br />聽聽聽聽聽聽聽聽聽聽聽 }<br />聽聽聽聽聽聽聽聽聽聽聽 return (writer.toString());<br />聽聽聽聽聽聽聽 } finally {<br />聽聽聽聽聽聽聽聽聽聽聽 if (null != is)<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 is.close();<br />聽聽聽聽聽聽聽 }<br />聽聽聽 }<br />鏈鍚庤皟鐢╲elocity鐨勬柟娉?br />Velocity.evaluate(Context context, java.io.Writer out, java.lang.String logTag, java.lang.String instring) <br />浠庤岀敓鎴愭枃浠躲傚眳鐒朵笉鐭ラ亾velocity鏈夎繖鏍風殑鏂規硶錛屾尯鏃犵煡鐨勶紝涓轟簡璺緞鐒﹀ご鐑傞錛岀粓浜庡緱瑙d簡銆傛葷粨涓涓嬫妧宸э細<br />1銆乆object.class.getClassLoader().getResourceAsStream("/templates/xx.vm")鐩稿璺緞鑾峰緱嫻侊紱<br />2銆乂elocity.evaluate(...)鏂規硶浣跨敤錛?/font> <img src ="http://m.tkk7.com/patterns/aggbug/84041.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/patterns/" target="_blank">閲庤崏</a> 2006-11-28 14:21 <a href="http://m.tkk7.com/patterns/archive/2006/11/28/velocity_template_path_another_method.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍦╦sp涓嬌鐢╢ckeditor 2.3http://m.tkk7.com/patterns/archive/2006/11/03/integrate_fckeditor_jsp.html閲庤崏閲庤崏Fri, 03 Nov 2006 03:00:00 GMThttp://m.tkk7.com/patterns/archive/2006/11/03/integrate_fckeditor_jsp.htmlhttp://m.tkk7.com/patterns/comments/77356.htmlhttp://m.tkk7.com/patterns/archive/2006/11/03/integrate_fckeditor_jsp.html#Feedback2http://m.tkk7.com/patterns/comments/commentRss/77356.htmlhttp://m.tkk7.com/patterns/services/trackbacks/77356.html 涓嬭澆

浠?span lang="EN-US">FCKeditor鐨勫畼鏂圭珯鐐?a >http://www.fckeditor.net/download涓婁笅杞紽CKeditor 2.3.2鍜孎CKeditor.Java錛屽叾涓璅CKeditor 2.3.2鏄簮鐮侊紝FCKeditor.Java鏄湪jsp涓嬌鐢ㄧ殑渚嬬▼銆?o:p>

鐦﹁韓

灝?span lang="EN-US">FCKeditor 2.3.2瑙e帇鍒癋CKeditor鏂囦歡澶癸紝鐒跺悗鍒犻櫎濡備笅鏂囦歡鎴栫洰褰曪細

1銆?_samples錛?_testcases錛?o:p>

2銆佸垹闄?_documentation.html,_whatsnew.html,fckeditor.afp,fckeditor.asp,fckeditor.cfc,fckeditor.cfm,
fckeditor.lasso,fckeditor.php,fckeditor.pl,fckeditor.py
鍙墿涓媐ckconfig.js,fckeditor.js,fckstyles.xml,fcktemplates.xml,htaccess.txt,license.txt錛?o:p>

3銆?editor/_source錛?o:p>

4銆?editor/filemanager/browser/default/connectors錛?o:p>

5銆?editor/filemanager/upload錛?o:p>

6銆佽璦鍖?editor/lang涓彧鐣欎笅en.js銆亃h-cn.js錛?o:p>

鍝堝搱錛屼竴涓嬪瓙浠?span lang="EN-US">2.5M鐦﹀埌832K錛岀埥鍛錛佽繕鍙互鍦ㄧ毊鑲ゅ寘閲?editor/skins鍔ㄥ姩鑴戠瓔錛屾瘮濡傚彧鐣欎竴涓猻liver錛岃繖涓ソ閰嶈壊銆?o:p>

閰嶇疆

灝?span lang="EN-US">FCKeditor鐨刯sp涓嬌鐢ㄧ殑渚嬬▼鍜孎CKeditor婧愮爜緇撳悎璧鋒潵錛岃В鍘婩CKeditor.Java錛屽皢瑙e帇鏂囦歡澶逛腑web鐩綍涓嬬殑鎵鏈夋枃浠舵嫹璐濆埌FCKeditor鐩綍涓紝榪欐牱鍦‵CKeditor鐩綍澶氫簡涓や釜鐩綍錛?o:p>

鈹溾攢_samples

鈹?span lang="EN-US">鈹?span style="mso-spacerun: yes">聽 index.jsp

鈹?span lang="EN-US">鈹?span style="mso-spacerun: yes">聽 sample.css

鈹?span lang="EN-US">鈹?span style="mso-spacerun: yes">聽 sampleslist.jsp

鈹?span lang="EN-US">鈹?span style="mso-spacerun: yes">聽

鈹?span lang="EN-US">鈹斺攢jsp

鈹?span lang="EN-US">聽聽聽聽聽聽聽聽聽 sample01.jsp

鈹?span lang="EN-US">聽聽聽聽聽聽聽聽聽 sample02.jsp

鈹?span lang="EN-US">聽聽聽聽聽聽聽聽聽 sample03.jsp

鈹?span lang="EN-US">聽聽聽聽聽聽聽聽聽 sample04.jsp

鈹?span lang="EN-US">聽聽聽聽聽聽聽聽聽 sample05.jsp

鈹?span lang="EN-US">聽聽聽聽聽聽聽聽聽 sample06.config.js

鈹?span lang="EN-US">聽聽聽聽聽聽聽聽聽 sample06.jsp

鈹?span lang="EN-US">聽聽聽聽聽聽聽聽聽 sample07.jsp

鈹?span lang="EN-US">聽聽聽聽聽聽聽聽聽 sampleposteddata.jsp

鈹?span lang="EN-US">聽聽聽聽聽聽聽聽聽

鈹斺攢WEB-INF

聽聽聽 鈹?span style="mso-spacerun: yes">聽 web.xml

聽聽聽 鈹?span style="mso-spacerun: yes">聽

聽聽聽 鈹斺攢lib

聽聽聽聽聽聽聽聽聽聽聽 FCKeditor-2.3.jar

聽聽聽聽聽聽聽聽聽聽聽 commons-fileupload.jar

鐪嬩竴涓?span lang="EN-US">web.xml鏂囦歡錛岄噷闈㈠鍔犱簡鏂囦歡嫻忚鍜屾枃浠朵笂浼犲緱servlet銆?o:p>

l聽聽聽聽聽聽聽聽 淇敼鏂囦歡FCKeditor/fckconfig.js

1銆?span style="FONT: 7pt 'Times New Roman'">聽 淇敼灞炴?span lang="EN-US">

涓枃錛?span lang="EN-US">FCKConfig.DefaultLanguage聽聽聽聽 = 'zh-cn' ;

鐨偆錛?span lang="EN-US">FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;

2銆?span style="FONT: 7pt 'Times New Roman'">聽 浣跨敤servlet鍋氭枃浠舵祻瑙堝拰涓婁紶

鍙傝?span lang="EN-US">http://wiki.fckeditor.net/Developer%27s_Guide/Integration/Java

//browser

FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Connector=connectors/jsp/connector" ;

FCKConfig.ImageBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector" ;

FCKConfig.FlashBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector" ;

//upload

FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/simpleuploader?Type=File' ;

FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/simpleuploader?Type=Flash' ;

FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/simpleuploader?Type=Image' ;

l聽聽聽聽聽聽聽聽 淇敼web.xml澧炲姞FCKeditor鐨則aglib

浠?span lang="EN-US">FCKeditor.Java瑙e帇鐩綍/src鐩綍涓嬫嫹璐滷CKeditor.tld鏂囦歡鍒癢EB-INF鐩綍涓嬶紝鍦╳eb.xml鏂囦歡涓鍔狅細

<taglib>

聽聽聽 <taglib-uri>/WEB-INF/FCKeditor.tld</taglib-uri>

聽聽聽 <taglib-location>/WEB-INF/FCKeditor.tld</taglib-location>

</taglib>

浣跨敤

鍦?/span> jsp 欏甸潰涓綔濡備笅璋冪敤錛堝叿浣撳浣曚嬌鐢ㄥ彲浠ョ湅 FCKeditor.tld瀹氫箟 錛夛細

...

<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="FCK" %>

...

<FCK:editor id="EditorDefault" basePath="/FCKeditor/">

This is FCKeditor demo!

</FCK:editor>

...

榪愯渚嬬▼

灝嗘垜浠慨鏀逛簡鍗婂ぉ鐨勬暣涓?/span> FCKeditor鐩綍鎷瘋礉鍒皌omcat5.0.28錛堟垨鍏朵粬web鏈嶅姟鍣級鐨剋ebapps鐩綍涓嬶紝鍚姩tomcat璁塊棶http://localhost:8080/FCKeditor/_samples/ 璇曠敤涓涓婩CKeditor 2.3.2鐨勫己澶у姛鑳斤紝鏈変簡demo鍦ㄩ」鐩腑濡備綍浣跨敤錛屼綘鑷繁鐞㈢(鍚э紒

渚嬬▼涓嬭澆錛?/span> FCKeditor



閲庤崏 2006-11-03 11:00 鍙戣〃璇勮
]]>
struts涓笉璁╅〉闈㈣煩杞殑灝忔柟娉?/title><link>http://m.tkk7.com/patterns/archive/2006/10/20/struts_deny_redirect.html</link><dc:creator>閲庤崏</dc:creator><author>閲庤崏</author><pubDate>Fri, 20 Oct 2006 09:43:00 GMT</pubDate><guid>http://m.tkk7.com/patterns/archive/2006/10/20/struts_deny_redirect.html</guid><wfw:comment>http://m.tkk7.com/patterns/comments/76426.html</wfw:comment><comments>http://m.tkk7.com/patterns/archive/2006/10/20/struts_deny_redirect.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://m.tkk7.com/patterns/comments/commentRss/76426.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/patterns/services/trackbacks/76426.html</trackback:ping><description><![CDATA[ <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">浣跨敤</span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> struts </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">鍋氶」鐩椂錛岄氬父鍦ㄤ俊鎭綍鍏ラ〉闈㈢偣鍑?/span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> [ </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">淇濆瓨</span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> ] </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">鎸夐挳鍚庝細璺寵漿鍒頒竴涓滀繚瀛樻垚鍔燂紒鈥濈殑鎻愮ず欏甸潰錛屽皬灝忕殑鎻愮ず浼氬甫鏉ヤ竴浜涢棶棰橈細</span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> </span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; TEXT-ALIGN: left; tab-stops: list 21.0pt; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-font-kerning: 0pt">l</span> <span lang="EN-US" style="FONT-SIZE: 7pt; mso-fareast-font-family: Wingdings; mso-font-kerning: 0pt">聽聽聽聽聽聽聽聽 </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">澶氳璁′竴涓〉闈紱</span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> </span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; TEXT-ALIGN: left; tab-stops: list 21.0pt; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-font-kerning: 0pt">l</span> <span lang="EN-US" style="FONT-SIZE: 7pt; mso-fareast-font-family: Wingdings; mso-font-kerning: 0pt">聽聽聽聽聽聽聽聽 </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">鐢ㄦ埛澶氬鍔犱竴姝ユ搷浣滐紙鐗瑰埆鏄湪淇℃伅淇敼欏甸潰錛夛紱</span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> </span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; TEXT-ALIGN: left; tab-stops: list 21.0pt; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-font-kerning: 0pt">l</span> <span lang="EN-US" style="FONT-SIZE: 7pt; mso-fareast-font-family: Wingdings; mso-font-kerning: 0pt">聽聽聽聽聽聽聽聽 </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">甯︽潵欏甸潰鍒鋒柊鐨勯噸澶嶆彁浜ょ殑闂錛?/span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> </span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 12pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">鎴戜滑鏀瑰彉涓涓嬫濊礬浼氬甫鏉ユ剰鎯充笉鍒扮殑鏁堟灉錛屽悓鏃朵篃瑙勯伩浜嗕互涓婇棶棰樸?/span> <span lang="EN-US" style="FONT-SIZE: 10pt; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <br /> </span> <b> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt">鏂規硶涓</span> </b> <span lang="EN-US" style="FONT-SIZE: 12pt; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">聽</span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; TEXT-ALIGN: left; tab-stops: list 18.0pt; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">1銆?/span> <span lang="EN-US" style="FONT-SIZE: 7pt; mso-fareast-font-family: 'Times New Roman'; mso-font-kerning: 0pt">聽 </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">淇敼浣犵殑淇℃伅褰曞叆欏甸潰錛屽姞鍏ュ涓嬭剼鏈?/span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> </span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p> </p> <table class="MsoNormalTable" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellspacing="0" cellpadding="0" border="1"> <tbody> <tr style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"> <td style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 426.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" valign="top" width="568"> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">鈥︹?/span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"><iframe name="tagFrame" style="display:none" frameborder="0"></iframe></span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">鈥︹?/span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"><script language="JavaScript"></span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"><!--</span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">// </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">淇濆瓨淇℃伅</span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> </span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">function saveInfo() {</span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <span style="mso-tab-count: 1">聽聽聽 </span>testForm.action="test.do?method=save";<span style="mso-tab-count: 1">聽 </span></span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <span style="mso-tab-count: 1">聽聽聽 </span>testForm.target="tagFrame";</span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <span style="mso-tab-count: 1">聽聽聽 </span>testForm.submit();</span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">}</span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">//--></span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"></script></span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> </span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p>聽</o:p> </span> </p> </td> </tr> </tbody> </table> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p>聽</o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; TEXT-ALIGN: left; tab-stops: list 18.0pt; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">2銆?/span> <span lang="EN-US" style="FONT-SIZE: 7pt; mso-fareast-font-family: 'Times New Roman'; mso-font-kerning: 0pt">聽 </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">淇敼浣犵殑鎻愮ず欏甸潰</span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> </span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p> </p> <table class="MsoNormalTable" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellspacing="0" cellpadding="0" border="1"> <tbody> <tr style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"> <td style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 426.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" valign="top" width="568"> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"><%@ page contentType="text/html; charset=GBK" %></span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p>聽</o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"><script language="javascript"></span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <span style="mso-tab-count: 1">聽聽聽 </span>alert(" </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">淇濆瓨鎴愬姛錛?/span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> "); </span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <span style="mso-tab-count: 1">聽聽聽 </span>// </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">榪欓噷鏄瓑寰呬綘鐐瑰嚮</span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> alert </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">鐨勭‘瀹氭寜閽悗璺寵漿錛岀濂囩殑</span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> js </span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <span style="mso-tab-count: 1">聽聽聽 </span>parent.window.location.href='test.do?method=test';</span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"></script></span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> </td> </tr> </tbody> </table> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">綆鍗曟敼涓涓嬪氨</span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> jsp </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">鏀惰幏榪樹笉灝忋?/span> <span lang="EN-US" style="FONT-SIZE: 10pt; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <br /> </span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <br /> </span> <b> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt">鏂規硶浜?/span> </b> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt">聽<br />璁゛ction榪斿洖javascript瀹屾垚鎻愮ず鍜岃煩杞細<o:p></o:p></span> </p> <p> </p> <table class="MsoNormalTable" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellspacing="0" cellpadding="0" border="1"> <tbody> <tr style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"> <td style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 426.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" valign="top" width="568"> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt">public ActionForward execute(ActionMapping mapping, <o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 60pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: 6.0" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt">ActionForm form, HttpServletRequest request,<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <span style="mso-spacerun: yes">聽聽聽聽聽聽聽聽聽聽聽 </span>HttpServletResponse response) throws Exception {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 40pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: 4.0" align="left"> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: Arial; mso-font-kerning: 0pt">銆傘傘?/span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 40pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: 4.0" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt">// </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: Arial; mso-font-kerning: 0pt">鍙戦佺殑淇℃伅</span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <span style="mso-spacerun: yes">聽聽聽聽聽聽聽 </span>String msg = "alert('</span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: Arial; mso-font-kerning: 0pt">鎿嶄綔鎴愬姛錛?/span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt">');location.href='test.do?method=test';";<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <span style="mso-spacerun: yes">聽聽聽聽聽聽聽 </span>writeJsToFrontPage(response, msg);<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p>聽</o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <span style="mso-spacerun: yes">聽聽聽聽聽聽聽 </span>return null;<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt">}<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <br /> </span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt">/**<br />聽聽聽聽 * </span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-font-kerning: 0pt">鍚戝墠绔〉闈㈠彂閫?/span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt">javascript</span> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-font-kerning: 0pt">鑴氭湰</span> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <br />聽聽聽聽 * <br />聽聽聽聽 * @param response<br />聽聽聽聽 * @param text<br />聽聽聽聽 * @throws IOException<br />聽聽聽聽 */聽</span> <span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-family: 瀹嬩綋; mso-font-kerning: 0pt"> <o:p> </o:p> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt">protected void writeJsToFrontPage(HttpServletResponse response, <o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 210pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-char-indent-count: 21.0" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt">String msg) throws IOException {<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <span style="mso-spacerun: yes">聽聽聽聽聽聽聽 </span>response.setContentType("text/html; charset=utf-8");<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <span style="mso-spacerun: yes">聽聽聽聽聽聽聽 </span>response.setHeader("Cache-Control", "no-cache");<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <span style="mso-spacerun: yes">聽聽聽聽聽聽聽 </span>PrintWriter pw = response.getWriter();<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <span style="mso-spacerun: yes">聽聽聽聽聽聽聽 </span>pw.write("<SCRIPT TYPE='text/javascript'>" + msg + "</SCRIPT>");<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <span style="mso-spacerun: yes">聽聽聽聽聽聽聽 </span>pw.close();<o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-font-kerning: 0pt"> <span style="mso-spacerun: yes">聽聽聽 </span>}<o:p></o:p></span> </p> </td> </tr> </tbody> </table> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US"> <o:p>聽</o:p> </span> </p> <img src ="http://m.tkk7.com/patterns/aggbug/76426.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/patterns/" target="_blank">閲庤崏</a> 2006-10-20 17:43 <a href="http://m.tkk7.com/patterns/archive/2006/10/20/struts_deny_redirect.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>hsqldb蹇熷叆闂?/title><link>http://m.tkk7.com/patterns/archive/2006/10/18/hsqldb_quick_start.html</link><dc:creator>閲庤崏</dc:creator><author>閲庤崏</author><pubDate>Wed, 18 Oct 2006 09:24:00 GMT</pubDate><guid>http://m.tkk7.com/patterns/archive/2006/10/18/hsqldb_quick_start.html</guid><wfw:comment>http://m.tkk7.com/patterns/comments/75989.html</wfw:comment><comments>http://m.tkk7.com/patterns/archive/2006/10/18/hsqldb_quick_start.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.tkk7.com/patterns/comments/commentRss/75989.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/patterns/services/trackbacks/75989.html</trackback:ping><description><![CDATA[     鎽樿: 鏁版嵁搴撶幆澧冮厤緗拰浣跨敤 棣栧厛浠巋ttp://www.hsqldb.org/涓嬭澆涓涓猦sqldb鐨勭ǔ瀹氱増鏈紝瑙e帇鍚庡彲浠ユ祻瑙堣В鍘嬬洰褰曚笅鐨刬ndex.html錛屽畠鎻忚堪浜嗗悇涓洰褰曟墍鍖呭惈鍐呭錛屽湪doc孌甸噷鏈変竴涓噸瑕佺殑閾炬帴User Guide: index.html錛屾湁絀哄ソ濂界爺絀跺惂錛? ...  <a href='http://m.tkk7.com/patterns/archive/2006/10/18/hsqldb_quick_start.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/patterns/aggbug/75989.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/patterns/" target="_blank">閲庤崏</a> 2006-10-18 17:24 <a href="http://m.tkk7.com/patterns/archive/2006/10/18/hsqldb_quick_start.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>錛堣漿錛夋鍒欒〃杈懼紡鐨勫叆闂ㄧ煡璇?http://m.tkk7.com/patterns/archive/2006/06/05/regular_expression.html閲庤崏閲庤崏Mon, 05 Jun 2006 01:15:00 GMThttp://m.tkk7.com/patterns/archive/2006/06/05/regular_expression.htmlhttp://m.tkk7.com/patterns/comments/50416.htmlhttp://m.tkk7.com/patterns/archive/2006/06/05/regular_expression.html#Feedback0http://m.tkk7.com/patterns/comments/commentRss/50416.htmlhttp://m.tkk7.com/patterns/services/trackbacks/50416.html 鎽樿嚜錛?/font> http://blog.csdn.net/zbzgigi/archive/2006/05/30/763795.aspx

1銆佲?鈥濅負閫氶厤絎︼紝琛ㄧず浠諱綍涓涓瓧絎︼紝渚嬪錛氣渁.c鈥濆彲浠ュ尮閰嶁渁nc鈥濄佲渁bc鈥濄佲渁cc鈥濓紱
2銆佲淸]鈥濓紝鍦╗]鍐呭彲浠ユ寚瀹氳姹傚尮閰嶇殑瀛楃錛屼緥濡傦細鈥渁[nbc]c鈥濆彲浠ュ尮閰嶁渁nc鈥濄佲渁bc鈥濄佲渁cc鈥濓紱浣嗕笉鍙互鍖歸厤鈥渁ncc鈥?a鍒皕鍙互鍐欐垚[a-z],0鍒?鍙互鍐欐垚[0-9];

3銆佹暟閲忛檺瀹氱鍙鳳紝琛ㄧず鍖歸厤嬈℃暟錛堟垨鑰呭彨鍋氶暱搴︼級鐨勭鍙鳳細

鍖呮嫭錛氣?鈥濃斺?嬈℃垨鑰呭嬈?br />聽聽聽聽聽 鈥?鈥濃斺?嬈℃垨鑰呭嬈?br />聽聽聽聽聽 鈥?鈥濃斺?嬈℃垨鑰?嬈?br />聽聽聽聽聽 鈥渰n}鈥濃斺斿尮閰峮嬈★紝n涓烘暣鏁?br />聽聽聽聽聽 鈥渰n,m}鈥濃斺斿尮閰嶄粠n鍒癿涔嬮棿鐨勬煇涓暟鐨勬鏁幫紱n鍜宮閮芥槸鏁存暟錛?br />聽聽聽聽聽 鈥渰n,}鈥濃斺斿尮閰峮鍒版棤絀鋒涔嬮棿浠繪剰嬈℃暟錛?br />聽聽聽聽聽 鈥渰,m}鈥濃斺斿尮閰?鍒癿涔嬮棿浠繪剰嬈℃暟錛?br />浠栦滑鏀懼埌鍖歸厤鏍煎紡鐨勫悗闈細
渚嬪錛?br />鐢佃瘽鍙風爜錛?24錛?4820482錛?2484820482(鍋囪鍓嶉潰3鎴栬?浣嶏紝鍚庨潰7鎴栬?浣嶏紝騫朵笖涓棿鐨勫噺鍙峰彲鏈夊彲鏃?

閮芥槸絎﹀悎瑙勫畾鐨勶紝閭d箞鍙互鐢ㄥ涓嬫牸寮忔潵鍖歸厤錛歔0-9]{3,4} \-? [0-9]{7,8}錛?br />娉ㄦ剰錛氣淺鈥濅負杞箟瀛楃錛屽洜涓衡?鈥濆湪姝e垯琛ㄨ揪寮忕敤鏈変唬琛ㄤ竴涓寖鍥寸殑鎰忎箟錛屼緥濡傦細鍓嶉潰鎵璇寸殑[0-9]錛?/font>

鎵浠ュ畠闇瑕佽漿涔夊瓧絎︹淺鈥濊繘琛岃漿涔夋墠鍙嬌鐢紱
4銆佲淾鈥濅負鍚︾鍙鳳紝琛ㄧず涓嶆兂鍖歸厤鐨勭鍙鳳紝渚嬪錛歔^z][a-z]+鍙互鍖歸厤鎵鏈夐櫎鈥渮鈥濆紑澶寸殑浠ュ鐨勬墍鏈夊瓧

絎︿覆錛堥暱搴﹀ぇ浜?錛屽洜涓衡?鈥濊〃紺哄ぇ浜庣瓑浜?鐨勬鏁幫紝浠庣浜屼綅寮濮嬮兘鏄皬鍐欒嫳鏂囧瓧絎︼級錛?br />濡傛灉^鏀懼埌[]鐨勫杈瑰垯琛ㄧず浠]寮澶寸殑瀛楃涓詫紱^[az][a-z]+琛ㄧずa鎴栬厇寮澶寸殑闀垮害澶т簬絳変簬2鐨勮嫳鏂囧瓧絎?/font>

涓詫紱
5銆佲渱鈥濇垨榪愮畻絎︼紝渚嬪錛歛[n|bc|cb]c鍙互鍖歸厤鈥渁bcc鈥?鈥渁nc鈥?鈥渁cbc鈥濓紱
6銆佲?鈥濅互瀹冨墠闈㈢殑瀛楃緇撳熬鐨勶紱渚嬪錛歛b+$灝卞彲浠ヨ鈥渁bb鈥濓紝鈥渁b鈥濆尮閰嶏紱
7銆佷竴浜涚畝鍗曡〃紺烘柟娉曪細
\d琛ㄧず[0-9];\D琛ㄧず[^0-9];\w琛ㄧず[A-Z0-9];\W琛ㄧず[^A-Z0-9];\s琛ㄧず[\t\n\r\f],灝辨槸絀烘牸瀛楃鍖呮嫭tab

錛岀┖鏍肩瓑絳?\S琛ㄧず[^\t\n\r\f]錛屽氨鏄潪絀烘牸瀛楃;
8銆佸父鐢ㄧ殑鍖歸厤錛?br />鍖歸厤涓枃瀛楃錛?鈥淸\u4e00-\u9fa5]鈥濓紱
鍖歸厤鍙屽瓧鑺傚瓧絎?鍖呮嫭姹夊瓧鍦ㄥ唴)錛氣淸^\x00-\xff]鈥濓紱
鍖歸厤絀鴻鐨勬鍒欒〃杈懼紡錛氣淺n[\s| ]*\r鈥濓紱
鍖歸厤HTML鏍囪鐨勬鍒欒〃杈懼紡錛氣?<(.*)>.*<\/\1>|<(.*) \/>/鈥濓紱
鍖歸厤棣栧熬絀烘牸鐨勬鍒欒〃杈懼紡錛氣?^\s*)|(\s*$)鈥濓紱
鍖歸厤闈炶礋鏁存暟錛堟鏁存暟 + 0錛夛細鈥淾\d+$鈥濓紱銆銆
鍖歸厤姝f暣鏁幫細鈥淾[0-9]*[1-9][0-9]*$鈥濓紱
鍖歸厤闈炴鏁存暟錛堣礋鏁存暟 + 0錛夛細鈥淾((-\d+)|(0+))$鈥濓紱
鍖歸厤璐熸暣鏁幫細鈥淾-[0-9]*[1-9][0-9]*$鈥濓紱
鍖歸厤鏁存暟錛氣淾-?\d+$鈥濓紱
鍖歸厤闈炶礋嫻偣鏁幫紙姝f誕鐐規暟 + 0錛夛細鈥淾\d+(\.\d+)?$鈥?br />鍖歸厤姝f誕鐐規暟錛氣淾(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*

))$鈥濓紱
^((-\d+(\.\d+)?)|(0+(\.0+)?))$銆銆//鍖歸厤闈炴嫻偣鏁幫紙璐熸誕鐐規暟 + 0錛?
^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$銆銆//鍖歸厤

璐熸誕鐐規暟
鍖歸厤嫻偣鏁幫細鈥淾(-?\d+)(\.\d+)?$鈥濓紱
鍖歸厤鐢辨暟瀛椼?6涓嫳鏂囧瓧姣嶆垨鑰呬笅鍒掔嚎緇勬垚鐨勫瓧絎︿覆錛氣淾\w+$鈥濓紱
鍖歸厤email鍦板潃錛氣淾[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$鈥濓紱
鍖歸厤url錛氣淾[a-zA-z]+://鍖歸厤(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$鈥?br />

涓嬮潰鏄鍒欒〃杈懼紡涓殑涓浜涘父鐢ㄦā寮忋?/font>

/pattern/聽 緇撴灉聽
. 鍖歸厤闄ゆ崲琛岀浠ュ鐨勬墍鏈夊瓧絎?
x? 鍖歸厤 0 嬈℃垨涓嬈?x 瀛楃涓?
x* 鍖歸厤 0 嬈℃垨澶氭 x 瀛楃涓詫紝浣嗗尮閰嶅彲鑳界殑鏈灝戞鏁?
x+ 鍖歸厤 1 嬈℃垨澶氭 x 瀛楃涓詫紝浣嗗尮閰嶅彲鑳界殑鏈灝戞鏁?
.* 鍖歸厤 0 嬈℃垨涓嬈$殑浠諱綍瀛楃
.+ 鍖歸厤 1 嬈℃垨澶氭鐨勪換浣曞瓧絎?
{m} 鍖歸厤鍒氬ソ鏄?m 涓?鐨勬寚瀹氬瓧絎︿覆
{m,n} 鍖歸厤鍦?m涓?浠ヤ笂 n涓?浠ヤ笅 鐨勬寚瀹氬瓧絎︿覆
{m,} 鍖歸厤 m涓?浠ヤ笂 鐨勬寚瀹氬瓧絎︿覆
[] 鍖歸厤絎﹀悎 [] 鍐呯殑瀛楃
[^] 鍖歸厤涓嶇鍚?[] 鍐呯殑瀛楃
[0-9] 鍖歸厤鎵鏈夋暟瀛楀瓧絎?
[a-z] 鍖歸厤鎵鏈夊皬鍐欏瓧姣嶅瓧絎?
[^0-9] 鍖歸厤鎵鏈夐潪鏁板瓧瀛楃
[^a-z] 鍖歸厤鎵鏈夐潪灝忓啓瀛楁瘝瀛楃
^ 鍖歸厤瀛楃寮澶寸殑瀛楃
$ 鍖歸厤瀛楃緇撳熬鐨勫瓧絎?
\d 鍖歸厤涓涓暟瀛楃殑瀛楃錛屽拰 [0-9] 璇硶涓鏍?
\d+ 鍖歸厤澶氫釜鏁板瓧瀛楃涓詫紝鍜?[0-9]+ 璇硶涓鏍?
\D 闈炴暟瀛楋紝鍏朵粬鍚?\d
\D+ 闈炴暟瀛楋紝鍏朵粬鍚?\d+
\w 鑻辨枃瀛楁瘝鎴栨暟瀛楃殑瀛楃涓詫紝鍜?[a-zA-Z0-9] 璇硶涓鏍?
\w+ 鍜?[a-zA-Z0-9]+ 璇硶涓鏍?
\W 闈炶嫳鏂囧瓧姣嶆垨鏁板瓧鐨勫瓧絎︿覆錛屽拰 [^a-zA-Z0-9] 璇硶涓鏍?
\W+ 鍜?[^a-zA-Z0-9]+ 璇硶涓鏍?
\s 絀烘牸錛屽拰 [\n\t\r\f] 璇硶涓鏍?
\s+ 鍜?[\n\t\r\f]+ 涓鏍?
\S 闈炵┖鏍鹼紝鍜?[^\n\t\r\f] 璇硶涓鏍?
\S+ 鍜?[^\n\t\r\f]+ 璇硶涓鏍?
\b 鍖歸厤浠ヨ嫳鏂囧瓧姣?鏁板瓧涓鴻竟鐣岀殑瀛楃涓?
\B 鍖歸厤涓嶄互鑻辨枃瀛楁瘝,鏁板間負杈圭晫鐨勫瓧絎︿覆
a|b|c 鍖歸厤絎﹀悎a瀛楃 鎴栨槸b瀛楃 鎴栨槸c瀛楃 鐨勫瓧絎︿覆
abc 鍖歸厤鍚湁 abc 鐨勫瓧絎︿覆
(pattern) () 榪欎釜絎﹀彿浼氳浣忔墍鎵懼鍒扮殑瀛楃涓詫紝鏄竴涓緢瀹炵敤鐨勮娉曘傜涓涓?() 鍐呮墍鎵懼埌鐨勫瓧絎︿覆
鍙樻垚 $1 榪欎釜鍙橀噺鎴栨槸 \1 鍙橀噺錛岀浜屼釜 () 鍐呮墍鎵懼埌鐨勫瓧絎︿覆鍙樻垚 $2 榪欎釜鍙橀噺鎴栨槸 \2 鍙橀噺錛屼互姝?br />綾繪帹涓嬪幓銆偮?
/pattern/i i 榪欎釜鍙傛暟琛ㄧず蹇界暐鑻辨枃澶у皬鍐欙紝涔熷氨鏄湪鍖歸厤瀛楃涓茬殑鏃跺欙紝涓嶈冭檻鑻辨枃鐨勫ぇ灝忓啓闂銆?
\ 濡傛灉瑕佸湪 pattern 妯″紡涓壘瀵諱竴涓壒孌婂瓧絎︼紝濡?"*"錛屽垯瑕佸湪榪欎釜瀛楃鍓嶅姞涓?\ 絎﹀彿錛岃繖鏍鋒墠浼氳鐗規畩
瀛楃澶辨晥
3銆佹鍒欒〃杈懼紡鐨勫叓澶у師鍒?br />銆銆濡傛灉鍦?Unix 涓浘緇忎嬌鐢ㄨ繃 sed銆乤wk銆乬rep 榪欎簺鍛戒護鐨勮瘽錛岀浉淇″浜庢鍒欒〃杈懼紡(Regular Expression)
涓嶄細鎰熷埌闄岀敓銆備笅闈㈢粰澶у浠嬬粛鍑犳潯姝e垯琛ㄨ揪寮忎嬌鐢ㄨ繃紼嬩腑鐨?8 澶у師鍒欍?

姝e垯琛ㄨ揪寮忓湪瀵逛粯鏁版嵁鐨勬垬鏂椾腑鍙艦鎴愬簽澶х殑鑱旂洘鈥斺旇繖甯稿父鏄竴鍦烘垬浜夈傛垜浠璁頒綇涓嬮潰鍏潯鍘熷垯錛?/font>

路 鍘熷垯1錛氭鍒欒〃杈懼紡鏈変笁縐嶄笉鍚屽艦寮?鍖歸厤(m/ /)錛屾浛鎹?s/ / /eg)鍜岃漿鎹?tr/ / /))銆?/font>

路 鍘熷垯2錛氭鍒欒〃杈懼紡浠呭鏍囬噺榪涜鍖歸厤( $scalar =~ m/a/; 鍙互宸ヤ綔; @array =~ m/a/ 灝嗘妸@array浣滀負鏍囬噺
瀵瑰緟錛屽洜姝ゅ彲鑳戒笉浼氭垚鍔?銆?/font>

路 鍘熷垯3錛氭鍒欒〃杈懼紡鍖歸厤涓涓粰瀹氭ā寮忕殑鏈鏃╃殑鍙兘鍖歸厤銆傜己鐪佹椂錛屼粎鍖歸厤鎴栨浛鎹㈡鍒欒〃杈懼紡
涓嬈? $a = 'string string2'; $a =~ s/string/ /; 瀵艱嚧 $a = 'string 2')銆?/font>

路 鍘熷垯4錛氭鍒欒〃杈懼紡鑳藉澶勭悊鍙屽紩鍙鋒墍鑳藉鐞嗙殑浠繪剰鍜屽叏閮ㄥ瓧絎? $a =~ m/$varb/ 鍦ㄥ尮閰嶅墠鎶妚arb鎵╁睍涓?br />鍙橀噺錛涘鏋?$varb = 'a' $a = 'as'錛?a =~ s/$varb/ /; 絳変環浜?$a =~ s/a/ /; 錛屾墽琛岀粨鏋滀嬌 $a = " s" )銆?/font>

路 鍘熷垯5錛氭鍒欒〃杈懼紡鍦ㄦ眰鍊艱繃紼嬩腑浜х敓涓ょ鎯呭喌錛氱粨鏋滅姸鎬佸拰鍙嶅悜寮曠敤錛?$a=~ m/pattern/ 琛ㄧず $a 涓槸鍚︽湁
瀛愪覆 pattern 鍑虹幇錛?a =~ s/(word1)(word2)/$2$1/ 鍒欌滆皟鎹⑩濊繖涓や釜鍗曡瘝銆?/font>

路 鍘熷垯6錛氭鍒欒〃杈懼紡鐨勬牳蹇冭兘鍔涘湪浜庨氶厤絎﹀拰澶氶噸鍖歸厤榪愮畻絎︿互鍙婂畠浠浣曟搷浣溿?a =~ m/\w+/ 鍖歸厤涓涓垨澶氫釜
鍗曡瘝瀛楃錛?a =~ m/\d/" 鍖歸厤闆朵釜鎴栧涓暟瀛椼?/font>

路 鍘熷垯7錛氬鏋滄鍖歸厤涓嶆涓涓瓧絎﹂泦鍚堬紝Perl浣跨敤 "|" 鏉ュ鍔犵伒媧繪с傚鏋滆緭鍏?m/(cat|dog)/ 鍒欑浉褰撲簬鈥滃尮閰?br />瀛楃涓?cat 鎴栬?dog銆?/font>

路 鍘熷垯8錛歅erl鐢?(?..) 璇硶緇欐鍒欒〃杈懼紡鎻愪緵鎵╁睍鍔熻兘銆?/font>



閲庤崏 2006-06-05 09:15 鍙戣〃璇勮
]]>
灝忓铏?/title><link>http://m.tkk7.com/patterns/archive/2006/06/02/little_gecho.html</link><dc:creator>閲庤崏</dc:creator><author>閲庤崏</author><pubDate>Fri, 02 Jun 2006 09:08:00 GMT</pubDate><guid>http://m.tkk7.com/patterns/archive/2006/06/02/little_gecho.html</guid><wfw:comment>http://m.tkk7.com/patterns/comments/49993.html</wfw:comment><comments>http://m.tkk7.com/patterns/archive/2006/06/02/little_gecho.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/patterns/comments/commentRss/49993.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/patterns/services/trackbacks/49993.html</trackback:ping><description><![CDATA[ <p>聽聽聽聽聽聽聽<font size="2">鍓嶄簺鏃ュ瓙錛屽伓鐒跺彂鐜板啺綆辯殑鍚庨潰澧欎笂瓚寸潃涓鍙皬澹佽檸錛屼綋闀垮ぇ姒?涓帢綾籌紝鏄劇劧鏄釜騫煎唇銆傛垜灝辨兂錛屽畠鏄庝箞鐖埌鎴戝閲屾潵鐨勶紝瀹冧負浠涔堜細鐖埌鎴戝閲屾潵錛屼互鍚庡畠鍚冧粈涔堛傝嚜宸變篃瑙夊緱鎸哄ソ絎戠殑錛屼負浠涔堜細鏈夎繖浜涙兂娉曘備粩緇嗘悳绱㈣剳嫻鋒繁澶勶紝鍥犱負鍦ㄥ畠韜笂鏈夊ソ澶氱編濂界殑绔ュ勾鍥炲繂銆傝嚜鍢蹭竴涓嬶紝璁告槸鈥滃叚涓鈥濆揩鍒頒簡鍚э紒</font></p> <p> <font size="2">聽聽聽聽聽聽聽 鎴戣寰楀畠搴旇灞炰簬鏇村箍闃旂殑灞嬪絀洪棿錛岃屼笉灞炰簬榪欑嫮灝忕殑灞嬪唴錛岄偅鍎挎湁瀹冪殑涓栫晫錛屾湁瀹冪殑綺懼僵錛屾洿鏈夊畠鐨勯鐗┿傛垜鐢熸曞畠楗挎浜嗭紝鏈夊ソ鍑犳鎯蟲姄浣忓畠錛屾妸瀹冩斁鍒扮獥澶栵紝鍙槸涓鐪ㄧ溂錛屽畠灝辮窇娌′簡銆傛垜榪樼壒鎰忕殑鍒板瀵繪壘錛屽彲緇堢┒娌℃壘鍒般傚彧寰楁瘡澶╀笂鐝墠緇欒翰鍦ㄨ钀芥棶鏃噷鐨勫畠鎵撳0鎷涘懠錛岀紱忓畠鍒楗挎錛屽彲鐖卞鐗圭殑灝忕敓鐏點?/font> </p> <p> <font size="2">聽聽聽聽聽聽聽 鏃墮棿涓闀胯繖浜嬪氨娣″繕浜嗭紝浠婂ぉ鏃╀笂璧鋒潵錛屽闈㈢殑澶╂皵濂借薄濂借搗鏉ヤ簡錛屾媺寮紿楀笜錛屼幾涓噿鑵幫紝鎽樹笅鐪奸暅錛屾悅鎼傜潯鎰忔湨鑳х殑鐪肩潧銆傚櫕錛屽湴涓婂摢鏉ョ殑榛戠嚎鍥紝鎴翠笂鐪奸暅錛屼竴鐪嬶紝鍛錛佽繖涓嶆槸灝忓铏庡悧錛熷熬宸存柇浜嗭紝瓚村湪閭o紝涓鍙埅瀛愬湪鎶栧姩鐫錛岀毊鑲や篃澶卞幓浜嗗厜娉姐傚攭錛佹垜鎯沖彲鑳藉皬澹佽檸鏈潵鐖笂浜嗙獥甯橈紝鎴戜竴鎷夌獥甯樺畠灝辨帀浜嗕笅鏉ワ紝姝eソ琚垜韙╁湪浜嗚剼涓嬨備笉鐭ラ亾瀹冭繕鑳戒笉鑳芥椿浜嗭紝鎴戣刀绱ф妸瀹冩嫞璧鋒潵錛屾斁鍒扮獥澶栫殑鑺辯泦涓紝閭e効鏈夌偣婀挎皵錛屾湁涓浜涘皬铏瓙銆傛垜鐪嬬潃瀹冿紝瀹冭洞鍦ㄩ偅涓鍔ㄤ笉鍔紝鎴戞兂澶ф鏄浜嗐傜瓑鍒版礂婕卞畬鍐嶆潵鐪嬶紝鍣紒涓嶈浜嗭紝鏄笉鏄埇璧頒簡銆傚績涓殫鏆楃獌鍠滐紝瑕佹槸灝忓铏庤繕媧葷潃錛岃繖鐪熸槸澶ソ浜嗐?/font> </p> <p> <font size="2">聽聽聽聽聽聽聽 涓鍙皬灝忕殑澹佽檸錛岃蛋榪涗簡鏈笉灞炰簬瀹冪殑涓栫晫錛岄ケ緇忔姌紓紝鎴戞兂瀹冨簲璇ユ湁鏇村己鐨勭敓鍛藉姏銆備篃璁歌繖灝辨槸瀹冮噸鐢熺殑鍒囨満錛岃櫧鐒訛紝榪樺甫鐫娌夌棝鐨勪激錛屼絾姣曠珶鑾峰緱浜嗘柊鐢熴?/font> </p> <img src ="http://m.tkk7.com/patterns/aggbug/49993.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/patterns/" target="_blank">閲庤崏</a> 2006-06-02 17:08 <a href="http://m.tkk7.com/patterns/archive/2006/06/02/little_gecho.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍒濇帰mysql-5.0.20http://m.tkk7.com/patterns/archive/2006/05/27/mysql_summary.html閲庤崏閲庤崏Sat, 27 May 2006 07:20:00 GMThttp://m.tkk7.com/patterns/archive/2006/05/27/mysql_summary.htmlhttp://m.tkk7.com/patterns/comments/48485.htmlhttp://m.tkk7.com/patterns/archive/2006/05/27/mysql_summary.html#Feedback0http://m.tkk7.com/patterns/comments/commentRss/48485.htmlhttp://m.tkk7.com/patterns/services/trackbacks/48485.html 1銆乵ysql-4.0.22涓嶆敮鎸佸祵濂楁煡璇紝mysql-5.0.20鍙互銆?/font>

2銆佷貢鐮侀棶棰?br />web搴旂敤鐨勬暟鎹簱榪炴帴錛?br />jdbc.driverClassName=org.gjt.mm.mysql.Driver
jdbc.url=jdbc:mysql://localhost/cs?useUnicode=true&amp;characterEncoding=gbk
jdbc.userName=cs
jdbc.password=cs

mysql-5.0.20鐨刴y.ini鏂囦歡錛?br />default-character-set=gbk
鏈変袱澶勶紝涓澶勬寚鏁版嵁瀛樺彇榪囩▼涓殑緙栫爜錛屼竴澶勬寚鍒涘緩schema鎴杢able鐨勯粯璁ょ紪鐮併傛墍浠ョ揣璁拌瀹岀紪鐮佸悗鍐嶅緩schema鎴杢able錛屽惁鍒欒繕鏄貢鐮併?/font>

3銆佷嬌鐢∕ySQL Administrator 1.1寤虹珛schema銆乼able鎴杣ser絳夛紝浣跨敤MySQL Query Browser 1.1鏌ヨ緇撴灉錛屼嬌鐢∕ySQL Workbench寤烘ā銆?/font>

4銆乵ysql鍩烘湰鍛戒護
鍚姩錛氬湪瀹夎鏃跺畨瑁厀indows鐨勬湇鍔★紝浠庢湇鍔″惎鍔ㄥ拰鍋滄錛?br />鐧誨綍錛歮ysql -hlocalhost -uroot -padmin
鍏朵粬錛歴how databases;
聽聽聽聽聽聽聽聽聽聽聽 聽use XXDB;
聽聽聽聽聽聽聽聽聽聽聽聽 show tables;

5銆佹暟鎹簱澶囦喚鍜屾仮澶?br />澶囦喚錛?strong>mysqldump -hlocalhost -uroot -padmin database_name>d:/database_name.data
鎭㈠錛氶鍏堝垱寤烘暟鎹簱database_name錛涚劧鍚庡懡浠?mysql-hlocalhost -uroot -padmin database_name<d:/database_name.data



閲庤崏 2006-05-27 15:20 鍙戣〃璇勮
]]>
prototype.js + util.js浣縜jax鏇村姞綆鍗曢忔槑http://m.tkk7.com/patterns/archive/2006/05/14/prototype_util_ajax.html閲庤崏閲庤崏Sun, 14 May 2006 13:29:00 GMThttp://m.tkk7.com/patterns/archive/2006/05/14/prototype_util_ajax.htmlhttp://m.tkk7.com/patterns/comments/46130.htmlhttp://m.tkk7.com/patterns/archive/2006/05/14/prototype_util_ajax.html#Feedback0http://m.tkk7.com/patterns/comments/commentRss/46130.htmlhttp://m.tkk7.com/patterns/services/trackbacks/46130.html 榪戜竴孌墊椂闂達紝瀛︿範ajax鐨勫簲鐢紝鎺ヨЕ浜哾wr妗嗘灦鍜孉jaxTags銆傛諱綋瑙夊緱dwr浣跨敤閰嶇疆姣旇緝澶嶆潅錛屼笉澶忔槑錛屼嬌浜烘湁涓縐嶄笉澶斁蹇冪殑鎰熻錛屼笖瀵箂truts鐨勬敮鎸佷笉澶熷ソ銆侫jaxTags鐨勪嬌鐢ㄥ叿鏈夐〉闈㈠厓绱犵殑閽堝鎬э紝涓嶅鑷敱銆傛晠姝ゆ垜鎯沖皢prototype.js鍜宒wr鐨剈til.js緇撳悎璧鋒潵錛屼嬌鎴戜滑鐨刟jax搴旂敤鏇村姞閫忔槑鍜岀畝鍗曘?br />
榪欐牱緇勫悎鐨勪紭鍔匡紵

1銆?span style="FONT: 7pt 'Times New Roman'"> 鍙槸澧炲姞浜嗕袱涓?span lang="EN-US">js鏂囦歡鍜屽鐞嗕綘欏甸潰鐨刯s錛岃繖浜涗笢瑗垮浣犳槸閫忔槑鐨勶紝寰堢畝鍗曘?o:p>

2銆?span style="FONT: 7pt 'Times New Roman'"> 涓嶅獎鍝嶆湇鍔″櫒绔殑鏋舵瀯錛屼笉綆′綘鏄彧浣跨敤struts錛岃繕鏄痵truts + spring + hibernate銆?o:p>


鏈嶅姟绔悜瀹㈡埛绔彁渚涗簡浠涔堬紵

1銆?span style="FONT: 7pt 'Times New Roman'"> 綆鍗曞璞?span lang="EN-US">

String銆乮nt銆丏ate絳夌被鍨嬬殑鍗曚竴鏁版嵁錛岃繑鍥炵粰瀹㈡埛绔樉紺洪兘鏄瓧絎︿覆銆?o:p>

2銆?span style="FONT: 7pt 'Times New Roman'"> 澶嶆潅瀵硅薄

鐢ㄦ埛鑷畾涔?span lang="EN-US">POJO瀵硅薄銆?o:p>

3銆?span style="FONT: 7pt 'Times New Roman'"> 鍒楄〃瀵硅薄

List瀵硅薄錛岄噷闈㈡斁鐨勬槸鍚屼竴POJO瀵硅薄銆?o:p>

瀹㈡埛绔彲浠ヨВ鏋愪粈涔堬紵

1銆?span style="FONT: 7pt 'Times New Roman'"> 綆鍗曞璞℃病鏈夐棶棰樸?span lang="EN-US">

2銆?span style="FONT: 7pt 'Times New Roman'"> 澶嶆潅瀵硅薄鍙互浣跨敤綾諱技浜?span lang="EN-US">map瀵硅薄鏉ヤ唬鏇匡紝渚嬪錛?o:p>

public class Person {

聽聽聽 private int id;

聽聽聽 private String name;

聽聽聽 private String gender;

聽聽聽 private int age;

聽聽聽 public void setId(int id) {

聽聽聽聽聽聽聽 this.id = id;

聽聽聽 }

聽聽聽 public String getName() {

聽聽聽聽聽聽聽 return name;

}

銆傘傘?span lang="EN-US">

}

鍙嬌鐢ㄥ涓嬪艦寮忔潵琛ㄧず錛?span lang="EN-US">

var person = { id:'001', name:'test1', gender:'鐢?, age:'15' };

3銆?span style="FONT: 7pt 'Times New Roman'"> 鍒楄〃瀵硅薄錛屽彲浠ヤ嬌鐢?span lang="EN-US">array瀵硅薄涓斁緗甿ap瀵硅薄琛ㄧず錛屼緥濡傦細

var people =[{ id:'001', name:'test1', gender:'鐢?, age:'15' },{ id:'002', name:'test2', gender:'濂?, age:'13' } ]

瀹㈡埛绔庝箞瑙f瀽錛?span lang="EN-US">

榪欐椂灝卞彲浠ュ彂鎸?span lang="EN-US">util.js鐨勫姛鑳戒簡錛屽湪dwr緗戠珯涓婂彲浠ヨ瑙併?o:p>

ajax鍦ㄥ摢閲岋紵

ajax鐨勫簲鐢ㄥ湪prototype.js涓紝瀹冮拡瀵筧jax鎻愪緵浜嗗ソ澶氭柟娉曪紝璇︾粏鍙prototype寮鍙戠瑪璁?/a>銆?o:p>

struts鎬庝箞榪斿洖錛?o:p>

鎴戞兂浠g爜浣犱竴鐪嬪氨鏄庣櫧錛?span lang="EN-US">

public ActionForward excute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {

聽聽聽 try {

聽聽聽聽聽聽聽 String text = null;

聽聽聽聽聽聽聽 // 鐢ㄦ埛鐧誨綍鍚?o:p>

聽聽聽聽聽聽聽 String logonName = request.getParameter("logonName");

聽聽聽聽聽聽聽

聽聽聽聽聽聽聽 logonName = StringUtil.convertEncoding(logonName,"ISO8859_1");

聽聽聽聽聽聽聽 // 鍒版暟鎹簱涓繘琛屾楠?..

聽聽聽聽聽聽聽 System.out.println("logonName:" + logonName);

聽聽聽聽聽聽聽 // 璇ョ敤鎴峰凡緇忓瓨鍦?o:p>

聽聽聽聽聽聽聽 text = logonName;

聽聽聽聽聽聽聽 // 灝嗙粨鏋滆繑鍥為〉闈?o:p>

聽聽聽聽聽聽聽 response.setContentType("text/xml; charset=UTF-8");

聽聽聽聽聽聽聽 response.setHeader("Cache-Control", "no-cache");

聽聽聽聽聽聽聽 PrintWriter pw = response.getWriter();

聽聽聽聽聽聽聽 pw.write(text);

聽聽聽聽聽聽聽 pw.close();

聽聽聽聽聽聽聽

聽聽聽 } catch (Exception e) {

聽聽聽聽聽聽聽 e.printStackTrace();

聽聽 }

聽聽聽聽聽聽聽

聽聽聽 //娉ㄦ剰

聽聽聽 return null;

}

鍒板簳鎬庝箞鐢紵

1銆?span style="FONT: 7pt 'Times New Roman'"> 瀹㈡埛绔嬌鐢?span lang="EN-US">get鏂瑰紡鍙戦佹暟鎹紝濡傛灉瑕佸彂閫佺殑鏄痜orm鏁版嵁鍙互浣跨敤prototype.js涓殑鏂規硶鐢熸垚鍙傛暟錛屼緥濡傦細var pars = Form.serialize(document.all.personForm)銆備唬鐮佺墖鏂涓嬶細

/*

澧炲姞浜哄憳

*/

function writePerson() {

聽聽聽 var url = 'ajax.do?method=showTableRows';

var pars = Form.serialize(document.all.personForm);

聽聽 new Ajax.Request(

聽聽聽聽聽 url,

聽聽聽聽聽 {method: 'get', parameters: pars, onComplete: personResult}

);

}

function personResult(result){

聽聽聽 fillTable(eval(result.responseText));

}

2銆?span style="FONT: 7pt 'Times New Roman'"> 鏈嶅姟鍣ㄧ鐨?span lang="EN-US">action鎺ュ彈鏁版嵁鍙互浣跨敤ActionForm錛圓ctionServlet浼氳嚜鍔ㄥ皝瑁呮暟鎹瓧涓茬殑錛夛紝涔熷彲浠ヤ嬌鐢細String personId = request.getParameter("personId")榪欐牱鐨勬柟娉曞崟鐙緱鍒版暟鎹?o:p>

3銆?span style="FONT: 7pt 'Times New Roman'"> 鍦ㄦ湇鍔″櫒绔嬌鐢?span lang="EN-US">AjaxUtil錛堟垜鍐欑殑涓涓伐鍏風被錛夛紝灝嗙粨鏋滆漿鍙樻垚map鎴朼rray錛屽啀榪斿洖緇欏鎴風銆?o:p>

import java.lang.reflect.Field;

import java.lang.reflect.InvocationTargetException;

import java.util.List;

import org.apache.commons.beanutils.BeanUtils;

public class AjaxUtil {

聽聽聽 /**

聽聽聽聽 * 灝唋ist緇撴瀯杞彉鎴恓s鐨刟rray緇撴瀯錛岃姹俵ist涓寘鍚殑鏄痬odel

聽聽聽聽 * 渚嬪錛歔{id:'1001',name:'test1'},{id:'1002',name:'test2'},{id:'1003',name:'test3'}]

聽聽聽聽 *

聽聽聽聽 * @param list

聽聽聽聽 *聽聽聽聽聽聽聽聽聽聽聽 List緇撴瀯

聽聽聽聽 * @return js鐨刟rray緇撴瀯

聽聽聽聽 *

聽聽聽聽 * @throws IllegalAccessException

聽聽聽聽 * @throws InvocationTargetException

聽聽聽聽 * @throws NoSuchMethodException

聽聽聽聽 */

聽聽聽 public static String list2StrArray(List list) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {

聽聽聽聽聽聽聽 StringBuffer strMap = new StringBuffer();

聽聽聽聽聽聽聽 strMap.append("[");

聽聽聽聽聽聽聽 int listSize = list.size();

聽聽聽聽聽聽聽 for (int i = 0; i < listSize; i++) {

聽聽聽聽聽聽聽聽聽聽聽 Object obj = list.get(i);

聽聽聽聽聽聽聽聽聽聽聽 if (i != listSize - 1)

聽聽 聽聽聽聽聽聽聽聽聽聽聽聽聽strMap.append(model2StrMap(obj)).append(",");

聽聽聽聽聽聽聽聽聽聽聽 else

聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 strMap.append(model2StrMap(obj));

聽聽聽聽聽聽聽 }

聽聽聽聽聽聽聽 strMap.append("]");

聽聽聽聽聽聽聽 return strMap.toString();

聽聽聽 }

聽聽聽 /**

聽聽聽聽 * 灝唌odel鐨勭粨鏋勮漿鍙樻垚js鐨刴ap緇撴瀯

聽聽聽聽 * 渚嬪錛歿id:'1001',name:'test'}

聽聽聽聽 *

聽聽聽聽 * @param obj

聽聽聽聽 *聽聽聽聽聽聽聽聽聽聽聽 浠諱竴瀵硅薄

聽聽聽聽 * @return js鐨刴ap緇撴瀯

聽聽聽聽 *

聽聽聽聽 * @throws IllegalAccessException

聽聽聽聽 * @throws InvocationTargetException

聽聽聽聽 * @throws NoSuchMethodException

聽聽聽聽 */

聽聽聽 public static String model2StrMap(Object obj) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {

聽聽聽聽聽聽聽 StringBuffer strMap = new StringBuffer();

聽聽聽聽聽聽聽 // 鑾峰緱model鐨勫睘鎬у瓧孌?o:p>

聽聽聽聽聽聽聽 Class clazz = obj.getClass();

聽聽聽聽聽聽聽 Field[] fields = clazz.getDeclaredFields();

聽聽聽聽聽聽聽 // 鍙栧嚭mode鐨勫睘鎬у?o:p>

聽聽聽聽聽聽聽 strMap.append("{");

聽聽聽聽聽聽聽 for (int i = 0; i < fields.length; i++) {

聽聽聽聽聽聽聽聽聽聽聽 String fieldName = fields[i].getName();

聽聽聽聽聽聽聽聽聽聽聽 String fieldValue = BeanUtils.getProperty(obj, fieldName);

聽聽聽聽聽聽聽聽聽聽聽 if (i != fields.length - 1)

聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 strMap.append(fieldName + ":'" + fieldValue + "',");

聽聽聽聽聽聽聽聽聽聽聽 else

聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 strMap.append(fieldName + ":'" + fieldValue + "'");

聽聽聽聽聽聽聽 }

聽聽聽聽聽聽聽 strMap.append("}");

聽聽聽聽聽聽聽 return strMap.toString();

聽聽聽 }

}


4銆?span style="FONT: 7pt 'Times New Roman'"> 瀹㈡埛绔緱鍒?span lang="EN-US">map鎴朼rray鍚庯紝浣跨敤dwr鐨剈til.js鎻愪緵鐨勬柟娉曞悜欏甸潰鍏冪礌濉厖鏁版嵁銆?o:p>

渚嬬▼涓嬭澆

simpleAjaxDemo



閲庤崏 2006-05-14 21:29 鍙戣〃璇勮
]]>
綆鍗曠伒媧葷殑鏉冮檺鏍?/title><link>http://m.tkk7.com/patterns/archive/2006/05/14/authority_tree.html</link><dc:creator>閲庤崏</dc:creator><author>閲庤崏</author><pubDate>Sun, 14 May 2006 01:11:00 GMT</pubDate><guid>http://m.tkk7.com/patterns/archive/2006/05/14/authority_tree.html</guid><wfw:comment>http://m.tkk7.com/patterns/comments/46047.html</wfw:comment><comments>http://m.tkk7.com/patterns/archive/2006/05/14/authority_tree.html#Feedback</comments><slash:comments>17</slash:comments><wfw:commentRss>http://m.tkk7.com/patterns/comments/commentRss/46047.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/patterns/services/trackbacks/46047.html</trackback:ping><description><![CDATA[     鎽樿: 鏈榪戝啓浜嗕竴媯墊潈闄愭爲錛屽洜涓哄湪鍐欎箣鍓嶅埌緗戜笂 google 浜嗕竴涓嬶紝濂藉儚娌℃湁姣旇緝瀹屾暣涓旂畝鍗曠殑鍋氭硶錛屾晠灝嗙粨鏋滀笌鍚勪綅鍏變韓涓涓嬨? 鎴戞槸灝? dree 浣滀簡涓浜涗慨鏀癸細 1銆? ...  <a href='http://m.tkk7.com/patterns/archive/2006/05/14/authority_tree.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/patterns/aggbug/46047.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/patterns/" target="_blank">閲庤崏</a> 2006-05-14 09:11 <a href="http://m.tkk7.com/patterns/archive/2006/05/14/authority_tree.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鏁版嵁搴撴煡璇㈢殑浼樺寲http://m.tkk7.com/patterns/archive/2006/05/09/index_sql_optimize.html閲庤崏閲庤崏Tue, 09 May 2006 09:38:00 GMThttp://m.tkk7.com/patterns/archive/2006/05/09/index_sql_optimize.htmlhttp://m.tkk7.com/patterns/comments/45250.htmlhttp://m.tkk7.com/patterns/archive/2006/05/09/index_sql_optimize.html#Feedback0http://m.tkk7.com/patterns/comments/commentRss/45250.htmlhttp://m.tkk7.com/patterns/services/trackbacks/45250.html闃呰鍏ㄦ枃

閲庤崏 2006-05-09 17:38 鍙戣〃璇勮
]]>
axis浣跨敤絎旇http://m.tkk7.com/patterns/archive/2006/05/06/axis_record0.html閲庤崏閲庤崏Sat, 06 May 2006 12:31:00 GMThttp://m.tkk7.com/patterns/archive/2006/05/06/axis_record0.htmlhttp://m.tkk7.com/patterns/comments/44803.htmlhttp://m.tkk7.com/patterns/archive/2006/05/06/axis_record0.html#Feedback3http://m.tkk7.com/patterns/comments/commentRss/44803.htmlhttp://m.tkk7.com/patterns/services/trackbacks/44803.html闃呰鍏ㄦ枃

閲庤崏 2006-05-06 20:31 鍙戣〃璇勮
]]>
錛堣漿錛塷racle緋葷粺琛ㄦ煡璇?/title><link>http://m.tkk7.com/patterns/archive/2006/04/11/oracle_systable_query.html</link><dc:creator>閲庤崏</dc:creator><author>閲庤崏</author><pubDate>Tue, 11 Apr 2006 03:04:00 GMT</pubDate><guid>http://m.tkk7.com/patterns/archive/2006/04/11/oracle_systable_query.html</guid><wfw:comment>http://m.tkk7.com/patterns/comments/40402.html</wfw:comment><comments>http://m.tkk7.com/patterns/archive/2006/04/11/oracle_systable_query.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/patterns/comments/commentRss/40402.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/patterns/services/trackbacks/40402.html</trackback:ping><description><![CDATA[ <p> <font size="2">鎽樿嚜錛?/font> <a > <font size="2">http://www.gbunix.com/htmldata/2004_06/2/5/article_53_1.html</font> </a> <br /> <br /> <font size="2">鏁版嵁瀛楀吀dict鎬繪槸灞炰簬Oracle鐢ㄦ埛sys鐨勩?<br />銆銆1銆佺敤鎴鳳細 <br />銆銆銆select username from dba_users; <br />銆銆鏀瑰彛浠?<br />銆銆銆alter user spgroup identified by spgtest; <br />銆銆2銆佽〃絀洪棿錛?<br />銆銆銆select * from dba_data_files; <br />銆銆銆select * from dba_tablespaces;//琛ㄧ┖闂?</font> </p> <p> <font size="2">銆銆銆select tablespace_name,sum(bytes), sum(blocks) <br />銆銆銆銆from dba_free_space group by tablespace_name;//絀洪棽琛ㄧ┖闂?</font> </p> <p> <font size="2">銆銆銆select * from dba_data_files <br />銆銆銆銆where tablespace_name='RBS';//琛ㄧ┖闂村搴旂殑鏁版嵁鏂囦歡 </font> </p> <p> <font size="2">銆銆銆select * from dba_segments <br />銆銆銆銆where tablespace_name='INDEXS'; <br />銆銆3銆佹暟鎹簱瀵硅薄錛?<br />銆銆銆select * from dba_objects; <br />銆銆銆CLUSTER銆丏ATABASE LINK銆丗UNCTION銆両NDEX銆丩IBRARY銆丳ACKAGE銆丳ACKAGE BODY銆?<br />銆銆銆PROCEDURE銆丼EQUENCE銆丼YNONYM銆乀ABLE銆乀RIGGER銆乀YPE銆乁NDEFINED銆乂IEW銆?<br />銆銆4銆佽〃錛?<br />銆銆銆select * from dba_tables; <br />銆銆銆analyze my_table compute statistics;->dba_tables鍚?鍒?<br />銆銆銆select extent_id,bytes from dba_extents <br />銆銆銆where segment_name='CUSTOMERS' and segment_type='TABLE' <br />銆銆銆order by extent_id;//琛ㄤ嬌鐢ㄧ殑extent鐨勪俊鎭俿egment_type='ROLLBACK'鏌ョ湅鍥炴粴孌電殑絀洪棿鍒嗛厤淇℃伅 <br />銆銆銆鍒椾俊鎭細<br />聽聽聽聽聽聽聽聽聽聽聽聽聽<1>.<br />銆銆銆銆select distinct table_name <br />銆銆銆銆from user_tab_columns <br />銆銆銆銆where column_name='SO_TYPE_ID';聽<br />聽聽聽聽聽聽聽聽聽聽聽聽<2>.<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽<font style="BACKGROUND-COLOR: #ffffff">鏌ヨ琛ㄧ殑鍒楀悕銆佹敞閲娿佺被鍨嬨侀暱搴?br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽select a.table_name,a.COLUMN_NAME,b.COMMENTS,a.DATA_TYPE,a.DATA_LENGTH<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽from user_tab_columns a,user_col_comments b<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽where a.table_NAME = b.table_NAME<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽and a.COLUMN_NAME = b.COLUMN_NAME<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽and a.TABLE_NAME = 'table_name';<br /></font>聽聽聽聽聽聽聽聽聽聽聽聽<br />銆銆5銆佺儲寮曪細銆 <br />銆銆銆select * from dba_indexes;//绱㈠紩錛屽寘鎷富閿儲寮?<br />銆銆銆select * from dba_ind_columns;//绱㈠紩鍒?<br />銆銆銆select i.index_name,i.uniqueness,c.column_name <br />銆銆銆銆from user_indexes i,user_ind_columns c <br />銆銆銆銆銆where i.index_name=c.index_name <br />銆銆銆銆銆and i.table_name ='ACC_NBR';//鑱旀帴浣跨敤 <br />銆銆6銆佸簭鍒楋細 <br />銆銆銆select * from dba_sequences; <br />銆銆7銆佽鍥撅細 <br />銆銆銆select * from dba_views; <br />銆銆銆select * from all_views; <br />銆銆text 鍙敤浜庢煡璇㈣鍥劇敓鎴愮殑鑴氭湰 <br />銆銆8銆佽仛綈囷細 <br />銆銆銆select * from dba_clusters; <br />銆銆9銆佸揩鐓э細 <br />銆銆銆select * from dba_snapshots; <br />銆銆蹇収銆佸垎鍖哄簲瀛樺湪鐩稿簲鐨勮〃絀洪棿銆?<br />銆銆10銆佸悓涔夎瘝錛?<br />銆銆銆select * from dba_synonyms <br />銆銆銆銆where table_owner='SPGROUP'; <br />銆銆銆銆//if owner is PUBLIC,then the synonyms is a public synonym. <br />銆銆銆銆銆if owner is one of users,then the synonyms is a private synonym. <br />銆銆11銆佹暟鎹簱閾撅細 <br />銆銆銆select * from dba_db_links; <br />銆銆鍦╯pbase涓嬪緩鏁版嵁搴撻摼 <br />銆銆銆create database link dbl_spnew <br />銆銆銆connect to spnew identified by spnew using 'jhhx'; <br />銆銆銆insert into </font> <a href="mailto:acc_nbr@dbl_spnew"> <font size="2">acc_nbr@dbl_spnew</font> </a> <font size="2"> <br />銆銆銆select * from acc_nbr where nxx_nbr='237' and line_nbr='8888'; <br />銆銆12銆佽Е鍙戝櫒錛?<br />銆銆銆select * from dba_trigers; <br />銆銆瀛樺偍榪囩▼錛屽嚱鏁頒粠dba_objects鏌ユ壘銆?<br />銆銆鍏舵枃鏈細select text from user_source where name='BOOK_SP_EXAMPLE'; <br />銆銆寤虹珛鍑洪敊錛歴elect * from user_errors; <br />銆銆oracle鎬繪槸灝嗗瓨鍌ㄨ繃紼嬶紝鍑芥暟絳夎蔣浠舵斁鍦⊿YSTEM琛ㄧ┖闂淬?<br />銆銆13銆佺害鏉燂細 <br />銆銆錛?錛夌害鏉熸槸鍜岃〃鍏寵仈鐨勶紝鍙湪create table鎴朼lter table table_name add/drop/modify鏉ュ緩绔嬨佷慨鏀廣佸垹闄ょ害鏉熴?<br />銆銆鍙互涓存椂紱佹綰︽潫錛屽錛?<br />銆銆銆alter table book_example <br />銆銆銆disable constraint book_example_1; <br />銆銆銆alter table book_example <br />銆銆銆enable constraint book_example_1; <br />銆銆錛?錛変富閿拰澶栭敭琚О涓鴻〃綰︽潫錛岃宯ot null鍜寀nique涔嬬被鐨勭害鏉熻縐頒負鍒楃害鏉熴傞氬父灝嗕富閿拰澶栭敭浣滀負鍗曠嫭鐨勫懡鍚嶇害鏉熸斁鍦ㄥ瓧孌靛垪琛ㄤ笅闈紝鑰屽垪綰︽潫鍙斁鍦ㄥ垪瀹氫箟鐨勫悓涓琛岋紝榪欐牱鏇村叿鏈夊彲璇繪с?<br />銆銆錛?錛夊垪綰︽潫鍙粠琛ㄥ畾涔夌湅鍑猴紝鍗砫escribe;琛ㄧ害鏉熷嵆涓婚敭鍜屽閿紝鍙粠dba_constraints鍜宒ba_cons_columns 鏌ャ?<br />銆銆銆select * from user_constraints <br />銆銆銆where table_name='BOOK_EXAMPLE'; <br />銆銆銆select owner,CONSTRAINT_NAME,TABLE_NAME <br />銆銆銆銆from user_constraints <br />銆銆銆銆where constraint_type='R' <br />銆銆銆銆order by table_name; <br />銆銆錛?錛夊畾涔夌害鏉熷彲浠ユ棤鍚嶏紙緋葷粺鑷姩鐢熸垚綰︽潫鍚嶏級鍜岃嚜宸卞畾涔夌害鏉熷悕錛堢壒鍒槸涓婚敭銆佸閿級 <br />銆銆濡傦細create table book_example <br />銆銆銆銆(identifier number not null); <br />銆銆銆銆create table book_example <br />銆銆銆銆(identifier number constranit book_example_1 not null); <br />銆銆14銆佸洖婊氭錛?<br />銆銆鍦ㄦ墍鏈夌殑淇敼緇撴灉瀛樺叆紓佺洏鍓嶏紝鍥炴粴孌典腑淇濇寔鎭㈠璇ヤ簨鍔℃墍闇鐨勫叏閮ㄤ俊鎭紝蹇呴』浠ユ暟鎹簱鍙戠敓鐨勪簨鍔℃潵鐩稿簲紜畾鍏跺ぇ灝忥紙DML璇彞鎵嶅彲鍥炴粴錛宑reate,drop,truncate絳塂DL涓嶈兘鍥炴粴錛夈?<br />銆銆鍥炴粴孌墊暟閲?騫跺彂浜嬪姟/4錛屼絾涓嶈兘瓚呰繃50錛涗嬌姣忎釜鍥炴粴孌靛ぇ灝忚凍澶熷鐞嗕竴涓畬鏁寸殑浜嬪姟錛?<br />銆銆銆create rollback segment r05 <br />銆銆銆tablespace rbs; <br />銆銆銆create rollback segment rbs_cvt <br />銆銆銆tablespace rbs <br />銆銆銆storage(initial 1M next 500k); <br />銆銆浣垮洖婊氭鍦ㄧ嚎 <br />銆銆銆alter rollback segment r04 online; <br />銆銆鐢╠ba_extents,v$rollback_segs鐩戞祴鍥炴粴孌電殑澶у皬鍜屽姩鎬佸闀褲?<br />銆銆鍥炴粴孌電殑鍖洪棿淇℃伅 <br />銆銆銆select * from dba_extents <br />銆銆銆where segment_type='ROLLBACK' and segment_name='RB1'; <br />銆銆鍥炴粴孌電殑孌典俊鎭?鍏朵腑bytes鏄劇ず鐩墠鍥炴粴孌電殑瀛楄妭鏁?<br />銆銆銆select * from dba_segments <br />銆銆銆銆where segment_type='ROLLBACK' and segment_name='RB1'; <br />銆銆涓轟簨鐗╂寚瀹氬洖褰掓 <br />銆銆銆set transaction use rollback segment rbs_cvt <br />銆銆閽堝bytes鍙互浣跨敤鍥炴粴孌靛洖緙┿?<br />銆銆銆alter rollback segment rbs_cvt shrink; <br />銆銆銆select bytes,extents,max_extents from dba_segments <br />銆銆銆銆where segment_type='ROLLBACK' and segment_name='RBS_CVT'; <br />銆銆鍥炴粴孌電殑褰撳墠鐘舵佷俊鎭細 <br />銆銆銆select * from dba_rollback_segs <br />銆銆銆銆where segment_name='RB1'; <br />銆銆姣斿鍥炴粴孌電姸鎬乻tatus錛屽洖婊氭鎵灞炲疄渚媔nstance_num <br />銆銆鏌ヤ紭鍖栧紀ptimal <br />銆銆銆select n.name,s.optsize <br />銆銆銆銆from v$rollname n,v$rollstat s <br />銆銆銆銆銆where n.usn=s.usn; <br />銆銆鍥炴粴孌典腑鐨勬暟鎹?<br />銆銆銆set transaction use rollback segment rb1;/*鍥炴粴孌靛悕*/ <br />銆銆銆select n.name,s.writes <br />銆銆銆銆from v$rollname n,v$rollstat s <br />銆銆銆銆銆where n.usn=s.usn; <br />銆銆褰撲簨鍔″鐞嗗畬姣曪紝鍐嶆鏌ヨ$rollstat錛屾瘮杈僿rites(鍥炴粴孌墊潯鐩瓧鑺傛暟)宸鹼紝鍙‘瀹氫簨鍔$殑澶у皬銆?<br />銆銆鏌ヨ鍥炴粴孌典腑鐨勪簨鍔?<br />銆銆銆column rr heading 'RB Segment' format a18 <br />銆銆銆column us heading 'Username' format a15 <br />銆銆銆column os heading 'Os User' format a10 <br />銆銆銆column te heading 'Terminal' format a10 <br />銆銆銆select r.name rr,nvl(s.username,'no transaction') us,s.osuser os,s.terminal te <br />銆銆銆銆from v$lock l,v$session s,v$rollname r <br />銆銆銆銆銆where l.sid=s.sid(+) <br />銆銆銆銆銆and trunc(l.id1/65536)=R.USN <br />銆銆銆銆銆and l.type='TX' <br />銆銆銆銆銆and l.lmode=6 <br />銆銆銆order by r.name; <br />銆銆15銆佷綔涓?<br />銆銆鏌ヨ浣滀笟淇℃伅 <br />銆銆銆select job,broken,next_date,interval,what from user_jobs; <br />銆銆銆select job,broken,next_date,interval,what from dba_jobs; <br />銆銆鏌ヨ姝e湪榪愯鐨勪綔涓?<br />銆銆銆select * from dba_jobs_running; <br />銆銆浣跨敤鍖卐xec dbms_job.submit(:v_num,'a;',sysdate,'sysdate + (10/(24*60*60))')鍔犲叆浣滀笟銆傞棿闅?0縐掗挓 <br />聽聽聽 exec dbms_job.submit(:v_num,'a;',sysdate,'sysdate + (11/(24*60))')鍔犲叆浣滀笟銆傞棿闅?1鍒嗛挓浣跨敤鍖卐xec dbms_job.remove(21)鍒犻櫎21鍙蜂綔涓氥?br /></font> </p> <img src ="http://m.tkk7.com/patterns/aggbug/40402.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/patterns/" target="_blank">閲庤崏</a> 2006-04-11 11:04 <a href="http://m.tkk7.com/patterns/archive/2006/04/11/oracle_systable_query.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍦―WR涓皟鐢℉ttp Servlet 瀵硅薄http://m.tkk7.com/patterns/archive/2006/04/07/dwr_access_servletobjects.html閲庤崏閲庤崏Fri, 07 Apr 2006 14:09:00 GMThttp://m.tkk7.com/patterns/archive/2006/04/07/dwr_access_servletobjects.htmlhttp://m.tkk7.com/patterns/comments/39926.htmlhttp://m.tkk7.com/patterns/archive/2006/04/07/dwr_access_servletobjects.html#Feedback0http://m.tkk7.com/patterns/comments/commentRss/39926.htmlhttp://m.tkk7.com/patterns/services/trackbacks/39926.html 鎴戜滑鍦ㄥ疄闄呯殑 web 搴旂敤寮鍙戣繃紼嬩腑錛屽湪鐢ㄦ埛鐧誨綍鍚庝細鍚?/span> session 涓鍏ヤ竴浜涗俊鎭紙渚嬪鐢ㄦ埛淇℃伅錛岃彍鍗曚俊鎭瓑錛夛紝鍦ㄩ〉闈㈡彁浜ゅ悗錛屼細浠?/span> session 涓彇鍑鴻繖浜涗俊鎭紝鎷兼垚瀹屾暣鐨勪笟鍔¤褰曪紝淇濆瓨鍒版暟鎹簱涓傛鏃跺氨瑕佹眰 DWR 鍙互涓?/span> Servlet 瀵硅薄閫氫俊銆?/span>

鍏跺疄 DWR 宸茬粡鑰冭檻濂戒簡錛屽湪 DWR1.1 涓彲浠ュ埄鐢?/span> uk.ltd.getahead.dwr.WebContext 鍜?/span> uk.ltd.getahead.dwr.WebContextFactory 鏉ュ拰 Http Servlet 鐨勬爣鍑嗗璞¤繘琛岄氫俊錛屽寘鎷細

l聽聽聽聽聽聽聽聽 HttpServletRequest

l聽聽聽聽聽聽聽聽 HttpServletResponse

l聽聽聽聽聽聽聽聽 HttpSession

l聽聽聽聽聽聽聽聽 ServletContext

l聽聽聽聽聽聽聽聽 ServletConfig

聽聽聽聽聽聽 鍏蜂綋鐨勪嬌鐢ㄦ柟娉曞涓嬶細

import javax.servlet.http.HttpServletRequest;

import uk.ltd.getahead.dwr.WebContext;

import uk.ltd.getahead.dwr.WebContextFactory;

///

WebContext ctx = WebContextFactory.get();

HttpServletRequest req = ctx.getHttpServletRequest();

聽聽聽聽聽聽 WebContext 鏄嬌鐢?/span> ThreadLocal 淇濆瓨鐨勶紝浣犲彲浠ョ湅涓涓?/span> uk.ltd.getahead.dwr.impl.DefaultWebContextBuilder 婧愮爜錛屾墍浠ュ彲浠ュ湪浠諱綍鍦版柟浣跨敤瀹冿紝渚嬪鍦ㄤ笂涓綃囩殑 demo 涓繘琛屾祴璇曞涓嬶細

鍦?/span> index.html 澶撮儴澧炲姞濡備笅浠g爜騫舵敼鍚嶄負 index.jsp

<%@ page contentType="text/html; charset=GBK" %>

<%

System.out.println("This is DWR servlet object!");

session.setAttribute("dwr","love dwr");

%>

淇敼 MessageDao.java 鐨勪唬鐮佸涓?/span>

package test.dwr;

import javax.servlet.http.HttpServletRequest;

import uk.ltd.getahead.dwr.WebContext;

import uk.ltd.getahead.dwr.WebContextFactory;

public class MessageDao {

聽聽聽 public Message save(Message message) {

聽聽聽聽聽聽聽 WebContext ctx = WebContextFactory.get();

聽聽聽聽聽聽聽 HttpServletRequest req = ctx.getHttpServletRequest();

聽聽聽聽聽聽聽

聽聽聽聽聽聽 System.out.println("========HttpServletRequest Begin=======");

聽聽聽聽聽聽聽 System.out.println("req:" + req.getRemoteHost());

聽聽聽聽聽聽聽 System.out.println("req-session:" + req.getSession().getAttribute("dwr"));

聽聽聽聽聽聽聽 System.out.println("text:" + req.getParameter("text"));

聽聽聽聽聽聽聽 System.out.println("from:" + req.getParameter("from"));

聽聽聽聽聽聽聽 System.out.println("=========HttpServletRequest End========");

聽聽聽聽聽聽聽 System.out.println("========Lucky DWR Begin=======");

聽聽聽聽聽聽聽 System.out.println("text:" + message.getText());

聽聽聽聽聽聽聽 System.out.println("from:" + message.getFrom());

聽聽聽聽聽聽聽 System.out.println("=========Lucky DWR End========");

聽聽聽聽聽聽聽 return message;

聽聽聽 }

聽聽聽 public Message get() {

聽聽聽聽聽聽聽 return new Message("This is the first dwr demo!", "test");

聽聽聽 }

}



閲庤崏 2006-04-07 22:09 鍙戣〃璇勮
]]>
DWR浣垮緱Java涓殑AJAX鍙樺緱綆鍗?/title><link>http://m.tkk7.com/patterns/archive/2006/04/02/first_dwr_demo.html</link><dc:creator>閲庤崏</dc:creator><author>閲庤崏</author><pubDate>Sun, 02 Apr 2006 12:41:00 GMT</pubDate><guid>http://m.tkk7.com/patterns/archive/2006/04/02/first_dwr_demo.html</guid><wfw:comment>http://m.tkk7.com/patterns/comments/38766.html</wfw:comment><comments>http://m.tkk7.com/patterns/archive/2006/04/02/first_dwr_demo.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.tkk7.com/patterns/comments/commentRss/38766.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/patterns/services/trackbacks/38766.html</trackback:ping><description><![CDATA[     鎽樿: DWR 鏄竴涓紑婧愮殑宸ュ叿錛屽ス鍒╃敤 Java 鐨勫弽灝勫拰 AJAX 鎶鏈疄鐜頒簡 javascript 涓? java 綾葷殑閫氫俊銆傚畼鏂圭綉绔欐槸錛? http://getahead.ltd.uk/dwr/ ...  <a href='http://m.tkk7.com/patterns/archive/2006/04/02/first_dwr_demo.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/patterns/aggbug/38766.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/patterns/" target="_blank">閲庤崏</a> 2006-04-02 20:41 <a href="http://m.tkk7.com/patterns/archive/2006/04/02/first_dwr_demo.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>浣跨敤dom4j鍜孹Pathhttp://m.tkk7.com/patterns/archive/2006/03/08/Dom4jAndXPath.html閲庤崏閲庤崏Wed, 08 Mar 2006 13:32:00 GMThttp://m.tkk7.com/patterns/archive/2006/03/08/Dom4jAndXPath.htmlhttp://m.tkk7.com/patterns/comments/34366.htmlhttp://m.tkk7.com/patterns/archive/2006/03/08/Dom4jAndXPath.html#Feedback4http://m.tkk7.com/patterns/comments/commentRss/34366.htmlhttp://m.tkk7.com/patterns/services/trackbacks/34366.html閰嶇疆寮鍙戝寘

dom4j-1.6.1.jar

jaxen-1.1-beta-6.jar錛?/SPAN>XPath蹇呭錛?/SPAN>

 

鍙栨煇涓鑺傜偣

Element root = (Element) document.selectSingleNode("http://root");

 

鍙栨煇涓鑺傜偣鐨勫睘鎬?/SPAN>

Attribute attribute = (Attribute) document.selectSingleNode("http://root/cell/@value");

 

浣跨敤緇忛獙

鎴戜滑鍦ㄥ仛緋葷粺闂翠氦浜掓椂錛岄氬父閫氳繃鑷畾涔夌殑xml鏂囦歡榪涜鏁版嵁浜ゆ崲銆備緥濡傦細緋葷粺A闇瑕佸悜緋葷粺B浼犺緭涓涓?/SPAN>xml瀛椾覆鐨勬潯浠跺涓嬶細

<?xml version="1.0" encoding="gb2312"?>

<root systemid="Darenkou" userid="admin" default="DA" icon="0000">

       <cell value=""/>

</root>

緋葷粺A鍙渶濉厖cell鑺傜偣鐨?/SPAN>value灞炴у鹼紝鎴戠殑寤鴻鏄皢榪欐xml鍐欐垚鏈湴鏂囦歡錛屾瘡嬈′紶杈撴椂棣栧厛璇誨彇xml鏂囦歡錛屽啀緗?/SPAN>cell鑺傜偣鐨?/SPAN>value灞炴у鹼紝鐒跺悗灝?/SPAN>xml瀵硅薄杞彉鎴愬瓧涓蹭紶緇欑郴緇?/SPAN>B銆傝繖鏍風殑浼樼偣鏄細涓鑸?/SPAN>systemid="Darenkou" userid="admin" default="DA" icon="0000" 鏄紶杈撳弬鏁幫紝褰撴湁鎵鍙樺姩鏃跺彧闇淇敼鏈湴鏂囦歡鍗沖彲銆?/SPAN>

 

璇︾粏渚嬬▼

test.xml

<?xml version="1.0" encoding="gb2312"?>

<root id="TK12" name="綆$悊鍛?/SPAN>" value=""/>

 

XmlTest.java

import java.io.File;

import java.io.IOException;

import java.io.StringWriter;

import java.io.UnsupportedEncodingException;

import java.util.HashMap;

import java.util.Iterator;

 

import org.dom4j.Document;

import org.dom4j.DocumentException;

import org.dom4j.Element;

import org.dom4j.io.OutputFormat;

import org.dom4j.io.SAXReader;

import org.dom4j.io.XMLWriter;

 

public class XmlTest {

       public static String generateXml(HashMap map) {

              String strXml = null;

 

              if (map != null) {

 

                     SAXReader reader = new SAXReader();

                     Document document = null;

 

                     try {

                            document = reader.read(new File("D:/test.xml"));

                     } catch (DocumentException e) {

                            e.printStackTrace();

 

                     }

 

                     Element root = (Element) document.selectSingleNode("http://root");

                     root.attribute("value").setValue("鍒嗗竷");

 

                     Iterator iter = map.keySet().iterator();

                     while (iter.hasNext()) {

                            String key = (String) iter.next();

                            String value = (String) map.get(key);

 

                            Element element = root.addElement("cell").addAttribute("value",

                                          key);

                            element.addElement("element").addAttribute("type", "鏁板?/SPAN>")

                                          .addAttribute("name", "浜烘暟").addText(value);

 

                     }

 

                     strXml = encodeXml(document, "gb2312");

              }

 

              return strXml;

       }

 

       private static String encodeXml(Document document, String aEncode) {

              // 榪涜緙栫爜杞崲

              StringWriter sw = new StringWriter();

 

              OutputFormat format = OutputFormat.createPrettyPrint();

              format.setEncoding(aEncode);

 

              try {

                     XMLWriter writer = new XMLWriter(format);

                     writer.setWriter(sw);

                     writer.write(document);

              } catch (UnsupportedEncodingException e) {

                     e.printStackTrace();

              } catch (IOException e) {

                     e.printStackTrace();

              }

 

              return sw.toString();

       }

 

       public static void main(String[] args) {

              HashMap map = new HashMap();

              map.put("涓婃搗", "200");

              map.put("鍖椾含", "300");

              map.put("澶╂觸", "300");

 

              System.out.println(generateXml(map));

 

       }

}

 



閲庤崏 2006-03-08 21:32 鍙戣〃璇勮
]]>
鍒濊瘑wxPython錛堢幆澧冮厤緗瘒錛?/title><link>http://m.tkk7.com/patterns/archive/2006/03/08/wxPython_env.html</link><dc:creator>閲庤崏</dc:creator><author>閲庤崏</author><pubDate>Wed, 08 Mar 2006 13:31:00 GMT</pubDate><guid>http://m.tkk7.com/patterns/archive/2006/03/08/wxPython_env.html</guid><wfw:comment>http://m.tkk7.com/patterns/comments/34365.html</wfw:comment><comments>http://m.tkk7.com/patterns/archive/2006/03/08/wxPython_env.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/patterns/comments/commentRss/34365.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/patterns/services/trackbacks/34365.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p></SPAN></P> <H1 style="MARGIN: 17pt 0cm 16.5pt; LINE-HEIGHT: 150%"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 22.0pt">鑳屾櫙<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></H1> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">浣跨敤<SPAN lang=EN-US>java宸茬粡涓ゅ勾澶氫簡錛屾湁鏃墮渶寮鍙戜竴浜涙闈㈢▼搴忎綔涓鴻緟鍔╁伐鍏鳳紝鐔熸倝java閭e氨鐢╦ava寮鍙戜簡錛屽彲鎭剁殑鏄緢灝忕殑搴旂敤紼嬪簭鍗磋鑳岃礋鐫涓涓簽澶с佺瘡璧樼殑jre錛岀壒鍒槸鍦ㄧ粰鐢ㄦ埛閮ㄧ講鏃訛紝榪樿鐗規剰鐨勫畨瑁卝re錛岀湡鏄棝鑻︺傝屼笖swing鐨勭晫闈㈡繪槸璁╀漢鎰熷埌涓嶄雞涓嶇被錛宻wt濂界偣錛屼絾鏄誨緱瑕佹嫋鐫jre錛岄儊闂楓?o:p></o:p></SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">姝eソ榪欐鏃墮棿蹇冭鏉ユ疆錛屾兂瀛︿竴鐐?SPAN lang=EN-US>c鐨勭煡璇嗭紝g鏉鍘誨嵈g鍒頒簡wxPython榪欎釜紲炲鐨勪笢涓滐細璺ㄥ鉤鍙般佹湰鍦扮晫闈€佽璦綆媧佲﹀叾瀹瀢xPython鏄熀浜嶱ython瑙i噴鍣ㄨ皟鐢╳xWidgets鐨勶紝鎵浠ュ畠鍏鋒湁Python璇█鐨勭畝媧侀珮鏁堬紝鍙堝叿鏈墂xWidgets鐨勬湰鍦板寲鍜岃法騫沖彴銆?o:p></o:p></SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">鎯寵緇嗕簡瑙o紝灝辯湅涓嬮潰緗戠珯錛?SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">Python錛?A ><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">http://www.python.org/</SPAN></A><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">WxWidgets錛?A ><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">http://wxwidgets.org/</SPAN></A><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">WxPython錛?A ><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">http://www.wxpython.org/</SPAN></A><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt"><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">鎯崇湅絀剁珶鏄粈涔堬紝灝辮窡鐫鎴戦厤緗幆澧冪湅<SPAN lang=EN-US>demo鍚э紒<o:p></o:p></SPAN></SPAN></P> <H1 style="MARGIN: 17pt 0cm 16.5pt; LINE-HEIGHT: 150%"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 22.0pt">閰嶇疆<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></H1> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><B><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">涓嬭澆瀹夎濡備笅杞歡錛?SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 瀹嬩綋"><SPAN style="mso-list: Ignore">1銆?SPAN style="FONT: 7pt 'Times New Roman'">  </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">python-2.4.msi錛?A ><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">http://www.python.org/download/</SPAN></A><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 瀹嬩綋"><SPAN style="mso-list: Ignore">2銆?SPAN style="FONT: 7pt 'Times New Roman'">  </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">wxPython2.6-win32-unicode-2.6.1.0-py24.exe<o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 瀹嬩綋"><SPAN style="mso-list: Ignore">3銆?SPAN style="FONT: 7pt 'Times New Roman'">  </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">wxPython2.6-win32-docs-demos-2.6.1.0.exe<o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 瀹嬩綋"><SPAN style="mso-list: Ignore">4銆?SPAN style="FONT: 7pt 'Times New Roman'">  </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">2鍜?閮藉湪<A ><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">http://www.wxpython.org/download.php#binaries</SPAN></A><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 瀹嬩綋"><SPAN style="mso-list: Ignore">5銆?SPAN style="FONT: 7pt 'Times New Roman'">  </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">瀹夎欏哄簭<SPAN lang=EN-US>1銆?銆?<o:p></o:p></SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 瀹嬩綋"><SPAN style="mso-list: Ignore">6銆?SPAN style="FONT: 7pt 'Times New Roman'">  </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">鐐瑰嚮緋葷粺鑿滃崟<SPAN lang=EN-US>wxPython2.6 Docs and Demos and Tools 鐨?Run the wxPython Deme錛屾槸涓嶆槸宸茬湅鍒頒簡鍙埍鐨刾ython浜嗭紝浠旂粏嬈h祻鍚э紒<BR><BR><o:p></o:p></SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><B><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 150%; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt">紼嶅井瑙i噴涓涓嬶細<SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></B></P><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 瀹嬩綋; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: 'Times New Roman'">python鏄竴涓В閲婂櫒錛屼負wxPython鎻愪緵榪愯鐜鐨勶紝瀹夎wxPython鏃朵細鑷姩瀹夎鍦╬ython涓葷洰褰曠殑/lib/site-packages鐩綍涓嬨?/SPAN><img src ="http://m.tkk7.com/patterns/aggbug/34365.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/patterns/" target="_blank">閲庤崏</a> 2006-03-08 21:31 <a href="http://m.tkk7.com/patterns/archive/2006/03/08/wxPython_env.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>涓涓暟鎹簱杞紪鐮佺殑闂http://m.tkk7.com/patterns/archive/2006/03/08/orcleCoding.html閲庤崏閲庤崏Wed, 08 Mar 2006 13:28:00 GMThttp://m.tkk7.com/patterns/archive/2006/03/08/orcleCoding.htmlhttp://m.tkk7.com/patterns/comments/34364.htmlhttp://m.tkk7.com/patterns/archive/2006/03/08/orcleCoding.html#Feedback0http://m.tkk7.com/patterns/comments/commentRss/34364.htmlhttp://m.tkk7.com/patterns/services/trackbacks/34364.html鍦╦ava涓垜浠粡甯鎬嬌鐢ㄤ竴涓嬭娉?/FONT>

......
String exSQL = " SELECT * FROM PK_TEST WHERE ID = ?";     
pstmt = conn.prepareStatement(exSQL);
pstmt.setString(1,idValue);
ResultSet rs = pstmt.executeQuery();
......

鍏朵腑PK_TEST緇撴瀯濡備笅錛?/FONT>

CREATE TABLE PK_TEST (
  ID      CHAR (9)      NOT NULL,
  NAME    VARCHAR2 (40),
  GENDER  CHAR (1),
  CONSTRAINT PK_PK_TEST
  PRIMARY KEY ( ID ) ) ;
娉ㄦ剰錛欼D鏄疌HAR (9)

鍦ㄨ〃涓彃鍏ユ祴璇曟暟鎹細
INSERT INTO PK_TEST ( ID, NAME, GENDER ) VALUES ('1        ', 'test1', '1');
INSERT INTO PK_TEST ( ID, NAME, GENDER ) VALUES ('2        ', 'test2', '0');
INSERT INTO PK_TEST ( ID, NAME, GENDER ) VALUES ('3        ', 'test3', '1');
INSERT INTO PK_TEST ( ID, NAME, GENDER ) VALUES ('123456789', 'test4', '0');
INSERT INTO PK_TEST ( ID, NAME, GENDER ) VALUES ('987654321', 'test5', '1');

浣跨敤Toad鎵ц:
SELECT * FROM PK_TEST WHERE ID ='1';
SELECT * FROM PK_TEST WHERE ID ='1        ';

閮芥病鏈夐棶棰橈紝浣嗗鏋滄垜灝嗗墠闈ava璇硶pstmt.setString(1,idValue);涓殑idValue璧嬪間負'1'錛岀▼搴忓氨鏄彇涓嶅埌鍊鹼紱
緇х畫嫻嬭瘯錛?BR>SELECT * FROM PK_TEST WHERE ID = :ID;
璧嬪間負'1'錛屾病鏈夌粨鏋滐紱
璧嬪間負'1        '錛岀粨鏋滃嚭鏉ヤ簡錛?/FONT>

鍙鏃犺鍦╦dbc榪樻槸鍦ㄦ暟鎹簱涓蔣緙栫爜鍜岀‖緙栫爜鏈変竴瀹氱殑鍖哄埆銆?/FONT>

鍞夛紒鏁寸悊鏁版嵁搴撲腑鐨勪富閿惂錛欼D = SUBSTR(TRIM(ID)||'000000000',0,9);



閲庤崏 2006-03-08 21:28 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 国产男女爽爽爽爽爽免费视频| 亚欧免费无码aⅴ在线观看| 五月天婷婷精品免费视频| 黄床大片免费30分钟国产精品| a视频免费在线观看| 57pao一国产成视频永久免费| 99国产精品永久免费视频 | 免费一级毛片在线播放视频免费观看永久 | 亚洲美女色在线欧洲美女| 亚洲一区二区久久| 精品国产亚洲一区二区三区在线观看 | 国产免费伦精品一区二区三区 | 香蕉视频在线观看免费| 国产一级婬片A视频免费观看| 一区二区三区在线免费看| 24小时日本在线www免费的| 亚洲?V乱码久久精品蜜桃 | 亚洲国产综合无码一区二区二三区| 国产AV无码专区亚洲AV男同| 亚洲国产精品成人久久久| 美女视频黄频a免费| 亚欧免费无码aⅴ在线观看| 妞干网免费视频观看| 伊人婷婷综合缴情亚洲五月| 亚洲精品国产肉丝袜久久| 亚洲av纯肉无码精品动漫| 久久免费国产精品一区二区| 最新中文字幕免费视频| 日韩一卡2卡3卡4卡新区亚洲| 亚洲国产视频一区| 日本在线观看免费高清| 每天更新的免费av片在线观看| 免费A级毛片在线播放不收费| 亚洲邪恶天堂影院在线观看| 亚洲高清乱码午夜电影网| 最近2019中文免费字幕在线观看| 成人免费无码大片A毛片抽搐 | 日韩亚洲精品福利| 亚洲精品无码久久久久久久 | 日韩人妻无码精品久久免费一| 国产精品极品美女免费观看 |