??xml version="1.0" encoding="utf-8" standalone="yes"?>午夜精品三级视频福利,在线观看国产成人av片,97视频在线观看网站http://www.aygfsteel.com/fidodido/category/2508.html子夜 ~程 代码与我同在zh-cnTue, 27 Feb 2007 10:47:46 GMTTue, 27 Feb 2007 10:47:46 GMT60“Y件工业奥斯卡”SYS-CON读者选择奖:(x) Java开发(转蝲自CSDNQ?/title><link>http://www.aygfsteel.com/fidodido/archive/2006/03/13/35027.html</link><dc:creator>^ Mustang ^</dc:creator><author>^ Mustang ^</author><pubDate>Mon, 13 Mar 2006 06:24:00 GMT</pubDate><guid>http://www.aygfsteel.com/fidodido/archive/2006/03/13/35027.html</guid><wfw:comment>http://www.aygfsteel.com/fidodido/comments/35027.html</wfw:comment><comments>http://www.aygfsteel.com/fidodido/archive/2006/03/13/35027.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fidodido/comments/commentRss/35027.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fidodido/services/trackbacks/35027.html</trackback:ping><description><![CDATA[     摘要: SYS-CON 媒体Qwww.sys-con.comQ在q日揭晓?jin)一q一度的“读者选择奖”,q个奖项有“Y件工业奥斯卡”之U。今q是W?0届,有超q?.7万的SYS-CON读者参与了(jin)投票Q分别评选出?jin)在SOA、Web Services、Java和XML技术等领域的最佳品、工具以?qing)最x名?  I 最佳Java应用服务?莯者:(x)BEA WebLogic Server (BEA ...  <a href='http://www.aygfsteel.com/fidodido/archive/2006/03/13/35027.html'>阅读全文</a><img src ="http://www.aygfsteel.com/fidodido/aggbug/35027.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fidodido/" target="_blank">^ Mustang ^</a> 2006-03-13 14:24 <a href="http://www.aygfsteel.com/fidodido/archive/2006/03/13/35027.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java API中文版[转蝲自Sun技术社区]http://www.aygfsteel.com/fidodido/archive/2005/11/08/18806.html^ Mustang ^^ Mustang ^Tue, 08 Nov 2005 09:00:00 GMThttp://www.aygfsteel.com/fidodido/archive/2005/11/08/18806.htmlhttp://www.aygfsteel.com/fidodido/comments/18806.htmlhttp://www.aygfsteel.com/fidodido/archive/2005/11/08/18806.html#Feedback0http://www.aygfsteel.com/fidodido/comments/commentRss/18806.htmlhttp://www.aygfsteel.com/fidodido/services/trackbacks/18806.html Java API 文档中文?/SPAN>


Sun 公司提供的Java API Docs是学?fn)和使用Java语言中最l常使用的参考资料之一。但是长期以来此文档只有英文版,对于中国地区的Java开发者来说相当的不便。目前Sun 公司正在l织多方力量此文档译成中文,q于q日在Sun 中国技术社区(http://gceclub.sun.com.cn/Q正式发布java.lang和java.utilcdAPI 文档的中文版Q其他类库API文档的中文版也将于今后一D|间内陆箋向中国地区的开发h员提供。在J2SE API文档Q?.0版本Q的汉化工作完成之后QSun 中国技术社开通Java API 文档中文版的打包下蝲服务?BR>
Java API 文档中文版发布计?/SPAN>

发布旉 相关cd 阅读/下蝲
2005/10/31 java.lang
java.util
在线阅读
2005/12/31 java.awt
java.io
java.text

2006/02/28 java.swing
2006/03/31
java.applet
java.beans
java.maths
java.net
java.nio
java.rmi
java.security
java.sql
javax.accessibility
javax.activity
javax.crypto
2006/04/30
javax.imageio
javax.management
javax.net
javax.naming
javax.print
javax.rmi
javax.security
javax.sound
2006/05/31
javax.sql
javax.transaction
javax.xml
org.ietf
org.xml
org.w3c
org.omg




^ Mustang ^ 2005-11-08 17:00 发表评论
]]>
使用FilterServlet寚w面进行{?/title><link>http://www.aygfsteel.com/fidodido/archive/2005/11/04/18185.html</link><dc:creator>^ Mustang ^</dc:creator><author>^ Mustang ^</author><pubDate>Fri, 04 Nov 2005 11:42:00 GMT</pubDate><guid>http://www.aygfsteel.com/fidodido/archive/2005/11/04/18185.html</guid><wfw:comment>http://www.aygfsteel.com/fidodido/comments/18185.html</wfw:comment><comments>http://www.aygfsteel.com/fidodido/archive/2005/11/04/18185.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fidodido/comments/commentRss/18185.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fidodido/services/trackbacks/18185.html</trackback:ping><description><![CDATA[怿很多朋友在用JSP/Servlet{技术进行页面编E的时候都?x)或多或地遇到q问题。解决的Ҏ(gu)有很多,比较常见的是手动Ҏ(gu)有可能包含中文的字符串进行{码:(x)<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"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">String latin </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> <IMG src="http://www.aygfsteel.com/images/dot.gif">;<BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>String gbk </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> String(latin.getBytes(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">iso-8859-1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">),</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">gbk</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);</SPAN></DIV><BR>q个Ҏ(gu)q去我也比较常用Q的有效,但很累赘Ӟ丝毫没有模式之美Q有没有更优雅的Ҏ(gu)呢?如果你和我一h疑虑的话Q可以考虑使用FilterServletQ?BR><BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080"> 1</SPAN><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> java.io.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080"> 2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> javax.servlet.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080"> 3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> javax.servlet.http.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080"> 4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080"> 5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> org.apache.log4j.</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080"> 6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080"> 7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> CharsetFilter<BR></SPAN><SPAN style="COLOR: #008080"> 8</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_168_917_Open_Image onclick="this.style.display='none'; Codehighlighter1_168_917_Open_Text.style.display='none'; Codehighlighter1_168_917_Closed_Image.style.display='inline'; Codehighlighter1_168_917_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_168_917_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_168_917_Closed_Text.style.display='none'; Codehighlighter1_168_917_Open_Image.style.display='inline'; Codehighlighter1_168_917_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">extends</SPAN><SPAN style="COLOR: #000000"> HttpServlet </SPAN><SPAN style="COLOR: #0000ff">implements</SPAN><SPAN style="COLOR: #000000"> Filter</SPAN><SPAN id=Codehighlighter1_168_917_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_168_917_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080"> 9</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> Logger logger </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> Logger.getLogger(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Filter servlet</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> init(FilterConfig filterConfig)<BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_315_319_Open_Image onclick="this.style.display='none'; Codehighlighter1_315_319_Open_Text.style.display='none'; Codehighlighter1_315_319_Closed_Image.style.display='inline'; Codehighlighter1_315_319_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_315_319_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_315_319_Closed_Text.style.display='none'; Codehighlighter1_315_319_Open_Image.style.display='inline'; Codehighlighter1_315_319_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>      </SPAN><SPAN style="COLOR: #0000ff">throws</SPAN><SPAN style="COLOR: #000000"> ServletException</SPAN><SPAN id=Codehighlighter1_315_319_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_315_319_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>  }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">15</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> doFilter(ServletRequest request,ServletResponse response,<BR></SPAN><SPAN style="COLOR: #008080">16</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_424_885_Open_Image onclick="this.style.display='none'; Codehighlighter1_424_885_Open_Text.style.display='none'; Codehighlighter1_424_885_Closed_Image.style.display='inline'; Codehighlighter1_424_885_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_424_885_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_424_885_Closed_Text.style.display='none'; Codehighlighter1_424_885_Open_Image.style.display='inline'; Codehighlighter1_424_885_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>      FilterChain filterChain)</SPAN><SPAN id=Codehighlighter1_424_885_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_424_885_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">17</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_449_740_Open_Image onclick="this.style.display='none'; Codehighlighter1_449_740_Open_Text.style.display='none'; Codehighlighter1_449_740_Closed_Image.style.display='inline'; Codehighlighter1_449_740_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_449_740_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_449_740_Closed_Text.style.display='none'; Codehighlighter1_449_740_Open_Image.style.display='inline'; Codehighlighter1_449_740_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(request </SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_449_740_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_449_740_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">18</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>      String charset </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> request.getCharacterEncoding();<BR></SPAN><SPAN style="COLOR: #008080">19</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>      </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(charset </SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">||</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">!</SPAN><SPAN style="COLOR: #000000">charset.equalsIgnoreCase(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">gbk</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">))<BR></SPAN><SPAN style="COLOR: #008080">20</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_579_636_Open_Image onclick="this.style.display='none'; Codehighlighter1_579_636_Open_Text.style.display='none'; Codehighlighter1_579_636_Closed_Image.style.display='inline'; Codehighlighter1_579_636_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_579_636_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_579_636_Closed_Text.style.display='none'; Codehighlighter1_579_636_Open_Image.style.display='inline'; Codehighlighter1_579_636_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN id=Codehighlighter1_579_636_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_579_636_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">21</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>          request.setCharacterEncoding(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">GBK</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">22</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">23</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_684_734_Open_Image onclick="this.style.display='none'; Codehighlighter1_684_734_Open_Text.style.display='none'; Codehighlighter1_684_734_Closed_Image.style.display='inline'; Codehighlighter1_684_734_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_684_734_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_684_734_Closed_Text.style.display='none'; Codehighlighter1_684_734_Open_Image.style.display='inline'; Codehighlighter1_684_734_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">(UnsupportedEncodingException ex)</SPAN><SPAN id=Codehighlighter1_684_734_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_684_734_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">24</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>          logger.warn(ex.getMessage());<BR></SPAN><SPAN style="COLOR: #008080">25</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">26</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">27</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_749_813_Open_Image onclick="this.style.display='none'; Codehighlighter1_749_813_Open_Text.style.display='none'; Codehighlighter1_749_813_Closed_Image.style.display='inline'; Codehighlighter1_749_813_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_749_813_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_749_813_Closed_Text.style.display='none'; Codehighlighter1_749_813_Open_Image.style.display='inline'; Codehighlighter1_749_813_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN id=Codehighlighter1_749_813_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_749_813_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">28</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>      filterChain.doFilter(request,response); </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> 递交责Q链下一?/SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">29</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top></SPAN><SPAN style="COLOR: #000000">    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">30</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_838_881_Open_Image onclick="this.style.display='none'; Codehighlighter1_838_881_Open_Text.style.display='none'; Codehighlighter1_838_881_Closed_Image.style.display='inline'; Codehighlighter1_838_881_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_838_881_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_838_881_Closed_Text.style.display='none'; Codehighlighter1_838_881_Open_Image.style.display='inline'; Codehighlighter1_838_881_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">(Exception ex)</SPAN><SPAN id=Codehighlighter1_838_881_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_838_881_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">31</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>      logger.error(ex.getMessage());<BR></SPAN><SPAN style="COLOR: #008080">32</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">33</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>  }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">34</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">35</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_911_915_Open_Image onclick="this.style.display='none'; Codehighlighter1_911_915_Open_Text.style.display='none'; Codehighlighter1_911_915_Closed_Image.style.display='inline'; Codehighlighter1_911_915_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_911_915_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_911_915_Closed_Text.style.display='none'; Codehighlighter1_911_915_Open_Image.style.display='inline'; Codehighlighter1_911_915_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> destroy()</SPAN><SPAN id=Codehighlighter1_911_915_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_911_915_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">36</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>  }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">37</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">38</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV><BR>FilterServlet内部应该使用责Q链(Chain of ResponsibilityQ实玎ͼ在这里我们把对字W串的{码做任链中的一环,从上一环拿到requestQ处理后交给铄下一环。另外需要在web.xml里做些配|:(x)<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"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">filter</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">filter-name</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">charsetfilter</SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">filter-name</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">filter-class</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">pqp.servlet.CharsetFilter</SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">filter-class</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">filter</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">filter-mapping</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">filter-name</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">charsetfilter</SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">filter-name</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">url-pattern</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">/*</SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">url-pattern</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff"><</SPAN><SPAN style="COLOR: #800000">dispatcher</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000">REQUEST</SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">dispatcher</SPAN><SPAN style="COLOR: #0000ff">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff"></</SPAN><SPAN style="COLOR: #800000">filter-mapping</SPAN><SPAN style="COLOR: #0000ff">></SPAN></DIV><BR>其中“REQUEST”指定了(jin)filter拦截的类型,有REQUEST、FORWARD、ERROR和INCLUDEQ可l合选择Q一般选REQUEST。全部设|好后重新打包、部|Ԍq样Servlet可以自动把所有的request转换为GBK的字W集?jin),是不是很方便Q?IMG height=19 src="http://www.aygfsteel.com/Emoticons/teeth_smile.gif" width=19 border=0>但在q里加了(jin)filter后对性能斚w的媄(jing)响未知,大家可以讨论一下?img src ="http://www.aygfsteel.com/fidodido/aggbug/18185.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fidodido/" target="_blank">^ Mustang ^</a> 2005-11-04 19:42 <a href="http://www.aygfsteel.com/fidodido/archive/2005/11/04/18185.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>java.util.Calendar中的陷阱http://www.aygfsteel.com/fidodido/archive/2005/10/24/16604.html^ Mustang ^^ Mustang ^Mon, 24 Oct 2005 09:23:00 GMThttp://www.aygfsteel.com/fidodido/archive/2005/10/24/16604.htmlhttp://www.aygfsteel.com/fidodido/comments/16604.htmlhttp://www.aygfsteel.com/fidodido/archive/2005/10/24/16604.html#Feedback2http://www.aygfsteel.com/fidodido/comments/commentRss/16604.htmlhttp://www.aygfsteel.com/fidodido/services/trackbacks/16604.html需求:(x)
从输入框得到用户分开输入的年、月、日Q将信息做ؓ(f)Datecd插入数据?/P>

解决一Q?/P>

InputBean bean = new InputBean(); // 装用户输入

// 获取用户输入Q封装于bean对象?/SPAN>

Calendar cal 
= Calendar.getInstance();
cal.set(cal.YEAR,bean.getYear()); 
// Year
cal.set(cal.MONTH,bean.getMonth()); // Month
cal.set(cal.DAY_OF_MONTH,bean.getDay()); // Day

// 数据库操?/SPAN>

陷阱Q?BR>Calendar中的MONTH字段和数l下标一P?开始,0代表Calendar.JANUARYQ?代表Calendar.FEBUARY…?2代表ơ年Calendar.JANUARY。因此用戯入的月䆾在置入Calendar对象之前必须q行处理Q即减一?BR>
解决二:(x)

InputBean bean = new InputBean(); // 装用户输入

// 获取用户输入Q封装于bean对象?/SPAN>

Calendar cal 
= Calendar.getInstance();
cal.set(cal.YEAR,bean.getYear()); 
// Year
cal.set(cal.MONTH,bean.getMonth() - 1); // Month
cal.set(cal.DAY_OF_MONTH,bean.getDay()); // Day

// 数据库操?/SPAN>


^ Mustang ^ 2005-10-24 17:23 发表评论
]]>
奇怪的范型定义http://www.aygfsteel.com/fidodido/archive/2005/10/19/15971.html^ Mustang ^^ Mustang ^Wed, 19 Oct 2005 10:14:00 GMThttp://www.aygfsteel.com/fidodido/archive/2005/10/19/15971.htmlhttp://www.aygfsteel.com/fidodido/comments/15971.htmlhttp://www.aygfsteel.com/fidodido/archive/2005/10/19/15971.html#Feedback1http://www.aygfsteel.com/fidodido/comments/commentRss/15971.htmlhttp://www.aygfsteel.com/fidodido/services/trackbacks/15971.html
public static <T> void sort(List<T> list,  Comparator<? super T> c)
1、既然该Ҏ(gu)无返回|voidQ,W一个?lt;T>”有什么作用?
2、?”代表什么含义?
3、“super”v什么作用?
4、基??Q?lt;? super T>”如何理解?

public static <T extends Comparable<? super T>> void sort(List<T> list)
1、“extends”如何理解?
2、其余同?img src ="http://www.aygfsteel.com/fidodido/aggbug/15971.html" width = "1" height = "1" />

^ Mustang ^ 2005-10-19 18:14 发表评论
]]>
Java Concurrent框架之阻塞队列(Blocking queueQ?/title><link>http://www.aygfsteel.com/fidodido/archive/2005/10/11/15269.html</link><dc:creator>^ Mustang ^</dc:creator><author>^ Mustang ^</author><pubDate>Tue, 11 Oct 2005 08:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/fidodido/archive/2005/10/11/15269.html</guid><wfw:comment>http://www.aygfsteel.com/fidodido/comments/15269.html</wfw:comment><comments>http://www.aygfsteel.com/fidodido/archive/2005/10/11/15269.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fidodido/comments/commentRss/15269.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fidodido/services/trackbacks/15269.html</trackback:ping><description><![CDATA[     摘要: 引子Q大家上q操作系l的都知道“生产者-消费者(Producer-ConsumerQ”模型,主要讨论的是q程Q线E)(j)间的互斥和同步问题,关键是对锁(lockQ的甌、独占和释放Q在q里我就不罗嗦了(jin)。原先我写的Java代码如下Q?public class Producer extends Thread{  private Pro...  <a href='http://www.aygfsteel.com/fidodido/archive/2005/10/11/15269.html'>阅读全文</a><img src ="http://www.aygfsteel.com/fidodido/aggbug/15269.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fidodido/" target="_blank">^ Mustang ^</a> 2005-10-11 16:56 <a href="http://www.aygfsteel.com/fidodido/archive/2005/10/11/15269.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java code namehttp://www.aygfsteel.com/fidodido/archive/2005/10/10/15181.html^ Mustang ^^ Mustang ^Mon, 10 Oct 2005 14:54:00 GMThttp://www.aygfsteel.com/fidodido/archive/2005/10/10/15181.htmlhttp://www.aygfsteel.com/fidodido/comments/15181.htmlhttp://www.aygfsteel.com/fidodido/archive/2005/10/10/15181.html#Feedback0http://www.aygfsteel.com/fidodido/comments/commentRss/15181.htmlhttp://www.aygfsteel.com/fidodido/services/trackbacks/15181.html VERSION CODE NAME   RELEASE DATE JDK 1.1.4 Sparkler Sept 12, 1997 JDK 1.1.5 Pumpkin Dec 3, 1997 JDK 1.1.6 Abigail April 24, 1998 JDK 1.1.7 Brutus Sept 28, 1998 JDK 1.1.8 Chelsea April 8, 1999 J2SE 1.2 Playground Dec 4, 1998 J2SE 1.2.1 (none) March 30, 1999 J2SE 1.2.2 Cricket July 8, 1999 J2SE 1.3 Kestrel May 8, 2000 J2SE 1.3.1 Ladybird May 17, 2001 J2SE 1.4.0 Merlin Feb 13, 2002 J2SE 1.4.1 Hopper Sept 16, 2002 J2SE 1.4.2 Mantis June 26, 2003 J2SE 5.0 (1.5.0) Tiger Sept 29, 2004
Future Releases J2SE 6.0 (1.6.0) Mustang Not yet released J2SE 7.0 (1.7.0) Dolphin Not yet released

^ Mustang ^ 2005-10-10 22:54 发表评论
]]>
Tomcat 5.5.9 不支持switch(&lt;enum&gt;)Q?/title><link>http://www.aygfsteel.com/fidodido/archive/2005/09/19/13439.html</link><dc:creator>^ Mustang ^</dc:creator><author>^ Mustang ^</author><pubDate>Mon, 19 Sep 2005 10:51:00 GMT</pubDate><guid>http://www.aygfsteel.com/fidodido/archive/2005/09/19/13439.html</guid><wfw:comment>http://www.aygfsteel.com/fidodido/comments/13439.html</wfw:comment><comments>http://www.aygfsteel.com/fidodido/archive/2005/09/19/13439.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fidodido/comments/commentRss/13439.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fidodido/services/trackbacks/13439.html</trackback:ping><description><![CDATA[ServiceExceptionTypeQ?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"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">package</SPAN><SPAN style="COLOR: #000000"> pqp.service;<BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><BR><IMG id=Codehighlighter1_54_125_Open_Image onclick="this.style.display='none'; Codehighlighter1_54_125_Open_Text.style.display='none'; Codehighlighter1_54_125_Closed_Image.style.display='inline'; Codehighlighter1_54_125_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_54_125_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_54_125_Closed_Text.style.display='none'; Codehighlighter1_54_125_Open_Image.style.display='inline'; Codehighlighter1_54_125_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">enum</SPAN><SPAN style="COLOR: #000000"> ServiceExceptionType</SPAN><SPAN id=Codehighlighter1_54_125_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_54_125_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>  DB_FAILURE<BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>      ,USER_EXISTED<BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>      ,INVALID_USERNAME_OR_PASSWORD<BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN></DIV><BR>在新用户注册的逻辑Ҏ(gu)中会(x)(g)查用户名是否已存在,存在的话抛出ServiceExceptionQƈServiceExceptionType装q去。action的excute不处理ServiceExceptionQ接着往外扔Q最后由error.jsp处理Q?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"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000"><%</SPAN><SPAN style="COLOR: #000000">@ page contentType</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">text/html; charset=GBK</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">%></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"><%</SPAN><SPAN style="COLOR: #000000">@ page isErrorPage</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">true</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">%></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"><%</SPAN><SPAN style="COLOR: #000000">@ page </SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">pqp.service.*</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">%></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"><%</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>ServiceException ex</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">(ServiceException)exception;<BR><IMG id=Codehighlighter1_188_270_Open_Image onclick="this.style.display='none'; Codehighlighter1_188_270_Open_Text.style.display='none'; Codehighlighter1_188_270_Closed_Image.style.display='inline'; Codehighlighter1_188_270_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_188_270_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_188_270_Closed_Text.style.display='none'; Codehighlighter1_188_270_Open_Image.style.display='inline'; Codehighlighter1_188_270_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">switch</SPAN><SPAN style="COLOR: #000000">(ex.getType())</SPAN><SPAN id=Codehighlighter1_188_270_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_188_270_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">case</SPAN><SPAN style="COLOR: #000000"> USER_EXISTED:<BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>  out.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">无法注册Q用户名?/SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">ex.getMessage()</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">”已存在</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff">break</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">%></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV><BR>l果~译的时候报错:(x)<BR><IMG height=610 alt=tomcat.png src="http://www.aygfsteel.com/images/blogjava_net/fidodido/2598/tomcat.png" width=761 border=0><BR><BR>NTomcat 5.5.9不支持对enumerationq行switch操作Q?img src ="http://www.aygfsteel.com/fidodido/aggbug/13439.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fidodido/" target="_blank">^ Mustang ^</a> 2005-09-19 18:51 <a href="http://www.aygfsteel.com/fidodido/archive/2005/09/19/13439.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Joshua Bloch咏Tiger诗八?/title><link>http://www.aygfsteel.com/fidodido/archive/2005/09/08/12445.html</link><dc:creator>^ Mustang ^</dc:creator><author>^ Mustang ^</author><pubDate>Thu, 08 Sep 2005 08:59:00 GMT</pubDate><guid>http://www.aygfsteel.com/fidodido/archive/2005/09/08/12445.html</guid><wfw:comment>http://www.aygfsteel.com/fidodido/comments/12445.html</wfw:comment><comments>http://www.aygfsteel.com/fidodido/archive/2005/09/08/12445.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fidodido/comments/commentRss/12445.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fidodido/services/trackbacks/12445.html</trackback:ping><description><![CDATA[<P>“Ease of Development”是J2SE 1.5的主要卖炏Vؓ(f)此,q一版本加入?jin)七U新的语aҎ(gu)——Enhanced for Loop、Autoboxing/Auto-Unboxing、Varargs、Static Import、Enumeration、Metadata和Generics。用这些特性,可以让编写出来的E序更简l、更清晰、更不容易出错,从而简化开发的q程?/P> <P>Joshua BlochQ《Effective Java》的作者,J2SE 1.5的主要开发h员之一Q效仿William BlakeQ?757-1827Q英国诗人)(j)的?A >Tiger</A>》一诗,些特性撰写了(jin)q样一l诗:(x)</P> <H4 class=major>咏Tiger</H4> <BLOCKQUOTE>Tiger, Tiger burning bright<BR>Like a geek who works all night<BR>What new-fangled bit or byte<BR>Could ease the hacker"s weary plight?<BR></BLOCKQUOTE> <P>q一首是总说Tiger中的能开发变得简单的各种新语aҎ(gu)?/P> <H4 class=major>咏Enhanced for Loop</H4> <BLOCKQUOTE>While Iterators have their uses<BR>They sometimes strangle us like nooses<BR>With enhanced-for"s deadly ray<BR>Iterator"s kept at bay<BR></BLOCKQUOTE> <P>q一首单表Enhanced for Loop机制提供?jin)一U更单的遍历数组、Collection和其它实C(jin)java.lang.Iterable接口的对象的Ҏ(gu)?/P> <H4 class=major>咏Autoboxing/Auto-Unboxing</H4> <BLOCKQUOTE>When from the collections ints are drawn<BR>Wrapper classes make us mourn<BR>When Tiger comes, we"ll shed no tears<BR>We"ll autobox them in the ears<BR></BLOCKQUOTE> <P>q一首单表Autoboxing机制/Auto-Unboxing提供?jin)一U更单的整合两套不同的类型系l(基本cd和引用类型)(j)的机制?/P> <H4 class=major>咏Varargs</H4> <BLOCKQUOTE>O joyless nights, o joyless days<BR>Our programs cluttered with arrays<BR>With varargs here, we needn"t whine;<BR>We"ll simply put the args inline<BR></BLOCKQUOTE> <P>q一首单表Varargs机制提供?jin)一U更单的传递个数可变的实参的方法?/P> <H4 class=major>咏Static Import</H4> <BLOCKQUOTE>And from the constant interface<BR>We shall inherit no disgrace<BR>With static import at our side<BR>Our joy will be unqualified<BR></BLOCKQUOTE> <P>q一首单表Static Import机制提供?jin)一U更单的讉K?rn)态成员的机制?/P> <H4 class=major>咏Enumeration</H4> <BLOCKQUOTE>The int-enum will soon be gone<BR>Like a foe we"ve known too long.<BR>With type safe-enum"s mighty power<BR>Our foe will bother us no more<BR></BLOCKQUOTE> <P>q一首单表Enumeration机制提供?jin)一U更单的定义“类型安全的枚DcZ的Ҏ(gu)?/P> <H4 class=major>咏Metadata</H4> <BLOCKQUOTE>As for noble metadata<BR>I"ll have to sing its praises later<BR>Its uses are so numerous<BR>To give their due, I"d miss the bus<BR></BLOCKQUOTE> <P>q一首单表Metadata机制提供?jin)一U更单的定义“机器可ȝ说明信息”的机制?/P> <H4 class=major>咏Generics</H4> <BLOCKQUOTE>To the most despised collections" cast<BR>We"ll bid a fond farewell at last<BR>With generics" burning spear<BR>The need for cast will disappear<BR></BLOCKQUOTE> <P>q一首是说用Generics机制Q可以免d多强制类型{化的步骤的事情。Generics机制q有些其它用法,在这里没有提到?/P><img src ="http://www.aygfsteel.com/fidodido/aggbug/12445.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fidodido/" target="_blank">^ Mustang ^</a> 2005-09-08 16:59 <a href="http://www.aygfsteel.com/fidodido/archive/2005/09/08/12445.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>接口与Objectcȝ关系Q?/title><link>http://www.aygfsteel.com/fidodido/archive/2005/08/19/10506.html</link><dc:creator>^ Mustang ^</dc:creator><author>^ Mustang ^</author><pubDate>Fri, 19 Aug 2005 05:53:00 GMT</pubDate><guid>http://www.aygfsteel.com/fidodido/archive/2005/08/19/10506.html</guid><wfw:comment>http://www.aygfsteel.com/fidodido/comments/10506.html</wfw:comment><comments>http://www.aygfsteel.com/fidodido/archive/2005/08/19/10506.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fidodido/comments/commentRss/10506.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fidodido/services/trackbacks/10506.html</trackback:ping><description><![CDATA[今天凌晨coding的时候发C个很有趣的现象。“ObjectcLJava体系的单根父节点Q所有Javac都从Objectcȝѝ”这句话是大部分green hand都知道的Java金句Q毋庸置疑。那如果我问你接口和Objectcȝ关系呢?{案是“没有关pZ。请看下面的代码Q?BR><BR> <DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"> <DIV><SPAN style="COLOR: #008080">1</SPAN><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">Map map </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> HashMap();<BR></SPAN><SPAN style="COLOR: #008080">2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>map.clone();</SPAN></DIV></DIV><BR>Map是一个接口,HashMap是一个类。clone()Ҏ(gu)在ObjectcM定义Q因此我下意识认为第二行可以q么写。结果编译器报错Qclone()Ҏ(gu)未定义。这个错误让我很郁闷Q看?jin)半天doc才发原来Map是一个接口,而接口和ObjectcL有Q何关p,所以Map也就没有l承clone()。于是把代码Ҏ(gu)下面的样子:(x)<BR><BR> <DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"> <DIV><SPAN style="COLOR: #008080">1</SPAN><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">HashMap map </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> HashMap();<BR></SPAN><SPAN style="COLOR: #008080">2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>map.clone();</SPAN></DIV></DIV><BR>q样可以了(jin)?img src ="http://www.aygfsteel.com/fidodido/aggbug/10506.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fidodido/" target="_blank">^ Mustang ^</a> 2005-08-19 13:53 <a href="http://www.aygfsteel.com/fidodido/archive/2005/08/19/10506.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>class文g中的U密http://www.aygfsteel.com/fidodido/archive/2005/08/04/9184.html^ Mustang ^^ Mustang ^Thu, 04 Aug 2005 04:50:00 GMThttp://www.aygfsteel.com/fidodido/archive/2005/08/04/9184.htmlhttp://www.aygfsteel.com/fidodido/comments/9184.htmlhttp://www.aygfsteel.com/fidodido/archive/2005/08/04/9184.html#Feedback1http://www.aygfsteel.com/fidodido/comments/commentRss/9184.htmlhttp://www.aygfsteel.com/fidodido/services/trackbacks/9184.html你知道class文g?6q制方式查看?个字节是什么数据吗Q“CAFEBABE”。没错,Cafe Baby。不信?用UltraEdit打开M一个class文g自己看看?/P>

^ Mustang ^ 2005-08-04 12:50 发表评论
]]>
static与final变量http://www.aygfsteel.com/fidodido/archive/2005/08/04/9179.html^ Mustang ^^ Mustang ^Thu, 04 Aug 2005 04:27:00 GMThttp://www.aygfsteel.com/fidodido/archive/2005/08/04/9179.htmlhttp://www.aygfsteel.com/fidodido/comments/9179.htmlhttp://www.aygfsteel.com/fidodido/archive/2005/08/04/9179.html#Feedback0http://www.aygfsteel.com/fidodido/comments/commentRss/9179.htmlhttp://www.aygfsteel.com/fidodido/services/trackbacks/9179.html一、illegal forward refrence

前天写一个类旉C个很眼生的编译错误(问题化后Q:(x)

1punlic final class Constants{
2  public static int VAR2 = VAR1 + 1;
3  public static int VAR1 = 1;
4}

~译时出错(W?行)(j)Q?/P>

illegal forward refrence

仔细一惻I是因为VAR2引用的VAR1在VAR2之后定义Q看来在Java中定义static变量时应遵@“声明先于用”的原则?BR>

 

二、static?/H4>

q是上一个类QVAR1和VAR2定义成finalQ值存在一个properties文g中,在用前必须值loadq来Q?/P>

System.getProperties().load(new FileInputStream("constants.properties"));

于是上面的代码攑֜static块中Q?BR>

punlic final class Constants{
  
static{
    System.getProperties().load(
new FileInputStream("constants.properties"));
  }


  
public static final int VAR2 = System.getProperties().getProperty("var2");

  
public static final int VAR1 = System.getProperties().getProperty("var1");
}


但在q行时VAR1和VAR2没有被赋|debug后发现static块根本没有执行。于是顿(zhn):(x)final变量在编译时便被~译器计、赋|因此在运行时没有必要执行static块?/P>

^ Mustang ^ 2005-08-04 12:27 发表评论
]]>JBuilder 2005中的Servlet mappinghttp://www.aygfsteel.com/fidodido/archive/2005/02/13/1149.html^ Mustang ^^ Mustang ^Sun, 13 Feb 2005 14:30:00 GMThttp://www.aygfsteel.com/fidodido/archive/2005/02/13/1149.htmlhttp://www.aygfsteel.com/fidodido/comments/1149.htmlhttp://www.aygfsteel.com/fidodido/archive/2005/02/13/1149.html#Feedback0http://www.aygfsteel.com/fidodido/comments/commentRss/1149.htmlhttp://www.aygfsteel.com/fidodido/services/trackbacks/1149.html


^ Mustang ^ 2005-02-13 22:30 发表评论
]]>
java.util.StringTokenizationhttp://www.aygfsteel.com/fidodido/archive/2005/02/13/1148.html^ Mustang ^^ Mustang ^Sun, 13 Feb 2005 14:29:00 GMThttp://www.aygfsteel.com/fidodido/archive/2005/02/13/1148.htmlhttp://www.aygfsteel.com/fidodido/comments/1148.htmlhttp://www.aygfsteel.com/fidodido/archive/2005/02/13/1148.html#Feedback1http://www.aygfsteel.com/fidodido/comments/commentRss/1148.htmlhttp://www.aygfsteel.com/fidodido/services/trackbacks/1148.html。我提议他用java.util.StringTokenizationcR那个类使用h很方便:(x)
StringTokenizer st = new StringTokenizer("this is a test"," ");
while (st.hasMoreTokens()) {
  System.
out.println(st.nextToken());
}

 
输出Q?BR>
this
is
a
test

Q构造器中第二个字符串是分隔W的集合Q默认是I格Q?B>


^ Mustang ^ 2005-02-13 22:29 发表评论
]]>
在Java中用Oracle blobhttp://www.aygfsteel.com/fidodido/archive/2005/02/13/1145.html^ Mustang ^^ Mustang ^Sun, 13 Feb 2005 14:27:00 GMThttp://www.aygfsteel.com/fidodido/archive/2005/02/13/1145.htmlhttp://www.aygfsteel.com/fidodido/comments/1145.htmlhttp://www.aygfsteel.com/fidodido/archive/2005/02/13/1145.html#Feedback0http://www.aygfsteel.com/fidodido/comments/commentRss/1145.htmlhttp://www.aygfsteel.com/fidodido/services/trackbacks/1145.htmlOracle中的lob (Large Object)可以存储非常大的数据Q可能是4GBQ,q样可以通过文件或其它M对象序列化成字节输出?OutputStream)后写入数据库Q之后用字节输入流(InputStream)数据读出然后反序列化ؓ(f)原始文g或对象。操作时需要用oracle的JDBC包,它扩展了(jin)sun的JDBC包中的Blob对象。同旉要注意一些细节。下面的代码演示如何使用blobQ实例中需要Oracle的JDBC包)(j)?BR>

 1import oracle.jdbc.OracleResultSet;  // 使用Oracle的ResultSet对象
 2import oracle.sql.BLOB;  // 使用Oracle的BLOB对象Q而不是sun的Blob
 3
 4
 5
 6try{
 7  Connection conn=<数据库连?/SPAN>>;
 8  File file=<存入数据库的文g对象>;
 9  conn.setAutoCommit(false);  // 取消Connection对象的auto commit属?/SPAN>
10  String file_name=file.getName();
11
12  // 数据库中有一个item表,其中的file_name (varchar2)存储文g名,file_blob (blob)存储文g对象
13  String sql="INSERT INTO item (file_name,file_blob) VALUES ('" + file_name + "',EMPTY_BLOB())";  // 使用“EMPTY_BLOB()“成生一个空blob
14  Statement stmt=conn.createStatement();
15  int count=stmt.executeUpdate(sql);
16  
17  sql="SELECT file_blob FROM item WHERE iid='" + iid + "' FOR UPDATE";  // 使用“FOR UPDATE”得到表的写?/SPAN>
18  ResultSet rs=stmt.executeQuery(sql);
19  rs.next();
20  BLOB blob=((OracleResultSet)rs).getBLOB("file_blob");  // 得到BLOB对象
21  OutputStream out=blob.getBinaryOutputStream();  // 建立输出?/SPAN>
22  InputStream in=new FileInputStream(file);  // 建立输入?/SPAN>
23  int size=blob.getBufferSize();
24  byte[] buffer=new byte[size];  // 建立~冲?/SPAN>
25  int len;
26  while((len=in.read(buffer)) != -1)
27    out.write(buffer,0,len);
28  in.close();
29  out.close();
30
31  conn.commit();
32}

33catch(Exception ex){
34  try{
35    conn.rollback();
36  }

37  catch(SQLException sqle){
38    System.err.println(sqle.getMessage());
39  }

40}

41
42

如果要读出文件的话只需调用BLOB的getBinaryStream()生成一个输入流Q再写入一个文件就行了(jin)?/FONT>



^ Mustang ^ 2005-02-13 22:27 发表评论
]]>
վ֩ģ壺 | | ٲ| | Ҷ| | | | | ʯ| | | | ƽ| | ƽ| | ɽ| | | | | ڻ| | ϻ| | ̩| | | ؿ˹| | Ϫ| | ɽ| ݸ| ̨| | | ϴ| Ͷ| |