锘??xml version="1.0" encoding="utf-8" standalone="yes"?>综合偷自拍亚洲乱中文字幕,久久夜色精品国产亚洲AV动态图 ,亚洲砖码砖专无区2023 http://m.tkk7.com/Jcat/category/11843.html瀹犺頸涓嶆儕錛岄棽鐪嬪涵鍓嶈姳寮鑺辮惤锝烇綖zh-cnMon, 07 Jan 2013 04:39:20 GMTMon, 07 Jan 2013 04:39:20 GMT60Groovy 淇グ絎?/title><link>http://m.tkk7.com/Jcat/archive/2008/11/10/239638.html</link><dc:creator>Jcat</dc:creator><author>Jcat</author><pubDate>Mon, 10 Nov 2008 04:30:00 GMT</pubDate><guid>http://m.tkk7.com/Jcat/archive/2008/11/10/239638.html</guid><wfw:comment>http://m.tkk7.com/Jcat/comments/239638.html</wfw:comment><comments>http://m.tkk7.com/Jcat/archive/2008/11/10/239638.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/Jcat/comments/commentRss/239638.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/Jcat/services/trackbacks/239638.html</trackback:ping><description><![CDATA[Groovy<font color="#0000ff">鎶婃渶甯哥敤鐨勪笢瑗塊兘璁劇疆鎴恉efault</font>浜嗭紝緇忓父鍙互鐪佽繖鐪侀偅鐨勶紙姣斿鎷彿銆佸垎鍙楓乸ublic絳夛級錛涘張鍔犱笂闂寘錛屽垵瀛︾殑鏃跺欙紝鏈変簺浠g爜錛屼竴鐪兼湜鍘伙紝閮藉垎涓嶆竻鏄柟娉曘佹槸綾匯佽繕鏄棴鍖呫?br />榪欓噷鍏堢畝鍗曟葷粨涓涓嬪父鐢ㄧ殑淇グ絎︺?br /><br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #0000ff">package</span><span style="COLOR: #000000">聽jcat.bit.g<br /><br /></span><span style="COLOR: #008000">/*</span><span style="COLOR: #008000"><br />淇グ絎︽湁涓夌被錛?br />1.聽static<br />2.聽浣滅敤鍩燂細public(榛樿),聽private,聽protected.<br />3.聽綾誨瀷錛歞ef錛堥粯璁わ紝鍔ㄦ侊級,聽void錛堟棤綾誨瀷錛岄潤鎬侊級,聽鍏跺畠甯歌闈欐佺被鍨?br /></span><span style="COLOR: #008000">*/</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽Test聽{<br />聽聽聽聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽def聽a_static_def聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">a_static_def</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000"><br />聽聽聽聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽a_static聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">a_static</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000"><br />聽聽聽聽def聽a_def聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">a_def</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000"><br /><br />聽聽聽聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽main(strs)聽{<br />聽聽聽聽聽聽聽聽println聽a_static_def<br />聽聽聽聽聽聽聽聽println聽a_static<br /><br />聽聽聽聽聽聽聽聽println聽t_static_def()<br />聽聽聽聽聽聽聽聽println聽t_static()<br /><br /><br />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽Test().with聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽println聽a_def<br /><br />聽聽聽聽聽聽聽聽聽聽聽聽println聽t_public_def()<br />聽聽聽聽聽聽聽聽聽聽聽聽println聽t_public()<br />聽聽聽聽聽聽聽聽聽聽聽聽println聽t_def()<br />聽聽聽聽聽聽聽聽}<br />聽聽聽聽}<br /><br />聽聽聽聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽def聽t_static_def()聽{聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽def聽=聽鍙互榪斿洖浠諱綍綾誨瀷錛屽寘鎷瑅oid</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">t_static_def</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br />聽聽聽聽}<br /><br />聽聽聽聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽t_static()聽{聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽鏈夊叾瀹冧慨楗扮鍙互鐪佺暐def錛?font color="#ff0000">榛樿public聽+聽def</font>錛?/span><span style="COLOR: #008000"><br /></span><span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">t_static</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br />聽聽聽聽}<br /><br />聽聽聽聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽def聽t_public_def()聽{<br />聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">t_public_def</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br />聽聽聽聽}<br /><br />聽聽聽聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽t_public()聽{聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽榛樿def</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">t_public</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br />聽聽聽聽}<br /><br />聽聽聽聽def聽t_def()聽{聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽鑷沖皯瑕佹湁涓涓慨楗扮錛屾墍浠ヨ繖涓猟ef涓嶈兘鐪佺暐;聽涓旈粯璁ublic</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">t_def</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br />聽聽聽聽}<br /><br />聽聽聽聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽t_static_void()聽{<br />聽聽聽聽聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">return聽"t_static_void"聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">聽cannot聽return聽an聽object聽from聽a聽method聽that聽returns聽"void"</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #000000">聽聽聽聽}<br />}</span></div><img src ="http://m.tkk7.com/Jcat/aggbug/239638.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/Jcat/" target="_blank">Jcat</a> 2008-11-10 12:30 <a href="http://m.tkk7.com/Jcat/archive/2008/11/10/239638.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Groovy JDBChttp://m.tkk7.com/Jcat/archive/2008/11/07/239258.htmlJcatJcatFri, 07 Nov 2008 07:02:00 GMThttp://m.tkk7.com/Jcat/archive/2008/11/07/239258.htmlhttp://m.tkk7.com/Jcat/comments/239258.htmlhttp://m.tkk7.com/Jcat/archive/2008/11/07/239258.html#Feedback3http://m.tkk7.com/Jcat/comments/commentRss/239258.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/239258.html鐢↗DBC鎿嶄綔鏁版嵁搴擄紝瀵規瘮涓涓婮ava鍜孏roovy銆?br />
鐜錛歋QL Server 2000 錛堣寰楁墦琛ヤ竵SP4錛屼笉鐒禞DBC璁塊棶浼氭姤閿欙級
JDBC Driver錛歮sbase.jar錛宮ssqlserver.jar錛宮sutil.jar

Java鐗?br />

package 聽jcat.bit.java;

import 聽java.sql. * ;

public class 聽JDBC聽{
聽聽聽聽
public static void 聽main(String[]聽args)聽 throws ClassNotFoundException,聽SQLException聽{
聽聽聽聽聽聽聽聽Class.forName(
" com.microsoft.jdbc.sqlserver.SQLServerDriver " );
聽聽聽聽聽聽聽聽Connection聽conn聽
= 聽DriverManager.getConnection(
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
" jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=pubs " ,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
" sa " ,聽 "*** " );

聽聽聽聽聽聽聽聽Statement聽stmt聽
= 聽conn.createStatement();
聽聽聽聽聽聽聽聽ResultSet聽rs聽
= 聽stmt.executeQuery( " select聽top聽10聽*聽from聽authors " );

聽聽聽聽聽聽聽
while 聽(rs.next())聽{
聽聽聽聽聽聽聽聽聽聽聽聽System.out.println(rs.getString(
2 ) + " " + rs.getString( 3
));聽聽//聽鏁癷d
聽聽聽聽聽聽聽聽}


聽聽聽聽聽聽聽聽rs.close();
聽聽聽聽聽聽聽聽stmt.close();
聽聽聽聽聽聽聽聽conn.close();

聽聽聽聽}
}



Groovy鐗?br />
package聽jcat.bit.groovy

import聽groovy.sql.Sql

class聽JDBC聽{
聽聽聽聽
staticvoid聽main(args)聽{
聽聽聽聽聽聽聽聽Sql聽sql聽
=聽Sql.newInstance(
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
"jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=pubs",
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
"sa",聽"***",
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
"com.microsoft.jdbc.sqlserver.SQLServerDriver")
聽聽聽聽聽聽聽聽sql.eachRow(
"select聽top聽10聽*聽from聽authors")聽{row聽->
聽聽聽聽聽聽聽聽聽聽聽聽println聽row.au_fname
+""+聽row.au_lname聽聽聽聽//鐩存帴鐢ㄦ暟鎹簱鐨勫瓧孌靛悕灝卞彲浠ユ搷浣滅粨鏋滈泦浜嗭紝涓嶇敤鍘繪暟id
聽聽聽聽聽聽聽聽}

聽聽聽聽}
}


鎬葷粨
1. 寤虹珛鏌ヨ錛屽樊鍒笉澶э紝閮芥槸JDBC閭d竴濂楋紱Groovy涓嶇敤澶勭悊寮傚父
2. 澶勭悊鏌ヨ緇撴灉錛孏roovy鍥犱負鏈夐棴鍖咃紝澶勭悊榪欎簺榪唬闂寰堟柟渚?/font>
3. Groovy涓嶇敤鍏抽棴

Jcat 2008-11-07 15:02 鍙戣〃璇勮
]]>
Groovy Closure 鈥滄搷浣溾濅篃鎴愪簡鍙傛暟http://m.tkk7.com/Jcat/archive/2008/11/07/239142.htmlJcatJcatThu, 06 Nov 2008 18:04:00 GMThttp://m.tkk7.com/Jcat/archive/2008/11/07/239142.htmlhttp://m.tkk7.com/Jcat/comments/239142.htmlhttp://m.tkk7.com/Jcat/archive/2008/11/07/239142.html#Feedback2http://m.tkk7.com/Jcat/comments/commentRss/239142.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/239142.html

1. 闂寘浠h〃錛堝畾涔夛級浜嗕竴孌典唬鐮侊紙鎿嶄綔錛夛細鍏夌湅榪欎竴鍙ワ紝鍏跺疄鏂規硶涔熻兘瀹炵幇鐩稿悓鐨勫姛鑳藉憖銆?br />2. 闂寘鍙互浣滀負鏂規硶鐨勫弬鏁幫細榪欐墠鏄棴鍖呯殑鐗規畩涔嬪鍜岀湡姝f剰涔夈?br />

涓嬮潰婕旂ず涓涓彧鏈夐棴鍖呰兘鍋氾紝鏂規硶鍋氫笉鍒扮殑渚嬪瓙銆?br />

鏂規硶鐨勪綔鐢ㄦ槸鎻愮偧鍏辨э紝鍐嶄唬涔嬩互涓嶅悓鐨勫弬鏁般傚嵆瀵逛笉鍚岀殑鈥滄暟鎹濊繘琛岀浉鍚岀殑鈥滄搷浣溾濄備粠3涓猯oop鍙互鐪嬪嚭錛?br />聽聽聽聽Comm1錛氱浉鍚岀殑鏁版嵁
聽聽聽聽Comm2錛氱浉鍚岀殑for寰幆
聽聽聽聽Diff1錛氬驚鐜綋鍐呮墽琛岀殑鎿嶄綔涓嶅悓

Comm1寰堝ソ鎼炲畾錛屽弬鏁癮a灝辨槸鎻愮偧鍑虹殑鍏辨?br />Comm2鐪嬩技鏄叡鎬э紝鍗村緢闅炬彁鐐鹼紝鍥犱負for寰幆鍜屽驚鐜綋鍐呯殑鎿嶄綔瀹為檯鏄竴涓暣浣擄紱Comm2琚獶iff1綰犵紶錛?涓猯oop鏄畬鍏ㄤ笉鍚岀殑3緇勬搷浣滐紝鏃犳硶鎻愮偧銆?br />
姣斿錛屽鏋滅幇鍦ㄦ兂瑕佹寜鐓у鏁板驚鐜紝鍙兘渚濇鏀瑰姩涓変釜寰幆銆?/font>聽

int []聽aa聽 = 聽[ 1 ,聽 2 ,聽 3 ,聽 4 ,聽 5 ,聽 6 ]

// 聽loop1
for 聽( int 聽i聽 = 0 ;聽i聽 < 聽aa.length;聽i ++ )聽{
聽聽聽聽println聽aa[i]
}

// 聽loop2
for 聽( int 聽i聽 = 0 ;聽i聽 < 聽aa.length;聽i ++ )聽{
聽聽聽聽print聽aa[i]
}

// 聽loop3
for 聽( int 聽i聽 = 0 ;聽i聽 < 聽aa.length;聽i ++ )聽{
聽聽聽聽print聽aa[i]聽
+ ' '
}
聽聽聽聽聽聽聽聽

// 聽loop1
for 聽( int 聽i聽 = 0 ;聽i聽 < 聽aa.length;聽i聽 += 2 )聽{
聽聽聽聽println聽aa[i]
}

// 聽loop2
for 聽( int 聽i聽 = 0 ;聽i聽 < 聽aa.length;聽i聽 += 2 )聽{
聽聽聽聽print聽aa[i]
}

// 聽loop3
for 聽( int 聽i聽 = 0 ;聽i聽 < 聽aa.length;聽i聽 += 2 )聽{
聽聽聽聽print聽aa[i]聽
+ ' '
}


涓嬮潰鎴戜滑鐪嬬湅闂寘鐨勫己澶т箣澶勶紝Comm1鍜孋omm2閮借寰堝ソ鐨勫皝瑁呭湪浜唋oop鏂規硶閲岋紱Diff1鍒欎綔涓哄弬鏁幫紙闂寘錛変紶鍏oop鏂規硶銆?br />
staticvoid聽main(String[]聽a)聽{
聽聽聽聽
int[]聽aa聽=聽[1,聽2,聽3,聽4,聽5,聽6]

聽聽聽聽loop(aa)聽{聽println聽it }
聽聽聽 loop(aa)聽{聽print聽it聽}聽聽聽
聽聽聽 loop(aa)聽{聽print聽it聽
+''聽}
}
濡傛灉鎴戜滑鎯寵鏀瑰彉寰幆鐨勬柟寮忥紝鍙渶瑕佹敼涓澶?
staticvoid聽loop(int[]聽aa,聽Closure聽c)聽{
聽聽聽聽
for聽(int聽i聽=0;聽i聽<聽aa.length;聽i++)聽{
聽聽聽聽聽聽聽聽c.call(aa[i])
聽聽聽聽}
聽聽聽聽println聽
''
}
staticvoid聽loop(int[]聽aa,聽Closure聽c)聽{
聽聽聽聽
for聽(int聽i聽=0;聽i聽<聽aa.length;聽i聽+=2)聽{
聽聽聽聽聽聽聽聽c.call(aa[i])
聽聽聽聽}
聽聽聽聽println聽
''
}

鎬葷粨錛岄棴鍖呮湰韜茍娌′粈涔堥毦鐐癸紝鍏抽敭鏄庢牱鍚堢悊鐨勮璁′竴涓帴鍙桟losure綾誨瀷鍙傛暟鐨勬柟娉曘備粠GDK鐨勬柟娉曚篃鍙互鐪嬪嚭錛屽ぇ澶氭暟鎺ュ彈闂寘鐨勬柟娉曢兘鏄拰鏁扮粍榪唬鏈夊叧錛堜篃鍗沖驚鐜級銆?/font>

Jcat 2008-11-07 02:04 鍙戣〃璇勮
]]>
Groovy Closurehttp://m.tkk7.com/Jcat/archive/2008/11/06/239095.htmlJcatJcatThu, 06 Nov 2008 10:50:00 GMThttp://m.tkk7.com/Jcat/archive/2008/11/06/239095.htmlhttp://m.tkk7.com/Jcat/comments/239095.htmlhttp://m.tkk7.com/Jcat/archive/2008/11/06/239095.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/239095.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/239095.htmlDefinition

聽聽聽 /*
聽聽聽聽聽聽聽聽1.聽鍙橀噺鏄敤鏉ヨ鈥滄暟鎹濈殑錛岄棴鍖呭氨鏄敤鏉ヨ鈥滄搷浣溾濈殑
聽聽聽聽聽聽聽聽2.聽鍜屽畾涔変竴涓柟娉曚竴鏍鳳紝闂寘涔熷彲浠ユ湁鍏ュ弬
聽聽聽聽聽聽聽
*/
聽聽聽聽聽聽聽聽Closure聽p聽
= 聽{x聽 ->
聽聽聽聽聽聽聽聽聽聽聽聽print聽x聽
+ ' '
聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽[
1 ,聽 2 ,聽 3 ].each(p)

聽聽聽聽聽聽聽聽[
4 ,聽 5 ,聽 6 ].each({x聽 -> // 聽闂寘鏄彲浠ュ尶鍚嶇殑
聽聽聽聽聽聽聽聽聽聽聽聽print聽x聽 + ' '
聽聽聽聽聽聽聽聽})

聽聽聽聽聽聽聽聽[
7 ,聽 8 ,聽 9 ].each聽{x聽 -> // 聽鎷彿鏄彲浠ョ渷鐣ョ殑
聽聽聽聽聽聽聽聽聽聽聽聽print聽x聽 + ' '
聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽[
10 ,聽 11 ,聽 12 ].each聽{聽 // 聽it鏄粯璁ょ殑鍙傛暟鍚嶅瓧錛屾墍浠ヨ繖閲岃繛鍏ュ弬鐨勫畾涔夐兘鐪佷簡
聽聽聽聽聽聽聽聽聽聽聽聽print聽it聽 + ' '
聽聽聽聽聽聽聽聽}


Using

package聽jcat.bit

class聽Test聽{
聽聽聽聽
/*
聽聽聽聽1.聽闂寘鏄璞★紝鏄疌losure綾葷殑瀹炰緥錛屾墍浠ワ細
聽聽聽聽聽聽聽聽1錛夊彲浠ュ湪綾婚噷瀹氫箟Closure綾誨瀷鐨勫睘鎬?br />聽聽聽聽聽聽聽聽2錛夊彲浠ュ湪鏂規硶閲屽畾涔塁losure綾誨瀷鐨勫彉閲?br />聽聽聽聽聽聽聽聽3錛夊彲浠ュ畾涔変竴涓柟娉曪紝鎺ユ敹Closure綾誨瀷鐨勫弬鏁?br />聽聽聽聽2.聽闂寘鍙堟湁鏂規硶鐗硅川錛屾瘯绔熷畠瑁呯殑鏄滄搷浣溾濓紝鐢氳嚦鍙互鍍忚皟鐢ㄦ柟娉曚竴鏍瘋皟鐢ㄩ棴鍖?br />聽聽聽聽聽
*/

聽聽聽聽
staticfinal聽Closure聽PRINT_STR聽=聽{聽聽//聽灞炴э紙綾誨彉閲忥級
聽聽聽聽聽聽聽聽println聽it
聽聽聽聽}


聽聽聽聽
staticvoid聽main(String[]聽a)聽{
聽聽聽聽聽聽聽聽
/*
聽聽聽聽聽聽聽聽闂寘綾諱技Java鐨勫唴閮ㄧ被錛屽尯鍒槸闂寘鍙湁鍗曚竴鐨勬柟娉曞彲浠ヨ皟鐢紝浣嗗彲浠ユ湁浠繪剰鐨勫弬鏁幫紝
聽聽聽聽聽聽聽聽闂寘鐢ㄢ渰}鈥濇嫭璧鳳紝鈥?>鈥濆墠闈㈡槸鍙傛暟錛屽悗闈㈡槸澶勭悊璇彞錛屽彲浠ョ洿鎺ヨ皟鐢紝涔熷彲浠ヤ嬌
聽聽聽聽聽聽聽聽鐢╟all璋冪敤銆備笉綆¢偅縐嶈皟鐢紝鏈鍚巊roovy緙栬瘧鍣ㄩ兘浼氭妸緙栬瘧鎴愬doCall鏂規硶鐨勮皟鐢紝
聽聽聽聽聽聽聽聽榪欐槸groovy瀵歸棴鍖呯殑涓涓殣钘忔柟娉曘?br />聽聽聽聽聽聽聽聽聽
*/
聽聽聽聽聽聽聽聽PRINT_STR(
"鍍忔柟娉曚竴鏍瘋皟鐢?/span>")
聽聽聽聽聽聽聽聽PRINT_STR.call(
"浣滀負Closure鐨勫疄渚嬶紝鍐嶈皟鐢ㄧ浉搴旂殑鏂規硶")


聽聽聽聽聽聽聽聽Closure聽printLength聽
=聽{String聽s聽->聽聽//聽灞閮ㄥ彉閲?/span>
聽聽聽聽聽聽聽聽聽聽聽聽println聽s.length()
聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽printLength(
"AAA")

聽聽聽聽聽聽聽聽
/*
聽聽聽聽聽聽聽聽閫氬父錛屾搷浣滄槸姝葷殑錛屾垜浠兘鍔ㄦ佷唬鍏ョ殑鏄滄暟鎹濄?br />聽聽聽聽聽聽聽聽闂寘浣垮緱鎴戜滑鍙互鍔ㄦ佺殑浠e叆涓孌碘滄搷浣溾濄?br />聽聽聽聽聽聽聽聽鈥滈棴鍖呮槸鍙互鐢ㄤ綔鏂規硶鍙傛暟鐨勪唬鐮佸潡銆傗?br />聽聽聽聽聽聽聽聽聽
*/
聽聽聽聽聽聽聽聽closureAsParameter(
null,聽printLength)
聽聽聽聽聽聽聽聽closureAsParameter(
"BBB",聽PRINT_STR)
聽聽聽聽}

聽聽聽聽
staticvoid聽closureAsParameter(String聽s,聽Closure聽c)聽{
聽聽聽聽聽聽聽聽
if聽(s聽!=null)聽{
聽聽聽聽聽聽聽聽聽聽聽聽c.call(s)
聽聽聽聽聽聽聽聽}
聽聽聽聽}
}



-----------------------------------------------------------------
闄勪笂涓涓狫ava鐨勫尶鍚嶅唴閮ㄧ被鐨勪緥瀛愶紝鐢ㄦ潵鍜岄棴鍖呭姣斾竴涓嬨?br />
package聽jcat.bit;

publicclass聽AnonymousInnerClass聽{
聽聽聽聽
publicstaticvoid聽main(String[]聽args)聽{
聽聽聽聽聽聽聽聽AbsClass聽a聽
=new聽AbsClass()聽{
聽聽聽聽聽聽聽聽聽聽聽聽
publicvoid聽foo(String聽s)聽{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽System.out.println(s);
聽聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽};

聽聽聽聽聽聽聽聽a.foo(
"ABC");

聽聽聽聽聽聽聽聽AbsClass聽b聽
=new聽AbsClass()聽{
聽聽聽聽聽聽聽聽聽聽聽聽
publicvoid聽foo(String聽s)聽{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽System.out.println(s.length());
聽聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽};
聽聽聽聽聽聽聽聽b.foo(
"ABC");
聽聽聽聽}
}

abstractclass聽AbsClass聽{
聽聽聽聽
publicabstractvoid聽foo(String聽s);
}


Jcat 2008-11-06 18:50 鍙戣〃璇勮
]]>
Hello Grailshttp://m.tkk7.com/Jcat/archive/2008/11/04/238710.htmlJcatJcatTue, 04 Nov 2008 14:04:00 GMThttp://m.tkk7.com/Jcat/archive/2008/11/04/238710.htmlhttp://m.tkk7.com/Jcat/comments/238710.htmlhttp://m.tkk7.com/Jcat/archive/2008/11/04/238710.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/238710.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/238710.html
1. <Flex 3> 鍚屼簨緇欎簡鎴戜喚Flex鐨勬暀紼嬶紝鎶婂墠涓夌珷鐪嬩簡涓涓嬶紝鏈変簡鍒濇鐨勪簡瑙o紱FlexBuilder涔熺敤浜嗕竴鎶婏紝涓嶉敊錛屾晥鏋滃緢緇氫附銆?br />
2. <IDEA 8> 鎭伴DEA 8 EAP (Early Access Preview)鍙戝竷錛屾悶浜嗕竴涓涓婅瘯璇曘備富瑕佽瘯浜嗚瘯瀵笷lex鐨勬敮鎸侊紝鎰熻榪樻湁寰呮彁鍗囥傚彟澶朓DEA瀵瑰唴瀛樼殑娑堣椾技涔庤秺鏉ヨ秺澶氫簡錛屾病鍋氭繁鍏ヤ綋楠屻?br />
3. <Grails 1.0.3> 鎷垮嚭浜嗗皬浜屽幓騫撮佹垜鐨勭敓鏃ョぜ鐗┿奊rails鏉冨▉鎸囧崡銆嬶紝緲諱簡緲伙紝Hello World涓浼氬氨鍋氬ソ浜嗐傛墦綆楀啀榪涗竴姝ヤ綋楠屼竴涓嬨?br />

Jcat 2008-11-04 22:04 鍙戣〃璇勮
]]>
java foundationhttp://m.tkk7.com/Jcat/archive/2007/05/23/119499.htmlJcatJcatWed, 23 May 2007 14:35:00 GMThttp://m.tkk7.com/Jcat/archive/2007/05/23/119499.htmlhttp://m.tkk7.com/Jcat/comments/119499.htmlhttp://m.tkk7.com/Jcat/archive/2007/05/23/119499.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/119499.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/119499.html
equals in String
publicboolean聽equals(Object聽anObject)聽{
聽聽聽聽
if聽(this==聽anObject)聽{
聽聽聽聽聽聽聽聽
returntrue;
聽聽聽聽}
聽聽聽聽
if聽(anObject聽instanceof聽String)聽{
聽聽聽聽聽聽聽聽String聽anotherString聽
=聽(String)anObject;
聽聽聽聽聽聽聽聽
int聽n聽=聽count;
聽聽聽聽聽聽聽聽
if聽(n聽==聽anotherString.count)聽{
聽聽聽聽聽聽聽聽
char聽v1[]聽=聽value;
聽聽聽聽聽聽聽聽
char聽v2[]聽=聽anotherString.value;
聽聽聽聽聽聽聽聽
int聽i聽=聽offset;
聽聽聽聽聽聽聽聽
int聽j聽=聽anotherString.offset;
聽聽聽聽聽聽聽聽
while聽(n--!=0)聽{
聽聽聽聽聽聽聽聽聽聽聽聽
if聽(v1[i++]聽!=聽v2[j++])
聽聽聽聽聽聽聽聽聽聽聽聽
returnfalse;
聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽
returntrue;
聽聽聽聽聽聽聽聽}
聽聽聽聽}
聽聽聽聽
returnfalse;
聽聽聽聽}

equals in Object
聽聽聽publicboolean聽equals(Object聽obj)聽{
聽聽聽聽
return聽(this==聽obj);
聽聽聽聽}

聽聽聽聽System.out.println(new聽String("aa").equals(new聽String("aa")));聽//true
聽聽聽聽System.out.println(new聽String("aa")聽==new聽String("aa"));聽聽聽聽聽聽//false
聽聽聽聽System.out.println("aa".equals("aa"));聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽//true
聽聽聽聽System.out.println("aa"=="aa");聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽//true



Jcat 2007-05-23 22:35 鍙戣〃璇勮
]]>
environment variable for java, groovy, ant and etc.http://m.tkk7.com/Jcat/archive/2007/05/23/119491.htmlJcatJcatWed, 23 May 2007 13:39:00 GMThttp://m.tkk7.com/Jcat/archive/2007/05/23/119491.htmlhttp://m.tkk7.com/Jcat/comments/119491.htmlhttp://m.tkk7.com/Jcat/archive/2007/05/23/119491.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/119491.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/119491.htmlJAVA_HOME


ANT_HOME

CATALINA_HOME

GROOVY_HOME

GRAILS_HOME

classpath=.
(%JAVA_HOME%\jre\lib is not required)


Path=%JAVA_HOME%\bin;%ANT_HOME%\bin;%CATALINA_HOME%\bin;%GROOVY_HOME%\bin;%GRAILS_HOME%\bin


Note: if you add %GROOVY_HOME%\embeddable\groovy-all-1.0.jar to classpath Grails can't work correctly.

Jcat 2007-05-23 21:39 鍙戣〃璇勮
]]>Strutshttp://m.tkk7.com/Jcat/archive/2007/04/08/109284.htmlJcatJcatSun, 08 Apr 2007 15:47:00 GMThttp://m.tkk7.com/Jcat/archive/2007/04/08/109284.htmlhttp://m.tkk7.com/Jcat/comments/109284.htmlhttp://m.tkk7.com/Jcat/archive/2007/04/08/109284.html#Feedback1http://m.tkk7.com/Jcat/comments/commentRss/109284.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/109284.htmlstruts鐢ㄤ簡涔熶竴騫翠簡錛屽熀鏈殑涓滆タ閮戒細鐢紝涓嶈繃鍥犱負鏄湪宸ヤ綔涓竟瀛﹁竟鐢紝闅懼厤寰堝鐭ヨ瘑鐐歸兘涓嶇郴緇燂紝鎯劎鍛銆傝繖鍑犲ぉ鎵炬湰涔︽⒊鐞嗕竴涓嬨?/span>

---MVC---
V錛氬縐嶈鍥懼叡浜竴涓悗鍙版ā鍨?br>M錛氬疄鐜頒笌鐣岄潰鐙珛錛岃壇濂界殑灝佽
C錛氭洿濂界殑緇存姢紼嬪簭嫻佺▼

model1錛欽SP錛圴銆丆錛?JavaBean錛圡錛?br>鍙傜敤浜庡皬鍨嬬▼搴忥紝JSP鐨勫弻閲嶈鑹蹭嬌HTML鍜孞ava娣峰悎錛屽緢闅劇淮鎶ゃ?br>
model2錛欽SP(V)+Servlet(C)+JavaBean(M)
Struts涔熸槸model2錛堢敤ActionServlet浠f浛Servlet錛夈係truts鐨勬墍鏈夊姛鑳介兘鏄緩绔嬪湪宸叉湁鐨凧ava Web緇勪歡涓婏紝濡係ervlet錛孞SP錛孞avaBean錛屽畠鍙槸鍒╃敤涓縐嶆柟寮忓皢榪欎簺鍏冪礌緇勭粐浜嗚搗鏉ワ紝浣垮畠浠崗鍚屽伐浣溿?br>
---鐐規淮---
鍦⊿truts搴旂敤紼嬪簭涓紝鎵鏈夌殑鐢ㄦ埛璇鋒眰閮界敱ActionServlet鎺ユ敹錛岀劧鍚庢牴鎹畇truts-config.xml鏌ユ壘鐩稿簲鐨勫瓙鎺у埗鍣ㄣ俉eb瀹瑰櫒鍔犺澆Struts搴旂敤紼嬪簭鍚庯紝struts-config.xml琚鍏堣鍏ュ唴瀛樻垚涓轟竴涓狝ctionMapping瀵硅薄銆?br>
鍩烘湰嫻佺▼錛欻ttpRequest-->XxxForm-->validate()=true-->XxxAction-->execute()-->(return) ActionForward-->JSP
榪欏叾涓殑閰嶇疆淇℃伅閮藉瓨鍦ㄤ簬struts-config涓?br>
鍥介檯鍖栵細<bean:message key=""/> + ApplicationResources.properties

---web.xml---
<display-name>    ApplicationContext name
<listener>   閰嶇疆浜嬩歡鐩戝惉鍣?br><session-config> -->  <session-timeout>    Session榪囨湡鏃墮棿
<welcome-file-list>   鏍筓RL鐨勯粯璁ら〉闈細鍏堟壘index鏂囦歡錛屾壘涓嶅埌鍐嶆煡鎵捐list
<error-page>     鍒跺畾鍦ㄨ繑鍥炵壒瀹欻TTP鐘舵佺爜錛屾垨鑰呯壒瀹氱被鍨嬬殑寮傚父琚姏鍑烘椂鏄劇ず鐨勯〉闈€?br><taglib>    瀵規爣璁板簱鎻忚堪絎︽枃浠訛紙Tag Library Descriptor File錛夋寚瀹氬埆鍚?br>
---struts-config.xml---
<data-source>   瀹氫箟鏁版嵁婧?br><global-exceptions>   瀹氫箟鍏ㄥ眬寮傚父
<global-forwards>      瀹氫箟鍏ㄥ眬杞彂錛堝悕瀛楃浉鍚屾椂錛屽眬閮ㄨ漿鍙戜紭鍏堬級
<controller>      瀹氫箟鎺у埗閰嶇疆綾伙紝濡俆ilesRequestProcessor
<message-resources>   鎸囧畾娑堟伅璧勬簮鏂囦歡錛岄厤鍚?lt;bean:message key="" bundle="">浣跨敤
<plug-in>      鎻掍歡

---Action浠?--
Action錛氱嚎紼嬪畨鍏ㄧ殑錛屾墍浠ラ兘鏄痵inglon鐨勩備笉搴旇鍦ˋction綾諱腑浣跨敤鍩熷彉閲忎繚瀛樼敤鎴風壒瀹氫俊鎭紝濡傜姸鎬佷俊鎭紙鍙互灝嗕竴浜涗笌鐗瑰畾璇鋒眰鏃犲叧鐨勫彉閲忓畾涔変負鍩熷彉閲忥紝濡侺og鍙橀噺錛?br>ActionForward錛氬彲浠ユ槸闈欐佺殑浠巆onfig鏂囦歡涓錛屽mapping.findForward("success")錛涗篃鍙互鏄姩鎬佺殑鎸囧畾錛屽new ActionForward("success","/aaa/bbb.jsp",true)

棰勫畾涔夌殑Action
 ForwardAction錛氱被浼?lt;jsp:forward>
 IncludeAction錛氱被浼?lt;jsp:include>
  浠ヤ笂涓や釜Action錛屼嬌Struts閬靛驚MVC錛岄伩鍏嶇洿鎺ヨ皟鐢↗SP錛屽彲浠ュ厖鍒嗗埄鐢ㄦ帶鍒跺櫒鐨勯澶勭悊鍔熻兘銆?nbsp;
 DispatchAction錛氫互璧勬簮涓轟腑蹇冿紝鍑忓皯Action鐨勬暟閲忋?br>  閫氬父鍙緗畃arameter="method"錛屽垯璋冪敤鐨剈rl涓篽ttp://xxx/yyy?method=add
  涔熷彲浠ヨ緗畃arameter="add, update"錛屽垯璋冪敤鐨剈rl涓篽ttp://xxx/yyy?add=true
 LookupDispatchAction錛欴ispatchAction鐨勫瓙綾伙紝閫氳繃鍙嶆煡璧勬簮緇戝畾錛屾壘鍒扮被涓搴旂殑鏂規硶銆?br> SwitchAction錛歋truts鏀寔澶氬簲鐢ㄧ▼搴忔ā鍧楋紙鍗砿ulti-module錛夛紝SwitchAction鐢ㄦ潵鎵ц鍦ㄤ笉鍚屽簲鐢ㄧ▼搴忔ā鍧楅棿鐨勫垏鎹㈡搷浣溿?br>


Jcat 2007-04-08 23:47 鍙戣〃璇勮
]]>
Apache vs Tomcathttp://m.tkk7.com/Jcat/archive/2007/03/06/102262.htmlJcatJcatTue, 06 Mar 2007 13:00:00 GMThttp://m.tkk7.com/Jcat/archive/2007/03/06/102262.htmlhttp://m.tkk7.com/Jcat/comments/102262.htmlhttp://m.tkk7.com/Jcat/archive/2007/03/06/102262.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/102262.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/102262.html鏈川鍖哄埆錛?br />1錛?br />apache鏀寔闈欐侀〉闈紱
tomcat鏀寔鍔ㄦ侀〉闈紝姣斿servlet絳夈?br />2錛?br />apache鏄痺eb錛坔ttp錛夋湇鍔″櫒錛屽畠鏄笓闂ㄧ敤浜庢彁渚汬TTP鏈嶅姟錛屼互鍙婄浉鍏抽厤緗殑錛堜緥濡傝櫄鎷熶富鏈恒乁RL杞彂絳夌瓑錛?br />tomcat鏄簲鐢紙java錛夋湇鍔″櫒錛屽畠鍙槸涓涓猻ervlet錛坖sp錛夊鍣紝鍙互璁や負鏄痑pache鐨勬墿灞曪紝浣嗘槸鍙互鐙珛浜巃pache榪愯銆?br />3錛?br />apache鏄竴杈嗗崱杞︼紝涓婇潰鍙互瑁呬竴浜涗笢瑗垮html絳夈備絾鏄笉鑳借姘達紝瑕佽姘村繀欏昏鏈夊鍣紙妗訛級錛岃岃繖涓《涔熷彲浠ヤ笉鏀懼湪鍗¤濺涓娿?br />
浣跨敤鍖哄埆錛?br />tomcat 浣滀負 jsp錛宻ervlet 瀹瑰櫒錛岃櫧鐒舵湁闈欐佽В鏋愬姛鑳斤紝浣嗘ц兘涓婁笌 apache 鐩告瘮鐩稿樊寰堣繙銆?br />apache 鍙互榪愯涓騫翠笉閲嶅惎錛岀ǔ瀹氭ч潪甯稿ソ錛岃?tomcat 鍒欎笉瑙佸緱銆?br />
鏁村悎錛?br />涓鑸嬌鐢╝pache+tomcat鐨勮瘽錛宎pache鍙槸浣滀負涓涓漿鍙戯紝瀵筳sp鐨勫鐞嗘槸鐢眛omcat鏉ュ鐞嗙殑銆?br />
鏁村悎鐨勫ソ澶勬槸錛?br />濡傛灉瀹㈡埛绔姹傜殑鏄潤鎬侀〉闈紝鍒欏彧闇瑕丄pache鏈嶅姟鍣ㄥ搷搴旇姹傦紝apache 瑙f瀽 html 絳夐潤鎬佺綉欏甸潪甯稿揩錛屾槸緇忚繃鏃犳暟嫻嬭瘯璇佹槑鐨勩?br />濡傛灉瀹㈡埛绔姹傚姩鎬侀〉闈紝鍒欐槸Tomcat鏈嶅姟鍣ㄥ搷搴旇姹傘?br />鍥犱負jsp鏄湇鍔″櫒绔В閲婁唬鐮佺殑錛岃繖鏍鋒暣鍚堝氨鍙互鍑忓皯Tomcat鐨勬湇鍔″紑閿銆?

鍏跺畠錛?br />Tomcat鏄疉pache緇勭粐鍦ㄧ鍚圝2EE鐨凧SP銆丼ervlet鏍囧噯涓嬪紑鍙戠殑涓涓狫SP鏈嶅姟鍣?br />

some official definitions:
What is the Apache HTTP Server?
聽聽聽 * is a powerful, flexible, HTTP/1.1 compliant web server
聽聽聽 * implements the latest protocols, including HTTP/1.1 (RFC2616)
聽聽聽 * is highly configurable and extensible with third-party modules
聽聽聽 * can be customised by writing 'modules' using the Apache module API
聽聽聽 * provides full source code and comes with an unrestrictive license
聽聽聽 * runs on Windows 2003/XP/2000/NT/9x, Netware 5.x and above, OS/2, and most versions of Unix, as well as several other operating systems

What is the Apache Tomcat?
聽聽聽 Apache Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
聽聽聽 Apache Tomcat is developed in an open and participatory environment and released under the Apache Software License.


Jcat 2007-03-06 21:00 鍙戣〃璇勮
]]>
input data from cmdhttp://m.tkk7.com/Jcat/archive/2007/02/04/97871.htmlJcatJcatSun, 04 Feb 2007 11:24:00 GMThttp://m.tkk7.com/Jcat/archive/2007/02/04/97871.htmlhttp://m.tkk7.com/Jcat/comments/97871.htmlhttp://m.tkk7.com/Jcat/archive/2007/02/04/97871.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/97871.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/97871.html import 聽java.io.InputStreamReader;
import 聽java.io.BufferedReader;
import 聽java.io.IOException;

/**
聽*聽User:聽Jcat
聽*聽Date:聽2006-11-19
*/
public class 聽Lab聽{
聽聽聽聽
public static void 聽main(String[]聽args)聽 throws 聽IOException聽{
聽聽聽聽聽聽聽聽InputStreamReader聽ir;
聽聽聽聽聽聽聽聽BufferedReader聽in;
聽聽聽聽聽聽聽聽String聽s;

聽聽聽聽聽聽聽聽ir聽
= new 聽InputStreamReader(System.in);
聽聽聽聽聽聽聽聽in聽
= new 聽BufferedReader(ir);
聽聽聽聽聽聽聽聽s聽
= 聽in.readLine();
聽聽聽聽聽聽聽聽System.out.println(s);
聽聽聽聽}
}



Jcat 2007-02-04 19:24 鍙戣〃璇勮
]]>
The ultimate webdesign usability checklisthttp://m.tkk7.com/Jcat/archive/2007/01/25/95893.htmlJcatJcatThu, 25 Jan 2007 04:39:00 GMThttp://m.tkk7.com/Jcat/archive/2007/01/25/95893.htmlhttp://m.tkk7.com/Jcat/comments/95893.htmlhttp://m.tkk7.com/Jcat/archive/2007/01/25/95893.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/95893.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/95893.html

I noticed that I, and fellow webdesigners, keep making the same usability mistakes over and over. This checklist with 88 questions is a must read for every webdesigner who cares about usability.

This website, NotUsable.com, is not designed by me. Giving me the perfect excuse why this website doesn鈥檛 pass my own usability checklist. :) But I would love to hear your comments and don鈥檛 forget to let me know when you can answer the whole checklist with 鈥榶es鈥?

Note that my design company is called Achtentachtig, which means Eighty Eight in Dutch, that鈥檚 why there are 88 questions in this checklist. Just to let you know.

Enough talking, let鈥檚 start!

    Technical

  1. Did you validate your (X)HTML using W3C Markup Validation Service?
  2. Did you validate your CSS using W3C CSS Validation Service?
  3. Did you check your website in at least IE, FF, Opera and Safari?
  4. Images

  5. Did you add the ALT and TITLE attributes to all your important images?
  6. Did you add the LONGDESC attributes to all your image that need a description?
  7. Did you write effective ALT text?
  8. Did you make the size of your pages less then 50KB?
  9. Did you choose the appropriate filetype for your images?
  10. Did you add a description to images that support your content?
  11. Did you use plain text instead of images for important content?
  12. Content

  13. Did you use a sans-serif typeface with a decent font size for your body text?
  14. Did you adjusted the leading and tracking, if necessary, to increase readability?
  15. Did you align your body text to the left? (depends on language)
  16. Did you use EM or percentages instead of PX?
  17. Did you make sure that there are no whole sentences in uppercase?
  18. Did you use less then 78 characters, including spaces, per line?
  19. Did you make brief and precise paragraphs with explanatory titles?
  20. Did you use lists to sum things up?
  21. Did you write your conclusion first and then your explanation?
  22. Did you create enough contrast between the text and the background?
  23. Did you make your website also accessible for text-only browsers?
  24. Did you make sure that there are no 鈥榰nder construction鈥?pages?
  25. Did you include a print function on pages with a large amount of text?
  26. Did you include a print stylesheet?
  27. Did you replace all special characters with the ISO Latin-1 codes?
  28. Did you spell check your content and did you proofread for grammar errors??
  29. Navigation

  30. Did you make sure that all your links work? W3C Link checker does the job.
  31. Did you include a link to all your main pages on your homepage?
  32. Did you include your main navigation on every page?
  33. Did you use no more then 8 items in your main navigation?
  34. Did you distinguish the active and nonactive page in the menu?
  35. Did you use self explanatory link text instead of 鈥榗lick here鈥?
  36. Did you use self explanatory link text instead of business terms?
  37. Did you make a distinction between visited and non-visited links?
  38. Did you make a distinction between links and plain text?
  39. Did you add the TITLE attribute to all your links?
  40. Did you use breadcrumbs if you have a large amount of pages?
  41. Did you include a search option if you have a large amount of pages?
  42. Did you make your logo link to your homepage?
  43. Did you make a skip to content link at the top of your pages?
  44. Did you make a skip to menu link at the top of your pages?
  45. Did you make it possible to browse your website using SHIFT-TAB and RETURN?
  46. Did you make sure you didn鈥檛 use any javascript links?
  47. Structure

  48. Did you make a consistent page structure?
  49. Did you place your logo at the top left?
  50. Did you place an explanatory tag line next to your logo?
  51. Did you place your search box at the top right?
  52. Did you place important content above the fold/scroll?
  53. Did you make your design on a grid system?
  54. Did you make your design fluid using percentages?
  55. Did you make your website also viewable on low resolutions?
  56. Did you make custom titles (as in TITLE tag) for all your pages?
  57. Forms

  58. Did you make sure that users don鈥檛 return to an altered form after an error?
  59. Did you make a friendly and informative error page?
  60. Did you make a friendly 鈥榯hank you鈥?page with a confirmation email?
  61. Did you add only a 鈥檚ubmit鈥?button and no 鈥榬eset鈥?button?
  62. Did you tell the user what to expect after clicking the submit button?
  63. Did you split long forms up into multiply pages?
  64. Did you gave the user room to type?
  65. Did you place an asterisk when a field is compulsatory?
  66. Did you keep the standard look of input fields that is generated by the browser?
  67. Did you create a logical order of asking information?
  68. Did you use double input fields for passwords only?
  69. Did you let the computer, not the user, handle information formatting?
  70. Did you make sure that users can fill in the entire form using the TAB key?
  71. Did you explain to the user why you ask certain information?
  72. Did you explain to the user what you are going to do with that information?
  73. Did you use realtime validation using AJAX?
  74. Did you use the LABEL tag?
  75. Did you place the LABEL above the input field, instead of next to it?
  76. Did you choose the correct input type for different data?
  77. Did you make the top input field automatically active using setfocus?
  78. Did you destinguish the active field from non-active fields using input:focus?
  79. Did you use the FIELDSET and LEGEND entities when appropriate?
  80. Did you check if your forms also work with Javascript turned off?
  81. Multimedia

  82. Did you make sure that essential information/navigation is not made in Flash?
  83. Did you make sure that music and videoclips don鈥檛 start playing automatically?
  84. Did you make sure that music and videoclips can be turned off at any time?
  85. Did you inform the user about the size and length of your music and videoclips?
  86. Extra features

  87. Did you make a custom 404 page?
  88. Did you make a site map?
  89. Did you make a rss feed? (if you add content regularly)
  90. Did you make a high contrast version of your website?
  91. Did you make good looking URL鈥檚 (like this one)?
  92. Did you make sure that there are no frames on your website?
  93. Did you make sure that there are no pop ups on your website?
  94. Did you make a contact form instead of just an email link?
  95. Any suggestions?

  96. Add number 88 by giving a comment on this post!
鍘熸枃鍦板潃



Jcat 2007-01-25 12:39 鍙戣〃璇勮
]]>
online status indicatorhttp://m.tkk7.com/Jcat/archive/2006/12/20/88968.htmlJcatJcatWed, 20 Dec 2006 01:34:00 GMThttp://m.tkk7.com/Jcat/archive/2006/12/20/88968.htmlhttp://m.tkk7.com/Jcat/comments/88968.htmlhttp://m.tkk7.com/Jcat/archive/2006/12/20/88968.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/88968.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/88968.htmlQQ聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 jcat聽聽聽 jcat

yahoo.cn聽聽聽聽聽聽聽聽聽聽聽聽 yahoo

yahoo聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽

onlinestatus.msn聽聽 MSN Online Status Indicator聽聽 MSN Online Status IndicatorMSN Online Status Indicator


鍏充簬msn錛屼技涔庤繕娌℃湁鎵懼埌瀹樻柟鐨勬湇鍔★紙鍨冨溇寰蔣錛夛紝絎笁鏂規彁渚涚殑鏈嶅姟鎬繪槸涓嶅お紼沖畾


Jcat 2006-12-20 09:34 鍙戣〃璇勮
]]>
涓浜涢〉闈㈣嚜鍔ㄨ煩杞殑瀹炵幇http://m.tkk7.com/Jcat/archive/2006/11/22/82831.htmlJcatJcatWed, 22 Nov 2006 09:20:00 GMThttp://m.tkk7.com/Jcat/archive/2006/11/22/82831.htmlhttp://m.tkk7.com/Jcat/comments/82831.htmlhttp://m.tkk7.com/Jcat/archive/2006/11/22/82831.html#Feedback2http://m.tkk7.com/Jcat/comments/commentRss/82831.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/82831.html鍔熻兘錛?縐掑悗錛岃嚜鍔ㄨ煩杞埌鍚岀洰褰曚笅鐨?2view.html鏂囦歡
1錛塰tml鐨勫疄鐜?br />
<head>
<meta聽http-equiv="refresh"聽content="5;url=02view.html">
</head>

浼樼偣錛氱畝鍗?br />緙虹偣錛歋truts Tiles涓棤娉曚嬌鐢?/div>
2錛塲avascript鐨勫疄鐜?br />
<script聽language="javascript"聽type="text/javascript">
聽聽 setTimeout(
"javascript:location.href='02view.html'",聽5000);聽
</script>

浼樼偣錛氱伒媧伙紝鍙互緇撳悎鏇村鐨勫叾浠栧姛鑳?br />緙虹偣錛氬彈鍒頒笉鍚屾祻瑙堝櫒鐨勫獎鍝?/div>
3錛夌粨鍚堜簡鍊掓暟鐨刯avascript瀹炵幇錛圛E錛?br />
<span聽id="totalSecond">5</span>

<script聽language="javascript"聽type="text/javascript">
var聽second聽=聽totalSecond.innerText;
setInterval(
"redirect()",聽1000);
function聽redirect(){聽
totalSecond.innerText
=--second;聽
if(second<0)聽location.href='02view.html';
}
</script>

浼樼偣錛氭洿浜烘у寲
緙虹偣錛歠irefox涓嶆敮鎸侊紙firefox涓嶆敮鎸乻pan銆乨iv絳夌殑innerText灞炴э級
3'錛夌粨鍚堜簡鍊掓暟鐨刯avascript瀹炵幇錛坒irefox錛?br />
<script聽language="javascript"聽type="text/javascript">
聽聽聽聽
var聽second聽=聽document.getElementById('totalSecond').textContent;
聽聽聽聽setInterval(
"redirect()",聽1000);
聽聽聽聽
function聽redirect()
聽聽聽聽{
聽聽聽聽聽聽聽聽document.getElementById('totalSecond').textContent聽
=--second;
聽聽聽聽聽聽聽聽
if聽(second聽<0)聽location.href聽=聽'02view.html';
聽聽聽聽}
</script>

4錛夎В鍐矲irefox涓嶆敮鎸乮nnerText鐨勯棶棰?br />
<span聽id="totalSecond">5</span>

<script聽language="javascript"聽type="text/javascript">
if(navigator.appName.indexOf("Explorer")聽>-1){
聽聽聽聽document.getElementById('totalSecond').innerText聽
="my聽text聽innerText";
}聽
else{
聽聽聽聽document.getElementById('totalSecond').textContent聽
="my聽text聽textContent";
}
</script>

5錛夋暣鍚?錛夊拰3'錛?br />
<span聽id="totalSecond">5</span>

<script聽language="javascript"聽type="text/javascript">
聽聽聽聽
var聽second聽=聽document.getElementById('totalSecond').textContent;

聽聽聽聽
if聽(navigator.appName.indexOf("Explorer")聽>-1)
聽聽聽聽{
聽聽聽聽聽聽聽聽second聽
=聽document.getElementById('totalSecond').innerText;
聽聽聽聽}聽
else
聽聽聽聽{
聽聽聽聽聽聽聽聽second聽
=聽document.getElementById('totalSecond').textContent;
聽聽聽聽}


聽聽聽聽setInterval(
"redirect()",聽1000);
聽聽聽聽
function聽redirect()
聽聽聽聽{
聽聽聽聽聽聽聽聽
if聽(second聽<0)
聽聽聽聽聽聽聽聽{
聽聽聽聽聽聽聽聽聽聽聽聽location.href聽
=聽'02view.html';
聽聽聽聽聽聽聽聽}聽
else
聽聽聽聽聽聽聽聽{
聽聽聽聽聽聽聽聽聽聽聽聽
if聽(navigator.appName.indexOf("Explorer")聽>-1)
聽聽聽聽聽聽聽聽聽聽聽聽{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽document.getElementById('totalSecond').innerText聽
=聽second--;
聽聽聽聽聽聽聽聽聽聽聽聽}聽
else
聽聽聽聽聽聽聽聽聽聽聽聽{
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽document.getElementById('totalSecond').textContent聽
=聽second--;
聽聽聽聽聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽}
聽聽聽聽}
</script>


Jcat 2006-11-22 17:20 鍙戣〃璇勮
]]>TAKE ALL'S FISHhttp://m.tkk7.com/Jcat/archive/2006/08/12/63218.htmlJcatJcatSat, 12 Aug 2006 07:28:00 GMThttp://m.tkk7.com/Jcat/archive/2006/08/12/63218.htmlhttp://m.tkk7.com/Jcat/comments/63218.htmlhttp://m.tkk7.com/Jcat/archive/2006/08/12/63218.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/63218.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/63218.html鍚夌ゥ涓夊疂

http://struts.apache.org/


http://www.springframework.org/


http://www.hibernate.org/

Apache

http://ant.apache.org/
Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles.

http://lucene.apache.org/

Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform.

http://jakarta.apache.org/commons/index.html
The Commons is a Jakarta subproject focused on all aspects of reusable Java components.

http://jakarta.apache.org/velocity/index.html
Velocity is a Java-based template engine. It permits anyone to use a simple yet powerful template language to reference objects defined in Java code.

Sourceforge

http://junit.sourceforge.net/
JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.

http://httpunit.sourceforge.net/
HttpUnit makes you easy聽 to be able to bypass the browser and access your site from a program. When combined with a framework such as JUnit, it is fairly easy to write tests that very quickly verify the functioning of a web site.

http://dozer.sourceforge.net/
Dozer is a powerful, yet simple Java Bean to Java Bean mapper that recursively copies data from one object to another. Typically, these Java Beans will be of different complex types.

http://xdoclet.sourceforge.net/xdoclet/index.html
XDoclet is an open source code generation engine. It enables Attribute-Oriented Programming for java. In short, this means that you can add more significance to your code by adding meta data (attributes) to your java sources. This is done in special JavaDoc tags.

http://displaytag.sourceforge.net
The display tag library is an open source suite of custom tags that provide high-level web presentation patterns which will work in an MVC model. Actually the display tag library can just... display tables! Give it a list of objects and it will handle column display, sorting, paging, cropping, grouping, exporting, smart linking and decoration of a table in a customizable XHTML style.

http://cglib.sourceforge.net/
cglib is a powerful, high performance and quality Code Generation Library, It is used to extend JAVA classes and implements interfaces at runtime.

Others

http://www.opensymphony.com/compass/
Compass is a first class open source Java Search Engine Framework, enabling the power of Search Engine semantics to your application stack decoratively. Built on top of the amazing Lucene Search Engine, Compass integrates seamlessly to popular development frameworks like Hibernate and Spring.

http://www.opensymphony.com/quartz/
Quartz is a full-featured, open source job scheduling system that can be integrated with, or used along side virtually any J2EE or J2SE application - from the smallest stand-alone application to the largest e-commerce system.

http://groovy.codehaus.org/
Groovy is an agile dynamic language for聽the Java Platform with many features that are inspired by languages like Python, Ruby and Smalltalk, making them available to Java developers using a Java-like syntax.

http://www.singularsys.com/jep/
JEP
is a Java library for parsing and evaluating mathematical expressions. With this package you can allow your users to enter an arbitrary formula as a string, and instantly evaluate it. JEP supports user defined variables, constants, and functions. A number of common mathematical functions and constants are included.

http://www.dom4j.org/
dom4j is an easy to use, open source library for working with XML, XPath and XSLT on the Java platform using the Java Collections Framework and with full support for DOM, SAX and JAXP.

http://www.castor.org/
Castor is an Open Source data binding framework for Java. It's the shortest path between Java objects, XML documents and relational tables. Castor provides Java-to-XML binding, Java-to-SQL persistence, and more.


Jcat 2006-08-12 15:28 鍙戣〃璇勮
]]>Hello Velocityhttp://m.tkk7.com/Jcat/archive/2006/08/08/62271.htmlJcatJcatTue, 08 Aug 2006 00:21:00 GMThttp://m.tkk7.com/Jcat/archive/2006/08/08/62271.htmlhttp://m.tkk7.com/Jcat/comments/62271.htmlhttp://m.tkk7.com/Jcat/archive/2006/08/08/62271.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/62271.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/62271.html鍗曡娉ㄩ噴錛?##your note
澶氳娉ㄩ噴錛?#*your note*#

涓嶈兘鐩存帴璁塊棶瀵硅薄鐨勫煙錛屽彧鑳介氳繃鏂規硶鏉ヨ闂傚叧浜庢柟娉曠殑璋冪敤錛屾湁涓ょ鍙樹綋錛圴elocity浼氬府浣犺皟鐢ㄧ浉搴旂殑鏂規硶錛夛細
1錛夊浜巆ontext涓殑Hashtable瀵硅薄錛屽彲浠ョ洿鎺ョ敤$hashtable.key鏉ュ緱鍒皏alue錛岀浉褰撲簬$hashtable.get(key)
2錛夊浜巆ontext涓殑JavaBean瀵硅薄錛屽彲浠ョ洿鎺ョ敤$javaBean.property鏉ヨ闂紝鐩稿綋浜?javaBean.getProperty()

瀹夐潤寮曠敤絎︼紙Quiet Reference Notation錛?font color="#ff0000">$!
浣滅敤錛氬綋寮曠敤鐨勫彉閲忎負null鏃訛紝灝嗚緭鍑虹┖瀛楃涓層傦紙濡傛灉鐢?xxx錛屽綋null鏃訛紝浼氳緭鍑哄瓧絎︿覆"$xxx"錛?br />
鍙屽紩鍙蜂腑鐨?xxx灝嗕粛鐒惰瑙f瀽錛涘崟寮曞彿涓殑$xxx灝嗕笉琚В鏋愶紝杈撳嚭瀛楃涓?$xxx"

鍏充簬璺緞錛?br />1. 涓篤elocityEngine鎸囧畾velocityLoaderPath錛岃璺緞涓哄瓨鏀緑m鏂囦歡鐨勬牴鐩綍錛堝叾涓嬪彲浠ュ緩瀛愭枃浠跺す錛屾棤闇鍙﹀鎸囧畾錛?br />2. 瀵箆m鐨勫紩鐢ㄩ兘鏄互velocityLoaderPath寮濮嬬殑緇濆璺緞銆傛瘮濡傦細
聽|-velocityLoaderPath
聽聽聽|-a.vm
聽聽聽|-B
聽聽聽聽聽|-b.vm
鍦╞.vm涓紩鐢╝.vm錛?parse("a.vm") 姝g‘錛浡?#parse("../a.vm") 閿欒

Jcat 2006-08-08 08:21 鍙戣〃璇勮
]]>Doohickeyhttp://m.tkk7.com/Jcat/archive/2006/08/06/62009.htmlJcatJcatSat, 05 Aug 2006 16:27:00 GMThttp://m.tkk7.com/Jcat/archive/2006/08/06/62009.htmlhttp://m.tkk7.com/Jcat/comments/62009.htmlhttp://m.tkk7.com/Jcat/archive/2006/08/06/62009.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/62009.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/62009.html 鏈鍚庣殑閫楀彿
String[] strs = {"1", "2", "3", };
System.out.println(strs.length); //3

榪欑珶鐒舵槸絎﹀悎璇硶鐨勶紒

ArrayInitializer:聽聽聽聽聽聽聽
{ [VariableInitializer {, VariableInitializer} [,]] }
VariableInitializer:聽ArrayInitializer聽Expression
http://java.sun.com/docs/books/jls/third_edition/html/syntax.html#18.1

"This is good for quick testing. I always use this. In my case, I have a table, sometimes I care some columns, other times I care some other columns, so I am lazy to remove the last comma when I change columns. It's convenient."



榪愯娌℃湁main鐨刯ava綾?br />聽聽聽聽聽聽閫氬父鎴戜滑闇瑕佸湪java綾諱腑娣誨姞main鍑芥暟鎵嶈兘鍦ㄥ懡浠よ榪愯榪欎釜綾伙紝浣嗘槸鏈変竴縐嶏紙鍙互璁╀綘鏅曟鐨勶級鏂規硶鍙互璁╀綘鍦ㄦ病鏈塵ain鐨勬儏鍐典笅涔熷彲浠ヨ繍琛宩ava class錛堝綋鐒朵笉鏄敤applet錛夛紝浠g爜濡備笅錛?/span>

public class 聽NoMainMethod
{
聽聽聽聽
static
{
聽聽聽聽聽聽聽聽System.out.println(
" Hello聽word,聽no聽main聽method! " );
聽聽聽聽聽聽聽聽System.exit(
0 );
聽聽聽聽}

}

聽聽聽聽聽聽static璇彞鍧椾細鍦ㄥ姞杞界被鐨勬椂鍊欏姞杞斤紝瀹冨湪main鍑芥暟涔嬪墠榪愯銆?褰搒tatic璇彞鍧楄繍琛屽畬姣曞悗錛屼細瀵繪壘main鍑芥暟錛屽鏋滄病鏈夋壘鍒幫紝灝變細鎶涘嚭寮傚父銆備絾鏄湪浠ヤ笂鐨勪唬鐮佷腑錛宻tatic璇彞鍧楁墽琛屽悗錛屾垜浠粓姝㈢▼搴忕殑榪愯錛屾墍浠ュ紓甯稿氨涓嶄細琚姏鍑哄暒銆?br />

璺沖嚭JavaBean鐨勫懡鍚嶈鑼?br />聽聽聽聽聽聽閫氬父錛孞avaBean鐨勫懡鍚嶈鑼冧負錛氬睘鎬у悕鐨勭浜屼釜瀛楁瘝涔熶笉鑳藉ぇ鍐欍傚嵆涓嶅彲浠ュ嚭鐜扮被浼?aAndB 榪欐牱鐨勫睘鎬у悕銆傚錛孒ibernate鐨凱O濡傛灉鍑虹幇榪欐牱鐨勫悕瀛楋紝灝嗘姏鍑簄et.sf.hibernate.PropertyNotFoundException寮傚父銆備絾鏄湁涓涓姙娉曞彲浠ヨВ鍐寵闂錛?br />

java聽file:聽聽聽聽聽
private 聽String聽aAndB;聽聽聽
public 聽String聽getAAndB()聽 {聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽
return 聽aAndB;聽聽聽
}
聽聽聽
public void 聽setAAndB(String聽aAndB)聽 {聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽 this .aAndB聽 = 聽aAndB;聽聽聽
}

mapping.xml < property聽 name ="AAndB" 聽column ="a_and_b" />
聽聽聽聽聽聽緇撶爺絀跺彂鐜幫紝涓婅堪鍔炴硶鍙互鎴愬姛鐨勫皢aAndB榪欐牱鐨勫睘鎬т笌鏁版嵁搴搈apping璧鋒潵銆?br />聽聽聽聽聽聽鏄劇劧hibernate鏄氳繃setter鍜実etter鏉ヨ闂璞$殑灞炴х殑錛屾墍浠ユ垜浠彲浠ヨ錛歮apping.xml騫朵笉鏄湪綾葷殑灞炴у拰鏁版嵁搴撶殑瀛楁鍚嶄箣闂村仛鏄犲皠錛岃屾槸鍦╯etter/getter鍜屾暟鎹簱鐨勫瓧孌典箣闂村仛鏄犲皠銆?font color="red">
聽聽聽聽聽聽璇氱劧錛屽嵆浣垮彲浠ヤ篃鍒繖涔堝共錛屽疄闄呭伐浣滀腑錛岃繕鏄閬胯繖縐嶉棶棰樼殑濂姐?/font>



Jcat 2006-08-06 00:27 鍙戣〃璇勮
]]>
Read source code is a good way to learn anything!http://m.tkk7.com/Jcat/archive/2006/08/03/61560.htmlJcatJcatThu, 03 Aug 2006 10:43:00 GMThttp://m.tkk7.com/Jcat/archive/2006/08/03/61560.htmlhttp://m.tkk7.com/Jcat/comments/61560.htmlhttp://m.tkk7.com/Jcat/archive/2006/08/03/61560.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/61560.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/61560.html Experience
To know how dose List.remove(Object) work, I do many test sample. But I still feel not very realizing. Finally, I聽took a look at聽souce code, and then I knew everything!
publicboolean聽remove(Object聽o)聽{
聽聽聽聽
if聽(o聽==null)聽{
聽聽聽聽聽聽聽聽聽聽聽聽
for聽(int聽index聽=0;聽index聽<聽size;聽index++)
聽聽聽聽聽聽聽聽
if聽(elementData[index]聽==null)聽{
聽聽聽聽聽聽聽聽聽聽聽聽fastRemove(index);
聽聽聽聽聽聽聽聽聽聽聽聽
returntrue;
聽聽聽聽聽聽聽聽}

聽聽聽聽}
else{
聽聽聽聽聽聽聽聽
for聽(int聽index聽=0;聽index聽<聽size;聽index++)
聽聽聽聽聽聽聽聽
if聽(o.equals(elementData[index]))聽{
聽聽聽聽聽聽聽聽聽聽聽聽fastRemove(index);
聽聽聽聽聽聽聽聽聽聽聽聽
returntrue;
聽聽聽聽聽聽聽聽}

聽聽聽聽聽聽聽聽}

聽聽聽聽
returnfalse;
聽聽聽聽}
1. List store very object's reference but object's own.
2. remove(Object) will remove the first reference in List which refer to聽the object
3. If you want to change an object to a new index: back up it--> remove it--> re-add it

Experience
I create a class to handle something annotated by Annotations. But it doesn't work. I found out it is returned false by Class.getMethod().isAnnotationPresent(Todo.class). Finally, I got the reason by reading source code.
publicenum聽RetentionPolicy聽{
聽聽聽聽
/**
聽聽聽聽聽*聽Annotations聽are聽to聽be聽discarded聽by聽the聽compiler.
聽聽聽聽聽
*/
聽聽聽聽SOURCE,

聽聽聽聽
/**
聽聽聽聽聽*聽Annotations聽are聽to聽be聽recorded聽in聽the聽class聽file聽by聽the聽compiler
聽聽聽聽聽*聽but聽need聽not聽be聽retained聽by聽the聽VM聽at聽run聽time.聽聽This聽is聽the聽default
聽聽聽聽聽*聽behavior.
聽聽聽聽聽
*/
聽聽聽聽CLASS,

聽聽聽聽
/**
聽聽聽聽聽*聽Annotations聽are聽to聽be聽recorded聽in聽the聽class聽file聽by聽the聽compiler聽and
聽聽聽聽聽*聽retained聽by聽the聽VM聽at聽run聽time,聽so聽they聽may聽be聽read聽reflectively.
聽聽聽聽聽*
聽聽聽聽聽*聽
@see聽java.lang.reflect.AnnotatedElement
聽聽聽聽聽
*/
聽聽聽聽RUNTIME
}



Jcat 2006-08-03 18:43 鍙戣〃璇勮
]]>灝忛敊涓嶆柇錛屽ぇ閿欎笉鐘?/title><link>http://m.tkk7.com/Jcat/archive/2006/07/25/59975.html</link><dc:creator>Jcat</dc:creator><author>Jcat</author><pubDate>Tue, 25 Jul 2006 05:11:00 GMT</pubDate><guid>http://m.tkk7.com/Jcat/archive/2006/07/25/59975.html</guid><wfw:comment>http://m.tkk7.com/Jcat/comments/59975.html</wfw:comment><comments>http://m.tkk7.com/Jcat/archive/2006/07/25/59975.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/Jcat/comments/commentRss/59975.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/Jcat/services/trackbacks/59975.html</trackback:ping><description><![CDATA[鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細鍒氶厤緗ソstruts錛屽彲鏄疍ispatchAction鎬庝箞閮戒笉宸ヤ綔錛圓ction鍙互宸ヤ綔錛夛紝涔熶笉鎶ラ敊<br />鍘熷洜錛氬彧寮曞叆浜唖truts鑷韓鐨刯ar錛岀湅涓鐪媟elease涓璴ib涓嬶紝榪樻湁涓嶅皯闈瀞truts鐨刯ar錛屽彲浠ョ寽鎯寵繖浜涢兘鏄疍ispatchAction鎵闇瑕佺殑錛岃孉ction涓嶉渶瑕侊紙浠ュ墠浠ヤ負榪欎簺娌$敤錛夈備笉鎶ラ敊璁╂垜寰堥儊闂楓?br /><br /><br /><br />鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細鍒氶厤緗ソstruts錛宎ction鍙互宸ヤ綔浜嗭紝灝辨槸涓嶈兘姝g‘鐨刦orward鍒癹sp欏甸潰錛宔xecute涓姞鏂偣錛屼篃涓嶈繘鍏ャ?br />鍘熷洜錛歟xecute鏈変袱涓紒錛侊紒<span style="font-weight: bold;">Http</span>ServletRequest vs ServletRequest錛屽墠鑰呮墠鏄痵truts鎵浣跨敤鐨別xecute銆?br /><br /><br /><br />鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細鍦╳eb.xml閲岄潰璁劇疆濂戒簡<br /><br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">error-page</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">error-code</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">404</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">error-code</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">location</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">/404.jsp</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">location</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">error-page</span><span style="color: rgb(0, 0, 255);">></span></div><br />浣嗗綋鍑虹幇<strong>404</strong>閿欒鏃訛紝騫舵病鏈夋樉紺?04.jsp榪欎竴欏碉紝鑰屾槸鏄劇ずbrowser鎻愪緵鐨別rror report page<br /><br />鍘熷洜錛氬湪瀹㈡埛绔祻瑙堝櫒濡侷E鐨刬nternet閫夐」楂樼駭灞炴т腑榛樿浣跨敤鈥滃弸濂界殑http閿欒淇℃伅鈥濓紝榪欐牱浼氶犳垚浣犵殑鏈嶅姟鍣ㄦ槸杈撳嚭浣犳墍瀹氫箟鐨勯敊璇〉闈紝浣嗗埌瀹㈡埛绔IE榪欐販铔嬬粰瑕嗙洊鎺変簡銆傝В鍐蟲柟妗堟槸浣犲畾涔夌殑閿欒欏甸潰鐨勫ぇ灝忓繀欏誨ぇ浜?strong><font color="#ff0000">512bytes</font></strong>錛屽氨涓嶄細琚鎴風璁劇疆鎵褰卞搷浜嗐?<br /><br /><br /><br />鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細鐢╤ibernate璁塊棶鏁版嵁搴擄紝鍙互insert錛屽彲浠elect錛屽彲浠rop錛屽氨鏄笉鑳?strong>update</strong>錛岃屼笖娌℃湁浠諱綍閿欒娑堟伅<br /><br />鍘熷洜錛?br /><class name="com.verican.base.model.CatalogPO" table="sys_catalog" mutable="<strong>false</strong>">璁劇疆鎴?strong><font color="#ff0000">true</font></strong>鍗沖彲銆?br />錛堝綋mutable錛漟alse錛屽嵈鍙堟墽琛寀pdate鎿嶄綔鏃訛紝hibernate鑷沖皯搴旇鎻愪緵璀﹀憡娑堟伅鍛婄煡涓涓嬫墠瀵?鍙儨娌℃湁錛屾墍浠ュ緢闅懼彂鐜幫級<br /><br /><br /><br />鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細<br />聽聽聽聽聽聽Javascript寮瑰嚭紿楀彛鏃訛紝濡傛灉鐢ㄧ殑鏄浉瀵硅礬寰勶紝褰㈠javascript:void(window.open('<strong><font color="#0000ff">../../</font></strong>test.html'))錛屼笉鍚岀殑嫻忚鍣ㄧ殑澶勭悊涓嶅悓錛堝洜涓簀s鏄祻瑙堝櫒澶勭悊鐨勪笢瑗匡級銆?br />聽聽聽聽聽聽姣斿錛屼笉鏄儴緗插湪鏍圭洰褰曚笅鏃訛紙鏍圭洰褰曚笅鍙堝緩浜嗕竴涓洰褰曪級錛氬湪Firefox涓嬶紝鏄互鏈嶅姟鍣ㄤ負瑙嗚錛屽垯<font color="#0000ff"><strong>../../</strong></font>鍗沖彲錛涜屽湪IE涓嬶紝鍒欐槸浠ユ祻瑙堝櫒涓鴻瑙掞紝鍒欓渶瑕佸鍔犱竴綰э紝濡?strong><font color="#0000ff">../../../</font></strong>銆?br />聽聽聽聽聽聽聽聽聽聽聽聽<br />瑙e喅錛氱敤緇濆璺緞 javascript:void(window.open('http://www.verican.com/test.html'))錛涙垨鑰咃紝鐢?<a <strong><font color="#ff0000">target="_blank"</font></strong> href="../../test.html"> 錛堝洜涓鴻繖鏄湇鍔″櫒澶勭悊鐨勪笢瑗匡紝鎵浠ヤ笉綆¢儴緗插湪鍝噷錛岀浉瀵硅礬寰勯兘鏄敮涓紜畾鐨勶級<br /><br /><br /><br />鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細<br />鍒鋒柊鐨勬椂鍊?1錛夋姏鍑篠ervletException<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽2錛塗he page cannot be refreshed without resending the information, Click Retry to send the information again.<br /><br />鍘熷洜錛歋truts涓璻edirect璁劇疆闂錛堝叿浣撳師鐞嗕互鍚庡啀鐮旂┒錛?br /><br />瑙e喅錛氫竴鑸殑錛宖orward鍒頒竴涓叿浣撶殑page錛宺edirect錛漟alse錛沠orward鍒板彟涓涓猘ction錛宺edirect錛漷rue<br />聽聽聽聽聽聽聽聽聽聽聽 <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">forward聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="add_item"</span><span style="color: rgb(255, 0, 0);">聽path</span><span style="color: rgb(0, 0, 255);">="newsletter.add_item.page"</span><span style="color: rgb(255, 0, 0);">聽redirect</span><span style="color: rgb(0, 0, 255);">="false"</span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">forward聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="success"</span><span style="color: rgb(255, 0, 0);">聽path</span><span style="color: rgb(0, 0, 255);">="/newsletter.do"</span><span style="color: rgb(255, 0, 0);">聽redirect</span><span style="color: rgb(0, 0, 255);">="true"</span><span style="color: rgb(0, 0, 255);">/></span></div><br /><br />鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細<br /><p class="MsoNormal" style="margin: 0in 0in 0pt;">save a form <span style="font-family: Wingdings;"><span>--></span></span> forward to list page <span style="font-family: Wingdings;"><span>--></span></span> refresh <span style="font-family: Wingdings;"><span>--></span></span> retry <span style="font-family: Wingdings;"><span>--> </span></span><span style="color: red;">save the form again (error)</span></p><br />鍘熷洜錛?br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">forward聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="list"</span><span style="color: rgb(255, 0, 0);">聽path</span><span style="color: rgb(0, 0, 255);">="ticket.list.page"</span><span style="color: rgb(255, 0, 0);">聽redirect</span><span style="color: rgb(0, 0, 255);">="false"</span><span style="color: rgb(0, 0, 255);">/></span></div><br />瑙e喅錛氫竴鑸殑錛屼粠save涓涓〃鍗曞悗錛屽簲璇orward鍒板彟涓涓猘ction錛屼笖redirect錛漷rue錛堣屼笉鏄彟涓涓猵age錛屽嵆渚垮綋鍓峚ction閲屾湁榪欎釜page錛夈傝繖鏍峰彲浠ヤ繚璇佷笉浼氶氳繃鍒鋒柊閲嶅save鏁版嵁銆?br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">forward聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="list"</span><span style="color: rgb(255, 0, 0);">聽path</span><span style="color: rgb(0, 0, 255);">="ticket.do"</span><span style="color: rgb(255, 0, 0);">聽redirect</span><span style="color: rgb(0, 0, 255);">="true"</span><span style="color: rgb(0, 0, 255);">/></span></div><br /><br /><br />鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細<br />聽聽聽聽聽聽鐢⊿pring + Velocity鍙慹mail錛屽紑濮嬮兘濂藉ソ鐨勶紝涔熻兘鐜板疄鍥劇墖錛屼絾褰撳姞鍏ユ煇涓騫呭浘鐗囦互鍚庯紝鏃犳硶姝e父鏄劇ず錛堝緱鍒頒竴涓〉闈負絀虹櫧鐨凟mail錛岃櫧鐒朵篃鏈夊ぇ灝忥級銆傛妸鍥劇墖浠巄mp鎹㈠埌jpg錛屽啀鎹㈠埌gif錛屾湭鏋溿傚噺灝忓浘鐗囩殑灝哄銆佸ぇ灝忥紝鏈灉銆傚嚑涔庨兘瑕佺粷鏈涗簡锝烇綖锝?br /><br />鍘熷洜錛?font color="#ff0000">NOTE: Invoke addInline after setText; else, mail readers might not be able to resolve inline references correctly.</font><font color="#000000">錛堣繖鏄疭pring API閲岀殑鍘熻瘽錛孨ND錛?br /><br />鎰熷彈錛?br />聽聽聽聽聽聽1.浠ュ墠娌″啓榪囧彂Email鐨勭▼搴忥紝宸ヤ綔涓敤鍒頒簡錛岀収鐚敾铏庢嬁榪囨潵灝辯敤錛屼篃娌℃湁浠旂粏闃呰鏂囨。錛屽鑷磋繖嬈℃儴鐥涚殑鏁欒銆?br />聽聽聽聽聽 2.Spring涓繖閮ㄥ垎璁捐鐨勪篃鏈夐棶棰橈紝瀹冨湪涓や釜琛ㄩ潰涓婃病浠涔堝叧緋葷殑鏂規硶涔嬮棿錛屽緩绔嬩簡<font color="#ff1493">欏哄簭涓婄殑渚濊禆鍏崇郴</font>銆傝繖浣垮緱鍑虹幇榪欑鎯呭喌鏃訛紝娌℃湁浠諱綍綰跨儲銆?br /><br /><br /><br />鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細<br />閬嶅巻List鏃訛紝涓璋冪敤remove灝卞嚭閿欙紝錛堥敊璇殑錛変唬鐮佸涓?br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">聽(Object聽o聽:聽list)<br /><img id="Codehighlighter1_30_68_Open_Image" onclick="this.style.display='none'; codehighlighter1_30_68_open_text.style.display=" none="" ;="" codehighlighter1_30_68_closed_image.style.display="'inline';" codehighlighter1_30_68_closed_text.style.display="'inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_30_68_Closed_Image" style="display: none;" onclick="this.style.display='none'; codehighlighter1_30_68_closed_text.style.display=" none="" ;="" codehighlighter1_30_68_open_image.style.display="'inline';" codehighlighter1_30_68_open_text.style.display="'inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_30_68_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽list.remove(o);<br /><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />聽聽聽聽聽聽聽聽}</span></span></div></font><br />鍘熷洜錛欳oncurrentModificationException錛屾湁remove鎿嶄綔鏃訛紝涓嶈兘鐢╢oreach寰幆<br /><br />瑙e喅錛氱敤浼犵粺寰幆錛堢湅浜嗕紶緇熻繕鏄緢鏈夌敤鐨勶級<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽i聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;聽i聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽list.size();聽i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)<br /><img id="Codehighlighter1_46_86_Open_Image" onclick="this.style.display='none'; codehighlighter1_46_86_open_text.style.display=" none="" ;="" codehighlighter1_46_86_closed_image.style.display="'inline';" codehighlighter1_46_86_closed_text.style.display="'inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_46_86_Closed_Image" style="display: none;" onclick="this.style.display='none'; codehighlighter1_46_86_closed_text.style.display=" none="" ;="" codehighlighter1_46_86_open_image.style.display="'inline';" codehighlighter1_46_86_open_text.style.display="'inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_46_86_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽list.remove(i</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">);<br /><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />聽聽聽聽聽聽聽聽}</span></span></div> 娉ㄦ剰remove榪?strong><font color="#ff0000">鍚?/font></strong>闇瑕?<font color="#ff0000"><strong>i--聽 </strong></font><font color="#000000"><strong>(--i is wrong)<br /><br /><br /><br /></strong>鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);">boolean</span><span style="color: rgb(0, 0, 0);">聽b聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽Integer(</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">)聽</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽Integer(</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 0);">);聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">false</span></div><div><br />鍘熷洜錛氬叾瀹炴槸寰堢畝鍗曠殑闂錛屼絾鏄疘DEA鍙細瀵筍tring鐨?= = 鍋氭櫤鑳芥彁紺猴紝娉ㄦ剰鍗沖彲銆?br /><br /><br /><br />鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細<br />org.hibernate.MappingException: Could not read mappings from resource: jcat/learn/mapping.xml</div><div>聽</div><div>寮濮嬩互涓鴻礬寰勬病鍐欏錛岃瘯楠屼簡N涓礬寰勭殑鍐欏彂鍚庯紝榪樻槸涓嶈銆傚悗鏉ユ墠鍙戠幇鏄洜涓簃apping.xml鏄┖鐨勩?/div><div>聽</div><div>瑙e喅錛氱粰mapping.xml鍔犱笂涓涓┖澹沖氨鍙互浜嗭紙濂芥絀哄3涓嶇瓑浜庣┖錛?/div><div>聽</div><div><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);"><?</span><span style="color: rgb(255, 0, 255);">xml聽version="1.0"聽encoding="gb2312"</span><span style="color: rgb(0, 0, 255);">?></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"><!</span><span style="color: rgb(255, 0, 255);">DOCTYPE聽hibernate-mapping聽SYSTEM聽"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"聽</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">hibernate-mapping聽</span><span style="color: rgb(255, 0, 0);">default-lazy</span><span style="color: rgb(0, 0, 255);">="false"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">hibernate-mapping</span><span style="color: rgb(0, 0, 255);">></span></div></div><div>聽</div><div>NOTE錛氬嚑縐嶈礬寰勭殑鍐欐硶<br />1. <strong>classpath:packagename/filename<br /></strong>渚嬪瓙錛氬湪applicationContext.xml涓敞鍐宧ibernate.cfg.xml<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">bean聽</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="GlobalHibernateSessionFactory"</span><span style="color: rgb(255, 0, 0);">聽class</span><span style="color: rgb(0, 0, 255);">="org.springframework.orm.hibernate3.LocalSessionFactoryBean"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">property聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="dataSource"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">ref聽</span><span style="color: rgb(255, 0, 0);">local</span><span style="color: rgb(0, 0, 255);">="GlobalDataSource"</span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">property聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="configLocation"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">classpath:hibernate.cfg.xml</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">></span></div></div><div><br />2. <strong>packagename/filename</strong><br />渚嬪瓙錛氬湪hibernate.cfg.xml涓敞鍐宮apping.xml<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">mapping聽</span><span style="color: rgb(255, 0, 0);">resource</span><span style="color: rgb(0, 0, 255);">="jcat/learn/hibernate_in_spring/orm.xml"</span><span style="color: rgb(0, 0, 255);">/></span></div></div></font><br /><br />鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細鎻愪氦琛ㄥ崟紼嬪簭錛屽姞鍏ヤ簡涓婁紶鏂囦歡鐨勫姛鑳藉悗錛屽嚭鐜板紓甯?br />java.lang.IllegalArgumentException: Cannot invoke com.verican.newsadmin.form.TicketForm.setUploadFile - <font color="#ff0000">argument type mismatch<br /><br /><font color="#000000">瑙e喅錛氬皢琛ㄥ崟澹版槑涓?font color="#ffa500">mulptipart</font>綾誨瀷</font><br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">html:form聽</span><span style="color: rgb(255, 0, 0);">action</span><span style="color: rgb(0, 0, 255);">="/ticket"</span><span style="color: rgb(255, 0, 0);">聽<strong><font color="#ffa500">enctype</font></strong></span><span style="color: rgb(0, 0, 255);"><strong><font color="#ffa500">="multipart/form-data"</font></strong></span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">html:file聽</span><span style="color: rgb(255, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">="uploadFile"</span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">html:form</span><span style="color: rgb(0, 0, 255);">></span></div></font><br /><br /><br />鐥?img src="http://m.tkk7.com/Emoticons/QQ/god.gif" border="0" height="20" width="20" />鐘訛細IE cannot open the Internet site file: ....<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">html</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">head</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">title</span><span style="color: rgb(0, 0, 255);">></</span><span style="color: rgb(128, 0, 0);">title</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">head</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">body</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">span聽</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="TypeDes2"</span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /><img id="Codehighlighter1_110_155_Open_Image" onclick="this.style.display='none'; codehighlighter1_110_155_open_text.style.display=" none="" ;="" codehighlighter1_110_155_closed_image.style.display="'inline';" codehighlighter1_110_155_closed_text.style.display="'inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_110_155_Closed_Image" style="display: none;" onclick="this.style.display='none'; codehighlighter1_110_155_closed_text.style.display=" none="" ;="" codehighlighter1_110_155_open_image.style.display="'inline';" codehighlighter1_110_155_open_text.style.display="'inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">script聽</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="text/javascript"</span><span style="color: rgb(0, 0, 255);">></span><span id="Codehighlighter1_110_155_Closed_Text" style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);"><img src="http://m.tkk7.com/images/dot.gif" /></span><span id="Codehighlighter1_110_155_Open_Text"><span style="color: rgb(0, 0, 0); background-color: rgb(245, 245, 245);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽TypeDes2.innerHTML聽</span><span style="color: rgb(0, 0, 0); background-color: rgb(245, 245, 245);">=</span><span style="color: rgb(0, 0, 0); background-color: rgb(245, 245, 245);">聽</span><span style="color: rgb(0, 0, 0); background-color: rgb(245, 245, 245);">"</span><span style="color: rgb(0, 0, 0); background-color: rgb(245, 245, 245);">Test聽Span</span><span style="color: rgb(0, 0, 0); background-color: rgb(245, 245, 245);">"</span><span style="color: rgb(0, 0, 0); background-color: rgb(245, 245, 245);">;<br /><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />聽聽聽聽</span></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">script</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">body</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">html</span><span style="color: rgb(0, 0, 255);">></span></div><br />瑙e喅錛氬浜庡崟鏍囩錛屾祻瑙堝櫒鎵句笉鍒癷nnerHTML灞炴с傛敼涓哄弻鏍囩鍗沖彲銆?br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">span聽</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="TypeDes2"</span><span style="color: rgb(0, 0, 255);">></</span><span style="color: rgb(128, 0, 0);">span</span><span style="color: rgb(0, 0, 255);">></span></div><img src ="http://m.tkk7.com/Jcat/aggbug/59975.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/Jcat/" target="_blank">Jcat</a> 2006-07-25 13:11 <a href="http://m.tkk7.com/Jcat/archive/2006/07/25/59975.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Hello Hibernatehttp://m.tkk7.com/Jcat/archive/2006/07/03/56338.htmlJcatJcatMon, 03 Jul 2006 06:24:00 GMThttp://m.tkk7.com/Jcat/archive/2006/07/03/56338.htmlhttp://m.tkk7.com/Jcat/comments/56338.htmlhttp://m.tkk7.com/Jcat/archive/2006/07/03/56338.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/56338.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/56338.html POJO principle

1. The class can not be final

2. Must implement Serializable

3. Must contain a non-argument constructor

4. The getter and setter must be public



Jcat 2006-07-03 14:24 鍙戣〃璇勮
]]>
Keymap in IntelliJhttp://m.tkk7.com/Jcat/archive/2006/06/26/55223.htmlJcatJcatMon, 26 Jun 2006 13:26:00 GMThttp://m.tkk7.com/Jcat/archive/2006/06/26/55223.htmlhttp://m.tkk7.com/Jcat/comments/55223.htmlhttp://m.tkk7.com/Jcat/archive/2006/06/26/55223.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/55223.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/55223.html闃呰鍏ㄦ枃

Jcat 2006-06-26 21:26 鍙戣〃璇勮
]]>
Some useful IntelliJ Pluginhttp://m.tkk7.com/Jcat/archive/2006/06/24/54850.htmlJcatJcatSat, 24 Jun 2006 05:01:00 GMThttp://m.tkk7.com/Jcat/archive/2006/06/24/54850.htmlhttp://m.tkk7.com/Jcat/comments/54850.htmlhttp://m.tkk7.com/Jcat/archive/2006/06/24/54850.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/54850.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/54850.html==must be installed==

RegexPlugin
http://www.intellij.org/twiki/bin/view/Main/RegexPlugin

unitTest: better (and also bigger) than JunitGenerator

CVS bar: VCS bar is too old

SpellCheckPlugin
http://www.intellij.org/twiki/bin/view/Main/SpellCheck

DBHelper: more powerful than聽 SQL Query Plugin. Maybe the latter will be removed after I am familiar with DBHelper.
http://ca.geocities.com/davidhuo2003/dbhelper.html

Rearranger: use it in canonical class, such as bean聽聽
http://www.intellij.org/twiki/bin/view/Main/RearrangerPlugin

simpleUML聽聽
http://www.intellij.org/twiki/bin/view/Main/SimpleUML

Key promoter: Shows to user how easy he can make same action using only keyboard


==good for using==

IdeaMouseGestures: IdeaMouseGestures plugin provides easy way to assign Idea's menu items to mouse gestures.
http://www.smardec.com/products/idea.html

KonaWorks PowerPack: A new code action to easily insert an expression inside a string literal
http://www.konaworks.org/

DragNDrop: This plugin will allow a user to drag and drop files into the main pane of IntelliJ

Workspaces
http://www.intellij.org/twiki/bin/view/Main/WorkspacesPlugin

RemoteTail: The plugin allows the user to view the content of a file which could be on a different computer.

Jump to Usage: Simple plugin to make navigation to element usages easier than using Alt+F7.
http://sourceforge.net/projects/jumptousage

Library Finder: helps to find library files (.jar/.zip) for a "fully qualified" class/resource name.
http://code.google.com/p/libraryfinder/

IntelliLang: IntelliLang is a combination of three basic kinds of functionality that are meant to support the developer in dealing with certain tasks that relate to (custom) languages in IntelliJ IDEA.
http://www.jetbrains.net/confluence/display/CONTEST/IntelliLang

XPathView + XSLT-Support: required by IntelliLang
http://www.intellij.org/twiki/bin/view/Main/XPathViewPlugin

Tabifier:聽The tabifier plugin retabs Java code so that syntactic elements are aligned vertically.聽
http://www.intellij.org/twiki/bin/view/Main/TabifierPlugin

Struts Assistant: it will conflict with Struts Plugin, so Struts Assistant is enough.
http://www.intellij.org/twiki/bin/view/Main/StrutsAssistant

IdeaSpring: Helpful聽to edit聽applicationContext.xml.聽But it is even a commercial one! So it has to be re-download every 15 days.

XFile: defaul Changes is good enough, so maybe it will be removed later.
http://www.echologic.com/plugins/xfiles.html

UpperLowerCapitalize: just use the capticalize, since there is default upper/lower in IDEA
http://www.intellij.org/twiki/bin/view/Main/UpperLowerCapitalize

IdeaJad: a popular decompiler
http://www.tagtraum.com/ideajad.html

SyncEdit: Remove the default shortcut "Tab" (for "Next SyncEditable Word"), since I need "Tab" work normally.

World of Java
http://www.worldofjava.org/

Scratch Pad: Additional editor tool window to hold pieces of code temporarily. No syntax colouring, intentions or error highlighting.
http://www.intellij.org/twiki/bin/view/Main/ScratchPadPlugin

HTML Preview: Provides preview for html files using Mozilla browser


==learning==

TabSwitch: Open files/tabs switcher

CVS Report for IntelliJ IDEA:聽CVS Report for IntelliJ IDEA is a free open source plugin for IntelliJ IDEA to generate statistical reports from your CVS repository.
http://vcsreport.sourceforge.net/

RssPlugin: RSS Plugin for viewing RSS feeds within IntelliJ.
http://www.intellij.org/twiki/bin/view/Main/RssPlugin

Hibernate Tools: better than hibero which is even聽a commercial one!

Smart Introduce:聽how to use it?
http://www.intellij.org/twiki/bin/view/Main/SmartIntroducePlugin

GroovyJ: hoping it can become more powerful
http://groovy.codehaus.org/IntelliJ+IDEA+Plugin


==not very useful, so can be ignore==

Code Outline: Have not found anything useful聽 (dosen't work聽in IDEA 6.0)

OpenContainingForder: Plugin for Viewing folders with Windows Explorer, but cannot聽open a folder.聽So聽"Alt+Shift+E" is better聽

LineMover: default "Ctrl+Shift+Up/Down" is enough.

SQL Query Plugin: DBHelper is good enough

SQL script editor: DBHelper is good enough

JavaDoc Browser: the window can't be big enough, so acutal browser (such as fire fox) is better.



BTW: if you have any good recommendation,聽welcome to share with us.聽



Jcat 2006-06-24 13:01 鍙戣〃璇勮
]]>
Hello Tomcathttp://m.tkk7.com/Jcat/archive/2006/06/23/54606.htmlJcatJcatFri, 23 Jun 2006 01:11:00 GMThttp://m.tkk7.com/Jcat/archive/2006/06/23/54606.htmlhttp://m.tkk7.com/Jcat/comments/54606.htmlhttp://m.tkk7.com/Jcat/archive/2006/06/23/54606.html#Feedback0http://m.tkk7.com/Jcat/comments/commentRss/54606.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/54606.html 1. Tomcat config file, where you can change Tomcat's port number: <CATALINA_HOME>/conf/server.xml

< 聽Host聽... >
聽聽聽聽聽聽 ...
聽聽聽聽聽聽聽
< 聽Context聽聽 path聽 ="/app1" 聽聽docBase聽 ="app1" 聽聽debug聽 ="0" 聽聽reloadable聽 ="true" />

聽聽聽聽聽聽聽
< 聽Context聽聽 path聽 ="/app2" 聽聽docBase聽 ="app2" 聽聽debug聽 ="0" 聽聽reloadable聽 ="true" />

聽聽聽聽聽聽聽
< 聽Context聽聽 path聽 ="root聽url" 聽聽docBase聽 ="root聽dir聽(or聽the聽path聽of聽.war)" 聽聽debug聽 ="0" 聽聽reloadable聽 ="note1" >

< / Host >


note1: whether auto-reload the web application, when .class file is changed
聽聽聽聽聽聽聽聽聽聽聽聽聽 1) during developing, set reloadable=true
聽聽聽聽聽聽聽聽聽聽聽聽聽 2) after deployment, set reloadable=false


2. Some libs

/server/lib聽

just for Tomcat

/shared/lib

for all web apps

/common/lib

both Tomcat and all web apps

/webapps/jcat/WEB-INF/lib

just present web app

3. Immobile Directory Structure (the names are also immobile, include uppercase/lowercase)
聽聽聽/jcat
聽聽聽/jcat/WEB-INF
聽聽聽/jcat/WEB-INF/web.xml
聽聽聽/jcat/WEB-INF/classes
聽聽聽/jcat/WEB-INF/lib

聽聽聽聽聽

Note: WEB-INF/classes is loaded by tomcat before WEB-INF/lib , so classes has priority than lib


4.聽Scopes
聽聽聽聽聽聽Application錛氬湪鏁翠釜web搴旂敤紼嬪簭鍐呮湁鏁堛傚搴斾簬servelet涓殑ServletContext瀵硅薄錛孉ction涓殑鑾峰彇錛歡etServlet().getServletContext()
聽聽聽聽聽聽Session錛氬湪涓涓敤鎴蜂笌鏈嶅姟鍣ㄥ緩绔嬭繛鎺ョ殑鏁翠釜榪囩▼涓湁鏁堛侫ction涓殑鑾峰彇錛歨ttpServletRequest.getSession()
聽聽聽聽聽聽Request錛氬湪涓涓姹傚懆鏈熷唴鏈夋晥銆傚氨鏄粠浣犵偣鍑婚〉闈笂鐨勪竴涓寜閽紑濮嬪埌鏈嶅姟鍣ㄨ繑鍥炲搷搴旈〉闈負姝紙鍖呮嫭鍝嶅簲欏甸潰錛夈?br />聽聽聽聽聽聽Page錛氫粎鍦ㄤ竴涓猨sp欏甸潰鍐呮湁鏁堛?br />


*1*
Request in Struts: PageFrom (request.setAttribute by using Form)-->Action(request.getAttribute&setAttribute)-->PageTo (request.getAttribute by using EL)聽

*2*聽:
Parameter vs Attribute in request
聽聽聽Parameter 鏄?/span> URL 甯﹁繃鏉ョ殑鍙傛暟錛屽彧鑳芥槸涓?/span> String 錛屽
www.verican.com/test?para1=1&para2=ttt
聽聽聽鍦?/span> Action 涓殑璋冪敤錛?/span>
request.getParameter("para1");聽
聽聽聽鍦ㄥ搷搴旈〉闈腑鐨勮皟鐢細 ${param.para1} 錛?/span> param 鏄?/span> EL 鐨勯殣钘忓璞★級


聽聽聽Attribute
涓鑸槸 Form 甯﹁繃鏉ョ殑灞炴э紝鍙互鏄換浣曞璞?br />聽聽聽 鍦?/span> Action 涓殑璋冪敤錛氫竴鑸凡緇忓瓨鍦ㄤ簬 Form 瀵硅薄涓?
聽聽聽鍦ㄥ搷搴旈〉闈腑鐨勮皟鐢細 ${attributeName.xxx}聽
錛?/span> EL 浼氳嚜鍔ㄨ皟鐢?/span> getXxx 鏂規硶錛屾墍浠ヨ attribute 蹇呴』瀹炵幇 getXxx 鏂規硶錛?/span>

5. Web server璺熻釜瀹㈡埛鐘舵佺殑鍥涚鏂規硶錛圚TTP鏄棤鐘舵佺殑鍗忚錛?br />聽聽聽 1錛夊緩绔嬪惈鏈夎窡韙暟鎹殑闅愯棌琛ㄦ牸瀛楁
聽聽聽 2錛夐噸鍐欏寘鍚澶栧弬鏁扮殑URL
聽聽聽 3錛変嬌鐢ㄦ寔緇殑Cookie
聽聽聽 4錛変嬌鐢⊿ervlet API涓殑Session鏈哄埗

6. JavaBean鐨勬爣鍑?br />聽聽聽1) should be a public class
聽聽聽2) should have a non-argument constructor
聽聽聽3) fields should be privated, and using get & set to access them
聽聽聽4) also can have some other functions as a common class



Jcat 2006-06-23 09:11 鍙戣〃璇勮
]]>
How to use jar to implement double-click-run like .exe filehttp://m.tkk7.com/Jcat/archive/2006/06/19/53857.htmlJcatJcatMon, 19 Jun 2006 14:45:00 GMThttp://m.tkk7.com/Jcat/archive/2006/06/19/53857.htmlhttp://m.tkk7.com/Jcat/comments/53857.htmlhttp://m.tkk7.com/Jcat/archive/2006/06/19/53857.html#Feedback2http://m.tkk7.com/Jcat/comments/commentRss/53857.htmlhttp://m.tkk7.com/Jcat/services/trackbacks/53857.html1. workdir=learnJar

鐩綍緇撴瀯
+ learnJar
聽| mf.mf
聽|+ test
聽聽聽| Test.java

2. workdir>javac test\Test.java

+ learnJar
聽| mf.mf聽
聽|+ test
聽聽 | Test.java
聽聽 | Test.class

3. workdir>jar cvfm a.jar mf.mf test\Test.class

+ learnJar
聽| mf.mf
聽|+ test
聽聽 | Test.java
聽聽 | Test.class
|+ a.jar
聽聽 |+ META-INF
聽聽聽聽 | MANIFEST.MF
聽聽 |+ test
聽聽聽聽 | Test.class

聽4. workdir>java -jar a.jar
hello world


NOTE
1. manifest.mf鍙互鏀懼湪浠諱綍浣嶇疆錛屼篃鍙互鏄叾瀹冪殑鏂囦歡鍚?鍙嶆鏈鍚巎ar涓殑鏂囦歡鍚嶄細琚嚜鍔ㄥ彉涓篗ANIFEST.MF)
2. "Manifest-Version: 1.0"--璇ヨ(浠ュ強鍏跺畠琛?鍐掑彿鍚庨潰蹇呴』鏄釜絀烘牸錛屽惁鍒檍ar鏃跺嚭閿?invalid header field"
3. "Main-Class: test.Test<鍥炶濺>"--璇ヨ蹇呴』浠ヤ竴涓洖杞︾緇撴潫錛屽惁鍒欐棤鏁堛?br />4. 濡傛灉鏄?font color="#0000ff">鏈塙I鐨勭▼搴?/font>錛?font color="#0000ff">鍙屽嚮jar鏂囦歡鍗沖彲榪愯銆?濡傛灉瀹夎浜唚inrar絳夊帇緙╄蔣浠訛紝jar鏂囦歡浼氳鍏寵仈錛屽洜姝わ紝鍙屽嚮鏃跺茍涓嶄細鎵цjar紼嬪簭錛岃屾槸璋冪敤鍘嬬緝杞歡鏉ユ墦寮jar鏂囦歡錛岃繖鏃訛紝灝唈ar鐨勫叧鑱斿幓鎺夊嵆鍙?

Appendix
Test.java

package 聽test;

import 聽javax.swing. * ;

public class 聽Test聽 extends 聽JFrame {
聽聽聽聽
public static void 聽main(String[]聽args) {
聽聽聽聽聽聽聽聽Test聽impl
= new 聽Test();
聽聽聽聽聽聽聽聽JLabel聽label聽
= new 聽JLabel( " hello聽world " );
聽聽聽聽聽聽聽聽impl.add(label);
聽聽聽聽聽聽聽聽聽聽聽聽impl.pack();
聽聽聽聽聽聽聽聽impl.setVisible(
true );
聽聽聽聽}

}

mf.mf
Manifest-Version:聽1.0
Main
-Class:聽test.Test
<鍥炶濺>


Jcat 2006-06-19 22:45 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 69天堂人成无码麻豆免费视频| 国产精品无码亚洲一区二区三区| 亚洲av永久无码精品漫画 | 2022国内精品免费福利视频| 日韩免费高清一级毛片在线| 午夜性色一区二区三区免费不卡视频| 18禁无遮挡无码国产免费网站| 97在线视频免费| 亚洲精品在线免费观看视频| 91制片厂制作传媒免费版樱花| 1区2区3区产品乱码免费| 114级毛片免费观看| 麻豆最新国产剧情AV原创免费 | 九九久久国产精品免费热6| 亚洲妇女水蜜桃av网网站| 亚洲综合在线成人一区| 亚洲综合亚洲综合网成人| 在人线av无码免费高潮喷水| 97视频热人人精品免费| 成人毛片视频免费网站观看| 四虎永久在线精品免费观看地址| 免费看h片的网站| a视频免费在线观看| 久久国产精品成人免费| 国产免费女女脚奴视频网 | 久久久久国色av免费看| 麻豆视频免费播放| 在线免费观看一区二区三区| 免费中文字幕在线| 亚洲VA成无码人在线观看天堂| 久久久久久亚洲AV无码专区| 亚洲av成人一区二区三区| 亚洲四虎永久在线播放| 国产成人精品日本亚洲专区6| jizzjizz亚洲日本少妇| 中文字幕免费视频精品一| 日本在线看片免费人成视频1000| 一二三四视频在线观看中文版免费 | 亚洲另类视频在线观看| 国产精品亚洲综合天堂夜夜| 亚洲永久网址在线观看|