<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2" -->
<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/"
	>

<channel>
	<title>IN MY OPINION</title>
	<link>http://blog.gomilko.com</link>
	<description>Andrew Gomilko's Blog</description>
	<pubDate>Mon, 14 Jan 2008 08:09:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>
	<language>en</language>
			<item>
		<title>Acegi Conditional Roles</title>
		<link>http://blog.gomilko.com/2008/01/12/acegi-conditional-roles/</link>
		<comments>http://blog.gomilko.com/2008/01/12/acegi-conditional-roles/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 16:54:50 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[IT]]></category>

		<category><![CDATA[Code snippets]]></category>

		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.gomilko.com/2008/01/12/acegi-conditional-roles/</guid>
		<description><![CDATA[Acegi - the Java security framework
I suppose that you know what is Spring Security (former Acegi project) is, or at least you are aware of its wide securing abilities for a Java web application. Besides lots of features which Acegi offers you out-of-the box, there are many configurable options. This time, I had a task [...]]]></description>
			<content:encoded><![CDATA[<h2>Acegi - the Java security framework</h2>
<p>I suppose that you know what is <a href="http://www.acegisecurity.org/">Spring Security</a> (former Acegi project) is, or at least you are aware of its wide securing abilities for a Java web application. Besides lots of features which Acegi offers you <a href="http://blog.springsource.com/main/2007/12/06/whats-new-in-spring-security-2/">out-of-the box</a>, there are many configurable options. This time, I had a task to implement a functionality which allows restricting access to method invocations based not only on the granted roles to the logged in user, but taking in account passed parameters as well. Let&#8217;s see the result.</p>
<h2>@Secured annotations</h2>
<p>Assume that you are developing pretty common web application with standard security model with users, granted roles, etc. Of course, the main goal of the security infrastructure is accepting/denying user access to different parts of your application based on the granted access rights. Acegi offers you two main ways of controlling access: <a href="http://www-128.ibm.com/developerworks/java/library/j-acegi1/">URL based</a> which analyzes the clients http requests to your application and based on the <a href="http://www.ibm.com/developerworks/java/library/j-acegi3/index.html">AOP principles</a> which controls method invocations. </p>
<p>With the URL based method you can achieve rough securing coverage very simply. For instance, if you have /admin part, you just deny the access to all users who don&#8217;t have ROLE_ADMIN granted role to the URLs which starts from /admin/** string. The part /store you can make available only to users with role ROLE_CUSTOMER, etc. You can cover all you URLs with such rules, but unfortunately, if you want more precise control, you have to write lots of business logic code in your Controllers/Managers which performs additional checks in the methods body.</p>
<p>Let&#8217;s consider an idiomatic example (no real DAOs, no Hibernate etc) consisting of: </p>
<ul>
<li>a controller ShoppingCartAddItemController which is mapped to /shop/card/addItem.jsp url,
<li>
<li>a service class IShoppingCartManager which provides with business logic,
<li>
<li>ROLE_USER which is granted to Scott user:</li>
</ul>
<pre class="prettyprint">
public class ShoppingCartAddItemController extends AbstractController {

    private IShoppingCartManager shoppingCartManager;

    @Override
    protected ModelAndView handleRequestInternal(HttpServletRequest request,
        HttpServletResponse response) throws Exception {
        Integer customerId = ServletRequestUtils.getIntParameter(request, "customerId");
        Integer itemId = ServletRequestUtils.getIntParameter(request, "itemId");
        Integer amount = ServletRequestUtils.getIntParameter(request, "amount");

        shoppingCartManager.addItem(customerId, itemId, amount);

        return new ModelAndView("redirect:/shop/item/congratulations.jsp");
    }

    public void setShoppingCartManager(IShoppingCartManager shoppingCartManager) {
        this.shoppingCartManager = shoppingCartManager;
    }
}

public interface IShoppingCartManager {

    @Secured({"ROLE_USER" })
    void addItem(Integer customerId, Integer itemId, Integer amount);

    @Secured({"ROLE_USER" })
    void deleteItem(Integer customerId, Integer itemId);

}

public class ShoppingCartManager implements IShoppingCartManager {

    public void addItem(Integer customerId, Integer itemId, Integer amount) {
        // use DAO
    }

    public void deleteItem(Integer customerId, Integer itemId) {
        // use DAO
    }

}
</pre>
<p>The ROLE_USER guarantees that the secured method can be invoked from the controller if the logged in user is granted by this role. But in this case, being logged in, I can change the URL parameter <i>customerId</i> to another value and Acegi won&#8217;t check it. To prevent it, we need to paste something like this in every Manager method (or Controller or Filter for every URL which matches /shop/**/*?customerId=&#8230; pattern):</p>
<pre class="prettyprint">
    public void addItem(Integer customerId, Integer itemId, Integer amount) {
         Integer loggedCustomerId = securityManager.getLoggedCustomerId();
         if (loggedCustomerId != customerId) {
              throw new AccessDeniedException("access denied");
         }
         // business logic
    }
</pre>
<p>The main question is: how can we minimize coding, if we know that lots of methods requires the same type of access check? The answer is pretty obvious - we need a AOP aspect which would do this routine instead of us. From another point of view, it would be great if we could employ already used @Secured annotation facilities. </p>
<h2>Conditional Roles</h2>
<p>After brief <a href="http://www.google.com/search?q=Acegi+Conditional+Roles">googling</a>, I caught the first clue. It was a <a href="http://forum.springframework.org/showthread.php?t=22321">similar question</a> on Spring framework forum, and eventually I came to the <a href="http://forum.springframework.org/showthread.php?t=39385">topic</a> which lead to Conditional Roles patch <a href="http://jira.springframework.org/browse/SEC-273">SEC-273</a>. It was an implementation by Usama Rashwan of the idea of <a href="http://karldmoore.blogspot.com/">Karl Moore</a>.</p>
<p>The idea is elegant and straightforward. All tricks with method invocations in Acegi could be done by implementing <a href="http://www.acegisecurity.org/acegi-security/apidocs/org/acegisecurity/vote/RoleVoter.html">RoleVoter</a> interface where you can implement your own access decision logic. But writing your own RoleVoter for every scenario is violating DRY principle. So, it was suggested to write one RoleVoter and to use a Scripting Language like OGNL, <a href="http://mvel.codehaus.org/">MVEL</a> to write conditions right in the role names after special delimiter &#8220;::&#8221;.</p>
<p>In our case, the new @Secured annotation changes to:</p>
<pre class="prettyprint">
    @Secured({"ROLE_USER::authentication.principal.customerId == arg0" })
    void addItem(Integer customerId, Integer itemId, Integer amount);
</pre>
<p>where <i>authentication</i> is SecurityContextHolder.getContext().getAuthentication() object which usually holds all logged in user details. This object is put to MVEL context by AbstractInvocationChecker. Besides this object, you can operate by arguments passed to the secured method, here arg0 is the first parameter passed to the method. The MVEL scripting language is very flexible, it can cope with JavaBeans, operations on collections, etc. Of course you can&#8217;t do there rocket science computations, but for our needs it is enough.</p>
<p>I suggest the next way of usage:</p>
<ul>
<li>Extend <a href="http://www.acegisecurity.org/acegi-security/apidocs/org/acegisecurity/userdetails/UserDetails.html">UserDetails</a> class with information required in decision point when the secured method is invoked. It could be ids of objects which is allowed to be manipulated by logged in user.</li>
<li>Populate UserDetails with all needed information while a user logging in by UserDetailsService. This object is available as &#8220;authentication.principal&#8221; object in MVEL context.</li>
<li>Write conditional roles based on this objects mixing with passed arguments.</li>
<li>Update the SecurityContextHolder.getContext().getAuthentication() if necessary during the user activity.</li>
</ul>
<h2>Buzz</h2>
<p>If you are interested in this topic - just download the patch, it has a comprehensive example of usage and clear source code. The   JIRA issue stated that this patch goes to 2.0.0 M2 which is going to be released soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gomilko.com/2008/01/12/acegi-conditional-roles/feed/</wfw:commentRss>
		</item>
		<item>
		<title>YUI Compression tool as Ant Task</title>
		<link>http://blog.gomilko.com/2007/11/29/yui-compression-tool-as-ant-task/</link>
		<comments>http://blog.gomilko.com/2007/11/29/yui-compression-tool-as-ant-task/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 18:45:52 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.gomilko.com/2007/11/29/yui-compression-tool-as-ant-task/</guid>
		<description><![CDATA[Minification over obfuscation and other uglifier techniques
Every mature web application enters phase when you need to optimize overall performance. Unfortunately, choosing right DB, tuning your SQL queries and using sophisticated load-balancers are not enough if a user&#8217;s browser have to wait for a 5 seconds to load your overloaded AJAX-based grid. And if it happens, [...]]]></description>
			<content:encoded><![CDATA[<h2>Minification over obfuscation and other uglifier techniques</h2>
<p>Every mature web application enters phase when you need to optimize overall performance. Unfortunately, choosing right DB, tuning your SQL queries and using sophisticated load-balancers are not enough if a user&#8217;s browser have to wait for a 5 seconds to load your overloaded AJAX-based grid. And if it happens, you have to think a lot and try many client-side optimization solutions. Now, developers have a great analyzing <a href="http://developer.yahoo.com/yslow/">YSlow</a> tool which can give you dozens of improvement tips. Actually, you can do all this work just analyzing response headers and content with another excellent tool - <a href="http://www.getfirebug.com/">Firebug</a>.</p>
<p>So, when our <a href="http://sonopia.com">application</a> had been optimized against almost all <a href="http://developer.yahoo.com/performance/rules.html">possible bottlenecks</a>, it was decided to use a sort of compression (apart from gzip, which is already employed) of resource files (js, css) based on its structure.</p>
<p>After a little comparison and talks with DHTML gurus, I chose using <a href="http://yuiblog.com/blog/2006/03/06/minification-v-obfuscation/">minification instead of obfuscation</a>, because the later one could be really source of evil bugs. Nowadays, the best supported minifier I found is <a href="http://developer.yahoo.com/yui/compressor/">YUI Compressor</a>. </p>
<h2>YUI Compressor</h2>
<p>I chose YUI Compressor because it is Java-based free open-sourced tool which means that I always can investigate why something goes wrong, and probable contribute something valuable. This tool can be used as a standalone command line application or used from your code instantiating necessary classes. It could parse javascript files as well as css. Also there is wide range of parameters (e.g. shorten local variables or not, preserve semicolons or not).</p>
<h2>Ant script</h2>
<p>Good overview of the tool usage from Ant script is <a href="http://www.julienlecomte.net/blog/2007/09/16/">here</a>. However, it is just calls to the compressor as to command-line program, which is verbose and sometimes not appropriate. Usually for such tools, there are custom Ant tasks. And it was obvious, that since sources of the tool is available, the Ant task should exist for the YUI Compressor too. After some googling, I found what I needed - semi-abandoned page <a href="http://www.ubik-ingenierie.com/ubikwiki/index.php?title=Minifying_JS/CSS">Minifying JS/CSS</a>. Many thanks to the author - Philippe Mouawad, well done! I would like to see this patch in the release and reference on the official site.</p>
<p>Simple example of usage:</p>
<div class="dean_ch" style="white-space: wrap;">
<p>&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;path</span> <span class="re0">id</span>=<span class="st0">&quot;yuicompressor.classpath&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;fileset</span> <span class="re0">dir</span>=<span class="st0">&quot;${yuicompressor.dir}&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;include</span> <span class="re0">name</span>=<span class="st0">&quot;**/yuicompressor-2.2.5.jar&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;include</span> <span class="re0">name</span>=<span class="st0">&quot;**/YUIAnt.jar&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="coMULTI">&lt;!&#8211; include name=&quot;**/rhino*.jar&quot;/ &#8211;&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/fileset<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/path<span class="re2">&gt;</span></span></span>&nbsp;</p>
<p>&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;target</span> <span class="re0">name</span>=<span class="st0">&quot;minify-js-css&quot;</span> <span class="re0">description</span>=<span class="st0">&quot;Minifiy a set of files&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;taskdef</span> <span class="re0">name</span>=<span class="st0">&quot;yuicompress&quot;</span> <span class="re0">classname</span>=<span class="st0">&quot;com.yahoo.platform.yui.compressor.YUICompressTask&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;classpath<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;path</span> <span class="re0">refid</span>=<span class="st0">&quot;yuicompressor.classpath&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/classpath<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/taskdef<span class="re2">&gt;</span></span></span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;delete</span> <span class="re0">dir</span>=<span class="st0">&quot;${js-min.dir}&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;mkdir</span> <span class="re0">dir</span>=<span class="st0">&quot;${js-min.dir}&quot;</span> <span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;yuicompress</span> <span class="re0">linebreak</span>=<span class="st0">&quot;300&quot;</span> <span class="re0">warn</span>=<span class="st0">&quot;false&quot;</span> <span class="re0">munge</span>=<span class="st0">&quot;yes&quot;</span> <span class="re0">preserveallsemicolons</span>=<span class="st0">&quot;true&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">outputfolder</span>=<span class="st0">&quot;${js-min.dir}&quot;</span> <span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;fileset</span> <span class="re0">dir</span>=<span class="st0">&quot;${js.dir}&quot;</span> <span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;include</span> <span class="re0">name</span>=<span class="st0">&quot;**/*.js&quot;</span> <span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/fileset<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/yuicompress<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/target<span class="re2">&gt;</span></span></span><br />
&nbsp;</div>
<h2>Encountered problems</h2>
<p>Everything works fine except one malicious trouble, I was struggling with for a day. If Rhino (which is stated as dependency library)<br />
was included in task classpath, all returning characters &#8220;\n&#8221; was pasted as a new line, and an JS error occurred.</p>
<div class="dean_ch" style="white-space: wrap;">
var a = &quot;aaa\nbbb&quot;;<br />
// turns after minification into:<br />
var a = &quot;aaa<br />
bbb&quot;;<br />
&nbsp;</div>
<p>This bug was eliminated by removing Rhino jar from classpath.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gomilko.com/2007/11/29/yui-compression-tool-as-ant-task/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Activating Windows XP by phone</title>
		<link>http://blog.gomilko.com/2007/10/15/activating-windows-xp-by-phone/</link>
		<comments>http://blog.gomilko.com/2007/10/15/activating-windows-xp-by-phone/#comments</comments>
		<pubDate>Mon, 15 Oct 2007 19:28:35 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://blog.gomilko.com/2007/10/15/activating-windows-xp-by-phone/</guid>
		<description><![CDATA[I never thought that I would use phone activation/registration of any software product, especially Windows. But it happened. Firstly I was kindly asked to assist in choosing new PC for parents of my wife. There weren&#8217;t any special requirements, so I decided to buy it in one of the local computer stores rather than assemble [...]]]></description>
			<content:encoded><![CDATA[<p>I never thought that I would use phone activation/registration of any software product, especially Windows. But it happened. Firstly I was kindly asked to assist in choosing new PC for parents of my wife. There weren&#8217;t any special requirements, so I decided to buy it in one of the local computer stores rather than assemble it from components. We did short ride in some shops, and chose one model which seemed perfect as home PC (1.8 Core Duo, 1G RAM, 200G HDD, ASUS motherboard).<br />
There was special discount - if you buy it with pre-installed Windows XP it becomes even cheaper than without OS. When we purchased and delivered it to home I have to enter license code printed on the recovery disk. It was usual and easy process. But then, I was asked to activate it, and encountered a problem - parents don&#8217;t have an Internet access yet. Hmm. I had to make a choice: to be asked &#8220;what&#8217;s wrong with that damn PC? it always asks something unclear..&#8221; or pass activation by phone to eliminate this irritating pop-up. Actually I had no choice, and started to call the number which appeared in the activation wizard. Frankly speaking I expected that I wouldn&#8217;t be answered because of Sunday, or I will talk to sleepy assistant. To my great surprise, I was greeted by answering machine, or rather voice-automate like every mobile operator or cinema have. The voice was charming and welcoming but then I realized that I had to type in my phone 9 groups of 6 digits generated by wizard (54 in total) <img src='http://blog.gomilko.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> Moreover, after this operation, I had to type the answer which was shorter but also too long. To get to this part I had to listen all rules and repeat actions correctly.<br />
After I successfully activated the Windows, I was asked by robot to answer some questions about quality of phone activation, I answered only on first three questions (did anybody reach the last?). I chose variants that I passed from first time but I didn&#8217;t like that boring procedure. Next questions seemed as boring as the whole process, so I dropped the line.<br />
I can&#8217;t say that the process was bad, but I still feel that I wasted 20 minutes of time.<br />
I think that there is only one way to improve activation by phone - just remove that process at all. I don&#8217;t understant why should a customer activate the product if it was bought with licensed CD/DVD with printed secure label with license code. Anyway, this measures don&#8217;t work against pirated disks, because they already ships with well cracked $oft\/\/are.<br />
Or, as an option, it can be activated in the shop where it was installed. For somebody the best is to use open software like Ubuntu <img src='http://blog.gomilko.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gomilko.com/2007/10/15/activating-windows-xp-by-phone/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PinchukArtCentre - Reflection excebition of contemporary art</title>
		<link>http://blog.gomilko.com/2007/10/14/pinchukartcentre-reflection-excebition-of-contemporary-art/</link>
		<comments>http://blog.gomilko.com/2007/10/14/pinchukartcentre-reflection-excebition-of-contemporary-art/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 19:09:40 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Culture]]></category>

		<category><![CDATA[Social]]></category>

		<guid isPermaLink="false">http://blog.gomilko.com/2007/10/14/pinchukartcentre-reflection-excebition-of-contemporary-art/</guid>
		<description><![CDATA[Yesterday I visited the most attractive ongoing event in Kiev - exhibition of contemporary art called Reflection which is held by PinchukArtCentre. I went there with my mother and wife and, however, we have different tastes, we all admired the exposition.
Actually, it is unique situation for today&#8217;s Kiev culture life, that people could stand in [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I visited the most attractive ongoing event in Kiev - exhibition of contemporary art called Reflection which is held by <a href="http://pinchukartcentre.org">PinchukArtCentre</a>. I went there with my mother and wife and, however, we have different tastes, we all admired the exposition.<br />
Actually, it is unique situation for today&#8217;s Kiev culture life, that people could stand in a line for an hour in the street when weather is cold, rainy and windy to enter the such event. The waiting visitors are lively and bright. There are lots of different people - young and old, stylish and with plastic bags from the supermarket, Ukrainians and foreigners.<br />
There are many pictures, photos and installations composed from objects, light and music. Some of them you can see on the <a href="http://pinchukfund.org/uk/media/photo-gallery/2007/470.html">press release page</a> or comprehensive <a href="http://www.proza.com.ua/events/reflection.shtml">overview </a>(in Russian). What I liked the most is the large photo of green rocky islands, I guess somewhere on North or perhaps in New Zeland. I could look at that picture for dozens of minutes. Also, no doubt, that the most fun for everybody is <a href="http://www.southbankcentre.co.uk/gormley/light.html">the foggy box</a> - the large long room with transparent glass filled with very thick fog (I think permanently generated by any of <a href="http://ndeaa.jpl.nasa.gov/nasa-nde/medical/fog.htm#Pictures%20of%20Atomization">ultrasonic fogger</a>). You can enter it and walk there, and it&#8217;s hard to see anything further<br />
then your nose. It looks like you&#8217;re flying in the cloud or milk. What are the most remarkable in the art center building - beautiful light design, amazing views on the city center and of course hi-tech futuristic toilets <img src='http://blog.gomilko.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Whats about the exposition at all, I would advice to add some description or clear titles to some extraordinary works. Because the distinction between such kind of art and nonsense is very subtle, it&#8217;s crucially important to direct viewer in the same way, the creator was thinking. I don&#8217;t mean that there should be only one right explanation without any other possible interpretations, but starting from it will be much easier to understand what was the author trying to say. </p>
<p>The exhibition is open till December 30, so you have plenty of time to visit it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gomilko.com/2007/10/14/pinchukartcentre-reflection-excebition-of-contemporary-art/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sysdeo Tomcat plugin configuration file</title>
		<link>http://blog.gomilko.com/2007/09/12/sysdeo-tomcat-plugin-configuration-file/</link>
		<comments>http://blog.gomilko.com/2007/09/12/sysdeo-tomcat-plugin-configuration-file/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 19:42:30 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.gomilko.com/2007/09/12/sysdeo-tomcat-plugin-configuration-file/</guid>
		<description><![CDATA[I use in all my web based Java application Tomcat as an IDE and Sysdeo Tomcat launcher for web container starting and stopping. Every project has it&#8217;s own configuration of Tomcat launch process. And if you have many workspaces (e.g. couple of ongoing branches - release on production, development version, etc.) you must configure this [...]]]></description>
			<content:encoded><![CDATA[<p>I use in all my web based Java application Tomcat as an IDE and Sysdeo Tomcat launcher for web container starting and stopping. Every project has it&#8217;s own configuration of Tomcat launch process. And if you have many workspaces (e.g. couple of ongoing branches - release on production, development version, etc.) you must configure this plugin each time you create a new workspace. If you&#8217;re using standard configuration, the only thing you have to do is specifying Tomcat home directory. Whilst, if it is needed to allocate more memory or enable JMX ports, you encounter the problem that you have to enter manually every single parameter in the JVM Settings dialog. There are no Copy All &#038; Paste All functionality, and you can&#8217;t even copy configuration to send it to co-worker or to project wiki. Only one, IMHO, meaningless action you can do is dumping current configuration to the Eclipse log. However, output is messy and hard to read. </p>
<p><img src="http://gallery.gomilko.com/d/2591-1/sysdeo-tomacat-preferences.png" width="600" height="247" alt="preferences" title="preferences" /></p>
<p>Today I decided to find out where this information is stored to know where to paste it next time. The search led me here:<br />
<code>workspace\.metadata\.plugins\org.eclipse.debug.core\.launches\Tomcat 5.x.launch</code>. This is the configuration file which stores everything you can edit through that dialog. Next time, I definitely will edit properties directly there. </p>
<p><img src="http://gallery.gomilko.com/d/2589-1/configuration-file.png" width="600" height="229" alt="configuration file" title="configuration file" /></p>
<p>Also I finally defeated the problem connected to Hot Deploy feature being occurred after I <a href="/2007/07/10/moving-to-eclipse-europa-for-j2ee-programmer/">moved to Eclipse Europa</a>. Since that time, any code modifications caused Tomcat crash, even if signature of classes/methods weren&#8217;t changed. I had to restart it every time and it became tedious. The problem was eliminated after I removed <code>reloadable="true"</code> parameter in the web application <a href="http://tomcat.apache.org/tomcat-5.0-doc/config/context.html">context</a> file.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gomilko.com/2007/09/12/sysdeo-tomcat-plugin-configuration-file/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I&#8217;ve got a laptop</title>
		<link>http://blog.gomilko.com/2007/07/22/ive-got-a-laptop/</link>
		<comments>http://blog.gomilko.com/2007/07/22/ive-got-a-laptop/#comments</comments>
		<pubDate>Sun, 22 Jul 2007 10:44:59 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Job]]></category>

		<category><![CDATA[Social]]></category>

		<guid isPermaLink="false">http://blog.gomilko.com/2007/07/22/ive-got-a-laptop/</guid>
		<description><![CDATA[Last Friday, when I was about to go home, I was given a brand new laptop empowered with 2G RAM and a high speed HDD.
So, now my workplace looks like a Shuttle Launch Center:
 
]]></description>
			<content:encoded><![CDATA[<p>Last Friday, when I was about to go home, I was given a brand new <a href="http://www.notebookcheck.net/Asus-A6JE.2615.0.html">laptop</a> empowered with 2G RAM and a high speed HDD.<br />
So, now my workplace looks like a Shuttle Launch Center:<br />
 <a href="/v/blog/IMG_0157.jpg.html"><img src="http://gallery.gomilko.com/d/2462-2/IMG_0157.jpg" width="150" height="113" alt="My Sonopia workplace" title="My Sonopia workplace" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gomilko.com/2007/07/22/ive-got-a-laptop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Playing with UrlRewrite Filter</title>
		<link>http://blog.gomilko.com/2007/07/16/playing-with-urlrewrite-filter/</link>
		<comments>http://blog.gomilko.com/2007/07/16/playing-with-urlrewrite-filter/#comments</comments>
		<pubDate>Mon, 16 Jul 2007 15:06:18 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Code snippets]]></category>

		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.gomilko.com/2007/07/16/playing-with-urlrewrite-filter/</guid>
		<description><![CDATA[Introduction
Nowadays, every modern web development environment offers a way to manipulate URL on the fly using a rule-based configuration rather than hard coded program logic. Probably every approach has its origins in famous Apache mod_rewrite module. In the Java world, de facto standard is a wonderful Url Rewrite Filter. It can do everything what you [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Nowadays, every modern web development environment offers a way to manipulate URL on the fly using a rule-based configuration rather than hard coded program logic. Probably every approach has its origins in famous Apache <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html">mod_rewrite</a> module. In the Java world, de facto standard is a wonderful <a href="http://tuckey.org/urlrewrite/">Url Rewrite Filter</a>. It can do everything what you expect from such tool and has some delicious topping as a benefit:</p>
<ul>
<li>analyze URL against a pattern (regexp or wildcard)</li>
<li>analyze all possible HTTP data like cookies, request parameters, host, remote info, etc</li>
<li>change data like cookie, session, request attributes</li>
<li>redirect or forward to static or dynamically(based on analysis data) formed URL</li>
<li>run your own rolled Java code (e.g. logging, statistics)</li>
</ul>
<p>During the last few days I got more familiar with this powerful tool and want to show the value it can bring into any Java based Web application. I won&#8217;t describe the syntax of the configuration file because there is a comprehensive <a href="http://tuckey.org/urlrewrite/manual/3.0/">manual</a> which outlines all options. Also I&#8217;m not going to describe simplest use cases, let&#8217;s start from something interesting like the first step in integration with affiliate partner.<br />
For instance, in case of integration with <a href="http://www.cj.com/">Commission Junction</a> affiliate service provider, your application have to set a cookie which identifies a user that come from an affiliate partner, and then redirect the user to the page stated as a request parameter.<br />
So, there are some steps I want to implement with UrlRewrite library:<br />
<code><br />
1. User came to your site by clicking on a banner with link http://example.com/?CJURL=http%3a%2f%2fexample.com%2fregister%2fnew.html (parameter is encoded string http://example.com/register/new.html) Tip: to url encode test data you can use a simple <a href="http://www.opinionatedgeek.com/DotNet/Tools/UrlEncode/Encode.aspx">online encoding tool</a>.<br />
2. Your application recognizes a CJURL request parameter and set a cookie (expire time >= 24h) to know that the user came from CJ affiliate program<br />
3. Redirect the user to the landing page equal to CJURL parameter<br />
</code></p>
<h2>Setting cookies</h3>
<p>This snippet sets cookie if a user comes from our affiliate partner. Despite of the fact that in UrlRewrite manual stated that expire time have to be set in minutes, it actually is in seconds. Probably it is just a typo in the manual, but be careful and alway test real expire date with your browser. It is possible to set all parameters (value can be in the format “[value][:domain[:lifetime[:path]]]”), although we use only two parameters.</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="sc3"><span class="re1">&lt;rule<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;condition</span> <span class="re0">type</span>=<span class="st0">&quot;query-string&quot;</span><span class="re2">&gt;</span></span>^CJURL=(.*)$<span class="sc3"><span class="re1">&lt;/condition<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;from<span class="re2">&gt;</span></span></span>^(.*)$<span class="sc3"><span class="re1">&lt;/from<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="coMULTI">&lt;!&#8211; Affiliate service provider &#8211;&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="coMULTI">&lt;!&#8211; expire time in seconds&#8211;&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;set</span> <span class="re0">type</span>=<span class="st0">&quot;cookie&quot;</span> <span class="re0">name</span>=<span class="st0">&quot;asp&quot;</span><span class="re2">&gt;</span></span>cj::86400<span class="sc3"><span class="re1">&lt;/set<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;/rule<span class="re2">&gt;</span></span></span><br />
&nbsp;</div>
<h2>Redirecting to a request parameter value</h2>
<p>It seems to be a simple task to get a value from request query and redirect to url created from that parameter. But you can&#8217;t do it explicitly in UrlRewrite. <a href="http://groups.google.co.nz/group/urlrewrite/browse_thread/thread/3fd3deedca98c0d0">Setting request parameters in <to> </a> is not allowed. There is a technique to parse a query and use the regexp back reference as a value, but you&#8217;ll have an encoded value as a result. We need a real request parameter, because in this case the value will be decoded.<br />
To make it clear I&#8217;ll give some illustration:<br />
1. The ideal solution if UrlRewrite supported it would be:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="sc3"><span class="re1">&lt;rule<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;condition</span> <span class="re0">type</span>=<span class="st0">&quot;query-string&quot;</span><span class="re2">&gt;</span></span>^CJURL=(.*)$<span class="sc3"><span class="re1">&lt;/condition<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;from<span class="re2">&gt;</span></span></span>^(.*$)<span class="sc3"><span class="re1">&lt;/from<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;to</span> <span class="re0">type</span>=<span class="st0">&quot;redirect&quot;</span><span class="re2">&gt;</span></span>%{parameter:CJURL}<span class="sc3"><span class="re1">&lt;/to<span class="re2">&gt;</span></span></span><br />
&nbsp;</div>
<p>But as I stated earlier, unfortunately we can&#8217;t use request parameter value in &lt;to&gt; clause.</p>
<p>2. If we had a simple parameter like [a-zA-z0-9] without special symbols used in regular URL we can parse it from query string. This approach can be used in beautifying urls according to REST style:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="sc3"><span class="re1">&lt;rule<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;rule</span> <span class="re0">match-type</span>=<span class="st0">&quot;wildcard&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;from<span class="re2">&gt;</span></span></span>/*/*/*<span class="sc3"><span class="re1">&lt;/from<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;to</span> <span class="re0">type</span>=<span class="st0">&quot;forward&quot;</span><span class="re2">&gt;</span></span>/$1.do?$2=$3<span class="sc3"><span class="re1">&lt;/to<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;/rule<span class="re2">&gt;</span></span></span> <br />
&nbsp;</div>
<p>But we need to decode this strings, because we can&#8217;t redirect to <strong>http%3a%2f%2fexample.com</strong> before we convert it to <strong>http://example.com</strong>. This conversion is done by container when you ask for a request parameter value. Therefore this solution WON&#8217;T work either:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="sc3"><span class="re1">&lt;rule<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;condition</span> <span class="re0">type</span>=<span class="st0">&quot;query-string&quot;</span><span class="re2">&gt;</span></span>^CJURL=(.*)$<span class="sc3"><span class="re1">&lt;/condition<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;from<span class="re2">&gt;</span></span></span>^(.*)?CJURL=(.*)$<span class="sc3"><span class="re1">&lt;/from<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;to</span> <span class="re0">type</span>=<span class="st0">&quot;redirect&quot;</span><span class="re2">&gt;</span></span>$2<span class="sc3"><span class="re1">&lt;/to<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;/rule<span class="re2">&gt;</span></span></span><br />
&nbsp;</div>
<p>3. Luckily we can use in &lt;to&gt; clause a request attribute. The only problem we have to solve is to write the request parameter value to request attribute somehow, and then read this attribute in &lt;to&gt; clause. I didn&#8217;t investigate heavily is it possible using UrlRewrite declarative facilities and employed another great option: calling self rolled Java code. The final version is something like:<br />
urlrewrite.xml:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="sc3"><span class="coMULTI">&lt;!&#8211; Affiliates tracking &#8211;&gt;</span></span><br />
<span class="sc3"><span class="re1">&lt;rule<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;note<span class="re2">&gt;</span></span></span>Commission Junction affiliate program<span class="sc3"><span class="re1">&lt;/note<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;condition</span> <span class="re0">type</span>=<span class="st0">&quot;query-string&quot;</span><span class="re2">&gt;</span></span>^CJURL=(.*)$<span class="sc3"><span class="re1">&lt;/condition<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;from<span class="re2">&gt;</span></span></span>^(.*)?CJURL=(.*)$<span class="sc3"><span class="re1">&lt;/from<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;run</span> <span class="re0">class</span>=<span class="st0">&quot;com.example.web.util.RequestToAttributeSetter&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;init-param<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;param-name<span class="re2">&gt;</span></span></span>parameterName<span class="sc3"><span class="re1">&lt;/param-name<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;param-value<span class="re2">&gt;</span></span></span>CJURL<span class="sc3"><span class="re1">&lt;/param-value<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/init-param<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/run<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;/rule<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;rule<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;condition</span> <span class="re0">type</span>=<span class="st0">&quot;query-string&quot;</span><span class="re2">&gt;</span></span>^CJURL=(.*)$<span class="sc3"><span class="re1">&lt;/condition<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;from<span class="re2">&gt;</span></span></span>^(.*)?CJURL=(.*)$<span class="sc3"><span class="re1">&lt;/from<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;to</span> <span class="re0">type</span>=<span class="st0">&quot;redirect&quot;</span><span class="re2">&gt;</span></span>%{attribute:CJURL}<span class="sc3"><span class="re1">&lt;/to<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="coMULTI">&lt;!&#8211; Affiliate service provider &#8211;&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="coMULTI">&lt;!&#8211; expire time in minutes &#8211;&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;set</span> <span class="re0">type</span>=<span class="st0">&quot;cookie&quot;</span> <span class="re0">name</span>=<span class="st0">&quot;asp&quot;</span><span class="re2">&gt;</span></span>cj::86400<span class="sc3"><span class="re1">&lt;/set<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;/rule<span class="re2">&gt;</span></span></span><br />
&nbsp;</div>
<p>Java code:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="kw2">package</span> com.<span class="me1">example</span>.<span class="me1">web</span>.<span class="me1">util</span>;</p>
<p><span class="co2">import javax.servlet.ServletConfig;</span><br />
<span class="co2">import javax.servlet.ServletRequest;</span><br />
<span class="co2">import javax.servlet.ServletResponse;</span><br />
<span class="co2">import javax.servlet.http.HttpServletRequest;</span></p>
<p><span class="coMULTI">/**<br />
&nbsp;* Workaround of UrlRewrite filter restriction which doesn&#8217;t allow setting request parameter as<br />
&nbsp;* an redirect target in &lt;to&gt; tag. &lt;br/&gt;<br />
&nbsp;* Similar solution: http://sujitpal.blogspot.com/2006/09/search-and-replace-with.html<br />
&nbsp;* @author Andrey Gomilko<br />
&nbsp;*/</span><br />
<span class="kw2">public</span> <span class="kw2">class</span> RequestToAttributeSetter <span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> parameterName;</p>
<p>&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> run<span class="br0">&#40;</span>ServletRequest request, ServletResponse response<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>parameterName != <span class="kw2">null</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HttpServletRequest req = <span class="br0">&#40;</span>HttpServletRequest<span class="br0">&#41;</span> request;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Object</span></a> value = req.<span class="me1">getParameter</span><span class="br0">&#40;</span>parameterName<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; req.<span class="me1">setAttribute</span><span class="br0">&#40;</span>parameterName, value<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> init<span class="br0">&#40;</span>ServletConfig config<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">this</span>.<span class="me1">parameterName</span> = config.<span class="me1">getInitParameter</span><span class="br0">&#40;</span><span class="st0">&quot;parameterName&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> destroy<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p><span class="br0">&#125;</span></p>
<p>&nbsp;</p></div>
<h2>Unit testing of UrlRewrite configuration</h2>
<p>Let&#8217;s assume you have already written your own <strong>urlrewrite.xml</strong> file with filter configuration and want to test it. If you decide testing rules on the working server (e.g. Tomcat), you&#8217;ll have to restart it every time you have changed something. More convenient way is to use JUnit tests for this purpose. Fortunately URLRewrite has all necessary internal classes and request/response mock classes  to dry run this filter without container and analyze the result. The very good example which covers basic use cases is <a href="http://sujitpal.blogspot.com/search/label/junit">A JUnit test for UrlRewriteFilter</a>. To test rules corresponding to CJ example we need to test cookies in addition to standard tests. Since our UrlRewrite rule is based on the <strong>host</strong>  HTTP header value, you have to set header values to the MockRequest because it doesn&#8217;t parse propagated url itself. To test CJ example, I got as a base the test snippet from <a href="http://sujitpal.blogspot.com/search/label/junit">A JUnit test for UrlRewriteFilter</a> and added some specific methods:</p>
<div class="dean_ch" style="white-space: wrap;">
&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw4">void</span> assertRedirect<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> fromUrl, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> toUrl, Cookie cookie<span class="br0">&#41;</span> <span class="kw2">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Exception</span></a> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; UrlRewriter rewriter = <span class="kw2">new</span> UrlRewriter<span class="br0">&#40;</span>conf<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; MockRequest request = <span class="kw2">new</span> MockRequest<span class="br0">&#40;</span>fromUrl<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">try</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AURL+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">URL</span></a> url = <span class="kw2">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AURL+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">URL</span></a><span class="br0">&#40;</span>fromUrl<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; request.<span class="me1">addHeader</span><span class="br0">&#40;</span><span class="st0">&quot;host&quot;</span>, url.<span class="me1">getHost</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>url.<span class="me1">getQuery</span><span class="br0">&#40;</span><span class="br0">&#41;</span> != <span class="kw2">null</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; request.<span class="me1">setQueryString</span><span class="br0">&#40;</span>url.<span class="me1">getQuery</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AStringTokenizer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">StringTokenizer</span></a> st = <span class="kw2">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AStringTokenizer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">StringTokenizer</span></a><span class="br0">&#40;</span>url.<span class="me1">getQuery</span><span class="br0">&#40;</span><span class="br0">&#41;</span>, <span class="st0">&quot;&amp;&quot;</span><span class="br0">&#41;</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">while</span><span class="br0">&#40;</span>st.<span class="me1">hasMoreElements</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> token = st.<span class="me1">nextToken</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a><span class="br0">&#91;</span><span class="br0">&#93;</span> parts = token.<span class="me1">split</span><span class="br0">&#40;</span><span class="st0">&quot;=&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> name = parts<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> value = parts<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; request.<span class="me1">addParameter</span><span class="br0">&#40;</span>name, java.<span class="me1">net</span>.<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AURLDecoder+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">URLDecoder</span></a>.<span class="me1">decode</span><span class="br0">&#40;</span>value, <span class="st0">&quot;UTF-8&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw2">catch</span><span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AMalformedURLException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">MalformedURLException</span></a> me<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="co1">// do nothing </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; MockResponse response = <span class="kw2">new</span> MockResponse<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; RewrittenUrl rewrittenUrl = rewriter.<span class="me1">processRequest</span><span class="br0">&#40;</span>request, response<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; assertNotNull<span class="br0">&#40;</span><span class="st0">&quot;Could not redirect URL from:&quot;</span> + fromUrl + <span class="st0">&quot; to:&quot;</span> + toUrl, rewrittenUrl<span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span class="br0">&#40;</span><span class="st0">&quot;Redirect from:&quot;</span> + fromUrl + <span class="st0">&quot; to:&quot;</span> + toUrl + <span class="st0">&quot; did not succeed&quot;</span>, toUrl<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , rewrittenUrl.<span class="me1">getTarget</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; assertTrue<span class="br0">&#40;</span>rewrittenUrl.<span class="me1">isRedirect</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; </p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AList+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">List</span></a> cookies = response.<span class="me1">getCookies</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span class="br0">&#40;</span><span class="nu0">1</span>, cookies.<span class="me1">size</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Cookie setCookie = <span class="br0">&#40;</span>Cookie<span class="br0">&#41;</span>cookies.<span class="me1">get</span><span class="br0">&#40;</span><span class="nu0">0</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span class="br0">&#40;</span>cookie.<span class="me1">getMaxAge</span><span class="br0">&#40;</span><span class="br0">&#41;</span>, setCookie.<span class="me1">getMaxAge</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span class="br0">&#40;</span>cookie.<span class="me1">getName</span><span class="br0">&#40;</span><span class="br0">&#41;</span>, setCookie.<span class="me1">getName</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span class="br0">&#40;</span>cookie.<span class="me1">getValue</span><span class="br0">&#40;</span><span class="br0">&#41;</span>, setCookie.<span class="me1">getValue</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> testCJRewriteDecoded<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw2">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Exception</span></a> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> fromUrl = <span class="st0">&quot;http://example.com/?CJURL=http%3a%2f%2fexample.com%2fregister%2fnew.html&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> toUrl = <span class="st0">&quot;http://example.com/reqister/new.html&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; Cookie cookie = <span class="kw2">new</span> Cookie<span class="br0">&#40;</span><span class="st0">&quot;asp&quot;</span>, <span class="st0">&quot;cj&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; cookie.<span class="me1">setMaxAge</span><span class="br0">&#40;</span><span class="nu0">86400</span><span class="br0">&#41;</span>; <span class="co1">// 24h</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; assertRedirect<span class="br0">&#40;</span>fromUrl, toUrl, cookie<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp;</div>
<h2>Conclusion</h2>
<p>The main idea of such tools is to reduce coding and transfer all possible application logic to the well-proven tools which can be easily tuned through configuration files. This approach eliminates number of possible bugs and keep tied logic in one place. So, before writing your own filter, think once more about UrlRewrite, probably it&#8217;ll fit your needs!</p>
<p>And stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gomilko.com/2007/07/16/playing-with-urlrewrite-filter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Moving to Eclipse Europa for J2EE programmer</title>
		<link>http://blog.gomilko.com/2007/07/10/moving-to-eclipse-europa-for-j2ee-programmer/</link>
		<comments>http://blog.gomilko.com/2007/07/10/moving-to-eclipse-europa-for-j2ee-programmer/#comments</comments>
		<pubDate>Tue, 10 Jul 2007 21:22:26 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Perl]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.gomilko.com/2007/07/10/moving-to-eclipse-europa-for-j2ee-programmer/</guid>
		<description><![CDATA[Europa release
With a short delay after Europa release announcement, I&#8217;ve moved to it. Thanks to the fact that Eclipse doesn&#8217;t require an installation process and can be just unzipped and run, the last few times I got the tuned Eclipse from my co-workers. Those distributions were well-tuned for J2EE development, with all necessary plugins, project [...]]]></description>
			<content:encoded><![CDATA[<h3>Europa release</h3>
<p>With a short delay after Europa release announcement, I&#8217;ve moved to it. Thanks to the fact that Eclipse doesn&#8217;t require an installation process and can be just unzipped and run, the last few times I got the tuned Eclipse from my co-workers. Those distributions were well-tuned for J2EE development, with all necessary plugins, project <a href="http://checkstyle.sourceforge.net/">checkstyles</a>, attached sources and so on. Seeing as this time nobody around me offered me such a favor, I did everything on my own.<br />
Actually, to develop a J2EE project, you need to install a dozen of plugins (depends on which frameworks are employed) in addition to the bare distribution, so it&#8217;s better to have a cheat sheet every time you start this Eclipse tuning campaign. Since I didn&#8217;t have such a plan, I used my current Eclipse 3.1 working set as an example.<br />
This time, I wrote some short notes during the installation process, and I&#8217;d like to share it here, to have something in the future to stick with.</p>
<h3>Download</h3>
<p>Firstly, you need to download an appropriate Eclipse distribution. However there is already a bundle for J2EE developer, I was interested in installing everything I want from the scratch. Therefore I went to <a href="http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a> and downloaded <strong>Eclipse Classic</strong> distribution for Windows (140 MB). It was extracted to C:\Java\eclipse3.3 directory where I store all Java stuff like IDEs, JDKs, etc. Then, as usually I wanted to create a custom shortcut with extended memory allocation for Eclipse, but suddenly noticed <strong>eclipse.ini</strong> file. To allow Eclipse allocation of more memory, just edit the <strong>eclipse.ini</strong> file (increase Xms and Xmx values):</p>
<div class="dean_ch" style="white-space: wrap;">
-showsplash<br />
org.eclipse.platform<br />
&#8211;launcher.XXMaxPermSize<br />
256m<br />
-vmargs<br />
-Xms256m<br />
-Xmx512m<br />
&nbsp;</div>
<h3>Web tools</h3>
<p><em>Some general notes.</em> All plugins can be installed in two common ways: through cute <strong>Help->Software Updates->Find and Install&#8230;</strong> and copying all unzipped stuff to <strong>ECLIPSE_HOME/plugins</strong> directory. Of course I prefer the first option, and every plugin I&#8217;ll be installing through this wizard, except of Sysdeo.<br />
By &#8220;default plugins&#8221; I mean plugins which can be installed through &#8220;Europa Discovery Site&#8221; (run the mentioned wizard and find it to be accustomed, if not yet).</p>
<p>From the past experience I knew that I was using a <a href="http://www.eclipse.org/webtools">WTP</a> (stands for Web Tools Platform) plugin for web development. The problem was that there were no mentioned WTP plugin on the &#8220;Europa Discovery Site&#8221;. I carried brief investigation and dig out that the main part of that plugin is a <a href="http://www.eclipse.org/webtools/wst/main.php">WST</a> subproject (the web standard tools subproject).<br />
Steps to reproduce after <strong>Help->Software Updates->Find and Install&#8230;</strong>:<br />
<img src="http://gallery.gomilko.com/d/2452-1/WST.png" alt="WST plugin" /><br />
When I checked WST check box, the wizard apparently gave a tip to select all dependent (required by WST) things too. After I installed a WST, the link to WTP update site suddenly appeared (I guess that it was due to WST), and I decided to install it to have a full stack.<br />
<img src="http://gallery.gomilko.com/d/2459-1/WTP.png" alt="WTP plugin" /></p>
<h3>Subversion integration</h3>
<p>When I installed all useful tools from the Europa repository, I moved to things which update sites have to be added manually. The process is almost the same as when we were updating standard components, the only difference is the update site where the plugin is stored. We need to add http://subclipse.tigris.org/update_1.2.x as a <strong>New Remote Site&#8230;</strong><br />
<img src="http://gallery.gomilko.com/d/2457-1/updateManager.png" alt="Update manager" /></p>
<h3>Tomcat launcher</h3>
<p>The simplest and the most valuable plugin for Eclipse invoking I ever used is a <a href="http://www.eclipsetotale.com/tomcatPlugin.html">Sysdeo</a> Tomcat launcher. Download the archive and install according to Installation section steps. Here, the unzipped archive should be placed manually to the <strong>ECLIPSE_HOME/plugins</strong> directory.<br />
<img src="http://gallery.gomilko.com/d/2455-1/sysdeoButtons.png" alt="Sysdeo butons" /></p>
<h3>Useful tools</h3>
<p>As you know how to install plugins, I&#8217;ll mention only links to update site:</p>
<ol>
<li><a href="http://eclipse-cs.sourceforge.net/update">http://eclipse-cs.sourceforge.net/update</a> - checkstyle plugin, helps to maintain your coding style due to different available code conventions (Sun, Eclipse, your own)
</li>
<li>
<a href="http://springide.org/updatesite/SpringIDE">http://springide.org/updatesite/SpringIDE</a> - Spring related things like bean definitions, xml configuration auto completion
</li>
<li>
<a href="http://e-p-i-c.sf.net/updates">http://e-p-i-c.sf.net/updates</a> - Perl IDE, just for fun to play with RegExps or to write some admin tools
</li>
<li>
<a href="http://www.fabioz.com/pydev/updates">http://www.fabioz.com/pydev/updates</a> - PyDev (Python IDE) not to be restricted only by Java world and be more broadminded
</li>
<li>
<a href="http://eclipse-tools.sourceforge.net/implementors/">http://eclipse-tools.sourceforge.net/implementors/</a> - nice Alt+F3 short key usage, allows quick jumps to implementation from interfaces.
</li>
</ol>
<p>Stay tuned!<br />
P.S. I know that saying this phrase is almost as popular as mentioning iPhone in the blog post <img src='http://blog.gomilko.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gomilko.com/2007/07/10/moving-to-eclipse-europa-for-j2ee-programmer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Infinitoy - the best building kit for little children</title>
		<link>http://blog.gomilko.com/2007/07/02/infinitoy-the-best-building-kit-for-little-children/</link>
		<comments>http://blog.gomilko.com/2007/07/02/infinitoy-the-best-building-kit-for-little-children/#comments</comments>
		<pubDate>Mon, 02 Jul 2007 07:16:29 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Shopping]]></category>

		<category><![CDATA[Social]]></category>

		<guid isPermaLink="false">http://blog.gomilko.com/2007/07/02/infinitoy-the-best-building-kit-for-little-children/</guid>
		<description><![CDATA[This weekend I found out probably the best gift for a little child. I&#8217;ve got a 4 years old nephew, and I had to choose a toy to make him a present and congratulate on his birthday. Me and my dear wife spent about 2 hours choosing a right toy and eventually we bought an [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend I found out probably the best gift for a little child. I&#8217;ve got a 4 years old nephew, and I had to choose a toy to make him a present and congratulate on his birthday. Me and my dear wife spent about 2 hours choosing a right toy and eventually we bought an <a href="http://www.infinitoy.com/zoob/zoob250.shtml">Infinitoy ZOOB</a> building kit. We couldn&#8217;t wait to present it and play ourselves.<br />
<a href="/v/blog/IMG_1863.JPG.html"><img src="http://gallery.gomilko.com/d/2442-2/IMG_1863.JPG" width="150" height="113" alt="Infinitoy" title="Infinitoy" /></a><br />
The kit contains lots of pieces of four different kind. Each piece is made from very durable bright colored plastic and has a <a href="http://www.infinitoy.com/zoob/productwarranty.shtml">life-term guarantee</a>, so every broken piece can be replaced for nothing. The pieces work like a joints and can be connected with each other to form different shapes, creatures and vehicles. I think that it is very helpful in child creativity skills development. Beginning from the simplest shapes like snake, a child learn variety of bright constructs from the manual.<br />
To sum up, I&#8217;d recommend to buy it if you&#8217;re looking for a good gift which might bring fun to both child and parents. In Kiev you can buy 250 pieces set for about 60$. Also there are some cheaper sets with less number of pieces.<br />
<a href="/v/blog/IMG_1864.JPG.html"><img src="http://gallery.gomilko.com/d/2445-2/IMG_1864.JPG" width="150" height="113" alt="Bike" title="Bike" /></a> <a href="/v/blog/IMG_1865.JPG.html"><img src="http://gallery.gomilko.com/d/2448-2/IMG_1865.JPG" width="150" height="113" alt="plastic scorpion" title="plastic scorpion" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gomilko.com/2007/07/02/infinitoy-the-best-building-kit-for-little-children/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sonopia picnic on the Kiev Sea</title>
		<link>http://blog.gomilko.com/2007/06/26/sonopia-picnic-on-the-kiev-sea/</link>
		<comments>http://blog.gomilko.com/2007/06/26/sonopia-picnic-on-the-kiev-sea/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 17:17:59 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Nature]]></category>

		<category><![CDATA[Job]]></category>

		<category><![CDATA[Social]]></category>

		<guid isPermaLink="false">http://blog.gomilko.com/2007/06/26/sonopia-picnic-on-the-kiev-sea/</guid>
		<description><![CDATA[Last Saturday we had a picnic with co-workers from Sonopia. It was my first time when I was on the Kiev Sea, moreover it was opening of the swimming season for me. There were lost of sports activity, delicious meals (especially grilled meat) and social chatting.
The most thing I liked at that day, that there [...]]]></description>
			<content:encoded><![CDATA[<p>Last Saturday we had a picnic with co-workers from <a href="http://sonopia.com">Sonopia</a>. It was my first time when I was on the Kiev Sea, moreover it was opening of the swimming season for me. There were lost of sports activity, delicious meals (especially grilled meat) and social chatting.<br />
The most thing I liked at that day, that there were no any commandments from anybody, and people were relaxed and were doing things they liked. At the same time, It seems that everybody was involved almost in at least couple of activities like playing football, swimming or supporting the campfire. Excellent rest for the excellent team <img src='http://blog.gomilko.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="one-image"><a href="/v/sonopia-picnic-june-2007/IMG_3299.jpg.html" ><img src="http://gallery.gomilko.com/d/2427-2/IMG_3299.jpg" width="150" height="100" class="giThumbnail" alt="playing football" longdesc=""/></a></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.gomilko.com/2007/06/26/sonopia-picnic-on-the-kiev-sea/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
