<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[史考特部落格園地 - JSP]]></title>
<link>http://www.pro-soho.com/Blog/</link>
<description><![CDATA[生命就該浪費在美好的事物上]]></description>
<language>zh-cn</language>
<copyright><![CDATA[Copyright 2005 PBlog2 v2.4]]></copyright>
<webMaster><![CDATA[scooter.tw@gmail.com(Scott)]]></webMaster>
<generator>PBlog2 v2.4</generator> 
<image>
	<title>史考特部落格園地</title> 
	<url>http://www.pro-soho.com/Blog/images/logos.gif</url> 
	<link>http://www.pro-soho.com/Blog/</link> 
	<description>史考特部落格園地</description> 
</image>

			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=73</link>
			<title><![CDATA[Eclipse 3.0.1 Lomboz 3.0 Tomcat 5.0.28安裝]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JSP]]></category>
			<pubDate>Sat,05 Nov 2005 02:43:27 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=73</guid>	
		<description><![CDATA[<a href="http://blog.yam.com/yowcheng/archives/18944.html" target="_blank">http://blog.yam.com/yowcheng/archives/18944.html</a>]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=72</link>
			<title><![CDATA[while 跟 do-while 在輸出資料時的差別]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JSP]]></category>
			<pubDate>Sat,05 Nov 2005 02:43:27 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=72</guid>	
		<description><![CDATA[while跟do-while有什麼差別?<br/><br/>while(rs.next()){<br/>&nbsp;&nbsp;String field = rs.getString(1);<br/>}<br/><br/>以上很正常的~~一般人都是如此使用 <br/><br/>if(rs.next()){<br/>&nbsp;&nbsp;do{<br/>&nbsp;&nbsp;String field = rs.getString(1);<br/>&nbsp;&nbsp;}while(rs.next())<br/>}<br/><br/>用do-while的話，一開始是以無條件就進入迴圈 <br/>所以一開始如果要讀ResultSet的話，沒有移動cursor到第一筆是抓不到東西的 <br/><br/>2.到底用getRow()還是count(*)好?其實我是都用count(*)，抱歉!!我沒有測試過效能優劣 <br/><br/>3.jsp跟asp 的cursor concept不太一樣，asp讀到db後，一開始就是在第一筆 <br/>而jsp(Java JDBC)的話是在beforeFirst(第一筆之前) <br/>記住是cursor在beforeFirst和First不一樣，afterLast跟Last不一樣 <br/>beforeFirst的cursor位置在第一筆之前，afterLast的cursor位置在最後一筆之後 <br/><br/>像你這種情形就能用do-while加上first() <br/>rs.first()<br/>do{<br/>&nbsp;&nbsp;String field = rs.getString(1);<br/>}while(rs.next())]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=71</link>
			<title><![CDATA[讓Submit按下後指向同一頁]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JSP]]></category>
			<pubDate>Sat,05 Nov 2005 02:43:27 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=71</guid>	
		<description><![CDATA[<div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">&lt;%<br/>if(&#34;POST&#34;.equals(request.getMethod())) {<br/> }<br/>%&gt;<br/>&lt;hr&gt;<br/>&lt;form method=&#34;POST&#34; enctype=&#34;multipart/form-data&#34;&gt;<br/>&lt;input type=&#34;submit&#34;&gt;<br/>&lt;/form&gt;</div></div>]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=70</link>
			<title><![CDATA[佈署(deploy)方式]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JSP]]></category>
			<pubDate>Sat,05 Nov 2005 02:43:27 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=70</guid>	
		<description><![CDATA[佈署(deploy)方式: 到整個 web application最上層(看得到 WEB-INF的那一層), 使用 jar 指令把整個 web application 包起來<br/>C:\XXX&gt;&nbsp;&nbsp;jar cvfM s530240.war . <br/>s530240.war: 格式: s學號.war 為部署檔 <br/>. 表示目前目錄 <br/>相關參數請自行參看課本或指令說明]]></description>
		</item>
		
			<item>
			<link>http://www.pro-soho.com/Blog/default.asp?id=69</link>
			<title><![CDATA[取得位於主機絕對路徑的方法]]></title>
			<author>scooter.tw@gmail.com(admin)</author>
			<category><![CDATA[JSP]]></category>
			<pubDate>Sat,05 Nov 2005 02:43:27 +0800</pubDate>
			<guid>http://www.pro-soho.com/Blog/default.asp?id=69</guid>	
		<description><![CDATA[<div class="UBBPanel"><div class="UBBTitle"><img src="http://www.pro-soho.com/Blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代碼"/> 程序代碼</div><div class="UBBContent">String path=getServletConfig().getServletContext().getRealPath(&#34;&#34;);</div></div>]]></description>
		</item>
		
</channel>
</rss>