锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲美女高清一区二区三区,在线精品亚洲一区二区三区,亚洲中文字幕伊人久久无码http://m.tkk7.com/windforce/category/15610.htmlzh-cnFri, 08 Jun 2007 00:55:58 GMTFri, 08 Jun 2007 00:55:58 GMT60Java鐨勪腑鏂囩紪紼嬩笌閰嶇疆蹇冨緱[杞澆]http://m.tkk7.com/windforce/archive/2007/06/07/122517.html椋庝箣鍔?/dc:creator>椋庝箣鍔?/author>Thu, 07 Jun 2007 02:18:00 GMThttp://m.tkk7.com/windforce/archive/2007/06/07/122517.htmlhttp://m.tkk7.com/windforce/comments/122517.htmlhttp://m.tkk7.com/windforce/archive/2007/06/07/122517.html#Feedback0http://m.tkk7.com/windforce/comments/commentRss/122517.htmlhttp://m.tkk7.com/windforce/services/trackbacks/122517.htmlJava鐨勪腑鏂囬棶棰樺巻鍙叉?zhèn)犱箙锛寴q炵壞涓嶇粷錛岃嚦浠婁篃娌℃湁瀹屽叏瑙e喅錛屼絾鏄笂鏈夋斂絳栦笅鏈夊絳栵紝鎴戜滑鎬繪槸鏈夊姙娉曟悶瀹氬畠鐨勩傝窡Java鐩稿叧鐨勪腑鏂囬棶棰樹富瑕佹湁涓ょ被錛屼竴綾繪槸緙栫▼鐨勯棶棰橈紝娑夊強(qiáng)鍒癐/O錛屽唴鐮佽漿鎹㈢瓑銆傜浜岀被鏄疛ava榪愯鐜鐨勯厤緗紝娑夊強(qiáng)瀛椾綋錛屽睘鎬ч厤緗瓑銆傛垜鍒氬垰鐢ㄤ簡涓澶╃殑鏃墮棿瑙e喅榪欎簺闂錛岃寰楀緢鏈夊繀瑕佺粰鑷繁鍐欎釜澶囧繕褰曚箣綾葷殑銆?

鎴戠湅榪樻槸浠庨棶棰樺叆鎵嬪惂錛岃繖鏍蜂笉鑷翠簬璁╁ぇ瀹舵墦鐬岀潯銆傛垜鎯沖啓涓▼搴忥紝榪欎釜紼嬪簭鏈変釜鍩烘湰鍔熻兘灝辨槸鏄劇ず鏂囦歡鍐呭錛屾垜鐢↗TextArea鏉ュ仛鏄劇ず鐨勪簨鎯咃紝紼嬪簭綆鍗曠殑鍒板浜嗭紝浣嗘槸灝辨槸涓枃閮芥槸涔辯爜銆傛垜鐨勯厤緗槸JBuilder7錛孞Builder鑷甫鐨凧DK1.3.3_b24錛屾垜鑷繁瑁呯殑JDK鏄疛DK1.4.0_02_b02錛岄兘鏄富嫻佺殑JDK銆傛搷浣滅郴緇熸槸鑻辨枃Windows2000鍔犱腑鏂囨敮鎸佸寘銆?

鎴戝皾璇曟崲JDK錛?.3.3鍜?.4.0閮戒笉琛岋紝down涓涓渶鏂扮殑j2sdk-1_4_1-rc涔熸槸涓嶈錛屽ソ鍍忎笉鏄疛DK鐨勯棶棰橈紝浜庢槸鎴戝氨鎶婄簿鍔涢泦涓埌I/O鐨勭紪鐮佽漿鎹笂錛屾垜鏌ラ槄浜嗙綉涓婅嫢騫插叧浜嶫AVA涓枃闂鐨勬枃绔狅紝鎶婄紪鐮佽漿鎹㈡悶鐨勫嶅効娓呮錛屽彲鏄庝箞璇曪紝鎹粈涔堢紪鐮佹姌鑵鵑兘涓嶈錛屽弽鑰屾樉紺虹殑鏇寸碂緋曪紝褰撳垵榪樻槸涔辯殑鏈変簺瑙勭煩錛屽氨鏄薄鍦ㄧ函鑻辨枃緋葷粺涓婃樉紺虹殑閭f牱錛屽ソ姝規(guī)垜榪樼煡閬撻偅鏄眽瀛楋紝鍙槸鏄劇ず涓嶅嚭鏉ワ紝絳夋垜鎶樿吘緙栫爜錛屽氨鍙樺緱閮芥槸闂彿浜嗐傚攭錛岄儊闂鳳紒

緙栫爜杞崲蹇冨緱錛?

JAVA鍐呴儴鏄疷NICODE緙栫爜錛屽湪I/O鏃跺鏋滀嬌鐢≧eader/Writer灝辮鍙戠敓緙栫爜杞崲錛屼嬌鐢ㄧ郴緇熷睘鎬ile.encoding浣滀負(fù)緙栫爜鏂瑰紡銆傚鏋滀嬌鐢⊿tream灝辨病鏈夎漿鎹㈢殑浜嬫儏浜嗭紝閭f槸Binary鐨勬暟鎹?

鏈夌敤鐨勬柟娉曟湁錛?銆傚湪Reader/Writer涓婂姞encoding鐨勯夐」錛屾敞鎰忕紪鐮佺殑鏂瑰悜錛屽湪Reader涓殑encoding琛ㄧず鎶婃暟鎹粠encoding杞崲鎴怳nicode錛寃riter灝辨槸鎶奤nicode鐨勫瓧絎﹁漿鎹㈡垚encoding鏍煎紡鐨勩?銆傜敤String.getByte()鎶婂瓧絎︿覆杞崲鎴愭寚瀹氱紪鐮併?

甯哥敤鐨勭紪鐮佹牸寮忥細(xì)ISO8859_1錛岃繖涓槸鑻辨枃緋葷粺緙虹渷鐨?bit緙栫爜錛屽洜涓烘槸8bit鐨勶紝鎵浠ヤ笉浼?xì)鎶婃眽瀛楃殑楂樹綅鍒犲幓锛屾墍浠ョ敤瀹冧篃鏄彲浠ュ鐞嗘眽瀛楃殑錛堟垜鑷繁榪欎箞鐞嗚В錛屾昏寰楁湁浜涗笉濡ワ紝浣嗗張涓嶇煡閬撲笉濡ュ湪浣曞錛岃繕鏈涢珮浜烘寚鍑猴級(jí)銆侴B2312鍜孏BK錛屾眽瀛楃紪鐮侊紝鎺ㄨ崘浣跨敤GBK錛屽畠鍏煎GB2312騫朵笖鏀寔鏇村姹夊瓧銆俇NICODE錛屼竴涓ぇ鐨勫瓧絎﹂泦錛屼笉鐭ユ槸涓嶆槸鍥介檯鏍囧噯鍙嶆澶у閮芥敮鎸侊紝浣跨敤16浣嶅姣忎釜瀛楃緙栫爜錛屾眽瀛楄櫧鐒舵鍚堥傦紝浣嗚嫳鏂囧嵈鍚冧簭浜嗭紝瑕佺敤澶氫竴鍊嶇殑絀洪棿鏉ュ瓨鍌紝鎵浠ュ緢澶氫漢榪樻槸鑰佸ぇ涓嶄箰鎰忥紝鍐欑殑紼嬪簭涓嶆敮鎸乁NICODE銆?

JSP/Servlet鐨勪腑鏂囬棶棰樻湁涓ょ瑙e喅鍔炴硶錛?銆備笉鍦ㄧ▼搴忎腑榪涜緙栫爜杞崲錛屾妸榪欎釜宸ヤ綔浜ょ粰嫻忚鍣紝鏂規(guī)硶灝辨槸鐢╦avac 鈥揺ncoding GBK *.java鏉ョ紪璇戞墍鏈夌殑bean錛岀劧鍚庡湪JSP欏甸潰涓婂姞

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

鎴栬呮槸鍦℉TML涓洿鎺ュ姞錛?

鍒板簳鍔犻偅涓紝璇曡瘯灝辯煡閬撲簡錛屾垜涔熸悶涓嶆竻妤氫簡銆?

2銆傚湪紼嬪簭涓寚瀹氱紪鐮侊紝鐢╦avac 鈥揺ncoding ISO8859_1 *.java鏉ョ紪璇戞墍鏈夌殑bean錛屽湪娑夊強(qiáng)鍒頒腑鏂囨樉紺虹殑紼嬪簭涓婂姞

str=new String(str.getBytes("ISO8859_1"));

涓婇潰涓ょ鏂規(guī)硶涓嶈兘娣風(fēng)敤錛屾剰鎬濆氨鏄涔堝氨鏄疓BK錛岃涔堝氨鏄疘SO8859_1錛屼粠閲屽埌澶栭兘涓鏍峰氨濂戒簡銆?

鏁版嵁搴揓DBC鐨勪腑鏂囬棶棰橈紝涓鑸彧瑕佹寜鐓ф暟鎹簱鎸囧畾鐨勭紪鐮佽繘琛岃漿鎹紝姣斿鎸夌収ISO8859_1璇伙紝ISO8859_1鍐欙紝涓鑸氨娌′粈涔堥棶棰樹簡銆?

铏界劧鏈夎繖浜涚紪鐮佷笂鐨勫績寰楋紝浣嗘槸騫朵笉鑳借В鍐蟲垜鐨勯棶棰樸傜湅鏉ユ垜鐨勭▼搴忚緭鍏ヨ緭鍑虹敤鐨勯兘鏄疘SO8859_1錛屾垜鐨勯棶棰樿窡緙栫爜娌′粈涔堝叧緋匯傛槸涓嶆槸瀛椾綋鐨勯棶棰樺憿錛熷湪Swing鐨勭粍浠朵腑錛屽瓧浣撴繪槸閭d箞鍑犱釜錛屽熀鏈笂鏄畾姝葷殑錛岄夐偅涓兘涓嶈銆備絾鏄垜紿佺劧鍙戠幇鍙互鏇存敼榪欎簺瀛椾綋鐨勯厤緗紝灝辨槸font.properties 榪欎釜鏂囦歡錛屼竴鑸琂DK閮藉甫浜嗕腑鏂囩殑瀛椾綋閰嶇疆鏂囦歡錛屽彲鑳芥槸font.properties.zh涔嬬被鐨勶紝涓嶅悓鐗堟湰鐨凧DK鍚嶅瓧鏈変簺宸埆錛屼綘瑕佸仛鐨勫氨鏄敤涓枃鐨勯厤緗鐩杅ont.properties鏂囦歡銆傛垜婊″績嬈㈠枩鐨勪互涓烘垚鍔熶簡錛屼絾鏄け璐ユ棤鎯呯殑鍙堜竴嬈℃墦鍑諱簡鎴戙備笉鏄繖縐嶆柟娉曚笉瀵癸紝浣嗘槸鍦╓indows緋葷粺涓紝java鑳藉姣旇緝鑷姩鐨勬鏌ヤ綘鐨勭郴緇熺紪鐮侊紝浣跨敤鏈鍚堥傜殑瀛椾綋閰嶇疆鏂囦歡錛屼竴鑸笉闇瑕佷綘鏀瑰姩浜嗭紝鍦↗DK1.2涔嬪墠紜疄鏄榪欎箞鏀圭殑錛岄毦鎬偅綃囨枃绔犳槸JDK1.1鐨勬枃妗e憿銆?

榪瀎ont.properties涔熶笉鐏典簡錛屽攭錛屾槸涓嶆槸JBuilder鏈夐棶棰樺憖錛熷埌浜嗚繖鍎匡紝鎴戜笉寰椾笉鎬鐤戝畠浜嗭紝铏界劧瀹冧粠娌¤鎴戝け鏈涜繃錛屾垜鍏蟲帀JBuilder錛屾嬁璧稪DK鍛戒護(hù)琛岋紝鍝庡憖錛佸彲鐖辯殑涓枃绔熺劧鍑烘潵浜嗭紒綆鐩存槸.....鑾悕鍏跺鍛錛屽洜涓篔Builder涔熸槸鐢ㄧ殑榪欎釜JDK鍛錛熸病鐞嗙敱鍛錛屾垜鍐嶆鎵撳紑JBuilder錛岃繍琛岋紝涔辯爜錛佹簨.......鎴戞潵鐪嬬湅.....鎴戞妸JBuilder閲岄潰鐨勬墽琛屽懡浠ゆ嫹璐濆埌DOS紿楀彛閲屾墜鍔ㄦ墽琛?...娌℃湁涓枃.....鎬紝鎴戜粩緇嗗鐓ф垜鎵嬫暡鐨勫懡浠ゅ拰JBuilder鎷峰嚭鏉ョ殑鍛戒護(hù)錛岄櫎浜嗘垜鐢ㄧ殑鏄痡ava瀹冪敤鐨勬槸javaw涔嬪錛屽埆鐨勫嚑涔庨兘涓鏍鳳紝闅鵑亾.......榪欎釜java鍜宩avaw绔熺劧浼?xì)涓嶄竴鏍鳳紵

鍞?......瑕佹垜璇翠粈涔堝憿錛岀瓟妗堝氨鏄繖涓簡錛宩avaw浼?xì)鋴社敤涓巎ava涓嶅悓鐨凩ocal閰嶇疆榪涜宸ヤ綔錛屽鑷翠簡鎴戜竴鐩寸湅涓嶅埌涓枃錛岃宩ava灝辨槸濂藉ソ鐨勩侸Builder涔熸槸濂藉ソ鐨勶紝娌℃湁闂錛岃皟鐢╦avaw涔熶笉鏄畠鐨勯敊錛岄毦閬撲綘鎯蟲瘡嬈¤繍琛屾垨鑰呰皟璇曠殑鏃跺欒功鍑轟釜DOS榛戞涔堬紵鍛靛懙銆傝繖鏄疛DK鐨勪竴涓狟ug錛屾垜鍦╦ava鐨勭綉绔欎笂鏌ュ埌榪欎釜bug錛屾弿榪扮殑鎯呭喌璺熸垜鐨勪竴鏍鳳紝鐒跺悗Sun璇磋繖涓狟ug宸茬粡淇浜嗭紝鍢垮樋錛岀畝鐩村氨鏄壇娣★紒淇涓寗瀛愶紒Bug緙栧彿鏄細(xì)4629351銆備笉淇″彲浠ュ幓鐪嬬湅銆?

浣嗘槸闅鵑亾鎴戝氨涓嶈兘鍦↗Builder閲岄潰鐪嬫垜鍙埍鐨勪腑鏂囦簡鍚楋紵濂藉儚JBuilder5鐨勬椂鍊欒繕鑳介夋嫨鏄敤java榪樻槸javaw錛岀幇鍦ㄥソ鍍忔病娉曞効閫変簡銆傛庝箞鎵嶈兘璁﹋avaw鏀寔涓枃鍛紵緇忚繃鍙堟槸涓鐣嫤鑻︽煡鎵撅紝绔熺劧娌℃湁浠涔堢粨鏋滐紝閮侀椃錛佹褰撹嫤闂蜂箣鏃訛紝紿佺劧鎯寵搗褰撳垵閰嶇疆榪嘦NIX涓嬬殑TOMCAT錛屽ソ鍍忓姞浜嗕簺鍚姩鍙傛暟錛屽氨鑳借tomcat鏀寔涓枃浜嗭紝璧跺揩緲誨嚭浠ュ墠鐨勬枃妗o紝鍟婏紝騫稿ソ鎴戝綋鍒濆啓浜嗗伐浣滃績寰楋紝瑕佷笉鐒跺張鎶撶瀻浜嗐傚叾瀹為亾鐞嗗緢綆鍗曪紝灝辨槸緇橨AVA铏氭嫙鏈哄姞涓婁竴浜涘睘鎬э細(xì)

-Dfile.encoding=GBK -Ddefault.client.encoding=GBK -Duser.language=zh -Duser.region=CN

鎶婂畠璺熷湪javaw鐨勫懡浠よ鍚庨潰褰撳弬鏁幫紝鍝堝搱錛屾悶瀹氾紒

鍦↗Builder涓夋嫨Project->Project Properties->run->edit->VM Parameters錛屽~涓婂氨琛屼簡錛?

閰嶇疆蹇冨緱錛?

鍦↗DK浣庣増鏈拰UNIX涓嬶紝闇瑕佹敼鍔╢ont.properties錛岃JAVA VM鑳藉鎵懼埌鍚堥傜殑瀛椾綋鏉ユ樉紺烘眽瀛椼?

鐩墠涓烘錛宩avaw鏈塀ug錛屽彧浣跨敤鑻辨枃鐨凩ocal錛岄渶瑕佺粰VM鍔犱笂灞炴ф墠琛屾甯告樉紺轟腑鏂囥?br />鏂囩珷鍑哄錛?a >Java瀹?www.javajia.com)



]]>
閮侀椃鐨剘~c3p0榪炴帴姹犻厤緗?/title><link>http://m.tkk7.com/windforce/archive/2007/04/20/112202.html</link><dc:creator>椋庝箣鍔?/dc:creator><author>椋庝箣鍔?/author><pubDate>Fri, 20 Apr 2007 06:49:00 GMT</pubDate><guid>http://m.tkk7.com/windforce/archive/2007/04/20/112202.html</guid><wfw:comment>http://m.tkk7.com/windforce/comments/112202.html</wfw:comment><comments>http://m.tkk7.com/windforce/archive/2007/04/20/112202.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/windforce/comments/commentRss/112202.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/windforce/services/trackbacks/112202.html</trackback:ping><description><![CDATA[姝e父閰嶇疆錛?br /><bean id="dataSource"<br />聽聽class="com.mchange.v2.c3p0.ComboPooledDataSource"<br />聽聽destroy-method="close"><br />聽聽<property name="driverClass"><br />聽聽聽<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value><br />聽聽</property><br />聽聽<property name="jdbcUrl"><br />聽聽聽<value>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=xxx</value><br />聽聽</property><br />聽聽<property name="user"><br />聽聽聽<value>xxx</value><br />聽聽</property><br />聽聽<property name="password"><br />聽聽聽<value>xxx</value><br />聽聽</property><br />聽</bean><br />浣跨敤IDE鏍煎紡鍖栧悗錛屽彉涓?br /><bean id="dataSource"<br />聽聽class="com.mchange.v2.c3p0.ComboPooledDataSource"<br />聽聽destroy-method="close"><br />聽聽<property name="driverClass"><br />聽聽聽<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value><br />聽聽</property><br />聽聽<property name="jdbcUrl"><br /><font color="#ff3300">聽聽聽<value><br />聽聽聽聽聽聽jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=xxx<br />聽聽聽</value><br /></font>聽聽</property><br />聽聽<property name="user"><br />聽聽聽<value>xxx</value><br />聽聽</property><br />聽聽<property name="password"><br />聽聽聽<value>xxx</value><br />聽聽</property><br />聽</bean><br />灝辨媧諱篃涓嶈寰椾簡錛屾垜鐙傛檿鍝?...<br /><br /><img src ="http://m.tkk7.com/windforce/aggbug/112202.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/windforce/" target="_blank">椋庝箣鍔?/a> 2007-04-20 14:49 <a href="http://m.tkk7.com/windforce/archive/2007/04/20/112202.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>spring涓媗ob鏁版嵁澶勭悊銆愬師鍒涖?/title><link>http://m.tkk7.com/windforce/archive/2006/11/08/79880.html</link><dc:creator>椋庝箣鍔?/dc:creator><author>椋庝箣鍔?/author><pubDate>Wed, 08 Nov 2006 08:20:00 GMT</pubDate><guid>http://m.tkk7.com/windforce/archive/2006/11/08/79880.html</guid><wfw:comment>http://m.tkk7.com/windforce/comments/79880.html</wfw:comment><comments>http://m.tkk7.com/windforce/archive/2006/11/08/79880.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/windforce/comments/commentRss/79880.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/windforce/services/trackbacks/79880.html</trackback:ping><description><![CDATA[ <p> <font size="1">鍋氫簡涓畝鍗曠殑閫氬憡綆$悊錛屽湪鏈満嫻嬭瘯鏃舵暟鎹噺姣旇緝?yōu)畯銆傛渶寮濮嬬敤鐨勬椂varchar2鍒?000錛屼箣鍚庣敤hibernate涓殑text綾誨瀷錛屽搴旀暟鎹簱涓殑Clob綾誨瀷銆傚綋鏁版嵁閲忓皬浜?000鏃訛紝鍙互鐩存帴浣跨敤setObject()鎻掑叆鏁版嵁搴撱傚綋鏁版嵁閲忓ぇ浜?000鏃躲傛姤閿欙細(xì)socket write error銆?br />鏌ユ壘浜嗕竴浜涜祫鏂欙紝璇村綋鏁版嵁閲忚秴榪?000鏃訛紝搴旇浣跨敤嫻佹柟寮忔搷浣溿傜湅鍒板ご鏄忔槒錛岀儲(chǔ)閮界儲(chǔ)姝諱簡......<br />鏈鍚庡彂鐜癝pring灝佽浜嗗lob鏁版嵁鐨勬搷浣滐紝鍙互鐩存帴浣跨敤jdbcTemple鎿嶄綔lob鏁版嵁銆?br />褰撲嬌鐢∕ySql銆丮SSQL銆丱racle 10g鏃訛紝浣跨敤DefaultLobHandler錛涗嬌鐢∣racle 9i鏃朵嬌鐢∣racleLobHandler銆?br />紺轟緥浠g爜錛氥愯漿鍊糺avaWorld銆?br /></font> </p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <font size="1"> <span style="COLOR: #008080">聽1</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">final</span><span style="COLOR: #000000">聽File聽binaryFile聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽File(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">c:\\workspace\\wish.jpg</span><span style="COLOR: #000000">"</span></font> <font size="1"> <span style="COLOR: #000000">);<br /></span> <span style="COLOR: #008080">聽2</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">final</span><span style="COLOR: #000000">聽File聽txtFile聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽File(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">c:\\workspace\\test.txt</span><span style="COLOR: #000000">"</span></font> <font size="1"> <span style="COLOR: #000000">);<br /></span> <span style="COLOR: #008080">聽3</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽<br /></span> <span style="COLOR: #008080">聽4</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">final</span><span style="COLOR: #000000">聽InputStream聽is聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span></font> <font size="1"> <span style="COLOR: #000000">聽FileInputStream(binaryFile);<br /></span> <span style="COLOR: #008080">聽5</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">final</span><span style="COLOR: #000000">聽Reader聽reader聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span></font> <font size="1"> <span style="COLOR: #000000">聽FileReader(txtFile);<br /></span> <span style="COLOR: #008080">聽6</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽<br /></span> <span style="COLOR: #008080">聽7</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽JdbcTemplate聽jdbcTemplate聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span></font> <font size="1"> <span style="COLOR: #000000">聽JdbcTemplate(dataSource);<br /></span> <span style="COLOR: #008080">聽8</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽<br /></span> <span style="COLOR: #008080">聽9</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">final</span><span style="COLOR: #000000">聽LobHandler聽lobHandler聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span></font> <font size="1"> <span style="COLOR: #000000">聽DefaultLobHandler();<br /></span> <span style="COLOR: #008080">10</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽<br /></span> <span style="COLOR: #008080">11</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽jdbcTemplate.execute(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">INSERT聽INTO聽test聽(txt,聽image)聽VALUES(?,聽?)</span><span style="COLOR: #000000">"</span></font> <font size="1"> <span style="COLOR: #000000">,<br /></span> <span style="COLOR: #008080">12</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">new</span></font> <font size="1"> <span style="COLOR: #000000">聽AbstractLobCreatingPreparedStatementCallback(lobHandler)聽{<br /></span> <span style="COLOR: #008080">13</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span></font> <font size="1"> <span style="COLOR: #000000">聽setValues(PreparedStatement聽pstmt,聽LobCreator聽lobCreator)<br /></span> <span style="COLOR: #008080">14</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">throws</span></font> <font size="1"> <span style="COLOR: #000000">聽SQLException,聽DataAccessException聽{<br /></span> <span style="COLOR: #008080">15</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽lobCreator.setClobAsCharacterStream(pstmt,聽</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">,聽reader,聽(</span><span style="COLOR: #0000ff">int</span></font> <font size="1"> <span style="COLOR: #000000">)聽txtFile.length());<br /></span> <span style="COLOR: #008080">16</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽lobCreator.setBlobAsBinaryStream(pstmt,聽</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">,聽is,聽(</span><span style="COLOR: #0000ff">int</span></font> <font size="1"> <span style="COLOR: #000000">)聽binaryFile.length());<br /></span> <span style="COLOR: #008080">17</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span> <span style="COLOR: #008080">18</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽});<br /></span> <span style="COLOR: #008080">19</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽<br /></span> <span style="COLOR: #008080">20</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽reader.close();<br /></span> <span style="COLOR: #008080">21</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽is.close();<br /></span> <span style="COLOR: #008080">22</span>聽<span style="COLOR: #000000"></span></font> </div> <p> <font size="1">璇誨彇浠g爜錛?br /><br /></font> </p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <font size="1"> <span style="COLOR: #008080">聽1</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">final</span><span style="COLOR: #000000">聽Writer聽writer聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽FileWriter(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">c:\\workspace\\test_bak.txt</span><span style="COLOR: #000000">"</span></font> <font size="1"> <span style="COLOR: #000000">);<br /></span> <span style="COLOR: #008080">聽2</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">final</span><span style="COLOR: #000000">聽OutputStream聽os聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽FileOutputStream(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽File(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">c:\\workspace\\wish_bak.jpg</span><span style="COLOR: #000000">"</span></font> <font size="1"> <span style="COLOR: #000000">));<br /></span> <span style="COLOR: #008080">聽3</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽<br /></span> <span style="COLOR: #008080">聽4</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽jdbcTemplate.query(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">SELECT聽txt,image聽FROM聽test聽WHERE聽id聽=聽?</span><span style="COLOR: #000000">"</span></font> <font size="1"> <span style="COLOR: #000000">,<br /></span> <span style="COLOR: #008080">聽5</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽Object[]聽{</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽Integer(</span><span style="COLOR: #000000">1</span></font> <font size="1"> <span style="COLOR: #000000">)},<br /></span> <span style="COLOR: #008080">聽6</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">new</span></font> <font size="1"> <span style="COLOR: #000000">聽AbstractLobStreamingResultSetExtractor()聽{<br /></span> <span style="COLOR: #008080">聽7</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽streamData(ResultSet聽rs)聽</span><span style="COLOR: #0000ff">throws</span></font> <font size="1"> <span style="COLOR: #000000">聽SQLException,聽IOException,聽DataAccessException聽{<br /></span> <span style="COLOR: #008080">聽8</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽FileCopyUtils.copy(lobHandler.getClobAsCharacterStream(rs,聽</span><span style="COLOR: #000000">1</span></font> <font size="1"> <span style="COLOR: #000000">),聽writer);<br /></span> <span style="COLOR: #008080">聽9</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽FileCopyUtils.copy(lobHandler.getBlobAsBinaryStream(rs,聽</span><span style="COLOR: #000000">2</span></font> <font size="1"> <span style="COLOR: #000000">),聽os);<br /></span> <span style="COLOR: #008080">10</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span> <span style="COLOR: #008080">11</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽});<br /></span> <span style="COLOR: #008080">12</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽writer.close();<br /></span> <span style="COLOR: #008080">13</span>聽</font> <font size="1"> <span style="COLOR: #000000">聽聽聽聽聽聽聽聽os.close();<br /></span> <span style="COLOR: #008080">14</span>聽</font> <span style="COLOR: #000000"> <br /> </span> <font size="1"> <span style="COLOR: #008080">15</span>聽<span style="COLOR: #000000"></span></font> </div> <font size="1">澶囨敞1錛歄racleLobHandler瑕佹眰娉ㄥ叆CommonsDbcpNativeJdbcExtractor錛屽惁鍒欐姤閿欙細(xì)瑕佹眰浣跨敤OracleConnection錛屼笉鍙互浣跨敤Dbcp榪炴帴姹犮?br /></font> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <font size="1"> <span style="COLOR: #008080">1</span> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #000000">聽聽聽聽</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">bean聽id</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">lobHandler</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">org.springframework.jdbc.support.lob.OracleLobHandler</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">></span> </font> <span style="COLOR: #000000"> <br /> </span> <font size="1"> <span style="COLOR: #008080">2</span> <span style="COLOR: #000000"> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">property聽name</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">nativeJdbcExtractor</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">></span> </font> <span style="COLOR: #000000"> <br /> </span> <font size="1"> <span style="COLOR: #008080">3</span> <span style="COLOR: #000000"> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">bean聽</span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">/></span> </font> <span style="COLOR: #000000"> <br /> </span> <font size="1"> <span style="COLOR: #008080">4</span> <span style="COLOR: #000000"> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽</span> <span style="COLOR: #000000"></</span> <span style="COLOR: #000000">property</span> <span style="COLOR: #000000">></span> </font> <span style="COLOR: #000000"> <br /> </span> <font size="1"> <span style="COLOR: #008080">5</span> <span style="COLOR: #000000"> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽</span> <span style="COLOR: #000000"></</span> <span style="COLOR: #000000">bean</span> <span style="COLOR: #000000">></span> </font> </div> <font size="1">澶囨敞2錛歄racle椹卞姩鐗堟湰寰堝錛岃姹備嬌鐢ㄦ紜殑椹卞姩銆傚綋椹卞姩鐗堟湰閿欒鏃?鎶ラ敊錛氭棤娉曢噴鏀綥obHandler錛涙棤娉曞叧闂璚riter錛涙棤娉曚粠濂楁帴瀛楄鍙栨洿澶氱殑淇℃伅銆傛墽琛屾彃鍏ユ搷浣滐紝浣嗘槸Clob綾誨瀷鏁版嵁涓虹┖銆?/font> <img src ="http://m.tkk7.com/windforce/aggbug/79880.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/windforce/" target="_blank">椋庝箣鍔?/a> 2006-11-08 16:20 <a href="http://m.tkk7.com/windforce/archive/2006/11/08/79880.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍦↗DK1.4涓嬌鐢↗AXP1.3[杞澆]http://m.tkk7.com/windforce/archive/2006/09/28/72675.html椋庝箣鍔?/dc:creator>椋庝箣鍔?/author>Thu, 28 Sep 2006 13:03:00 GMThttp://m.tkk7.com/windforce/archive/2006/09/28/72675.htmlhttp://m.tkk7.com/windforce/comments/72675.htmlhttp://m.tkk7.com/windforce/archive/2006/09/28/72675.html#Feedback0http://m.tkk7.com/windforce/comments/commentRss/72675.htmlhttp://m.tkk7.com/windforce/services/trackbacks/72675.html鍦↗DK1.4涓嬌鐢↗AXP1.3
鐢變簬JDK1.5浠ヤ笂宸茬粡鑷甫jaxp浜嗭紝鑰宩dk1.4浠ヤ笅鐗堟湰闇瑕佽嚜宸辨坊鍔爅axp搴撴枃浠躲?/div>
1銆備笅杞?/div>
鍥犱負(fù)jwsdp-1.5涓甫鐨刯axp鏄?.26鐗堟湰錛屽洜姝ら渶瑕佸崟鐙噸鏂頒笅杞絡(luò)axp
鍙傝冿細(xì)
2.瀹夎:
JAXP_RI_20041025.class鎵鍦ㄧ殑鐩綍涓?榪涘叆鍛戒護(hù)琛岋紝
榪愯錛歫ava -cp . JAXP_RI_20041025
鐒跺悗灞忓箷涓婂垪鍑烘墍鏈夎В鍘嬪嚭鏉ョ殑鏂囦歡鍚嶅瓧銆?/div>
姝ゆ椂錛屽湪褰撳墠鐩綍涓嬩細(xì)鏈変竴涓彨jaxp-1_3鐨勭洰褰曪紝閲岄潰鏈塲axp鐨刯ar鏂囦歡鍜宎pi鏂囨。銆?/div>
3.jaxp闇瑕佺敤鍒扮殑jar涓?閮藉湪jaxp-1_3鐩綍涓?錛?/div>
dom.jar,jaxp-api.jar,sax.jar,xalan.jar,xercesImpl.jar
4.鎺ヤ笅鏉ュ氨鍙互鏍規(guī)嵁鑷繁闇瑕佹潵浣跨敤jaxp1.3浜?/div>
5.鐢變簬sun榛樿浣跨敤鐨勮В鏋愬櫒鏄粡榪囧叾鍖呰鍚庣殑(鍩轟簬Xerces version 2.6.0 鍜?XSLTC version 2.5.2),姣斿錛?/div>
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl(鍙煡鐪媕avax.xml.parsers.SAXParserFactory 鐨勬簮浠g爜),
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl(鍙煡鐪媕avax.xml.transform.TransformerFactory 鐨勬簮浠g爜).
鍥犳鍦ㄩ渶瑕佷嬌鐢ㄥ叾瀹冭В鏋愬櫒鐨勬椂鍊欙紝闇瑕侀氳繃璁劇疆緋葷粺灞炴у肩殑鏂瑰紡錛?/div>
鎴栬呭湪$java.home/lib/jaxp.properties榪涜閰嶇疆($java.home涓篠ystem.getProperty("java.home")鎵寰楀埌鐨勮礬寰勶紝鍏蜂綋鍙互鏌ョ湅javax.xml.parsers.FactoryFinder婧愪唬鐮佷腑鐨?static Object find(String factoryId, String fallbackClassName) 鏂規(guī)硶)鏉ラ夋嫨鍏蜂綋鐨勮В鏋愬櫒瀹炵幇銆?/div>
jaxp.properties涓敮鎸佷互涓嬪睘鎬?
紺轟緥鏂囦歡濡備笅(瀹為檯灝辨槸jaxp鐨勯粯璁ゅ?錛?/div>
javax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
javax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl javax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
javax.xml.datatype.DatatypeFactory=com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl
鍋囧闇瑕佷嬌鐢╝pache鐨勮В鏋愬櫒錛岄偅涔堝涓嬫搷浣?銆?/div>
(鍧囦負(fù)褰撳墠鏈鏂扮増鏈?
b.瑙e帇鑾峰緱鐩稿簲鐨刯ar鏂囦歡,鏀懼叆classpath涓?/div>
3.閰嶇疆jaxp.properties涓猴細(xì)
javax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.TransformerFactoryImpl
#涔熷彲浠ヤ嬌鐢?/div>
#javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
javax.xml.datatype.DatatypeFactory=org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl
6.闇瑕佸叧浜巎axp鐨勮皟璇曚俊鎭紝璁劇疆緋葷粺灞炴axp.debug涓?鍗沖彲
聽聽 System.setProperty("jaxp.debug","1");
鎴栬呰繍琛屾椂鐨勫懡浠や負(fù)錛?java -Djaxp.debug=1 com.lizongbo.TestJAXP
鍑犵瘒闈炲父濂界殑璧勬枡錛?/div>
JAXP 涓撹堪 Sun 鐨?Java API for XML 璇硶鍒嗘瀽
JAXP 鍐嶈堪 Sun 鐨?Java API for XML Parsing錛?.1 鐗?/span>
JAXP 1.3 鐨勬柊鐗規(guī)э紝絎?1 閮ㄥ垎
鎶鏈患榪幫紝鑰冨療瑙f瀽 API 鐨勫彉鍖栧拰鏂扮殑楠岃瘉 API
JAXP 1.3 鐨勬柊鐗規(guī)э紝絎?2 閮ㄥ垎
XPath 鍔熻兘銆佹敮鎸佸悕縐扮┖闂寸殑宸ュ叿鍜屽叾浠栨敼榪?/span>
JAXP 鍏ㄩ潰浠嬬粛錛岀 1 閮ㄥ垎
XML 澶勭悊宸ュ叿鍖呬嬌瑙f瀽鍜岄獙璇佸彉寰楁洿瀹規(guī)槗
Factory妯″紡鍜孉bstract聽Factory妯″紡
Java涓叧浜嶺ML鐨凙PI涓鐬?/strong>


Trackback: http://tb.donews.net/TrackBack.aspx?PostId=418679



]]>sendRedirect VS forwordhttp://m.tkk7.com/windforce/archive/2006/09/17/70139.html椋庝箣鍔?/dc:creator>椋庝箣鍔?/author>Sun, 17 Sep 2006 07:06:00 GMThttp://m.tkk7.com/windforce/archive/2006/09/17/70139.htmlhttp://m.tkk7.com/windforce/comments/70139.htmlhttp://m.tkk7.com/windforce/archive/2006/09/17/70139.html#Feedback0http://m.tkk7.com/windforce/comments/commentRss/70139.htmlhttp://m.tkk7.com/windforce/services/trackbacks/70139.html2.forward鏃訛紝鎿嶄綔瀹屽叏鍦ㄦ湇鍔″櫒绔繘琛岋紝鐢辨湇鍔″櫒鐩存帴鎵ц鏂扮殑URL銆傚鎴風(fēng)鐢氳嚦姣笉鐭ユ儏銆?br />3.鐢變簬sendRedirect鏄敱瀹㈡埛绔嚜鍔ㄨ姹傜殑錛屾墍浠ュ鎴風(fēng)殑絎竴嬈$殑璇鋒眰鏁版嵁灝變笉鑳藉緱鍒頒繚瀛橈紱鐩稿弽錛屽湪forward鐨勬儏鍐碉紝瀹㈡埛絎竴嬈$殑璇鋒眰鏁版嵁寰楀埌浜嗕繚瀛橈紝鍗沖湪鏂扮殑URL閲岃兘澶熷緱鍒板師鍏堢殑璇鋒眰鏁版嵁銆?br />4.鍦ㄧ浉鍚岀殑鎯呭喌涓嬶紝鐢變簬sendRedirect鐩稿綋浜庡鎴風(fēng)殑涓ゆ璇鋒眰錛屾墍浠orward鐨勬晥鐜囪緝sendRedirect瑕佸ソ銆?br />5.sendRedirect()涓瀹氳鍦╮esponse瀵硅薄,鍒殑璇█鐨勫ご鍩熻緭鍑烘病鏈夎緭鍑烘鏂囨椂鎵嶈兘浣跨敤,鍥犱負(fù)鎸塛3C鏍囧噯,澶村煙鍦ㄥ湪杈撳嚭鍚庢槸涓嶈鏀瑰彉鐘舵佺殑,鍙湁JSP鍜孲ERVLET鍙互鏀瑰彉瀹?鑰屼竴浣嗘湁姝f枃杈撳嚭,灝變細(xì)浜х敓BUFFER闃誨.

姣斿\r
<%
out.println("sss");
response.sendRedirect("url");
%>
榪欐槸閿欒鐨?鎴栬呭湪姝や箣鍓嶆湁HTML
<HTMLMWPW>
<%
response.sendRedirect("url");
%>
榪欎簡鏄敊璇殑,鍥犱負(fù)HTML鍐呭涔熸槸out瀵硅薄杈撳嚭鐨?response瀵硅薄宸茬粡琚崰鐢?榪欐椂搴旇鐢╢orward()鎵嶅.


]]>
struts涓嬭В鍐充貢鐮佷竴娉?/title><link>http://m.tkk7.com/windforce/archive/2006/09/13/69323.html</link><dc:creator>椋庝箣鍔?/dc:creator><author>椋庝箣鍔?/author><pubDate>Wed, 13 Sep 2006 02:51:00 GMT</pubDate><guid>http://m.tkk7.com/windforce/archive/2006/09/13/69323.html</guid><wfw:comment>http://m.tkk7.com/windforce/comments/69323.html</wfw:comment><comments>http://m.tkk7.com/windforce/archive/2006/09/13/69323.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/windforce/comments/commentRss/69323.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/windforce/services/trackbacks/69323.html</trackback:ping><description><![CDATA[鏂板緩涓涓猄etCharacterEncodingServlet鐨勭被錛堢戶鎵緼ctionServlet錛?閲嶅啓process()鏂規(guī)硶銆傚涓嬬ず錛?br />聽聽聽聽聽聽聽聽聽 protected void process(HttpServletRequest request,<br />聽聽聽聽聽聽聽聽聽聽聽 HttpServletResponse response) throws java.io.IOException,<br />聽聽聽聽聽聽聽聽聽聽聽 javax.servlet.ServletException<br />聽聽聽聽聽聽聽聽聽聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽request.setCharacterEncoding("UTF-8");<br />聽聽聽聽聽聽聽聽聽聽聽聽聽 super.process(request, response);<br />聽聽聽聽聽聽聽聽聽聽聽 }<br />鍦╳eb.xml涓儴緗睞ctionServlet銆?br /><servlet><br />聽聽聽 <servlet-name>action</servlet-name><br />聽聽聽 <servlet-class>com..util.UTF8ActionServlet</servlet-class><br />聽聽聽 <init-param><br />聽聽聽聽聽 <param-name>config</param-name><br />聽聽聽聽聽 <param-value>/WEB-INF/struts-config.xml</param-value><br />聽聽聽 </init-param><br />聽聽聽聽聽<init-param><br />聽聽聽聽聽 <param-name>debug</param-name><br />聽聽聽聽聽 <param-value>3</param-value><br />聽聽聽 </init-param><br />聽聽聽 <init-param><br />聽聽聽聽聽 <param-name>detail</param-name><br />聽聽聽聽聽 <param-value>3</param-value><br />聽聽聽 </init-param><br />聽聽聽 <load-on-startup>0</load-on-startup><br />聽 </servlet><br /><br />聽聽聽<servlet-mapping><br />聽聽聽 <servlet-name>action</servlet-name><br />聽聽聽 <url-pattern>*.do</url-pattern><br />聽聽 </servlet-mapping><img src ="http://m.tkk7.com/windforce/aggbug/69323.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/windforce/" target="_blank">椋庝箣鍔?/a> 2006-09-13 10:51 <a href="http://m.tkk7.com/windforce/archive/2006/09/13/69323.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍏充簬commons-fileupload緇勪歡涓枃涔辯爜鐨勯棶棰?/title><link>http://m.tkk7.com/windforce/archive/2006/09/13/69313.html</link><dc:creator>椋庝箣鍔?/dc:creator><author>椋庝箣鍔?/author><pubDate>Wed, 13 Sep 2006 02:07:00 GMT</pubDate><guid>http://m.tkk7.com/windforce/archive/2006/09/13/69313.html</guid><wfw:comment>http://m.tkk7.com/windforce/comments/69313.html</wfw:comment><comments>http://m.tkk7.com/windforce/archive/2006/09/13/69313.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/windforce/comments/commentRss/69313.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/windforce/services/trackbacks/69313.html</trackback:ping><description><![CDATA[ <p>聽聽聽 鍦ㄤ嬌鐢╟ommons-fileupload緇勪歡榪囩▼涓紝鍒氬紑濮嬪嚭鐜頒貢鐮佸茍娌℃湁鍦ㄦ剰銆傚姞浜嗕竴涓繃婊ゅ櫒錛岀紪鐮佸叏閮║TF-8,OK!榪涜璋冭瘯,鍑烘潵榪樻槸涔辯爜錛屾垜鍊掞紒鏀規(guī)垚gb2312錛岀粨鏋滅珶鐒跺ソ浜嗭紝鏂囦歡鍚嶃佽緭鍑洪兘鏄腑鏂?br />聽聽聽聽鍚庢潵緇忚繃鍐嶇爺絀惰繃鍚庯紝鍙戠幇commons-fileupload鐨凞iskFileUpload鏈変竴涓猻etHeadEncoding鐨勬柟娉曪紝鍦ㄨ幏鍙栨枃浠跺悕鐨勬椂鍊欐槸瑕佺敤鍒扮殑銆傚鏋滄病鏈夎緗紝灝變嬌鐢ㄩ粯璁ょ殑gb2312緙栫爜銆?br />聽聽聽setHeadEncoding("UTF-8")錛岃皟璇曚竴鍒噊k銆?/p> <img src ="http://m.tkk7.com/windforce/aggbug/69313.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/windforce/" target="_blank">椋庝箣鍔?/a> 2006-09-13 10:07 <a href="http://m.tkk7.com/windforce/archive/2006/09/13/69313.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://miliwo.com" target="_blank">成人午夜18免费看</a>| <a href="http://2499m.com" target="_blank">AV无码免费永久在线观看</a>| <a href="http://kyqp0033.com" target="_blank">免费一级做a爰片久久毛片潮喷</a>| <a href="http://yuntao360.com" target="_blank">国产精品亚洲四区在线观看</a>| <a href="http://5gz0z.com" target="_blank">男女免费观看在线爽爽爽视频</a>| <a href="http://miya863.com" target="_blank">亚洲精品福利网泷泽萝拉</a>| <a href="http://sxjttxkywl.com" target="_blank">无码精品A∨在线观看免费</a>| <a href="http://szhszszy.com" target="_blank">亚洲成在人线电影天堂色</a>| <a href="http://sczssc.com" target="_blank">中文字幕影片免费在线观看</a>| <a href="http://8aa3.com" target="_blank">亚洲国产中文在线视频</a>| <a href="http://aqd1987.com" target="_blank">最近中文字幕mv手机免费高清</a>| <a href="http://shaiyahx.com" target="_blank">亚洲日韩精品无码AV海量</a>| <a href="http://tha2008.com" target="_blank">日韩精品免费电影</a>| <a href="http://www44414.com" target="_blank">一个人看的免费高清视频日本</a>| <a href="http://minliusoft.com" target="_blank">久久精品国产精品亚洲下载</a>| <a href="http://anyliz.com" target="_blank">免费无码黄网站在线看</a>| <a href="http://0515bh.com" target="_blank">亚洲美女视频一区</a>| <a href="http://scycho.com" target="_blank">嫩草影院在线免费观看</a>| <a href="http://www759696b.com" target="_blank">免费观看亚洲人成网站</a>| <a href="http://51ykz.com" target="_blank">青青草原亚洲视频</a>| <a href="http://www-554757.com" target="_blank">亚洲人成在线免费观看</a>| <a href="http://tbw77.com" target="_blank">亚洲国产美女精品久久久</a>| <a href="http://d8139.com" target="_blank">亚洲国产精品日韩</a>| <a href="http://6668889.com" target="_blank">99精品一区二区免费视频</a>| <a href="http://tv695.com" target="_blank">亚洲情A成黄在线观看动漫软件</a>| <a href="http://bjqhkf.com" target="_blank">国产成人免费一区二区三区</a>| <a href="http://0755haoma.com" target="_blank">国产免费A∨在线播放</a>| <a href="http://155lh.com" target="_blank">亚洲精品美女久久久久</a>| <a href="http://liexion.com" target="_blank">国产高清在线免费</a>| <a href="http://selaohu.com" target="_blank">久久精品国产免费</a>| <a href="http://sdzhly.com" target="_blank">中文字幕精品三区无码亚洲</a>| <a href="http://df6618.com" target="_blank">亚洲电影日韩精品</a>| <a href="http://qqcao7.com" target="_blank">精品一区二区三区免费毛片爱</a>| <a href="http://91sebo.com" target="_blank">亚洲精品无码日韩国产不卡av</a>| <a href="http://140699.com" target="_blank">亚洲熟女乱综合一区二区</a>| <a href="http://234an.com" target="_blank">69精品免费视频</a>| <a href="http://tc116.com" target="_blank">四虎精品成人免费视频</a>| <a href="http://lanchenews.com" target="_blank">亚洲人成电影在线天堂</a>| <a href="http://sdzhly.com" target="_blank">免费一级毛片在线播放不收费</a>| <a href="http://s8sb.com" target="_blank">久久久久久成人毛片免费看</a>| <a href="http://wwwby1378.com" target="_blank">亚洲精品无码少妇30P</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>