<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>George Armhold</title>
	<atom:link href="http://blog.armhold.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.armhold.com</link>
	<description>Data-driven webapps built with Java &#38; Wicket</description>
	<lastBuildDate>Sun, 06 May 2012 19:40:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.armhold.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>George Armhold</title>
		<link>http://blog.armhold.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.armhold.com/osd.xml" title="George Armhold" />
	<atom:link rel='hub' href='http://blog.armhold.com/?pushpress=hub'/>
		<item>
		<title>Twilio and Adobe Flash</title>
		<link>http://blog.armhold.com/2012/02/19/twilio-and-adobe-flash/</link>
		<comments>http://blog.armhold.com/2012/02/19/twilio-and-adobe-flash/#comments</comments>
		<pubDate>Sun, 19 Feb 2012 14:26:22 +0000</pubDate>
		<dc:creator>George Armhold</dc:creator>
				<category><![CDATA[twilio]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.armhold.com/?p=194</guid>
		<description><![CDATA[I started doing some Twilio development recently and ran into a problem with Adobe Flash. Twilio Client (which lets you make phone calls right from your browser) relies on the Flash plugin. It pops up this nice little settings dialog &#8230; <a href="http://blog.armhold.com/2012/02/19/twilio-and-adobe-flash/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=194&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I started doing some <a href="http://www.twilio.com/api/sms">Twilio development</a> recently and ran into a problem with Adobe Flash. <a href="http://www.twilio.com/api/client">Twilio Client</a> (which lets you make phone calls right from your browser) relies on the Flash plugin. It pops up this nice little settings dialog the first time it runs to ask your permission:</p>
<p><a href="http://armhold.files.wordpress.com/2012/02/flash.png"><img class="aligncenter size-full wp-image-195" title="Flash" src="http://armhold.files.wordpress.com/2012/02/flash.png?w=584" alt=""   /></a></p>
<p>The problem is that on Chrome, <strong>it won&#8217;t let you actually click any of those buttons</strong>- the dialog is non-responsive to mouse clicks. This was really frustrating, and a few minutes of Googling showed that this was an old problem supposedly fixed by a Flash update months ago.</p>
<p>Updating to the latest Flash didn&#8217;t help (it&#8217;s apparently bundled with Chrome, and doesn&#8217;t use the version you can install manually on OSX).</p>
<p>Then I came across <a href="http://reviews.cnet.com/8301-13727_7-20090579-263/adobe-flash-update-fixes-unresponsive-settings-in-os-x-lion/">this trick</a>: use tab to navigate the dialog checkboxes, and spacebar to select/deselect. Works like a charm.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/armhold.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/armhold.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/armhold.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/armhold.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/armhold.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/armhold.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/armhold.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/armhold.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/armhold.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/armhold.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/armhold.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/armhold.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/armhold.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/armhold.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=194&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.armhold.com/2012/02/19/twilio-and-adobe-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35752f1794d9a5f8ab8fe8edf272f0cc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quickbrownfrog</media:title>
		</media:content>

		<media:content url="http://armhold.files.wordpress.com/2012/02/flash.png" medium="image">
			<media:title type="html">Flash</media:title>
		</media:content>
	</item>
		<item>
		<title>Announcing: Wicket-Source plugin for Intellij IDEA</title>
		<link>http://blog.armhold.com/2012/02/16/announcing-wicket-source-plugin-for-intellij-idea/</link>
		<comments>http://blog.armhold.com/2012/02/16/announcing-wicket-source-plugin-for-intellij-idea/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 00:06:07 +0000</pubDate>
		<dc:creator>George Armhold</dc:creator>
				<category><![CDATA[intellij-idea]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[wicket]]></category>

		<guid isPermaLink="false">http://blog.armhold.com/?p=185</guid>
		<description><![CDATA[The folks at 42lines have released an awesome Firefox plugin called &#8220;Wicket-Source&#8221;. It allows you to easily navigate from your browser to the corresponding Wicket source code. Since their plugin is Eclipse-based, I wrote up a compatible plugin for Intellij &#8230; <a href="http://blog.armhold.com/2012/02/16/announcing-wicket-source-plugin-for-intellij-idea/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=185&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The folks at <a href="https://www.42lines.net/">42lines</a> have released an awesome <a href="https://www.42lines.net/2012/01/31/announcing-wicket-source/">Firefox plugin</a> called &#8220;Wicket-Source&#8221;. It allows you to easily navigate from your browser to the corresponding Wicket source code.</p>
<p>Since their plugin is Eclipse-based, I wrote up a compatible plugin for Intellij IDEA. You can install it from <a href="http://plugins.intellij.net/plugin/?idea&amp;id=6846">the repository</a>, or build it yourself from the <a href="https://github.com/armhold/wicket-source-intellij">source on Github</a>.</p>
<p>There are two parts to this plugin: the Firefox extension (provided by 42lines) and the IDE plugin; you need both. To install the Firefox plugin, follow the <a href="https://github.com/42Lines/wicket-source/wiki">directions from 42lines</a>. Then to install the Intellij plugin do the following:</p>
<ol>
<li>Open the Preferences dialog (Intellij IDEA menu -&gt; Preferences)</li>
<li>Under &#8220;IDE Settings&#8221; select &#8220;Plugins&#8221;</li>
<li>Click the &#8220;Browse Repositories&#8221; button.</li>
<li>In the search box type &#8220;wicket&#8221;, which should narrow the results significantly.</li>
<li>Right-click &#8220;Wicket Source&#8221;, and select &#8220;Download and Install&#8221;.</li>
</ol>
<div>You&#8217;ll be asked to re-start Intellij, and then you should be in business. The plugin uses port  9123 and no password by default (same as the Firefox plugin defaults). To change this, open the IDE Settings dialog and click &#8220;Wicket Source&#8221; to enter a password.</div>
<div></div>
<div></div>
<div>Enjoy!</div>
<p><a href="http://armhold.files.wordpress.com/2012/02/wicket-source.png"><img class="aligncenter size-full wp-image-190" title="wicket-source" src="http://armhold.files.wordpress.com/2012/02/wicket-source.png?w=584&#038;h=333" alt="" width="584" height="333" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/armhold.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/armhold.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/armhold.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/armhold.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/armhold.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/armhold.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/armhold.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/armhold.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/armhold.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/armhold.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/armhold.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/armhold.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/armhold.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/armhold.wordpress.com/185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=185&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.armhold.com/2012/02/16/announcing-wicket-source-plugin-for-intellij-idea/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35752f1794d9a5f8ab8fe8edf272f0cc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quickbrownfrog</media:title>
		</media:content>

		<media:content url="http://armhold.files.wordpress.com/2012/02/wicket-source.png" medium="image">
			<media:title type="html">wicket-source</media:title>
		</media:content>
	</item>
		<item>
		<title>Wicket: submitting a form over SSL from an unsecured page</title>
		<link>http://blog.armhold.com/2012/01/21/wicket-submitting-a-form-over-ssl-from-an-unsecured-page/</link>
		<comments>http://blog.armhold.com/2012/01/21/wicket-submitting-a-form-over-ssl-from-an-unsecured-page/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 18:54:37 +0000</pubDate>
		<dc:creator>George Armhold</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[wicket]]></category>

		<guid isPermaLink="false">http://blog.armhold.com/?p=166</guid>
		<description><![CDATA[Lots of folks are making great use of Twitter Bootstrap, which includes a handy login button right at the top: To protect your users&#8217; privacy, you should make sure that form is sent over SSL. If the hosting page is &#8230; <a href="http://blog.armhold.com/2012/01/21/wicket-submitting-a-form-over-ssl-from-an-unsecured-page/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=166&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Lots of folks are making great use of <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a>, which includes a handy login button right at the top:</p>
<p><a href="http://armhold.files.wordpress.com/2012/01/twitter-bootstrap-wicket1.png"><img class="alignnone size-full wp-image-171" title="twitter-bootstrap-wicket" src="http://armhold.files.wordpress.com/2012/01/twitter-bootstrap-wicket1.png?w=584&#038;h=73" alt="" width="584" height="73" /></a></p>
<p>To protect your users&#8217; privacy, you should make sure that form is sent over SSL. If the hosting page is https that happens automatically, but most domains don&#8217;t secure their entire site; only a subset of pages are typically secured with SSL. But since this header likely appears on <em>all your pages</em>, how can you secure the form?</p>
<p>The first step is to manually adjust the form&#8217;s <strong>action</strong> attribute to ensure that the form submission happens over https, rather than http.</p>
<p>But this is where we run into a problem with Wicket- if the hosting page is http, and you have also installed an HttpsMapper in your WicketApplication like this:</p>
<pre>setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(HTTP_PORT, HTTPS_PORT)));</pre>
<p>then Wicket will not allow your form to be sent over https; the mapper will notice the http/https mismatch, and instead of calling your form&#8217;s onSubmit() method, it will simply serve up the hosting page again, discarding your form submission.</p>
<p>The solution is to manually post your form to a different, secure page that is marked for https via @RequireHttps. Then the HttpsMapper will allow the form submission to take place.</p>
<p>First, we need a LoginForm that will adjust the form&#8217;s <strong>action</strong> attribute to point to our secure page:</p>
<pre>public class LoginForm extends StatelessForm
{
    public LoginForm(String id)
    {
        super(id);
        add(new TextField("username").setRequired(true));
        add(new PasswordTextField("password").setRequired(true));
    }

   @Override
   protected void onComponentTag(ComponentTag tag)
   {
       super.onComponentTag(tag);
       String action = urlFor(LoginFormHandlerPage.class, null).toString();
       tag.put("action", action);
   }
}</pre>
<p>Now we&#8217;ll need to create a page to handle the form submission:</p>
<pre>@RequireHttps
public class LoginFormHandlerPage extends WebPage
{
    public LoginFormHandlerPage(PageParameters parameters)
    {
        HttpServletRequest req = (HttpServletRequest) getRequest().getContainerRequest();
        String username = req.getParameter("username");
        String password = req.getParameter("password");

        if (loginSuccessful(username, password))
        {
             if (! continueToOriginalDestination());
             {
                 setResponsePage(AccountPage.class);
             }
        }
        else
        {
            getSession().error("login failed"));
            // on failure send user to our regular login page
            setResponsePage(LoginPage.class);
        }
    }
}</pre>
<p>Note that if you&#8217;re using Wicket 1.5.3 <a href="https://issues.apache.org/jira/browse/WICKET-4338">there is a bug</a> that prevents the processing of form POST parameters (that&#8217;s why we&#8217;re reading the params manually from the HttpServletRequest). Fixed in Wicket 1.5.4.</p>
<p>The LoginFormHandlerPage will process the submitted form data over https, and if successful, log the user in, else send them to a page where then can re-enter their password.</p>
<p>You can get all the code (and quite a bit more useful login-related stuff) from <a href="https://github.com/armhold/justaddwater">github</a>.</p>
<p>Credit where it&#8217;s due: the real gem here (submitting the form to a secure url) comes from this <a href="http://www.petrikainulainen.net/programming/tips-and-tricks/wicket-https-tutorial-part-three-creating-a-secure-form-submit-from-a-non-secure-page/">blog posting</a> by Petri Kainulainen.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/armhold.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/armhold.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/armhold.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/armhold.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/armhold.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/armhold.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/armhold.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/armhold.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/armhold.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/armhold.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/armhold.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/armhold.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/armhold.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/armhold.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=166&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.armhold.com/2012/01/21/wicket-submitting-a-form-over-ssl-from-an-unsecured-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35752f1794d9a5f8ab8fe8edf272f0cc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quickbrownfrog</media:title>
		</media:content>

		<media:content url="http://armhold.files.wordpress.com/2012/01/twitter-bootstrap-wicket1.png" medium="image">
			<media:title type="html">twitter-bootstrap-wicket</media:title>
		</media:content>
	</item>
		<item>
		<title>How to get JNDI working with Wicket 1.5 and Jetty 7.5</title>
		<link>http://blog.armhold.com/2011/12/28/how-to-get-jndi-working-with-wicket-1-5-and-jetty-7-5/</link>
		<comments>http://blog.armhold.com/2011/12/28/how-to-get-jndi-working-with-wicket-1-5-and-jetty-7-5/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 03:29:03 +0000</pubDate>
		<dc:creator>George Armhold</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.armhold.com/?p=151</guid>
		<description><![CDATA[The Wicket 1.5 archetype sets up a project to use Jetty 7.5. Quite a lot has changed in Jetty since version 6, and this broke my JNDI config. Here&#8217;s how I put things right again. First of all, the imports &#8230; <a href="http://blog.armhold.com/2011/12/28/how-to-get-jndi-working-with-wicket-1-5-and-jetty-7-5/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=151&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Wicket 1.5 archetype sets up a project to use Jetty 7.5. Quite a lot has changed in Jetty since version 6, and this broke my JNDI config. Here&#8217;s how I put things right again.</p>
<p>First of all, the imports have all been moved in 7.x.  Here&#8217;s where they landed:</p>
<pre>import org.eclipse.jetty.plus.webapp.EnvConfiguration;
import org.eclipse.jetty.webapp.WebInfConfiguration;
import org.eclipse.jetty.webapp.Configuration;
import org.eclipse.jetty.webapp.WebXmlConfiguration;</pre>
<div>Next, you&#8217;ll need a jetty-env.xml.</div>
<pre>&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"&gt;

&lt;Configure id="wac" class="org.eclipse.jetty.webapp.WebAppContext"&gt;
    &lt;New class="org.eclipse.jetty.plus.jndi.EnvEntry"&gt;
    &lt;Arg&gt;jdbc/mydatasource&lt;/Arg&gt;
    &lt;Arg&gt;
        &lt;New class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"&gt;
            &lt;Set name="Url"&gt;jdbc:mysql://localhost/mydatabase?characterEncoding=utf8&lt;/Set&gt;
            &lt;Set name="User"&gt;username&lt;/Set&gt;
            &lt;Set name="Password"&gt;password&lt;/Set&gt;
        &lt;/New&gt;
    &lt;/Arg&gt;
    &lt;/New&gt;
&lt;/Configure&gt;</pre>
<p>Normally this goes into src/main/webapp/WEB-INF, but you probably don&#8217;t want to deploy that with your app in your production war file. So instead I put mine in src/test/jetty/jetty-env.xml. You&#8217;ll need to modify your Start.java to tell Jetty to find the relocated config file.</p>
<pre>EnvConfiguration envConfiguration = new EnvConfiguration();
URL url = new File("src/test/jetty/jetty-env.xml").toURI().toURL();
envConfiguration.setJettyEnvXml(url);
bb.setConfigurations(new Configuration[]{
    new WebInfConfiguration(),
    envConfiguration,
    new WebXmlConfiguration()
});</pre>
<p>I found that I also had to set a couple of environment properties:</p>
<pre>System.setProperty("java.naming.factory.url.pkgs",
                   "org.eclipse.jetty.jndi");
System.setProperty("java.naming.factory.initial",
                   "org.eclipse.jetty.jndi.InitialContextFactory");</pre>
<p>With this, I can finally access my JNDI datasource happily from Wicket/Jetty.</p>
<p>Update: I&#8217;ve created a <a href="https://gist.github.com/1539302">gist with the full source code.</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/armhold.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/armhold.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/armhold.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/armhold.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/armhold.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/armhold.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/armhold.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/armhold.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/armhold.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/armhold.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/armhold.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/armhold.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/armhold.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/armhold.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=151&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.armhold.com/2011/12/28/how-to-get-jndi-working-with-wicket-1-5-and-jetty-7-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35752f1794d9a5f8ab8fe8edf272f0cc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quickbrownfrog</media:title>
		</media:content>
	</item>
		<item>
		<title>Automatically generate Maven dependency coordinates for random Jar files</title>
		<link>http://blog.armhold.com/2011/09/03/automatically-generate-maven-dependency-coordinates-for-random-jar-files/</link>
		<comments>http://blog.armhold.com/2011/09/03/automatically-generate-maven-dependency-coordinates-for-random-jar-files/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 16:07:38 +0000</pubDate>
		<dc:creator>George Armhold</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.armhold.com/?p=142</guid>
		<description><![CDATA[Have you just inherited an Ant project that you&#8217;re trying to convert to Maven? Maybe it came with a &#8220;lib&#8221; directory full or random jar files. And worse, some thoughtless developer neglected to include version strings in the filenames? Fear &#8230; <a href="http://blog.armhold.com/2011/09/03/automatically-generate-maven-dependency-coordinates-for-random-jar-files/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=142&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Have you just inherited an Ant project that you&#8217;re trying to convert to Maven? Maybe it came with a &#8220;lib&#8221; directory full or random jar files. And worse, some thoughtless developer neglected to include version strings in the filenames?</p>
<p>Fear not! The Sonatype <a href="https://repository.sonatype.org/service/local/lucene/search?sha1=&quot;;">checksum search</a> REST service can give you the Maven coordinates based on the jar&#8217;s SHA1 hash.</p>
<p>Still too much work? Not to worry, I just wrote a quick program to make it even easier for you. <a href="https://github.com/armhold/Provenance">Provenance</a> will take a directory full of jar files and write out the XML dependency information for every jar it finds. You can then copy/paste this right into the <code>&lt;dependencies&gt;</code> section of your pom.xml.</p>
<p>Enjoy.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/armhold.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/armhold.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/armhold.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/armhold.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/armhold.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/armhold.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/armhold.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/armhold.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/armhold.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/armhold.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/armhold.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/armhold.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/armhold.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/armhold.wordpress.com/142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=142&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.armhold.com/2011/09/03/automatically-generate-maven-dependency-coordinates-for-random-jar-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35752f1794d9a5f8ab8fe8edf272f0cc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quickbrownfrog</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding Git SHAs to Wicket Pages Automatically</title>
		<link>http://blog.armhold.com/2011/08/04/adding-git-shas-to-wicket-pages-automatically/</link>
		<comments>http://blog.armhold.com/2011/08/04/adding-git-shas-to-wicket-pages-automatically/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 19:58:34 +0000</pubDate>
		<dc:creator>George Armhold</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.armhold.com/?p=128</guid>
		<description><![CDATA[If you have a non-trivial project, it&#8217;s handy to be able to tell what code was used to build a particular release once it&#8217;s been deployed. Especially if you&#8217;ve recently discovered the joys of branching and merging with Git. Here&#8217;s &#8230; <a href="http://blog.armhold.com/2011/08/04/adding-git-shas-to-wicket-pages-automatically/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=128&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you have a non-trivial project, it&#8217;s handy to be able to tell what code was used to build a particular release once it&#8217;s been deployed. Especially if you&#8217;ve recently discovered the joys of branching and merging with Git.</p>
<p>Here&#8217;s a handy way to <strong>add a Git SHA</strong> to all your app&#8217;s pages via <strong>Wicket and Maven</strong>.</p>
<h1>Maven</h1>
<p>First, we&#8217;ll use the exec-maven-plugin to create a <tt>git.properties</tt> file for us. Add this to the &lt;plugins&gt; section in your pom.xml:</p>
<pre>&lt;plugin&gt;
   &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
   &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
   &lt;version&gt;1.1&lt;/version&gt;
   &lt;executions&gt;
       &lt;execution&gt;
          &lt;phase&gt;compile&lt;/phase&gt;
          &lt;goals&gt;
             &lt;goal&gt;exec&lt;/goal&gt;
          &lt;/goals&gt;
       &lt;/execution&gt;
   &lt;/executions&gt;
   &lt;configuration&gt;
       &lt;executable&gt;git&lt;/executable&gt;
       &lt;arguments&gt;
            &lt;argument&gt;log&lt;/argument&gt;
            &lt;argument&gt;--pretty=format:gitsha=%H %ci&lt;/argument&gt;
            &lt;argument&gt;-n1&lt;/argument&gt;
       &lt;/arguments&gt;
       &lt;outputFile&gt;target/classes/git.properties&lt;/outputFile&gt;
   &lt;/configuration&gt;
&lt;/plugin&gt;</pre>
<p>This will create a <tt>git.properties</tt> file containing the Git SHA, along with the commit timestamp whenever your code is compiled. You can learn how to further customize this <a href="http://www.kernel.org/pub/software/scm/git/docs/git-log.html">here</a>.</p>
<h1>Wicket Application Subclass</h1>
<p>Now we&#8217;ll need to read in the git.properties file when our application starts up.</p>
<pre>public class Application extends WebApplication
{
    private String gitSHA;

    public AppgravityApplication()
    {
        java.util.Properties props = new java.util.Properties();
        try
        {
            props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("git.properties"));
            gitSHA = props.getProperty("gitsha");
            log.info("gitsha: " + gitSHA);
        }
        catch (IOException e)
        {
            log.severe(e.getMessage());
            gitSHA = "unknown";
        }
    }

    public String getGitSHA()
    {
        return gitSHA;
    }</pre>
<h1>Wicket WebPage Subclass</h1>
<p>Now we&#8217;ll create a WebPage subclass that renders the Git SHA into a <tt>&lt;meta&gt;</tt> tag when the page is rendered.</p>
<pre>public abstract class MyPage extends WebPage
{
    @Override
    protected void onBeforeRender()
    {
        Label metaGitSHA = new Label("metaGitSHA", "");
        metaGitSHA.add(new AttributeModifier("content", Model.of(((Application) getApplication()).getGitSHA())));
        addOrReplace(metaGitSHA);
        super.onBeforeRender();
    }
}</pre>
<p>You&#8217;ll want to extend MyPage for each of your pages. You&#8217;ll need to add the placeholder meta tag to each of your HTML pages like this:</p>
<pre>&lt;head&gt;
    &lt;meta wicket:id="metaGitSHA" id="metaGitSHA" name="metaGitSHA" content=""/&gt;
&lt;/head&gt;</pre>
<p>And you&#8217;re done!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/armhold.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/armhold.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/armhold.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/armhold.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/armhold.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/armhold.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/armhold.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/armhold.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/armhold.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/armhold.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/armhold.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/armhold.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/armhold.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/armhold.wordpress.com/128/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=128&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.armhold.com/2011/08/04/adding-git-shas-to-wicket-pages-automatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35752f1794d9a5f8ab8fe8edf272f0cc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quickbrownfrog</media:title>
		</media:content>
	</item>
		<item>
		<title>Pixlshare- an image sharing app</title>
		<link>http://blog.armhold.com/2011/06/06/pixlshare-an-image-sharing-app/</link>
		<comments>http://blog.armhold.com/2011/06/06/pixlshare-an-image-sharing-app/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 22:27:00 +0000</pubDate>
		<dc:creator>George Armhold</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.armhold.com/2011/06/06/pixlshare-an-image-sharing-app</guid>
		<description><![CDATA[Pixlshare is a new image-sharing webapp that I just started working on. It&#8217;s intended to be a low-friction way to do simple image sharing- upload an image and instantly get a URL that you can share with others. No accounts &#8230; <a href="http://blog.armhold.com/2011/06/06/pixlshare-an-image-sharing-app/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=48&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://pixlshare.com/">Pixlshare</a> is a new image-sharing webapp that I just started working on. It&#8217;s intended to be a low-friction way to do simple image sharing- upload an image and instantly get a URL that you can share with others. No accounts or logins needed- just click upload and you&#8217;re done.</p>
<div class="separator" style="clear:both;text-align:center;"><a style="margin-left:1em;margin-right:1em;" href="http://pixlshare.com/images/trzlX8"><img src="http://pixlshare.com/images/trzlX8" alt="" width="320" height="315" border="0" /></a></div>
<p>It&#8217;s built in Wicket and tiny bit of JQuery. It&#8217;s fairly basic, but it has one fairly novel feature- you can add textual annotations to your uploaded images; the annotations appear as actual searchable text, rather than merely being part of the image bits.</p>
<p>I&#8217;m planning to add features like:</p>
<ul>
<li>HTML5 drag-n-drop for uploads</li>
<li>upload multiple pictures at once to create an album</li>
<li>user comments</li>
</ul>
<div><a href="http://pixlshare.com/">Give it a try!</a></div>
<div class="blogger-post-footer"><img src="https://blogger.googleusercontent.com/tracker/3562558747791280858-1270788796689877149?l=garmhold.blogspot.com" alt="" width="1" height="1" /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/armhold.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/armhold.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/armhold.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/armhold.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/armhold.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/armhold.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/armhold.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/armhold.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/armhold.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/armhold.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/armhold.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/armhold.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/armhold.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/armhold.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=48&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.armhold.com/2011/06/06/pixlshare-an-image-sharing-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35752f1794d9a5f8ab8fe8edf272f0cc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quickbrownfrog</media:title>
		</media:content>

		<media:content url="http://pixlshare.com/images/trzlX8" medium="image" />

		<media:content url="https://blogger.googleusercontent.com/tracker/3562558747791280858-1270788796689877149?l=garmhold.blogspot.com" medium="image" />
	</item>
		<item>
		<title>Pause your Web History- break Google Maps</title>
		<link>http://blog.armhold.com/2010/05/05/pause-your-web-history-break-google-maps/</link>
		<comments>http://blog.armhold.com/2010/05/05/pause-your-web-history-break-google-maps/#comments</comments>
		<pubDate>Wed, 05 May 2010 12:50:00 +0000</pubDate>
		<dc:creator>George Armhold</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.armhold.com/2010/05/05/pause-your-web-history-break-google-maps</guid>
		<description><![CDATA[For a few days Google Maps stopped working for me. I first noticed it while trying to get directions to the airport. I use Safari, and the Maps page would just sit there with &#8220;Still loading&#8230;&#8221; forever. I thought it &#8230; <a href="http://blog.armhold.com/2010/05/05/pause-your-web-history-break-google-maps/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=46&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For a few days <a href="http://maps.google.com/">Google Maps</a> stopped working for me. I first noticed it while trying to get directions to the airport. I use Safari, and the Maps page would just sit there with &#8220;Still loading&#8230;&#8221; forever. I thought it was a momentary glitch, but 2 days later it was still happening. I fired up Chrome on the same machine, which worked fine. Back in Safari, I tried clearing the cache, restarting the browser, etc. all to no avail.</p>
<p>Today I figured it out- I had paused my <a href="https://www.google.com/history/">web history</a> some time back. On a whim I tried unpausing it, and lo and behold, Maps now works again in Safari. Pausing it again results in the same breakage, so the problem is repeatable. Having to enable Web History to use Maps is a little unsettling, but this sounds like a bug.</p>
<div class="separator" style="clear:both;text-align:center;"><a style="margin-left:1em;margin-right:1em;" href="http://armhold.files.wordpress.com/2010/05/stillloading2.png"><img src="http://armhold.files.wordpress.com/2010/05/stillloading2.png?w=640&#038;h=195" alt="" width="640" height="195" border="0" /></a></div>
<div class="blogger-post-footer"><img alt="" width="1" height="1" /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/armhold.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/armhold.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/armhold.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/armhold.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/armhold.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/armhold.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/armhold.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/armhold.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/armhold.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/armhold.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/armhold.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/armhold.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/armhold.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/armhold.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=46&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.armhold.com/2010/05/05/pause-your-web-history-break-google-maps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35752f1794d9a5f8ab8fe8edf272f0cc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quickbrownfrog</media:title>
		</media:content>

		<media:content url="http://armhold.files.wordpress.com/2010/05/stillloading2.png?w=300" medium="image" />
	</item>
		<item>
		<title>A Multilingual Password Generator using GWT and Google App Engine</title>
		<link>http://blog.armhold.com/2010/03/22/a-multilingual-password-generator-using-gwt-and-google-app-engine/</link>
		<comments>http://blog.armhold.com/2010/03/22/a-multilingual-password-generator-using-gwt-and-google-app-engine/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 04:43:00 +0000</pubDate>
		<dc:creator>George Armhold</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.armhold.com/2010/03/22/a-multilingual-password-generator-using-gwt-and-google-app-engine</guid>
		<description><![CDATA[My fascination with GWT and Google App Engine continues. This weekend I created a multi-lingual memorable password generator. In order to create memorable passwords I took the Diceware approach. The idea is simple: create a list of English words, and &#8230; <a href="http://blog.armhold.com/2010/03/22/a-multilingual-password-generator-using-gwt-and-google-app-engine/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=45&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My fascination with GWT and Google App Engine continues. This weekend I created a<br />
<a href="http://create-a-password.appspot.com/">multi-lingual memorable password generator</a>.</p>
<p>In order to create memorable passwords I took the <a href="http://world.std.com/~reinhold/diceware.html">Diceware</a> approach. The idea is simple: create a list of English words, and assign a five digit number to each of them.</p>
<pre class="code">23542 click23543 cliff23544 climb23545 clime23546 cling23551 clink</pre>
<p>To build up a password, you select some number of these words and combine them (preferably with some further randomization of the case, as well as perhaps inserting some digits or symbols between the words).</p>
<p>To select each word, you roll a die (or fire up a pseudo-random number generator) five times. If you roll 2, 3, 5, 4 and then 3, that corresponds to the word with index 23543. In our case, that&#8217;s <tt>cliff</tt>. Keep selecting words in this manner until you&#8217;ve built up a sufficiently long/complex password.</p>
<p>There are a number of password generator sites that seem to be using lots of server-side entropy for password generation, but then blithely download the generated passwords across the Internet to your browser. That doesn&#8217;t seem like such a good idea. With <a href="http://create-a-password.appspot.com">create-a-password</a>, it all happens right in your browser window, thanks to the magic of GWT.</p>
<p>On the downside, the dictionaries used for word selection are in fact downloaded (and they are well-known anyway). Despite this shortcoming, it still seems safer to me than shipping generated passwords across the network. Using a longer password (Wikipedia recommends <a href="http://en.wikipedia.org/wiki/Diceware">5 or more dice words</a>) can help with this.</p>
<p>Diceware dictionaries are available in several languages, so it was pretty straightforward to go ahead and use GWT&#8217;s <a href="http://code.google.com/webtoolkit/doc/latest/DevGuideI18n.html">i18n</a> to make this program available in a few different languages. Hopefully I haven&#8217;t butchered the <a href="http://create-a-password.appspot.com/Password/Password_es.html">Spanish</a> too badly.</p>
<p>I was a little disappointed to learn that GWT doesn&#8217;t <a href="http://stackoverflow.com/questions/156412/why-does-gwt-ignore-browser-locale">seem to support automatically recognizing the user&#8217;s browser locale</a>. I expected to be able to automatically detect this, and then offer localized content, but that doesn&#8217;t seem to be the case. I ended up having to embed a property into each of my localized html pages:</p>
<pre class="code">&lt;meta name='gwt:property' content='locale=fr'/&gt;</pre>
<p>Another approach is to <a href="http://learngwt.com/articles/mdamour1976/AutomaticGWTInternationalizationdetection.html">use a JSP</a>. Despite this, I think it turned out pretty well.</p>
<div class="blogger-post-footer"><img alt="" width="1" height="1" /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/armhold.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/armhold.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/armhold.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/armhold.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/armhold.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/armhold.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/armhold.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/armhold.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/armhold.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/armhold.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/armhold.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/armhold.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/armhold.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/armhold.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=45&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.armhold.com/2010/03/22/a-multilingual-password-generator-using-gwt-and-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35752f1794d9a5f8ab8fe8edf272f0cc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quickbrownfrog</media:title>
		</media:content>
	</item>
		<item>
		<title>The Weekend Hack: 13-14 March, 2010</title>
		<link>http://blog.armhold.com/2010/03/15/the-weekend-hack-13-14-march-2010/</link>
		<comments>http://blog.armhold.com/2010/03/15/the-weekend-hack-13-14-march-2010/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 13:21:00 +0000</pubDate>
		<dc:creator>George Armhold</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.armhold.com/2010/03/15/the-weekend-hack-13-14-march-2010</guid>
		<description><![CDATA[Inspired by this recent post over at Hacker News, I was itching for a fun weekend project.  My criteria for the project were the following: be small &#38; well-defined- doable in a weekend produce something useful for someone give my rusty &#8230; <a href="http://blog.armhold.com/2010/03/15/the-weekend-hack-13-14-march-2010/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=44&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Inspired by <a href="http://news.ycombinator.com/item?id=1133613">this recent post</a> over at Hacker News, I was itching for a fun weekend project.  My criteria for the project were the following:</p>
<div>
<ul>
<li>be small &amp; well-defined- doable in a weekend</li>
<li>produce something useful for <em>someone</em></li>
<li>give my rusty Google App Engine and GWT skills a workout</li>
</ul>
<div>
<div>I use <a href="http://wicket.apache.org/">Wicket</a> for my livelihood these days, but <a href="http://code.google.com/webtoolkit/">GWT</a> is my true love. I miss working with it.</div>
</div>
<div>So I decided to create a searchable database of Weight Watchers &#8220;food points&#8221; values.  Last year, the company that I was working for held weekly WW meetings in our lunch room.  For about 6 months it was all but impossible to avoid hearing &#8220;how many points for X?&#8221; type questions several times daily.</div>
<div>There are a lot of existing sites for this kind of thing, but I found the interfaces somewhat lacking (are we really still producing sites with MIDI soundtracks in 2010?)</div>
<div>Thus was born <a href="http://slimpoints.appspot.com/">this weekend&#8217;s project</a>. At least until WW decides to shut it down. Here&#8217;s the breakdown of where the time went:</div>
<div>
<ul>
<li>2 hours brainstorming</li>
<li>4 hours getting Intellij, GWT and Google App Engine to all play nicely (this was the most painful part, really)</li>
<li>3 hours basic coding, page layout, getting the tabs to work</li>
<li>45 minutes with an Emacs macro converting HTML tables with food point values into a nice, CSV-style GWT properties file</li>
<li>2 hours playing around with font sizes and colors.  I&#8217;m still not 100% happy with this, but the project was time-limited by definition.</li>
<li>1/2 hour enabling AdSense, getting things to look relatively nice</li>
</ul>
<div>
<div>A grand total of 260 lines of code.  GWT&#8217;s SuggestBox made autocomplete so much easier than Wicket Extensions&#8217; AutoCompleteTextField, which I had to use recently.</div>
</div>
<div>
<div>The project is &#8220;done&#8221; in the sense that I am happy with it, and would feel content if I never spent another hour of time on it; that was part of my criteria for something doable in a weekend.  But that doesn&#8217;t mean I&#8217;ll never revisit it.</div>
<div>One potential idea is to make an iPhone-friendlier version of it, with some big calculator-style buttons right on the page to facilitate data entry.  I might come back to this idea in the future if the site analytics tell me it&#8217;s worthwhile.  (As a side note, compared to the time and effort required to get an <a href="http://itunes.apple.com/us/app/another-tip-calculator-yatc/id316488754?mt=8">iPhone app of equivalent complexity</a> published, this was a piece of cake.)</div>
<div>So, what fun projects are you working on?</div>
</div>
</div>
</div>
<div class="blogger-post-footer"><img src="https://blogger.googleusercontent.com/tracker/3562558747791280858-8903738812890999672?l=garmhold.blogspot.com" alt="" width="1" height="1" /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/armhold.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/armhold.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/armhold.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/armhold.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/armhold.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/armhold.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/armhold.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/armhold.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/armhold.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/armhold.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/armhold.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/armhold.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/armhold.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/armhold.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.armhold.com&#038;blog=24648574&#038;post=44&#038;subd=armhold&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.armhold.com/2010/03/15/the-weekend-hack-13-14-march-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/35752f1794d9a5f8ab8fe8edf272f0cc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quickbrownfrog</media:title>
		</media:content>

		<media:content url="https://blogger.googleusercontent.com/tracker/3562558747791280858-8903738812890999672?l=garmhold.blogspot.com" medium="image" />
	</item>
	</channel>
</rss>
