<?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>the art of milking eeks</title>
	<atom:link href="http://milkedeek.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://milkedeek.wordpress.com</link>
	<description>gamer, developer, internet citizen</description>
	<lastBuildDate>Wed, 06 Mar 2013 13:23:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='milkedeek.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>the art of milking eeks</title>
		<link>http://milkedeek.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://milkedeek.wordpress.com/osd.xml" title="the art of milking eeks" />
	<atom:link rel='hub' href='http://milkedeek.wordpress.com/?pushpress=hub'/>
		<item>
		<title>New hosting</title>
		<link>http://milkedeek.wordpress.com/2013/03/06/new-hosting/</link>
		<comments>http://milkedeek.wordpress.com/2013/03/06/new-hosting/#comments</comments>
		<pubDate>Wed, 06 Mar 2013 13:23:08 +0000</pubDate>
		<dc:creator>My Milked Eek</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://milkedeek.wordpress.com/?p=268</guid>
		<description><![CDATA[I&#8217;ve moved from wordpress.com to my own domain and webhost: http://mymilkedeek.net &#160; Thanks for visiting and I hope to see you on my new website.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=268&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve moved from wordpress.com to my own domain and webhost:</p>
<p><a href="http://mymilkedeek.net" rel="nofollow">http://mymilkedeek.net</a></p>
<p>&nbsp;</p>
<p>Thanks for visiting and I hope to see you on my new website.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/milkedeek.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/milkedeek.wordpress.com/268/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=268&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://milkedeek.wordpress.com/2013/03/06/new-hosting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73c9193b8650b20fd06787849f1801f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">My Milked Eek</media:title>
		</media:content>
	</item>
		<item>
		<title>Ludum Dare 24 [03] Day 2 &#8211; DONE</title>
		<link>http://milkedeek.wordpress.com/2012/08/26/ludum-dare-24-03-day-2-done/</link>
		<comments>http://milkedeek.wordpress.com/2012/08/26/ludum-dare-24-03-day-2-done/#comments</comments>
		<pubDate>Sun, 26 Aug 2012 18:14:26 +0000</pubDate>
		<dc:creator>My Milked Eek</dc:creator>
				<category><![CDATA[ld24]]></category>
		<category><![CDATA[ludumdare]]></category>

		<guid isPermaLink="false">http://milkedeek.wordpress.com/?p=258</guid>
		<description><![CDATA[http://www.ludumdare.com/compo/ludum-dare-24/?action=preview&#38;uid=7229 I&#8217;ve finished this Ludum. Not the most exciting entry, but it&#8217;s almost bugfree. And that&#8217;s cool. Got to leave the pc alone for a few hours. &#160; Eek.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=258&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.ludumdare.com/compo/ludum-dare-24/?action=preview&amp;uid=7229">http://www.ludumdare.com/compo/ludum-dare-24/?action=preview&amp;uid=7229</a></p>
<p>I&#8217;ve finished this Ludum. Not the most exciting entry, but it&#8217;s almost bugfree. And that&#8217;s cool.</p>
<p>Got to leave the pc alone for a few hours.</p>
<p><a href="http://milkedeek.files.wordpress.com/2012/08/screenshot.png"><img class="aligncenter size-full wp-image-259" title="screenshot" src="http://milkedeek.files.wordpress.com/2012/08/screenshot.png?w=497&#038;h=330" alt="" width="497" height="330" /></a></p>
<p>&nbsp;</p>
<p>Eek.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/milkedeek.wordpress.com/258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/milkedeek.wordpress.com/258/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=258&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://milkedeek.wordpress.com/2012/08/26/ludum-dare-24-03-day-2-done/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73c9193b8650b20fd06787849f1801f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">My Milked Eek</media:title>
		</media:content>

		<media:content url="http://milkedeek.files.wordpress.com/2012/08/screenshot.png" medium="image">
			<media:title type="html">screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>Ludum Dare 24 [02] 14.30 PM Second commit and new idea</title>
		<link>http://milkedeek.wordpress.com/2012/08/25/ludum-dare-24-02-14-30-pm-second-commit-and-new-idea/</link>
		<comments>http://milkedeek.wordpress.com/2012/08/25/ludum-dare-24-02-14-30-pm-second-commit-and-new-idea/#comments</comments>
		<pubDate>Sat, 25 Aug 2012 12:39:40 +0000</pubDate>
		<dc:creator>My Milked Eek</dc:creator>
				<category><![CDATA[ld24]]></category>
		<category><![CDATA[ludumdare]]></category>

		<guid isPermaLink="false">http://milkedeek.wordpress.com/?p=254</guid>
		<description><![CDATA[So, I didn&#8217;t go with the mouse cursor thing. Too meh. Decided on a farm simulator. You start with a few crops and some money. You can grow crops, sell crops and breed crops. At the end of turn 99, the game ends and your money is your score. The cool thing is that you&#8217;ll [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=254&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>So, I didn&#8217;t go with the mouse cursor thing. Too meh. Decided on a farm simulator. You start with a few crops and some money. You can grow crops, sell crops and breed crops. At the end of turn 99, the game ends and your money is your score.</p>
<p>The cool thing is that you&#8217;ll be able to enter your own dna code. Basically letting you be a genetic engineer. The goal is to find the dna code which gives you the best crop concerning marketprice, seed number and growtime.</p>
<p>At this point I just finished crop breeding. The next steps are:</p>
<p>- user inventory (grown crops, seeds)<br />
- marketplace</p>
<p>In the far future:</p>
<p>- crop/seed detail view<br />
- user dna code (comes at a price)<br />
- crop placement</p>
<p><a href="http://milkedeek.files.wordpress.com/2012/08/scrn003.png"><img class="aligncenter size-full wp-image-256" title="scrn003" src="http://milkedeek.files.wordpress.com/2012/08/scrn003.png?w=497&#038;h=330" alt="" width="497" height="330" /></a></p>
<p>&nbsp;</p>
<p>So, yes, I have some work to do.</p>
<p>Eek.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/milkedeek.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/milkedeek.wordpress.com/254/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=254&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://milkedeek.wordpress.com/2012/08/25/ludum-dare-24-02-14-30-pm-second-commit-and-new-idea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73c9193b8650b20fd06787849f1801f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">My Milked Eek</media:title>
		</media:content>

		<media:content url="http://milkedeek.files.wordpress.com/2012/08/scrn003.png" medium="image">
			<media:title type="html">scrn003</media:title>
		</media:content>
	</item>
		<item>
		<title>Ludum Dare 24 [01] 11.00 AM First commit</title>
		<link>http://milkedeek.wordpress.com/2012/08/25/ludum-dare-24-01-11-00-am-first-commit/</link>
		<comments>http://milkedeek.wordpress.com/2012/08/25/ludum-dare-24-01-11-00-am-first-commit/#comments</comments>
		<pubDate>Sat, 25 Aug 2012 09:04:12 +0000</pubDate>
		<dc:creator>My Milked Eek</dc:creator>
				<category><![CDATA[ld24]]></category>

		<guid isPermaLink="false">http://milkedeek.wordpress.com/?p=251</guid>
		<description><![CDATA[The theme is Evolution. Wow, it actually won this time. I didn&#8217;t brainstorm on any idea for this them because, well yeah, it never wins. So, after about an hour I got to writing some concept code in Groovy. Threw it out, started over. Threw that out as well. And then I went back to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=251&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The theme is Evolution.</p>
<p>Wow, it actually won this time. I didn&#8217;t brainstorm on any idea for this them because, well yeah, it never wins. So, after about an hour I got to writing some concept code in Groovy. Threw it out, started over. Threw that out as well. And then I went back to my original thought: do something with the mouse.</p>
<p>The idea is to have the mouse do actions and stuff, not sure on what exactly, and from there, you can upgrade your mouse. Eventually your mouse will have the arms of a bodybuilder. I&#8217;m not sure how I&#8217;ll show the upgrades (if I&#8217;ll show them at all). The main idea here is that I&#8217;ll be learning about mouse interfacing and collision detection.</p>
<p>Screenshot time!</p>
<p><a href="http://milkedeek.files.wordpress.com/2012/08/scrn001.png"><img class="aligncenter size-full wp-image-252" title="scrn001" src="http://milkedeek.files.wordpress.com/2012/08/scrn001.png?w=497&#038;h=330" alt="" width="497" height="330" /></a></p>
<p>&nbsp;</p>
<p>Ok, that&#8217;s lame. The mouse pointer doesn&#8217;t show&#8230;</p>
<p>Anyways, my code repository!</p>
<p><a href="https://bitbucket.org/mymilkedeek/ludum">https://bitbucket.org/mymilkedeek/ludum</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/milkedeek.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/milkedeek.wordpress.com/251/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=251&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://milkedeek.wordpress.com/2012/08/25/ludum-dare-24-01-11-00-am-first-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73c9193b8650b20fd06787849f1801f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">My Milked Eek</media:title>
		</media:content>

		<media:content url="http://milkedeek.files.wordpress.com/2012/08/scrn001.png" medium="image">
			<media:title type="html">scrn001</media:title>
		</media:content>
	</item>
		<item>
		<title>Ludum Dare 24 &#8211; [00] Getting ready</title>
		<link>http://milkedeek.wordpress.com/2012/08/24/ludum-dare-24-0/</link>
		<comments>http://milkedeek.wordpress.com/2012/08/24/ludum-dare-24-0/#comments</comments>
		<pubDate>Fri, 24 Aug 2012 15:00:32 +0000</pubDate>
		<dc:creator>My Milked Eek</dc:creator>
				<category><![CDATA[gamedev]]></category>
		<category><![CDATA[ld24]]></category>
		<category><![CDATA[ludumdare]]></category>

		<guid isPermaLink="false">http://milkedeek.wordpress.com/?p=235</guid>
		<description><![CDATA[Rejoice game devs, it&#8217;s Ludum weekend! And I&#8217;m entering once more. I&#8217;m nearly ready for my third participation. My &#8220;I&#8217;m in&#8221; post. Things on my To Do list: get some raw ideas in my head. The last theme selection went up and I&#8217;ll need to see if I can come up with some simple ideas [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=235&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Rejoice game devs, it&#8217;s Ludum weekend! And I&#8217;m entering once more. I&#8217;m nearly ready for my third participation. <a href="http://www.ludumdare.com/compo/2012/08/05/third-ludum/">My &#8220;I&#8217;m in&#8221; post</a>.</p>
<p><strong>Things on my To Do list:</strong></p>
<ul>
<li>get some raw ideas in my head. The last theme selection went up and I&#8217;ll need to see if I can come up with some simple ideas based on those themes.</li>
<li>decide on which genre/game mechanic I want to go. I&#8217;m undecided between a board game approach and a more arcade approach using only a mouse as an interface.</li>
<li>stock up on food and drinks.</li>
<li>linux screenshots for my timelapse.</li>
<li>check out launch4j.</li>
<li>check out some music programs.</li>
</ul>
<p>I learned quite a bit from previous ludums. First of all, keep going. Second of all, keep going. Third, stupid fixes to bugs/errors are usually the best. Fourth, keep the code clean as possible. The first Ludum was a pretty codebase gone ugly. My second Ludum was an ugly codebase gone even more ugly. I plan to make the codebase for my third entry a pleasant one. I&#8217;m stressing the verb &#8220;plan&#8221;.</p>
<p>I should also do a bit more on the preparations side beyond coding. Or at least not the night before it begins&#8230;</p>
<p>&nbsp;</p>
<p><strong>Things I&#8217;ll do better than last time:</strong></p>
<ul>
<li>collision detection. I figured out how to do it &#8220;elegantly&#8221;. Still not there yet, but a whole lot better than what i did for LD22 or for LD23</li>
<li>coding. Didn&#8217;t you hear? Groovy is awesome.</li>
<li>deployment. This time, it&#8217;ll work everywhere else.</li>
<li>making my game fun.</li>
</ul>
<p>A fun game, you say? Why didn&#8217;t I think of that? Well yeah, last times I went with what I had. But this time, I&#8217;m going to go somewhere.</p>
<p>&nbsp;</p>
<p><strong>My planning:</strong></p>
<ul>
<li>Friday-Saturday night; try to wake up at 3 AM to read the theme. Go back to bed and dream about it.</li>
<li>Saturday noon; basic gameplay, placeholder art and sfx/bgm</li>
<li>Saturday afternoon-evening-Sunday morning; advanced gameplay</li>
<li>Sunday noon-afternoon; art and sfx/bgm</li>
<li>Sunday evening; submission</li>
</ul>
<p>I haven&#8217;t planned it, but somewhere in between there should be a spot or two for some panicking, anxiety and tranquility. Isn&#8217;t Ludum Dare fun?</p>
<p>&nbsp;</p>
<p>Have fun,<br />
Eek.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/milkedeek.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/milkedeek.wordpress.com/235/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=235&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://milkedeek.wordpress.com/2012/08/24/ludum-dare-24-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73c9193b8650b20fd06787849f1801f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">My Milked Eek</media:title>
		</media:content>
	</item>
		<item>
		<title>Groovy and Tomcat, Pt4 &#8211; Groovy Servlet Pages</title>
		<link>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt4/</link>
		<comments>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt4/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 09:50:02 +0000</pubDate>
		<dc:creator>My Milked Eek</dc:creator>
				<category><![CDATA[groovy]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://milkedeek.wordpress.com/?p=228</guid>
		<description><![CDATA[Groovy Server Pages (GSP) Setting up GSP is as easy as setting up scripts. Add following to the project: - groovy.jar - groovy-json.jar - groovy-servlet.jar - groovy-templates.jar - groovy-xml.jar - antlr.jar - asm.jar web.xml And then just create your .gsp file: Navigating to the gsp url gives me the following: Still easy as 1-2-3. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=228&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Groovy Server Pages (GSP)</p>
<p>Setting up GSP is as easy as setting up scripts.</p>
<p>Add following to the project:</p>
<p>- groovy.jar<br />
- groovy-json.jar<br />
- groovy-servlet.jar<br />
- groovy-templates.jar<br />
- groovy-xml.jar<br />
- antlr.jar<br />
- asm.jar</p>
<p><strong>web.xml</strong></p>
<p><pre class="brush: xml;">

&lt;servlet&gt;
 &lt;servlet-name&gt;GroovyPages&lt;/servlet-name&gt;
 &lt;servlet-class&gt;groovy.servlet.TemplateServlet&lt;/servlet-class&gt;
 &lt;/servlet&gt;
 &lt;servlet-mapping&gt;
 &lt;servlet-name&gt;GroovyPages&lt;/servlet-name&gt;
 &lt;url-pattern&gt;*.gsp&lt;/url-pattern&gt;
 &lt;/servlet-mapping&gt;

</pre></p>
<p>And then just create your .gsp file:</p>
<p><pre class="brush: xml;">

&lt;html&gt;
&lt;head&gt;&lt;title&gt;Groovy Pages&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;&lt;% println &quot;hello world&quot; %&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;

</pre></p>
<p>Navigating to the gsp url gives me the following:</p>
<p><a href="http://milkedeek.files.wordpress.com/2012/08/gsp1.png"><img class="aligncenter size-medium wp-image-229" title="gsp" src="http://milkedeek.files.wordpress.com/2012/08/gsp1.png?w=300&#038;h=47" alt="" width="300" height="47" /></a></p>
<p>Still easy as 1-2-3.</p>
<p>The next part will be up later tonight as it&#8217;s under construction. It will feature a project that ties all the different groovy parts together into one project.</p>
<p>Until then, take care,<br />
Eek.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/milkedeek.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/milkedeek.wordpress.com/228/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=228&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73c9193b8650b20fd06787849f1801f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">My Milked Eek</media:title>
		</media:content>

		<media:content url="http://milkedeek.files.wordpress.com/2012/08/gsp1.png?w=300" medium="image">
			<media:title type="html">gsp</media:title>
		</media:content>
	</item>
		<item>
		<title>Groovy and Tomcat, Pt3 &#8211; Groovy Scripts</title>
		<link>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt3/</link>
		<comments>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt3/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 09:43:16 +0000</pubDate>
		<dc:creator>My Milked Eek</dc:creator>
				<category><![CDATA[groovy]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://milkedeek.wordpress.com/?p=194</guid>
		<description><![CDATA[In this part I&#8217;m going to show you how to use Groovy Scripts on a Tomcat. It&#8217;s very easy to do! First add these libraries to your project: - groovy.jar - groovy-json.jar - groovy-servlet.jar - groovy-xml.jar - antlr.jar - asm.jar You might need to add more to the project depending on the functionality of your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=194&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In this part I&#8217;m going to show you how to use Groovy Scripts on a Tomcat. It&#8217;s very easy to do!</p>
<p>First add these libraries to your project:</p>
<p>- groovy.jar<br />
- groovy-json.jar<br />
- groovy-servlet.jar<br />
- groovy-xml.jar<br />
- antlr.jar<br />
- asm.jar</p>
<p>You might need to add more to the project depending on the functionality of your scripts, but this is the minimum I needed to not encounter any exceptions.</p>
<p>Next, in your <strong>web.xml</strong><strong>, </strong>add the following servlet;</p>
<p><pre class="brush: xml;">

&lt;servlet&gt;
 &lt;servlet-name&gt;GroovyScript&lt;/servlet-name&gt;
 &lt;servlet-class&gt;groovy.servlet.GroovyServlet&lt;/servlet-class&gt;
 &lt;/servlet&gt;

&lt;servlet-mapping&gt;
 &lt;servlet-name&gt;GroovyScript&lt;/servlet-name&gt;
 &lt;url-pattern&gt;*.groovy&lt;/url-pattern&gt;
 &lt;/servlet-mapping&gt;

</pre></p>
<p>Groovy will then compile your scripts and run them as requested. For a quick test, put this in your webapp root folder and have its name end with .groovy, I named mine script.groovy, but you should name it something more meaningful.</p>
<p><pre class="brush: java;">

def ip = request.getRemoteAddr()

println &quot;&quot;&quot;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Groovy Scripts&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;Hello ${ip}&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
&quot;&quot;&quot;

</pre></p>
<p>Navigate to the url of the script and you&#8217;ll get a warm welcome.</p>
<p><a href="http://milkedeek.files.wordpress.com/2012/08/groovyscript.png"><img class="aligncenter size-medium wp-image-195" title="groovyscript" src="http://milkedeek.files.wordpress.com/2012/08/groovyscript.png?w=300&#038;h=61" alt="" width="300" height="61" /></a></p>
<p style="text-align:left;">Wasn&#8217;t that easy?</p>
<p style="text-align:left;">Stay tuned,<br />
Eek.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/milkedeek.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/milkedeek.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=194&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73c9193b8650b20fd06787849f1801f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">My Milked Eek</media:title>
		</media:content>

		<media:content url="http://milkedeek.files.wordpress.com/2012/08/groovyscript.png?w=300" medium="image">
			<media:title type="html">groovyscript</media:title>
		</media:content>
	</item>
		<item>
		<title>Groovy and Tomcat, Pt2 &#8211; Groovy extends HttpServlet</title>
		<link>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt2/</link>
		<comments>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt2/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 09:38:15 +0000</pubDate>
		<dc:creator>My Milked Eek</dc:creator>
				<category><![CDATA[groovy]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://milkedeek.wordpress.com/?p=221</guid>
		<description><![CDATA[Continuing where we left off&#8230; The jars you&#8217;ll need for this part are the same as the ones for part 1: - groovy.jar - antlr.jar - asm.jar GroovyHttpServlet And add it to the web.xml Now, navigate to the Servlet url and watch Groovy take care of everything: So, in short, what we did was replace a Java [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=221&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Continuing where we left off&#8230;</p>
<p>The jars you&#8217;ll need for this part are the same as the ones for part 1:</p>
<p>- groovy.jar<br />
- antlr.jar<br />
- asm.jar</p>
<p><strong>GroovyHttpServlet</strong></p>
<p><pre class="brush: java;">

package net.mymilkedeek.tomcat

import javax.servlet.http.HttpServlet
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse

class GroovyHttpServlet extends HttpServlet {

 @Override
 protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
 req.session.setAttribute(&quot;language&quot;, &quot;groovy&quot;)
 req.session.setAttribute(&quot;sentiment&quot;, &quot;awesome&quot;)
 req.session.setAttribute(&quot;message&quot;, JavaGroovy.message())
 resp.sendRedirect(&quot;index.jsp&quot;)
 }

 @Override
 protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
 super.doPost(req, resp)
 }
}

</pre></p>
<p>And add it to the <strong>web.xml</strong></p>
<p><pre class="brush: xml;">&lt;/pre&gt;
&lt;servlet&gt;
 &lt;servlet-name&gt;GroovyHttpServlet&lt;/servlet-name&gt;
 &lt;servlet-class&gt;net.mymilkedeek.tomcat.GroovyHttpServlet&lt;/servlet-class&gt;
 &lt;/servlet&gt;
 &lt;servlet-mapping&gt;
 &lt;servlet-name&gt;GroovyHttpServlet&lt;/servlet-name&gt;
 &lt;url-pattern&gt;/groovyhttpservlet&lt;/url-pattern&gt;
 &lt;/servlet-mapping&gt;
&lt;pre&gt;</pre></p>
<p>Now, navigate to the Servlet url and watch Groovy take care of everything:</p>
<p><a href="http://milkedeek.files.wordpress.com/2012/08/groovyhttpservlet.png"><img class="aligncenter size-medium wp-image-222" title="groovyhttpservlet" src="http://milkedeek.files.wordpress.com/2012/08/groovyhttpservlet.png?w=300&#038;h=65" alt="" width="300" height="65" /></a></p>
<p>So, in short, what we did was replace a Java HttpServlet with a Groovy HttpServlet.</p>
<p>For my next blog post, I&#8217;ll show you how to set up a Groovy Script in a webapplication.</p>
<p>Stay tuned,<br />
Eek.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/milkedeek.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/milkedeek.wordpress.com/221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=221&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73c9193b8650b20fd06787849f1801f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">My Milked Eek</media:title>
		</media:content>

		<media:content url="http://milkedeek.files.wordpress.com/2012/08/groovyhttpservlet.png?w=300" medium="image">
			<media:title type="html">groovyhttpservlet</media:title>
		</media:content>
	</item>
		<item>
		<title>Groovy and Tomcat, Pt1 &#8211; Calling Groovy from a Java Servlet</title>
		<link>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt1/</link>
		<comments>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt1/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 09:27:18 +0000</pubDate>
		<dc:creator>My Milked Eek</dc:creator>
				<category><![CDATA[groovy]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[java servlet]]></category>

		<guid isPermaLink="false">http://milkedeek.wordpress.com/?p=177</guid>
		<description><![CDATA[For this first post, I&#8217;ll keep it very simple: a Java servlet calls Groovy code to display a message to the screen. Start by setting up a regular Java servlet application. After your simple web application is set up, read the code snippets below. index.jsp In this .jsp code, we&#8217;ll print three attributes. Two handled [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=177&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For this first post, I&#8217;ll keep it very simple: a Java servlet calls Groovy code to display a message to the screen. Start by setting up a regular Java servlet application. After your simple web application is set up, read the code snippets below.</p>
<p><strong><br />
index.jsp</strong></p>
<p><pre class="brush: java;">
&lt;%@ page contentType=&quot;text/html;charset=UTF-8&quot; language=&quot;java&quot; %&gt;
&lt;%@ taglib prefix=&quot;c&quot; uri=&quot;http://java.sun.com/jsp/jstl/core&quot; %&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Eek's Groovy Sandbox&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;I'm using &lt;c:out value=&quot;${language}&quot; /&gt;! That's &lt;c:out value=&quot;${sentiment}&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;c:out value=&quot;${message}&quot; /&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre></p>
<p>In this .jsp code, we&#8217;ll print three attributes. Two handled by the Java servlet and one handed to us by our Groovy utility class.</p>
<p><strong>The Java servlet </strong></p>
<p><pre class="brush: java;">

package net.mymilkedeek.tomcat;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * The Java Servlet
 *
 * @author My Milked Eek
 */
public class JavaServlet extends HttpServlet {
 @Override
 protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
 req.getSession().setAttribute(&quot;language&quot;, &quot;java&quot;);
 req.getSession().setAttribute(&quot;sentiment&quot;, &quot;ok...&quot;);
 resp.sendRedirect(&quot;index.jsp&quot;); }
}

</pre></p>
<p><strong>web.xml</strong></p>
<p><pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;web-app xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot;
 xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;
 version=&quot;2.5&quot;&gt;

&lt;servlet&gt;
 &lt;servlet-name&gt;JavaServlet&lt;/servlet-name&gt;
 &lt;servlet-class&gt;net.mymilkedeek.tomcat.JavaServlet&lt;/servlet-class&gt;
 &lt;/servlet&gt;
 &lt;servlet-mapping&gt;
 &lt;servlet-name&gt;JavaServlet&lt;/servlet-name&gt;
 &lt;url-pattern&gt;/javacallinggroovy&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;

&lt;/web-app&gt;
</pre></p>
<p>That&#8217;s a simple webapplication. Now add the following dependencies to your project:</p>
<p>- groovy.jar<br />
- antlr.jar<br />
- asm.jar</p>
<p>Now add a Groovy Class, I named it JavaGroovy.</p>
<p><strong>Groovy Class<br />
</strong></p>
<p><pre class="brush: java;">
package net.mymilkedeek.tomcat

class JavaGroovy {

static def message() {
 &quot;I was called from Groovy. Exciting, isn't it?&quot;
 }
}

</pre></p>
<p>And add following line to your Java Servlet:</p>
<p><pre class="brush: java;">
...
req.getSession().setAttribute(&quot;message&quot;, JavaGroovy.message());
...
</pre></p>
<p>Now, navigate to the url of the Java Servlet and watch the magic happen:</p>
<p><a href="http://milkedeek.files.wordpress.com/2012/08/javacallinggroovy.png"><img class="aligncenter size-medium wp-image-215" title="javacallinggroovy" src="http://milkedeek.files.wordpress.com/2012/08/javacallinggroovy.png?w=300&#038;h=69" alt="" width="300" height="69" /></a></p>
<p>So, in short, what we did was make a call to a Java Servlet. This servlet then gets a message from a Groovy class. And then we added that message to the session.</p>
<p>This kind of setup with Groovy is particularly useful with an existing Java Servlet: You only need to add Groovy jars and you can start hacking away.</p>
<p>For my next post, I&#8217;ll show you how to get Groovy extending HttpServlet.</p>
<p>Stay tuned,<br />
Eek.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/milkedeek.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/milkedeek.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=177&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat-pt1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73c9193b8650b20fd06787849f1801f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">My Milked Eek</media:title>
		</media:content>

		<media:content url="http://milkedeek.files.wordpress.com/2012/08/javacallinggroovy.png?w=300" medium="image">
			<media:title type="html">javacallinggroovy</media:title>
		</media:content>
	</item>
		<item>
		<title>Groovy and Tomcat</title>
		<link>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat/</link>
		<comments>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 09:04:36 +0000</pubDate>
		<dc:creator>My Milked Eek</dc:creator>
				<category><![CDATA[groovy]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[java servlet]]></category>

		<guid isPermaLink="false">http://milkedeek.wordpress.com/?p=205</guid>
		<description><![CDATA[It&#8217;s been a while since my last non-ludum blog post. Since I wrote &#8220;iText on the JVM&#8221; I&#8217;ve been playing with Groovy and Python occasionally. But for the past month and a half, I&#8217;ve been getting into Groovy a lot. So much that my next Ludum Dare entry will be written in Groovy/Java. Up until [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=205&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s been a while since my last non-ludum blog post. Since I wrote &#8220;<a href="http://milkedeek.wordpress.com/2012/01/03/itext-on-the-jvm/">iText on the JVM</a>&#8221; I&#8217;ve been playing with Groovy and Python occasionally. But for the past month and a half, I&#8217;ve been getting into Groovy a lot. So much that my next Ludum Dare entry will be written in Groovy/Java.</p>
<p>Up until this blog post I&#8217;ve just been experimenting with Groovy, using it to quickly test issues and bugs, but I wanted to do a bit more with it, so I tried using it in Tomcat. I didn&#8217;t set up Grails, didn&#8217;t want to do that just yet, but I set up Groovy and I&#8217;ll document several ways to use Groovy in Tomcat.</p>
<p><strong>Table of contents:</strong></p>
<ol>
<li>Java HttpServlet calling Groovy</li>
<li>Groovy HttpServlet</li>
<li>Groovy Scripts</li>
<li>Groovy Servlet Pages</li>
<li>Bringing it all together</li>
</ol>
<p>We&#8217;ll start out really simple; use Groovy as an extension to an existing Java servlet and work our way to using scripts in combination with .gsp&#8217;s.</p>
<p>Stay tuned,<br />
Eek.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/milkedeek.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/milkedeek.wordpress.com/205/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=milkedeek.wordpress.com&#038;blog=10761383&#038;post=205&#038;subd=milkedeek&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://milkedeek.wordpress.com/2012/08/20/groovy-and-tomcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/73c9193b8650b20fd06787849f1801f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">My Milked Eek</media:title>
		</media:content>
	</item>
	</channel>
</rss>
