<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-36926743</id><updated>2024-10-25T13:51:43.282+08:00</updated><category term="Open source"/><category term="WebLogic"/><category term="java"/><category term="struts"/><category term="軟體開發"/><category term="AIX"/><category term="ClearQuest"/><category term="JAAS"/><category term="REST"/><category term="javadoc"/><category term="jruby"/><category term="project management"/><category term="test"/><category term="ActiveRecord-JDBC"/><category term="ClearCase"/><category term="Eclipse"/><category term="Linux"/><category term="OpenLogic"/><category term="Qt"/><category term="Wiki"/><category term="cxf"/><category term="emma"/><category term="installation"/><category term="joke"/><category term="jsp tag"/><category term="maven"/><category term="portal"/><category term="rails"/><category term="restlet"/><category term="ruby"/><category term="sitemesh"/><category term="spec"/><category term="spring"/><category term="trac"/><category term="web tool"/><category term="webwork"/><category term="日記"/><title type='text'>死工程師的軟體開發心得</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-36926743.post-6693057646332870218</id><published>2009-01-06T11:54:00.002+08:00</published><updated>2009-01-06T13:16:12.836+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="project management"/><category scheme="http://www.blogger.com/atom/ns#" term="trac"/><title type='text'>trac notification</title><content type='html'>trac e-mail通知主要設定在trac.ini中的[notification]段落中，只要將smtp_enabled設成true，其他各設定項目，就依環境所需設定即可。&lt;br /&gt;&lt;br /&gt;一個較常見的設定項目是&lt;span style=&quot;font-weight:bold;&quot;&gt;smtp_default_domain&lt;/span&gt;，可以讓使用者只需輸入e-mail帳號(@前的部份)，trac會自動在帳號後加上@_smtp_default_domain，作為發信的e-mail</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/6693057646332870218/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/6693057646332870218' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/6693057646332870218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/6693057646332870218'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2009/01/trac-notification.html' title='trac notification'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-8937228200798642597</id><published>2008-12-19T14:31:00.004+08:00</published><updated>2008-12-19T14:55:42.871+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><category scheme="http://www.blogger.com/atom/ns#" term="restlet"/><category scheme="http://www.blogger.com/atom/ns#" term="spring"/><title type='text'>Restlet + Spring config HOWTO</title><content type='html'>最近把原先用cxf方式架起來的REST介面改用restlet，搭配freemarker作為顯示用的template engine，以下是相關的設定方式，以及需要注意的地方。&lt;br /&gt;&lt;br /&gt;首先是在pom.xml中加入相依性設定：&lt;br /&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;br /&gt; &amp;lt;dependency&amp;gt;&lt;br /&gt;     &amp;lt;groupId&amp;gt;org.restlet&amp;lt;/groupId&amp;gt;&lt;br /&gt;     &amp;lt;artifactId&amp;gt;org.restlet&amp;lt;/artifactId&amp;gt;&lt;br /&gt;     &amp;lt;version&amp;gt;1.1.1&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;   &lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.restlet&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;org.restlet.ext.spring&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;1.1.1&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.restlet&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;org.restlet.ext.freemarker&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;1.1.1&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;     &amp;lt;groupId&amp;gt;com.noelios.restlet&amp;lt;/groupId&amp;gt;&lt;br /&gt;     &amp;lt;artifactId&amp;gt;com.noelios.restlet.ext.spring&amp;lt;/artifactId&amp;gt;&lt;br /&gt;     &amp;lt;version&amp;gt;1.1.1&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.freemarker&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;freemarker&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;2.3.14&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;freemarker&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;freemarker&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;2.3.8&amp;lt;/version&amp;gt;&lt;br /&gt;   &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;其中，freemarker的部份，是因為freemarker曾經改過maven的id，而struts 2與restlet相依的是不同位置，因此必須透過手動的方式，將其中一個排除。&lt;br /&gt;&lt;br /&gt;尤於是搭配在現有的webapp當中，所以必需在web.xml中加入如下設定：&lt;br /&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;br /&gt; &amp;lt;servlet&amp;gt;&lt;br /&gt;  &amp;lt;servlet-name&amp;gt;restlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;  &amp;lt;servlet-class&amp;gt;com.noelios.restlet.ext.spring.SpringServerServlet&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;  &amp;lt;init-param&amp;gt;&lt;br /&gt;   &amp;lt;param-name&amp;gt;org.restlet.component&amp;lt;/param-name&amp;gt;&lt;br /&gt;   &amp;lt;param-value&amp;gt;component&amp;lt;/param-value&amp;gt;&lt;br /&gt;  &amp;lt;/init-param&amp;gt;&lt;br /&gt; &amp;lt;/servlet&amp;gt;&lt;br /&gt; &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;  &amp;lt;servlet-name&amp;gt;restlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;  &amp;lt;url-pattern&amp;gt;/resources/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt; &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;其中，org.restlet.application與org.restlet.component分別指定spring設定檔中的application與component id，如此一來，就可以透過spring來為resource進行dependency injection了。&lt;br /&gt;&lt;br /&gt;接下來，輪到主角applicationContext-rest.xml了，設定如下&lt;br /&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;br /&gt;  &amp;lt;bean id=&quot;component&quot; class=&quot;org.restlet.ext.spring.SpringComponent&quot;&amp;gt;&lt;br /&gt;    &amp;lt;property name=&quot;defaultTarget&quot; ref=&quot;restRoute&quot; /&amp;gt;&lt;br /&gt;  &amp;lt;/bean&amp;gt;&lt;br /&gt;  &amp;lt;bean id=&quot;restRoute&quot; class=&quot;org.restlet.ext.spring.SpringRouter&quot;&amp;gt;&lt;br /&gt;    &amp;lt;property name=&quot;attachments&quot;&amp;gt;&lt;br /&gt;      &amp;lt;map&amp;gt;&lt;br /&gt;        &amp;lt;entry key=&quot;/employee/{empNo}&quot;&amp;gt;&lt;br /&gt;   &amp;lt;bean class=&quot;org.restlet.ext.spring.SpringFinder&quot;&amp;gt;&lt;br /&gt;            &amp;lt;lookup-method name=&quot;createResource&quot; bean=&quot;employeeResource&quot; /&amp;gt;&lt;br /&gt;          &amp;lt;/bean&amp;gt;&lt;br /&gt; &amp;lt;/entry&amp;gt;&lt;br /&gt;      &amp;lt;/map&amp;gt;&lt;br /&gt;    &amp;lt;/property&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;再加上employeeResource這個資源的定義，以及其Java實作，便能夠由webapp/resources/employee/{empNp}的位置，取得employee資訊了。</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/8937228200798642597/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/8937228200798642597' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/8937228200798642597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/8937228200798642597'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2008/12/restlet-spring-config-howto.html' title='Restlet + Spring config HOWTO'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-1864552660025241348</id><published>2008-06-13T10:42:00.002+08:00</published><updated>2008-06-13T10:58:51.921+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="web tool"/><title type='text'>網頁開發必備工具 -- IETester</title><content type='html'>&lt;p&gt;&lt;br /&gt;對於網頁開放人員而言，不論使用的是asp/java/php，甚至是python或ruby，最令人頭痛的問題，除了各語言本身的限制、使用者不斷改變的需求之外，大家共同的痛應該就是同時支援多種瀏覽器時的測試問題。&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;不同的瀏覽器對javascript/css甚至是html語法，都有不同的支援，可能是對w3c標準的遵循程度，也可能是顯示方面的細節，這些不同，成為網頁開發人員最頭痛的問題。&lt;br /&gt;IETester是一個可以同時以XP或Vista的IE 5.5, 6.0,7, 8 beta 1的方式，顯示相同網的測試工具，雖然在java applet跟flash上還有些問題，但還是能大大減輕開發網頁時的負擔。&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;IETester 說明網頁: &lt;a href=&quot;http://www.my-debugbar.com/wiki/IETester/HomePage&quot;&gt;http://www.my-debugbar.com/wiki/IETester/HomePage&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/1864552660025241348/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/1864552660025241348' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/1864552660025241348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/1864552660025241348'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2008/06/ietester.html' title='網頁開發必備工具 -- IETester'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-5026512622286688943</id><published>2008-04-07T15:38:00.003+08:00</published><updated>2008-04-07T15:38:51.890+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Qt"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>Install QtRuby4 on Windows</title><content type='html'>&lt;p&gt;最近想把一些之前用ruby/python寫的小工具加上GUI，找了一下GUI的函式，決定用Qt+Ruby/Qt+Python 來做，不過，QtRuby在windows下一直不是很好裝，還好最新版的QtRuby有了gem包裝，雖然沒辦法用gem 直接remote install，不過，總是方便一點了。&lt;/p&gt;  &lt;p&gt;在Windows XP下安裝ruby 的Qt4 binding方法如下：&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;下載qt4-qtruby，url=&lt;a title=&quot;http://rubyforge.org/projects/korundum/&quot; href=&quot;http://rubyforge.org/projects/korundum/&quot;&gt;http://rubyforge.org/projects/korundum/&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;安裝mingw &lt;/li&gt;    &lt;li&gt;確定系統裡有nmake(安裝rubyqt4時會用到) &lt;/li&gt;    &lt;li&gt;執行gem install qtruby4-1.4.9-win32.gem &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;可以開始用ruby + qt寫GUI程式了&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/5026512622286688943/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/5026512622286688943' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/5026512622286688943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/5026512622286688943'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2008/04/install-qtruby4-on-windows.html' title='Install QtRuby4 on Windows'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-268912346866079371</id><published>2008-04-07T15:38:00.001+08:00</published><updated>2008-04-07T15:38:44.477+08:00</updated><title type='text'>Install Python 2.5.2 and PyQt on Windows</title><content type='html'>&lt;p&gt;安裝Python 2.5.2 與PyQt binding方式如下&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;下載Python 2.5.2 &lt;/li&gt;    &lt;li&gt;下載PyQt-Py2.5-gpl-4.3.3-2.exe &lt;/li&gt;    &lt;li&gt;安裝python &lt;/li&gt;    &lt;li&gt;安裝PyQt &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;大功告成&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/268912346866079371/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/268912346866079371' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/268912346866079371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/268912346866079371'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2008/04/install-python-252-and-pyqt-on-windows.html' title='Install Python 2.5.2 and PyQt on Windows'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-7093561145621431071</id><published>2008-01-29T11:05:00.002+08:00</published><updated>2008-06-24T19:28:56.150+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="installation"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="portal"/><title type='text'>Install Pluto 1.1.4 on Geronimo 2.0.2</title><content type='html'>剛把pluto 1.1.4安裝到geronimo 2.0.2上，花掉一天以上的時間，在這裡作個記錄。&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;安裝環境&lt;/span&gt;&lt;br /&gt;OS: Windows XP sp2 中文版&lt;br /&gt;JDK: Sun jdk 5.0 update 12&lt;br /&gt;Geronimo: 2.0.2&lt;br /&gt;Pluto: 1.1.4&lt;br /&gt;&lt;br /&gt;在安裝之前需要由pluto網站上下載pluto-current-bin.zip檔。&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;安裝share library&lt;/span&gt;&lt;br /&gt;將以下檔案安裝為geronimo 的common library:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;castor-1.1.1.jar&lt;/li&gt;&lt;br /&gt;&lt;li&gt;commons-logging-1.1.jar&lt;/li&gt;&lt;br /&gt;&lt;li&gt;pluto-container-1.1.4.jar&lt;/li&gt;&lt;br /&gt;&lt;li&gt;pluto-descriptor-api-1.1.4.jar&lt;/li&gt;&lt;br /&gt;&lt;li&gt;pluto-descriptor-impl-1.1.4.jar&lt;/li&gt;&lt;br /&gt;&lt;li&gt;pluto-taglib-1.1.4.jar&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;安裝pluto-portal&lt;/span&gt;&lt;br /&gt;建立pluto-portal用的deployment plan，dependency中加入上述的common library以及xercesImpl 2.8.1版。正常狀況下，應該就能夠順利的安裝到geronimo中，能夠在http://localhost/pluto中看到pluto的登入畫面。&lt;br /&gt;&lt;br /&gt;如果在安裝過程中發生Portlet init NullPointException，log中發現register 0 portlet的訊息，有可能是castor parse portlet.xml時發生問題，只需要把pluto-portal.war解開，將portlet.xml裡&lt;portlet-app&gt; tag的namespace拿掉，應該就能夠順利的部署上去。&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;安裝pluto-testsuite&lt;/span&gt;&lt;br /&gt;pluto testsuite並不需要安裝額外的library，只需要在dependency中以classes的方式import pluto.pluto 的class以及pluto-taglib就行了，如果遇到register 0 portlet，和pluto-portal一樣，修改portlet.xml就能夠解決。&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;security config&lt;/span&gt;&lt;br /&gt;在pluto-portal的deployement plan也需要註記security 的定義，定義如下&lt;br /&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;br /&gt;      &lt;context-root&gt;/pluto&lt;/context-root&gt;&lt;br /&gt;  &lt;br /&gt;      &lt;security-realm-name&gt;geronimo-admin&lt;/security-realm-name&gt;&lt;br /&gt;      &lt;security&gt;&lt;br /&gt;          &lt;default-principal realm-name=&quot;geronimo-admin&quot;&gt;&lt;br /&gt;              &lt;principal name=&quot;anonymous&quot;&lt;br /&gt;                  class=&quot;org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal&quot;/&gt;&lt;br /&gt;          &lt;/default-principal&gt;&lt;br /&gt;          &lt;role-mappings&gt;&lt;br /&gt;              &lt;role role-name=&quot;pluto&quot;&gt;&lt;br /&gt;                  &lt;realm realm-name=&quot;geronimo-admin&quot;&gt;&lt;br /&gt;                      &lt;principal name=&quot;system&quot;&lt;br /&gt;                          class=&quot;org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal&quot;/&gt;&lt;br /&gt;                  &lt;/realm&gt;&lt;br /&gt;              &lt;/role&gt;&lt;br /&gt;  &lt;br /&gt;          &lt;/role-mappings&gt;&lt;br /&gt;      &lt;/security&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;pluto-testsuite的deployement plan中需包含下列片段:&lt;br /&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;    &lt;context-root&gt;/testsuite&lt;/context-root&gt;&lt;br /&gt;  &lt;br /&gt;      &lt;security-realm-name&gt;geronimo-admin&lt;/security-realm-name&gt;&lt;br /&gt;  &lt;br /&gt;      &lt;security&gt;&lt;br /&gt;          &lt;default-principal realm-name=&quot;geronimo-admin&quot;&gt;&lt;br /&gt;              &lt;principal name=&quot;anonymous&quot;&lt;br /&gt;                  class=&quot;org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal&quot;/&gt;&lt;br /&gt;          &lt;/default-principal&gt;&lt;br /&gt;          &lt;role-mappings&gt;&lt;br /&gt;              &lt;role role-name=&quot;tomcat&quot;&gt;&lt;br /&gt;                  &lt;realm realm-name=&quot;geronimo-admin&quot;&gt;&lt;br /&gt;                      &lt;principal name=&quot;system&quot;&lt;br /&gt;                          class=&quot;org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal&quot;/&gt;&lt;br /&gt;                  &lt;/realm&gt;&lt;br /&gt;              &lt;/role&gt;&lt;br /&gt;  &lt;br /&gt;          &lt;/role-mappings&gt;&lt;br /&gt;     &lt;/security&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;如此應該就能夠順利把pluto 1.1.4安裝到geronimo上了。</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/7093561145621431071/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/7093561145621431071' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/7093561145621431071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/7093561145621431071'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2008/01/install-pluto-114-on-geronimo-202.html' title='Install Pluto 1.1.4 on Geronimo 2.0.2'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-1721125727341024298</id><published>2008-01-25T10:20:00.003+08:00</published><updated>2009-01-06T11:54:46.201+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><category scheme="http://www.blogger.com/atom/ns#" term="project management"/><title type='text'>Java 專案環境設定 -- maven 篇 (簡介)</title><content type='html'>&lt;p&gt;maven 是一個比較新近的java 專案開發工具，能夠簡化開發人員設置專案開發環境的程序與步驟，快速的進入專案的開發階段。透過Convention over Configuration 的概念以及設定檔的繼承機制，maven能夠讓團隊中所進行的各個開發專案有相同的檔案結構，同時也讓個別專案所需要進行的設定減到最低。&lt;/p&gt;  &lt;h6&gt;檔案結構&lt;/h6&gt;  &lt;p&gt;maven 預設的檔案結構如下&lt;/p&gt;  &lt;br /&gt;&lt;code class=&quot;prettyprint&quot;&gt;&lt;br /&gt;/src&lt;br /&gt; /main&lt;br /&gt;  /java&lt;br /&gt;  /resources&lt;br /&gt;  /configuration&lt;br /&gt;  /webapp&lt;br /&gt; /test&lt;br /&gt;  /java&lt;br /&gt;  /resources&lt;br /&gt;  /configuration&lt;br /&gt; /target&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;以 main子目錄下放置專案的production code，test下則放置專案的testing code以及configuration，專案建置(build)的結果與過程中的中間產物則會產生在target子目錄之下。/src/main/webapp則是進行網頁專案開發時的特別目錄，放置如web.xml等等的網頁相關資訊。&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h6&gt;專案設定檔&lt;/h6&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;maven的設定檔(如同ant的 build.xml)稱作pom.xml(project object model)，設定了如建置環境(java 版本，application server)，相依性(使用到的其他library及版本)。&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;設定檔的設定方式都是定義式的，如在相依性的設定中，僅需定義使用的library的名稱與版本，在建置過程中，maven會依據所設定的相依性，由repository中取得所需要的函式。定義式的設定檔另外一個好處就是與系統維持最低的相依性，同樣的設定檔，不過是在 *nix或是Windows系統下，都能夠正常的使用。&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h6&gt;專案設定檔的繼承&lt;/h6&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;專案設定檔間的繼承提供了一個能夠設定團隊中跨專案的共通性設定的地方。在一般的團隊中有許多跨專案的共通規範，如coding convention, coding style, test rule等等，團隊能夠建立一個團隊的pom設定檔，而個別的專案，只需要繼承這個團隊設定檔即可擁有相同的設定，不需要在個別的專案設定檔中重複的進行這些共通的設定。&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/1721125727341024298/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/1721125727341024298' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/1721125727341024298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/1721125727341024298'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2008/01/java-maven.html' title='Java 專案環境設定 -- maven 篇 (簡介)'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-4653650336231723055</id><published>2007-11-02T21:53:00.001+08:00</published><updated>2007-11-02T21:54:13.004+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Open source"/><category scheme="http://www.blogger.com/atom/ns#" term="軟體開發"/><title type='text'>Install trac on ubuntu with multi-project</title><content type='html'>&lt;p&gt;晚上在Ubuntu上把trac 裝好了，因為clearsilver的so link 會遇到一些問題，所以，把過程記錄下來。&lt;/p&gt;  &lt;h5&gt;安裝軟體套件&lt;/h5&gt;  &lt;p&gt;sudo apt-get install trac apache2 libapache2-svn&lt;/p&gt;  &lt;h5&gt;建立trac環境&lt;/h5&gt;  &lt;p&gt;sudo mkdir /var/lib/trac&lt;/p&gt;  &lt;p&gt;sudo chown www-data:www-data /var/lib/trac&lt;/p&gt;  &lt;h5&gt;設定apache (enable sites)&lt;/h5&gt;  &lt;p&gt;ScriptAlias /trac &amp;quot;/usr/share/trac/cgi-bin/trac.cgi&amp;quot;&lt;/p&gt;  &lt;p&gt;&amp;lt;Location &amp;quot;/trac&amp;quot;&amp;gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;SetEnv TRAC_ENV_PARENT_DIR &amp;quot;/var/lib/trac&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;lt;/Location&amp;gt;&lt;/p&gt;  &lt;p&gt;Alias /trac/chrome/common &amp;quot;/usr/share/trac/htdocs&amp;quot;&lt;/p&gt;  &lt;p&gt;&amp;lt;Directory &amp;quot;/usr/share/trac/htdocs&amp;quot;&amp;gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Order allow,deny&lt;/p&gt;    &lt;p&gt;Allow from all&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;/Directory&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;做到這邊，trac 環境應該可以正常的運作了，如果需要使用者認證的話，則需要在apache的設定中加上以下設定 (Multiple project 環境)&lt;/p&gt;  &lt;p&gt;&amp;lt;LocationMatch &amp;quot;trac/[^/]+/login&amp;quot;&amp;gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;AuthType Basic&lt;/p&gt;    &lt;p&gt;AuthName &amp;quot;Trac&amp;quot;&lt;/p&gt;    &lt;p&gt;AuthUserFile /somewhere/trac.passwd&lt;/p&gt;    &lt;p&gt;require valid-user&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;/LocationMatch&amp;gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;重新啟動apache，trac環境就可以正常運作了。&lt;/p&gt;  &lt;p&gt;接下來，只需要在新增專案的時候，在/var/lib/trac下用trac-admin 的initenv command建新的trac repository了。&lt;/p&gt; </content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/4653650336231723055/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/4653650336231723055' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/4653650336231723055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/4653650336231723055'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/11/install-trac-on-ubuntu-with-multi.html' title='Install trac on ubuntu with multi-project'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-3054331680858099436</id><published>2007-10-28T14:50:00.000+08:00</published><updated>2007-10-28T14:52:19.930+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jruby"/><category scheme="http://www.blogger.com/atom/ns#" term="rails"/><title type='text'>Access java servlet request from rails</title><content type='html'>看起來，在JRuby 的Rails 中，能夠透過$java_servlet_request來取得HttpRequest，這樣的話，應該能夠利用這種方式將rails和AppServer的JAAS整在一起來了。&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Code from RailsServlet&lt;br /&gt;  runtime.defineReadonlyVariable(&quot;$stdin&quot;, stdin);&lt;br /&gt;  runtime.defineReadonlyVariable(&quot;$java_servlet_request&quot;, JavaEmbedUtils.javaToRuby(runtime, request));&lt;br /&gt;  runtime.defineReadonlyVariable(&quot;$java_servlet_response&quot;, JavaEmbedUtils.javaToRuby(runtime, response));&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/3054331680858099436/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/3054331680858099436' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/3054331680858099436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/3054331680858099436'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/10/access-java-servlet-request-from-rails.html' title='Access java servlet request from rails'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-8502358466977618314</id><published>2007-09-22T00:39:00.000+08:00</published><updated>2007-09-22T00:50:56.663+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cxf"/><category scheme="http://www.blogger.com/atom/ns#" term="Open source"/><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><title type='text'>CXF REST transport notes</title><content type='html'>&lt;p&gt;&lt;br /&gt;搞了一整天，總算試出CXF的REST介面可以運作的設定模式，雖然wrapped mode一直搞不定，不過，總算搞定unwrapped mode的設定方式。主要必需注意的事情是:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;interface上一定要有@WebService annotation&lt;/li&gt;&lt;br /&gt;&lt;li&gt;在需要傳遞的參數上必需要使用 @HttpResource 指定對應的uri pattern&lt;/li&gt;&lt;br /&gt;&lt;li&gt;因為是unwrapped mode, 接受的參數都必需要用VTO (value transfer object)包起來，如同CXF 文件Java REST annotation中的範例一樣&lt;/li&gt;&lt;br /&gt;&lt;li&gt;CXF 會根據 URI template中的參數名稱{param}將參數對於到VTO中的property。&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;範例 (interface), spring 設定中的 serviceFactory必需設定unwrapped = false&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;@WebService(targetNamespace=&quot;http://employee.some.company.com&quot;)&lt;br /&gt;public interface EmployeeService {&lt;br /&gt; @Get&lt;br /&gt; @HttpResource(location=&quot;/employees/{serial}&quot;)&lt;br /&gt; @WebResult(name=&quot;Employee&quot;)&lt;br /&gt; Employee getEmployee(GetEmployee getEmployee);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/8502358466977618314/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/8502358466977618314' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/8502358466977618314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/8502358466977618314'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/09/cxf-rest-transport-notes.html' title='CXF REST transport notes'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-6668264778086109364</id><published>2007-07-17T09:50:00.000+08:00</published><updated>2007-07-19T20:01:26.766+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Open source"/><category scheme="http://www.blogger.com/atom/ns#" term="struts"/><category scheme="http://www.blogger.com/atom/ns#" term="軟體開發"/><title type='text'>struts 2: field validation and type conversion</title><content type='html'>一般web 應用中，很基本的一個功能是參數的驗證(validation)，而在struts 2中，這個功能是透過validation來達成的。但是，在驗證之前，struts 2會先做type conversion 的動作，以確定輸入的參數能夠滿足action 中各個properties的需求。所以，interceptor的執行順序是&lt;br /&gt;&lt;ol&gt;&lt;li&gt;型別轉換 (type conversion)&lt;/li&gt;&lt;li&gt;參數驗證 (validation)&lt;/li&gt;&lt;/ol&gt;如果在型別轉換時就發生錯誤的話，相同的欄位就不會進行參數驗證。我就是忽略了這個順序，才搞了二天。&lt;br /&gt;&lt;br /&gt;舉例來說，如果有個property 是 setDate(Date theDate)，在zh_TW的locale中，預設的日期格式是mm/dd/yyyy，我想在為這個欄位加上validation, 於是，在我的Action-validation.xml中有下列的一段程式碼：&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;field name=&quot;date&quot;&amp;gt;&lt;br /&gt;&amp;lt;field-validator type=&quot;regex&quot;&amp;gt;&lt;br /&gt;   &amp;lt;param name=&quot;expression&quot;&amp;gt; ...&amp;lt;/param&amp;gt;&lt;br /&gt;   &amp;lt;message&amp;gt;wrong format for field date&amp;lt;/message&amp;gt;&lt;br /&gt;&amp;lt;/field-validator&amp;gt;&lt;br /&gt;&amp;lt;/field&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;但是，當格式錯誤時，regex卻不會抓到錯誤，問題就是出在type conversion 的interceptor 先運作了，所以總是會出現type conversion 的錯誤訊息 : &quot;&lt;span style=&quot;font-weight: bold;&quot;&gt;Invalid field value for field &quot;date&quot;&lt;/span&gt;&quot;，所以，對於非String 型態的property，比較有意義的validator只剩下required、date、int這幾個有意義，其他的意義都不大。&lt;br /&gt;&lt;br /&gt;那接下來的問題就在於，怎麼把&quot;Invalid field value for vield ...&quot; 這段訊息換成我們想顯示的訊息。這必需透過struts 2的I18N機制來達成，根據&lt;a href=&quot;http://struts.apache.org/2.0.6/struts2-core/apidocs/com/opensymphony/xwork2/util/AnnotationXWorkConverter.html&quot;&gt;AnnotationXWorkConverter&lt;/a&gt;文件中提到的，可以在ClassName.properties中設定 &lt;b&gt;invalid.fieldvalue.欄位名稱&lt;/b&gt;，來設定特定欄位的conversion error錯誤訊息，如果要改變預設的訊息的話，則可以透過設定global的I18N屬性&lt;b&gt;xwork.default.invalid.fieldvalue&lt;/b&gt; 來達成效果。</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/6668264778086109364/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/6668264778086109364' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/6668264778086109364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/6668264778086109364'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/07/struts-2-field-validation-and-type.html' title='struts 2: field validation and type conversion'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-3412420262973498225</id><published>2007-07-16T14:14:00.000+08:00</published><updated>2007-07-19T20:08:33.069+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Open source"/><category scheme="http://www.blogger.com/atom/ns#" term="struts"/><category scheme="http://www.blogger.com/atom/ns#" term="軟體開發"/><title type='text'>sturts 2 validation and action property</title><content type='html'>今天又犯了個豬頭錯誤，我有兩個Struts Action，程式碼類似這樣:&lt;br /&gt;public class ParentAction {&lt;br /&gt;  protected long property; &lt;br /&gt; ...&lt;br /&gt;  public long getProperty(){&lt;br /&gt;      return property;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class ChildAction extends ParentAction{&lt;br /&gt;   public void setProperty(int property ){&lt;br /&gt;        this.property = property;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;當我對ChildAction 加上required validation時，問題就來了，不論我輸入的是什麼值，validation interceptor總是告訴會回報property is null，找了半天，一路trace到Ognl層，才發現問題出在，透過reflection API取得property 的method descriptor時，因為setProperty的參數型態和getProperty的參數型態不符，而getProperty又在parent，所以會只認getProperty，而把setProperty(int) 當作是一個overloading method，以致於無法設值進去，只要把setProperty 由setProperty(int)改成setProperty(long)，就又能夠正常運作了。&lt;br /&gt;&lt;br /&gt;這樣的錯誤，只能說是自己不小心造成的，但是，這種錯，應該會常常發生吧，下次，得把這類的檢查也加到test case中。</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/3412420262973498225/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/3412420262973498225' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/3412420262973498225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/3412420262973498225'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/07/sturts-2-validation-and-action-property.html' title='sturts 2 validation and action property'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-1952628954381499043</id><published>2007-07-16T11:29:00.000+08:00</published><updated>2007-07-16T14:16:38.483+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic"/><title type='text'>WebLogic workshop 10.1 release</title><content type='html'>&lt;p&gt;這幾天的事吧，剛開始用，有幾點還不錯的改善。&lt;/p&gt; &lt;ol&gt;&lt;li&gt;server console 總算可以不用另外開個console window，而能夠直接顯示在eclipse的console view了。&lt;/li&gt;&lt;li&gt;deployee時如果發現context已經有application，會自動問你要不要把原來的application  delte，換成目前的proect。&lt;/li&gt;&lt;li&gt;compile/build/deployee的速度變快了，看起來AppXRay總算有點正面效益了。&lt;/li&gt;&lt;li&gt;新的 jsp editor還不錯，一個畫面切上下兩部份，下半source，上半部是jsp輸出的結果，對我這種喜歡直接寫code的人還蠻方便的。&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;不過，有優點當然也會有缺點囉：&lt;br /&gt;&lt;ol&gt;&lt;li&gt;還不支援portal development，幾個portal facet 會丟warning&lt;/li&gt;&lt;li&gt;還不支援struts 2 ....&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;一些有加強，但對我而言可有可無的功能，但是這些功能可能對其他人蠻有幫助的吧：&lt;br /&gt;&lt;ol&gt;&lt;li&gt;spring ide support，不過，只支援到spring 2.0&lt;/li&gt;&lt;li&gt;hibernate/bea kudo support，不過，我習慣手動寫mapping，或是利用annotation，所以對我而言效益也不大&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;其他一些pageflow(beehive)之類的相關功能，因為沒在用，就沒特別去試了。</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/1952628954381499043/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/1952628954381499043' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/1952628954381499043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/1952628954381499043'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/07/weblogic-workshop-101-release.html' title='WebLogic workshop 10.1 release'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-1876722876840205455</id><published>2007-06-01T10:10:00.000+08:00</published><updated>2007-06-04T14:48:24.059+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAAS"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="struts"/><category scheme="http://www.blogger.com/atom/ns#" term="test"/><title type='text'>在Struts2 中取得JAAS相關資訊</title><content type='html'>&lt;p&gt;在WebWork/Struts 2的應用框架中，可以讓系統開發者在寫程式時，專注在應用系統的邏輯，透過IoC的注入(injection)方式，程式碼中可以完全看不到與JavaEE相關的程式碼。但是這種美好的世界，在遇到一些需要根據使用者傳回不同的結果的action時，就不是那麼美好，除非你所開發的應用系統自行處理使用者權限與授權相關的功能。如果是使用JAAS，那程式中不免會需要透過HttpRequest來取得remoteUser等資訊。在Struts2/WebWork中，提供了兩個介面可以做到這樣的功能 &lt;strong&gt;HttpRequestAware&lt;/strong&gt; 與 &lt;strong&gt;PrincipalAware。&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;HttpRequestAware&lt;/strong&gt; 是第一個會想到的介面，既然remoteUser的資料是從request來的，那就叫struts幫我們注入個request object不就成了？但是一但在action中引入HttpRequest，使用Struts2/Webwork的最大好處，與平台低相依性，易測試的優點就當場被破壞了。當引入HttpRequest之後，為了測試action，必需透過如spring-mock等等的JavaEE mock 套件，無法簡單的透過如jmock, 或是自行打造stub的方式來進行測試，而且，只是需要getRemoteUser, isUserInRole等function，卻把整個HttpRequest 都暴露在action中，怎麼看味道也不對。&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;PrincipalAware&lt;/strong&gt; 就是為了解決上述的問題產生的，如果你只是很單存的需要getRemoteUser, isSecured, getPrincipal, isUserInRole等功能，那action只需要實作PrincipalAware，Struts2/WebWork會為action注入一個PrincipalProxy，提供getRemoteUser等需要的方法，又不需要將整個HttpRequest都暴露在action中，造成與平台過度的相依。更好的是，PrincipalProxy是一個interface，可以利用jmock, dynaMock等mock framework簡單的產生測試時需要的替代品，對自動測試可是一大利多。&lt;/p&gt;&lt;br /&gt;&lt;p&gt;使用WebWork到現在，也好幾年了，居然到現在才發現有這個interface，該說是後知後覺，還是太不認真了，不過，這個介面可是解決了以往為了測試這些需要principal 的action，而搞了幾乎整套的JavaEE stack的問題，又能夠滿足整個應用系統的味道能夠一致，真該認真點的。&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/1876722876840205455/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/1876722876840205455' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/1876722876840205455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/1876722876840205455'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/06/struts2-principalaware.html' title='在Struts2 中取得JAAS相關資訊'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-2147935716394547233</id><published>2007-05-25T16:29:00.001+08:00</published><updated>2007-06-04T10:12:29.124+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="joke"/><category scheme="http://www.blogger.com/atom/ns#" term="軟體開發"/><title type='text'>下車再上車?</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;&lt;p&gt;&lt;br /&gt;以前的同事pj曾經說過一個笑話，一群人開車到郊外踏青，在差不多算是荒郊野外的地方車子故障了，一群人急得想各種辦法要把車子修好，但是都徒勞無功，最後，一位在微軟工作的軟體工程師說話了：「我們把車子熄火，全部的人下車，再上車試看看，可能就沒問題了。」凡是用過電腦的人，多多少少會遇到類似下車再上車的狀況，對像可能是特定的應用程式，也可能是整個作業系統，怎麼找就是找不出問題，但是，把程式重開或是重開機之後，問題就不見了。而開發人員遇到這種狀況的機會又比一般的使用者來得高。&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;這種狀況，常常是因為系統在開發過程中沒有考慮到一些特定的狀況所造成的。但是隨著作業系統愈來愈複雜，今天，除了特殊的應用之外，單工的作業環境已經愈來愈少見了，導致要在開發階段就考慮到所有的狀況已經是愈來愈不可能了。為了因應這種狀況，近代的程式語言大都包含了例外處理的機制，這個機制最主要的目的就是讓程式在遇到開發時期未考慮到的狀況時，能夠死得漂亮一點，死得優雅一點，最低限度，要讓使用者知道，程式已經死了，而不是讓使用者去和一個不穩定狀態的系統打交道。&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;例外處理，是程式設計的一個很重要的課題，雖然有些人認為例外處理讓部份程式流程更不容易被追蹤(trace)，但是不可否認的，在支援例外處理的程式中，程式碼可以以更容易被人類讀懂的方式來表示，而不是一長串的if/else if /else。畢竟，程式碼除了建立系統之外，也是程式設計師之間最主要的溝通工具。如果說，少男漫畫中的主角是用拳頭交心，那程式設計師就是用程式碼交心了。&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/2147935716394547233/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/2147935716394547233' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/2147935716394547233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/2147935716394547233'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/05/blog-post.html' title='下車再上車?'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-4065763200338635323</id><published>2007-05-25T00:09:00.001+08:00</published><updated>2007-05-25T00:10:50.660+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Open source"/><category scheme="http://www.blogger.com/atom/ns#" term="Wiki"/><title type='text'>需要wiki嗎? 自己挑一個吧!!</title><content type='html'>&lt;p&gt;這幾年，wiki (維基)愈來愈紅，不管是公司、社群，甚至個人常常都會有個wiki。但是愈來愈紅代表的也就是選擇可能會愈來愈多，在wiki的領域，可選擇的軟體也愈來愈多，甚至也可以偷懶直接使用別人的wiki 主機服務。這麼多的wiki怎麼選呢? 當然，就是要靠比較多，這次介紹的網站，就是可以幫你比較常見的wiki間的差異、支援等等，讓你更方便的選擇一個自己的wiki。&lt;/p&gt;&lt;br /&gt;&lt;p&gt;這個網站收錄了87個Wiki軟體及服務(主機服務)，可以讓你對各個wiki之間的功能作詳細的比較，更提供了一個Wiki Choice Wizard，透過幾個問題，先幫你作篩選，讓你不用在87個軟體間漫無目的的尋找，需要wiki嗎? 挑個自己合用的吧!!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;http://www.wikimatrix.org/&quot;&gt;WikiMatrix - Compare them all&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/4065763200338635323/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/4065763200338635323' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/4065763200338635323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/4065763200338635323'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/05/wiki.html' title='需要wiki嗎? 自己挑一個吧!!'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-3532029253785872790</id><published>2007-04-04T09:21:00.001+08:00</published><updated>2007-04-04T09:23:35.118+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic"/><title type='text'>WebLogic 10 正式發佈</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;中心的server才剛啟動由WebLogic 8到WebLogic 9的轉移程序，10居然就發表了，雖然以中心的理境而言，用這麼大的AppServer或是Portal Server真的是很明顯的殺雞用牛刀的狀況，但是，買都買了，預算也編了，暫時也只能維持在目前的平台，再儘可能的以符合標準的方式來作系統開發，減少日後萬一需要轉移時需要的工夫吧。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;不過，這次的Workshop 10總算能以個別plugin的方式安裝在原有的Eclipse環境下，這點對我可是有很大的吸引力呢，至少不用在去處理ClearCase plugin 與 Workshop 9之間偶爾會發生的怪異狀況，再加上很多Eclipse的plugin 也都轉移到3.2的版本了，看來，可以認真考慮是不是要跳過9, 一次攻頂上到10版了。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/3532029253785872790/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/3532029253785872790' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/3532029253785872790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/3532029253785872790'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/04/weblogic-10.html' title='WebLogic 10 正式發佈'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-3894341565328056535</id><published>2007-03-12T18:24:00.000+08:00</published><updated>2007-03-12T18:29:15.812+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ClearCase"/><category scheme="http://www.blogger.com/atom/ns#" term="ClearQuest"/><title type='text'>Install ClearCase 7.0.0.1 fixpack</title><content type='html'>因為ClearCase 7.0.0.0 沒辦法跟ClearQuest 7.0.0.1 作協同運作，再加上Eclipse clearcase adapter 又要求安裝到7.0.0.1，於是，早上打算把fixpack裝起來，再開始下個版本的開發作業，沒想到，這次的fixpack安裝，怎麼裝怎麼不順，就是裝不起來，而不裝，後續又做不下去。&lt;br /&gt;&lt;br /&gt;這一搞又是搞了一整天才找到問題，以往安裝fixpack都還蠻簡單的，確認完系統符合安裝的規範之後，就可以一路下一步安裝到底了，沒想到，今天在安裝的時候，就是有問題，找了半天，也找不出來，log也蠻正常的，到了下班前，才看到一篇說明，原來是需要DCOM service,  而我機器上的DCOM service不知道什麼時候被我給停下來了，把service啟動，就可以正常的安裝fixpack了，真是想不到的錯。</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/3894341565328056535/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/3894341565328056535' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/3894341565328056535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/3894341565328056535'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/03/install-clearcase-7001-fixpack.html' title='Install ClearCase 7.0.0.1 fixpack'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-7184951512645533850</id><published>2007-03-02T09:22:00.000+08:00</published><updated>2007-03-02T09:27:19.935+08:00</updated><title type='text'>Cheet Sheet 大全</title><content type='html'>在&lt;a href=&quot;http://www.hemidemi.com/&quot;&gt;黑米&lt;/a&gt;看到的, &lt;a href=&quot;http://www.smashingmagazine.com/2006/10/30/cheat-sheet-round-up-ajax-css-latex-ruby/&quot;&gt;Cheet Sheet 大全&lt;/a&gt;網頁, 幾乎可以說，只要是有在用電腦的使用者，難免就會需要，一堆用得到，用不到，想得到的全都有，真的蠻方便的。&lt;br /&gt;&lt;br /&gt;Cheet Sheet, 簡單的說，就是小抄啦。&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.smashingmagazine.com/2006/10/30/cheat-sheet-round-up-ajax-css-latex-ruby/&quot;&gt;Cheet Sheet 大全&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/7184951512645533850/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/7184951512645533850' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/7184951512645533850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/7184951512645533850'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/03/cheet-sheet.html' title='Cheet Sheet 大全'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-7081097078215873142</id><published>2007-02-26T09:53:00.000+08:00</published><updated>2007-02-26T10:04:48.053+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAAS"/><category scheme="http://www.blogger.com/atom/ns#" term="struts"/><title type='text'>struts test with remote user</title><content type='html'>最近遇到一個閃不掉的struts系統開發，慘的是，只能用struts 1.x這個我一直很努力避免使用的framework。不過，既然遇到了，還是得用，利用&lt;a href=&quot;http://strutstestcase.sourceforge.net/&quot;&gt;StrutsTestCase&lt;/a&gt;來作單元測試(unit test)，一開始倒也還相安無事，一直到遇到一些需要用到HttpRequest.getRemoteUser的action，一時之間，還真不知道該從何著手，只有個概念該從mock object的方向做。&lt;br /&gt;不過，幸運的讓我找到一篇&lt;a href=&quot;http://www.solace.net/nash/devel/struts.html&quot;&gt;Testing Struts&lt;/a&gt;的文章，其中提到了利用MockStrutsTestCase來作security的unit test，再追了一下StrutsTestCase的原始碼，果然，在MockStrutsTestCased中使用的HttpServletRequestSimulator 這個mock object可以由程式碼給定RemoteUser等request的相關資料，總算解決了我的問題。&lt;br /&gt;Struts 1.x算是個很成熟的framework，相關的討論，隨便找找也都是2004年，甚至更早的文件，很多文件，還真的跟不太上目前的狀況，還好這篇的東西還可以用，不然，就真的很麻煩了。&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/7081097078215873142/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/7081097078215873142' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/7081097078215873142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/7081097078215873142'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/02/struts-test-with-remote-user.html' title='struts test with remote user'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-5256437370332712996</id><published>2007-02-05T19:14:00.000+08:00</published><updated>2007-04-04T09:24:37.247+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sitemesh"/><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic"/><title type='text'>weblogic + sitemesh + spring 中文亂碼解法</title><content type='html'>看到了篇可能是解決weblogic + sitemesh + spring下中文發生問題的解法，不過，我還沒機會測試就是了。&lt;br /&gt;&lt;a href=&quot;http://www.blogjava.net/rocky/archive/2005/12/18/24467.html&quot;&gt;&lt;br /&gt;http://www.blogjava.net/rocky/archive/2005/12/18/24467.html &lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/5256437370332712996/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/5256437370332712996' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/5256437370332712996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/5256437370332712996'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/02/weblogic-sitemesh-spring.html' title='weblogic + sitemesh + spring 中文亂碼解法'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-3697090598071374252</id><published>2007-01-16T13:15:00.000+08:00</published><updated>2007-01-16T13:19:47.467+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ActiveRecord-JDBC"/><category scheme="http://www.blogger.com/atom/ns#" term="jruby"/><title type='text'>Patch ActiveRecord-JDBC</title><content type='html'>花了一個早上的時間在找ActiveRecord-JDBC連結Oracle 9的問題，利用&lt;a href=&quot;http://jruby.codehaus.org/&quot;&gt;jruby&lt;/a&gt;使用&lt;a href=&quot;http://rubyforge.org/projects/jruby-extras/&quot;&gt;ActiveRecord-JDBC&lt;/a&gt;來連結Oracle會出現java.sql.SQLException 數值溢位的例外，一路追下去，發現是ActiveRecord在讀取database metadata時，發生overflow的問題。&lt;br /&gt;&lt;br /&gt;把jdbc_adapter.rb 的 convert_jdbc_type_to_reply中的 resultset.getInt改成 resultset.getLong就行了，不過，這是蠻暴力的改法就是了 。</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/3697090598071374252/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/3697090598071374252' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/3697090598071374252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/3697090598071374252'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/01/patch-activerecord-jdbc.html' title='Patch ActiveRecord-JDBC'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-5773745568333323288</id><published>2007-01-10T22:45:00.000+08:00</published><updated>2007-01-10T23:12:51.485+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="emma"/><category scheme="http://www.blogger.com/atom/ns#" term="javadoc"/><category scheme="http://www.blogger.com/atom/ns#" term="test"/><title type='text'>Code coverage with emma</title><content type='html'>打從第一次看到有Open source 的專案使用clover來作測試覆蓋率(Test coverage)的工具， 就一直想找一個類似的工具來用，但是Clover是要錢的，如果只是寫寫自己好玩的程式，也要用這種花錢的工具，那這個興趣的成本還真是太高了，也就沒很認真看待這件事，久了，也就忘了。&lt;br /&gt;&lt;br /&gt;前陣子，閒閒在Eclipse的網站上晃的時候，碰巧被我看到了這個plugin -- EclEmma，一個把emma整合進eclipse 環境中的plugin，裝起來試了一下，蠻有趣的，就持續用下去了，下一步，就是把&lt;a href=&quot;http://emma.sourceforge.net/&quot;&gt;emma&lt;/a&gt;導入作為部門中的正規流程了。&lt;br /&gt;&lt;br /&gt;emma是一個找覆蓋率的工具，透過emma來執行Java程式，可以在程式結束的時候，顯示出執行期間所有執行到的程式碼，跟執行的狀況 -- 完全執行，未執行，部份執行(條件判斷式)。如果用來執行junit 的測試，就能夠看出執行這些測試程式的時候，執行過那些正式的程式碼。雖然說這類的資訊，只是參考用，但是對於剛開始寫測試程式，或是維護舊有的未測試程式時，也是蠻好用的工具。&lt;br /&gt;&lt;a href=&quot;http://emma.sourceforge.net/&quot;&gt;&lt;br /&gt;Emma 官方站&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.eclemma.org/&quot;&gt;EclEmma 官方站&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/5773745568333323288/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/5773745568333323288' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/5773745568333323288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/5773745568333323288'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/01/code-coverage-with-emma.html' title='Code coverage with emma'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-5284646396702436279</id><published>2007-01-06T22:45:00.000+08:00</published><updated>2007-01-06T22:52:36.460+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Open source"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenLogic"/><title type='text'>OpenLogic partner</title><content type='html'>昨天突然收到&lt;a href=&quot;http://www.openlogic.com/&quot;&gt;OpenLogic&lt;/a&gt;的Partner邀請，作為他們&lt;a href=&quot;http://subclipse.tigris.org/&quot;&gt;subclipse&lt;/a&gt;計畫的後端支援人員，原來是他們從subclipse的comitter列表中找到我的名字，才發出邀請函。想想自己目前的工作，還算有空檔能幫幫Open source社群的一些忙，也就答應了，不過，他們有提供能協力伙伴一些金錢上的支援，會根據解決的問題，得到若干的報酬就是了。</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/5284646396702436279/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/5284646396702436279' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/5284646396702436279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/5284646396702436279'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2007/01/openlogic-partner.html' title='OpenLogic partner'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36926743.post-303803167853594107</id><published>2006-12-27T08:57:00.000+08:00</published><updated>2006-12-27T08:58:20.888+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ClearQuest"/><title type='text'>CQ Web login url</title><content type='html'>搞了半天，原來不是ClearQuest web  沒裝好，而是url弄錯了，不是http://host/cqweb，要用http://host/cqweb/login才行，真是白忙一場。</content><link rel='replies' type='application/atom+xml' href='http://chuanghs.blogspot.com/feeds/303803167853594107/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/36926743/303803167853594107' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/303803167853594107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36926743/posts/default/303803167853594107'/><link rel='alternate' type='text/html' href='http://chuanghs.blogspot.com/2006/12/cq-web-login-url.html' title='CQ Web login url'/><author><name>Steve Chuang</name><uri>http://www.blogger.com/profile/12669586609855931802</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>