<?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/"
	>

<channel>
	<title>Grails Rocks &#187; code</title>
	<atom:link href="http://www.anyware.co.uk/2005/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anyware.co.uk/2005</link>
	<description>Grails, Apple, usability and world stuff</description>
	<lastBuildDate>Fri, 27 Jan 2012 13:52:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A few WTFs for the day</title>
		<link>http://www.anyware.co.uk/2005/2008/09/26/a-few-wtfs-for-the-day/</link>
		<comments>http://www.anyware.co.uk/2005/2008/09/26/a-few-wtfs-for-the-day/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 14:50:23 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
				<category><![CDATA[Groovy and Grails]]></category>
		<category><![CDATA[Programming links]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/?p=248</guid>
		<description><![CDATA[Ugh. It&#8217;s one of those days where I&#8217;m being reminded that either I&#8217;m dumb or the rest of the world is, but someone is. Case 1 &#8211; Calling each() on String in Groovy gives you every character of the string&#8230; but as a String and not a Character. I&#8217;m sure there&#8217;s a great reason for [...]]]></description>
			<content:encoded><![CDATA[<p>Ugh. It&#8217;s one of those days where I&#8217;m being reminded that either I&#8217;m dumb or the rest of the world is, but someone is.</p>
<p>Case 1 &#8211; Calling each() on String in Groovy gives you every character of the string&#8230; but as a String and not a Character. I&#8217;m sure there&#8217;s a great reason for it, but it eludes me.</p>
<p>Case 2 &#8211; The Java Servlet API is an old friend. The person who put it together however did not understand the concept of HTTP Status codes. To send a non-&#8221;OK&#8221; response (code 200 as it happens), you have to call a method called setStatus(). However to set the string sent with the status, you have to call sendError &#8211; previously there was a setStatus(int, String) but that is deprecated. So&#8230; all responses with messages are errors now. OK. Then if you&#8217;re using Spring&#8217;s MockHttpServletResponse you find they have added getErrorMessage() to get the message set in setStatus/sendError&#8230; even though it is not necessarily an error message! Personally I think setStatus(int, String) was fine, and the mock should have getStatus() and getStatusMessage().</p>
<p>Rant over.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2008/09/26/a-few-wtfs-for-the-day/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 11/18 queries in 0.186 seconds using disk: basic

Served from: www.anyware.co.uk @ 2012-02-05 03:18:45 -->
