<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">]>
<rss version="2.0" xml:base="http://www.kai-mai.com">
<channel>
 <title>Kai Mai&#039;s Blog - Take Back the Web - Nodes for java</title>
 <link>http://www.kai-mai.com/tags/java</link>
 <description>Nodes containing the tag java</description>
 <language>en</language>
<item>
 <title>Java:  Loading Resource Bundle File with UTF-8</title>
 <link>http://www.kai-mai.com/node/128</link>
 <description>&lt;p&gt;
You hear that UTF-8 is the gold standard in internationalization.
so you prepare your JSP pages to &lt;a href=&quot;http://weblogs.java.net/blog/simongbrown/archive/2004/03/displaying_inte.html&quot;&gt;use UTF-8 charset&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Then you get your resource bundle files(property files) to use UTF-8 encoding.  Everything looks fine in your text editor.
&lt;/p&gt;
&lt;p&gt;
Now you load up the pages.  Every character retrieved from your resource bundles look garbled.
&lt;/p&gt;
&lt;p&gt;
This is because Java loads property files using ISO 8859-1 character encoding.  &lt;a href=&quot;http://www.thoughtsabout.net/blog/archives/000044.html&quot;&gt;Resource bundle utf-8 hack&lt;/a&gt; comes to rescue.  
&lt;/p&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/47&quot;&gt;java&lt;/a&gt; &lt;a href=&quot;tags/214&quot;&gt;utf-8&lt;/a&gt; &lt;a href=&quot;tags/215&quot;&gt;internationalization&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">java</category>
 <category domain="http://www.technorati.com/tag">utf-8</category>
 <category domain="http://www.technorati.com/tag">internationalization</category>
 <pubDate>Sat, 08 Mar 2008 22:47:19 -0800</pubDate>
</item>
<item>
 <title>The Workable Configuration for TestNG, Maven 2, SureFire, and Ecplise</title>
 <link>http://www.kai-mai.com/node/96</link>
 <description>&lt;p&gt;
I started to use TestNG for testing in Java today.  and it took me a while to find out that the workable Configuration for &lt;a href=&quot;http://testng.org/&quot;&gt;TestNG&lt;/a&gt;, &lt;a href=&quot;http://maven.apache.org/plugins/maven-surefire-plugin/&quot;&gt;Maven 2&#039;s Surefire&lt;/a&gt;, is:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; TestNG 5.1, 
&lt;li&gt; Surefire 2.3
&lt;/ul&gt;
&lt;p&gt;
The real important thing is to specify &amp;lt;classifier&amp;gt;jdk15&amp;lt;/classifier&amp;gt; for JDK 1.5+, or &amp;lt;classifier&amp;gt;jdk14&amp;lt;/classifier&amp;gt; for JDK 1.4 in your pom file.  The reference can be found &lt;a href=&quot;http://maven.apache.org/plugins/maven-surefire-plugin/testng.html&quot;&gt;here&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
If you don&#039;t specify the classifier, it seems to run in jdk14 mode.  so all of my tests using annotations didn&#039;t run with Maven.  
&lt;/p&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/47&quot;&gt;java&lt;/a&gt; &lt;a href=&quot;tags/57&quot;&gt;eclipse&lt;/a&gt; &lt;a href=&quot;tags/115&quot;&gt;testng&lt;/a&gt; &lt;a href=&quot;tags/116&quot;&gt;maven&lt;/a&gt; &lt;a href=&quot;tags/117&quot;&gt;surefire&lt;/a&gt; &lt;a href=&quot;tags/118&quot;&gt;testing&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">java</category>
 <category domain="http://www.technorati.com/tag">eclipse</category>
 <category domain="http://www.technorati.com/tag">testng</category>
 <category domain="http://www.technorati.com/tag">maven</category>
 <category domain="http://www.technorati.com/tag">surefire</category>
 <category domain="http://www.technorati.com/tag">testing</category>
 <pubDate>Wed, 02 May 2007 22:19:34 -0700</pubDate>
</item>
<item>
 <title>Framework, CMS - What Do I Really Want from a Web Application Rapid Development Kit</title>
 <link>http://www.kai-mai.com/node/52</link>
 <description>&lt;p&gt;
Inspired by the blog &lt;a href=&quot;http://www.robertpeake.com/index.php?/archives/125-What-I-Want-From-A-Framework.html&quot;&gt;What I Want From A Framework&lt;/a&gt;, I want to discuss what I want from a web application rapid development kit(WARDK) as a lazy developer.  I am going to use PHP language as an example in my discussion, but the discussion can apply to other languages such as Java, Ruby, and Python.
&lt;/p&gt;
&lt;p&gt;
Here’s what I want:
the most important and common features (every web application that supports multiple users need to have these):
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; user management(CRUD operations on users, ban users, user group management), pluggable authentication(LDAP, &lt;a href=&quot;http://openid.net/&quot;&gt;OpenID&lt;/a&gt;, integration with other systems) &lt;a href=&quot;http://openid.net/&quot;&gt;OpenID&lt;/a&gt;)
&lt;/ul&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/47&quot;&gt;java&lt;/a&gt; &lt;a href=&quot;tags/65&quot;&gt;php&lt;/a&gt; &lt;a href=&quot;tags/69&quot;&gt;web&lt;/a&gt; &lt;a href=&quot;tags/70&quot;&gt;application&lt;/a&gt; &lt;a href=&quot;tags/71&quot;&gt;framework&lt;/a&gt; &lt;a href=&quot;tags/72&quot;&gt;development&lt;/a&gt; &lt;a href=&quot;tags/73&quot;&gt;ruby&lt;/a&gt; &lt;a href=&quot;tags/74&quot;&gt;python&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">java</category>
 <category domain="http://www.technorati.com/tag">php</category>
 <category domain="http://www.technorati.com/tag">web</category>
 <category domain="http://www.technorati.com/tag">application</category>
 <category domain="http://www.technorati.com/tag">framework</category>
 <category domain="http://www.technorati.com/tag">development</category>
 <category domain="http://www.technorati.com/tag">ruby</category>
 <category domain="http://www.technorati.com/tag">python</category>
 <pubDate>Wed, 15 Mar 2006 21:10:03 -0800</pubDate>
</item>
<item>
 <title>NetBeans 5.0 is Out With a Very Good GUI Builder</title>
 <link>http://www.kai-mai.com/node/41</link>
 <description>&lt;p&gt;
&lt;a href=&quot;http://www.netbeans.org/kb/50/&quot;&gt;NetBeans 5.0&lt;/a&gt; is out.
&lt;/p&gt;
&lt;p&gt;
What excited me is the new &lt;a href=&quot;http://www.netbeans.org/kb/articles/matisse.html&quot;&gt;Matisse&lt;/a&gt; GUI Builder that &amp;quot;makes it easier to layout professional looking windows and dialog boxes&amp;quot;. 
&lt;/p&gt;
&lt;p&gt;
Be sure to check out &lt;a href=&quot;http://www.netbeans.org/files/documents/4/475/matisse.html&quot;&gt;the demo&lt;/a&gt;.  
&lt;/p&gt;
&lt;p&gt;
I also tried the new GUI builder myself.  I have been very impressed.  It&#039;s a lot better than JBuilder&#039;s.  I am not sure how it stacks up against Eclipse as I didn&#039;t find any good GUI builder for Eclipse like one year ago.  
&lt;/p&gt;
&lt;p&gt;
I used to use Netbeans 4 to develop GUI prototypes because it had the best GUI builder to let me lay out things with different layout managers.  But it still required a lot of tweaking (mainly on GridBagLayout) in order to get resizing to behave correctly.  Netbeans 5 has made it so easy to get the right resizing behaviors.  Thumbs up!
&lt;/p&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/47&quot;&gt;java&lt;/a&gt; &lt;a href=&quot;tags/54&quot;&gt;ide&lt;/a&gt; &lt;a href=&quot;tags/55&quot;&gt;gui&lt;/a&gt; &lt;a href=&quot;tags/56&quot;&gt;builder&lt;/a&gt; &lt;a href=&quot;tags/57&quot;&gt;eclipse&lt;/a&gt; &lt;a href=&quot;tags/58&quot;&gt;netbeans&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">java</category>
 <category domain="http://www.technorati.com/tag">ide</category>
 <category domain="http://www.technorati.com/tag">gui</category>
 <category domain="http://www.technorati.com/tag">builder</category>
 <category domain="http://www.technorati.com/tag">eclipse</category>
 <category domain="http://www.technorati.com/tag">netbeans</category>
 <pubDate>Wed, 08 Feb 2006 20:44:36 -0800</pubDate>
</item>
<item>
 <title>Struts:  Cannot find message resources under key org.apache.struts.action.MESSAGE</title>
 <link>http://www.kai-mai.com/node/35</link>
 <description>&lt;p&gt;
I was working on a Struts-based web application that required two message resources and got a nasty &amp;quot;Cannot find message resources under key org.apache.struts.action.MESSAGE&amp;quot; exception.
&lt;/p&gt;
&lt;p&gt;
The application was working fine with only one message resource factory.  Here&#039;s the setting in struts-config.xml:
&lt;/p&gt;
&lt;pre&gt;
    &amp;lt;message-resources
        factory=&amp;quot;company.webapps.resources.WebAppMessageResourcesFactory&amp;quot;
        parameter=&amp;quot;company.webapps&amp;quot;/&amp;gt;
&lt;/pre&gt;
&lt;p&gt;
I add another mesage resource that&#039;s a resource bundle file.
&lt;/p&gt;
&lt;pre&gt;
    &amp;lt;!-- specify a key name to distinguish different resources --&amp;gt;
   &amp;lt;message-resources key=&amp;quot;defaultResources&amp;quot;
&lt;/pre&gt;
&lt;p class=&quot;awTags_TagLinks&quot;&gt;Tags: &lt;a href=&quot;tags/47&quot;&gt;java&lt;/a&gt; &lt;a href=&quot;tags/48&quot;&gt;struts&lt;/a&gt; &lt;/p&gt;</description>
 <category domain="http://www.technorati.com/tag">java</category>
 <category domain="http://www.technorati.com/tag">struts</category>
 <pubDate>Thu, 19 Jan 2006 18:06:34 -0800</pubDate>
</item>
</channel>
</rss>

