<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Information Technology Management &#38; Development</title>
	<atom:link href="http://blogs.yellowfish.biz/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.yellowfish.biz</link>
	<description>IT Consulting, Infrastructure, Software &#38; Voip Phone Systems</description>
	<lastBuildDate>Tue, 27 Jul 2010 20:04:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A Simple Perl Proxy Server</title>
		<link>http://blogs.yellowfish.biz/2010/a-simple-perl-proxy-server/</link>
		<comments>http://blogs.yellowfish.biz/2010/a-simple-perl-proxy-server/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 20:04:04 +0000</pubDate>
		<dc:creator>Praveen Ray</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://blogs.yellowfish.biz/?p=375</guid>
		<description><![CDATA[perl proxy server, logging incoming web requests and responses]]></description>
			<content:encoded><![CDATA[<p>A simple perl proxy server which listens for web requests and log them to a file. Very useful for debugging web requests on the server side.  Especially traditional form POSTs , which are not displayed by FireBug. </p>
<p>Usage:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #339933;">&gt;</span> <span style="color: #339933;">./</span>proxy<span style="color: #339933;">-</span>server<span style="color: #339933;">.</span>pl</pre></div></div>

<p>Change your browser to use a proxy server. Point it to the host running this script and port 8001.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> HTTP<span style="color: #339933;">::</span><span style="color: #006600;">Proxy</span> <span style="color: #000066;">qw</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">:</span><span style="color: #000066;">log</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> HTTP<span style="color: #339933;">::</span><span style="color: #006600;">Proxy</span><span style="color: #339933;">::</span><span style="color: #006600;">BodyFilter</span><span style="color: #339933;">::</span><span style="color: #006600;">simple</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> HTTP<span style="color: #339933;">::</span><span style="color: #006600;">Proxy</span><span style="color: #339933;">::</span><span style="color: #006600;">BodyFilter</span><span style="color: #339933;">::</span><span style="color: #006600;">complete</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Data<span style="color: #339933;">::</span><span style="color: #006600;">Dumper</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$proxy</span> <span style="color: #339933;">=</span> HTTP<span style="color: #339933;">::</span><span style="color: #006600;">Proxy</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span>port <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">8001</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$proxy</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">host</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">undef</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">#$proxy-&gt;logmask(ALL);</span>
&nbsp;
<span style="color: #0000ff;">$proxy</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">push_filter</span><span style="color: #009900;">&#40;</span>
    mime <span style="color: #339933;">=&gt;</span> <span style="color: #000066;">undef</span><span style="color: #339933;">,</span>
    response <span style="color: #339933;">=&gt;</span> HTTP<span style="color: #339933;">::</span><span style="color: #006600;">Proxy</span><span style="color: #339933;">::</span><span style="color: #006600;">BodyFilter</span><span style="color: #339933;">::</span><span style="color: #006600;">complete</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$proxy</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">push_filter</span><span style="color: #009900;">&#40;</span>
    mime <span style="color: #339933;">=&gt;</span> <span style="color: #000066;">undef</span><span style="color: #339933;">,</span>
    request <span style="color: #339933;">=&gt;</span> HTTP<span style="color: #339933;">::</span><span style="color: #006600;">Proxy</span><span style="color: #339933;">::</span><span style="color: #006600;">BodyFilter</span><span style="color: #339933;">::</span><span style="color: #006600;">simple</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$self</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$dataref</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$req</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$protocol</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$buffer</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
        <span style="color: #000066;">open</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$fh</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'&gt;&gt;'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">||</span> <span style="color: #ff0000;">'http-recorder.txt'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$cookie</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$req</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">header</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'cookie'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$xhr</span>    <span style="color: #339933;">=</span> <span style="color: #0000ff;">$req</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">header</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'x-requested-with'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066;">print</span> <span style="color: #0000ff;">$fh</span> <span style="color: #0000ff;">$req</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">method</span><span style="color: #339933;">,</span><span style="color: #ff0000;">' '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$req</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">uri</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@headers</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$cookie</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@headers</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span><span style="color: #ff0000;">'cookie'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$cookie</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> 
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$xhr</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@headers</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span><span style="color: #ff0000;">'x-requested-with'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$xhr</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$content_type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$req</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">header</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'content-type'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$content_type</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@headers</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span><span style="color: #ff0000;">'content-type'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$content_type</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@headers</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">local</span> <span style="color: #0000ff;">$Data</span><span style="color: #339933;">::</span><span style="color: #006600;">Dumper</span><span style="color: #339933;">::</span><span style="color: #006600;">Indent</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> 
            <span style="color: #000066;">local</span> <span style="color: #0000ff;">$Data</span><span style="color: #339933;">::</span><span style="color: #006600;">Dumper</span><span style="color: #339933;">::</span><span style="color: #006600;">Varname</span><span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #339933;">;</span> 
            <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$str</span> <span style="color: #339933;">=</span> Data<span style="color: #339933;">::</span><span style="color: #006600;">Dumper</span><span style="color: #339933;">::</span><span style="color: #006600;">Dumper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\@headers</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #0000ff;">$str</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/^\$1\s+=\s+//</span><span style="color: #339933;">;</span>
            <span style="color: #000066;">print</span> <span style="color: #0000ff;">$fh</span> <span style="color: #ff0000;">&quot; HEADERS: $str&quot;</span> <span style="color: #b1b100;">if</span> <span style="color: #0000ff;">$str</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066;">print</span> <span style="color: #0000ff;">$fh</span> <span style="color: #ff0000;">'CONTENT: '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$req</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">content</span> <span style="color: #b1b100;">if</span> <span style="color: #0000ff;">$req</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">content</span><span style="color: #339933;">;</span>
        <span style="color: #000066;">print</span> <span style="color: #0000ff;">$fh</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$fh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">close</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	response <span style="color: #339933;">=&gt;</span> HTTP<span style="color: #339933;">::</span><span style="color: #006600;">Proxy</span><span style="color: #339933;">::</span><span style="color: #006600;">BodyFilter</span><span style="color: #339933;">::</span><span style="color: #006600;">simple</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span>
       <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$self</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$dataref</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$req</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$protocol</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$buffer</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
	   <span style="color: #000066;">open</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$fh</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'&gt;&gt;'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'http-response.txt'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	   <span style="color: #000066;">print</span> <span style="color: #0000ff;">$fh</span> <span style="color: #0000ff;">$$dataref</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
	   <span style="color: #0000ff;">$fh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">close</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># start the proxy</span>
<span style="color: #0000ff;">$proxy</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span></pre></div></div>

<p>It listens on port 8001 and writes headers and incoming data (including POSTed data) in a file called<strong> http-recorder.txt</strong> and outgoing response to <strong>http-response.txt</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.yellowfish.biz/2010/a-simple-perl-proxy-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GWT Development with Traditional Servlets</title>
		<link>http://blogs.yellowfish.biz/2010/gwt-development-with-traditional-servlets/</link>
		<comments>http://blogs.yellowfish.biz/2010/gwt-development-with-traditional-servlets/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 14:04:11 +0000</pubDate>
		<dc:creator>Praveen Ray</dc:creator>
				<category><![CDATA[Computer Languages]]></category>
		<category><![CDATA[Web Applications / User Interface Design]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[jetty]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blogs.yellowfish.biz/?p=363</guid>
		<description><![CDATA[If you&#8217;re developing GWT apps with traditional servlets (other than GWT-RPC) with your web server running as separate process, you can&#8217;t really send GWT Ajax messages from hosted mode since the outside process and port are considered to be another domain and GWT won&#8217;t send cross domain requests. One clean solution is to use a [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re developing GWT apps with traditional servlets (other than GWT-RPC) with your web server running as separate process, you can&#8217;t really send GWT Ajax messages from hosted mode since the outside process and port are considered to be another domain and GWT won&#8217;t send cross domain requests. One clean solution is to use a transparent proxy as hosted mode servlet and let that proxy talk to the real server. Here are the steps I took:<br />
Find following jars are copy them to  your GWT project:</p>
<pre code='java'>
{GWT-Project}/war/WEB-INF/lib
        jetty-http-7.1.3.v20100526.jar
        jetty-io-7.1.3.v20100526.jar
        jetty-servlets-7.1.3.v20100526.jar
        jetty-continuation-7.1.3.v20100526.jar
        jetty-util-7.1.3.v20100526.jar
        jetty-client-7.1.3.v20100526.jar
        jetty-jmx-7.1.3.v20100526.jar
</pre>
<p>Add these jars to Referenced Libraries -> Build Path -> Configure Build Path -> Libraries -> Add Jars.<br />
Don&#8217;t forget to make sure these jars are selected in &#8216;Order and Export&#8217; Tab.</p>
<p>Modify {GWT-Project}/war/WEB-INF/web.xml:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;web-app<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filter-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>JettyContinuationFilter<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filter-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filter-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.eclipse.jetty.continuation.ContinuationFilter<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filter-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filter-mapping<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filter-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>JettyContinuationFilter<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filter-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url-pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/app/*<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url-pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filter-mapping<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jetty-proxy-servlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.eclipse.jetty.servlets.ProxyServlet$Transparent<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;init-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ProxyTo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://localhost:8080/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/init-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;init-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Prefix<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/init-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;load-on-startup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/load-on-startup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-mapping<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jetty-proxy-servlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url-pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/app/*<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url-pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-mapping<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>   
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/web-app<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Now all your URLS in your GWT app starting with &#8216;/app&#8217; are normally forwarded to your traditional web server at localhost:8080.<br />
BTW, I got these jetty jars from my local maven .m2 repository. </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.yellowfish.biz/2010/gwt-development-with-traditional-servlets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GWT Server Servlet ClassNotFoundException</title>
		<link>http://blogs.yellowfish.biz/2010/gwt-server-servlet-classnotfoundexception/</link>
		<comments>http://blogs.yellowfish.biz/2010/gwt-server-servlet-classnotfoundexception/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 20:01:56 +0000</pubDate>
		<dc:creator>Praveen Ray</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blogs.yellowfish.biz/?p=359</guid>
		<description><![CDATA[If you&#8217;re getting ClassNotFoundException for your GWT server servlets, even though the class exists and is ok, you might want to check out the Build Path in Eclipse and make sure All libraries are selected in

 Java Build Path -&#62; Order and Export.

The error message could be confusing and misleading. Hope this tip saves you [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re getting ClassNotFoundException for your GWT server servlets, even though the class exists and is ok, you might want to check out the Build Path in Eclipse and make sure All libraries are selected in</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"> Java Build Path <span style="color: #339933;">-&gt;</span> Order and Export.</pre></div></div>

<p>The error message could be confusing and misleading. Hope this tip saves you some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.yellowfish.biz/2010/gwt-server-servlet-classnotfoundexception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring Unit Tests</title>
		<link>http://blogs.yellowfish.biz/2010/spring-unit-tests/</link>
		<comments>http://blogs.yellowfish.biz/2010/spring-unit-tests/#comments</comments>
		<pubDate>Wed, 26 May 2010 14:22:39 +0000</pubDate>
		<dc:creator>Praveen Ray</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[unit-test]]></category>

		<guid isPermaLink="false">http://blogs.yellowfish.biz/?p=353</guid>
		<description><![CDATA[Dependency Injection is supposed to make your life easier when it comes to writing Unit and Integration Tests; assuming you do your homework right and indeed make use of Injection. With Spring 3 annotations like @Autowired and configurations like , there really is no excuse for sloppiness.
Here&#8217;s is how to reap the rewards of DI [...]]]></description>
			<content:encoded><![CDATA[<p>Dependency Injection is supposed to make your life easier when it comes to writing Unit and Integration Tests; assuming you do your homework right and indeed make use of Injection. With Spring 3 annotations like @Autowired and configurations like <context:spring-configured/>, there really is no excuse for sloppiness.<br />
Here&#8217;s is how to reap the rewards of DI when writing unit tests. You can dependency inject each Test Class using same @Autowired annotation that you use for your normal classes.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.junit.runner.RunWith</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.springframework.test.context.ContextConfiguration</span><span style="color: #339933;">;</span>
&nbsp;
@RunWith<span style="color: #009900;">&#40;</span>SpringJUnit4ClassRunner.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span>
@ContextConfiguration<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;classpath:spring-config.xml&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MyClassTest <span style="color: #009900;">&#123;</span>
   @Autowired
   <span style="color: #000000; font-weight: bold;">private</span> TransferMoneyStrategy strategy <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
   ....
   @Test
   <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> test_transfer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #666666; font-style: italic;">// write Asserts here</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Key is the annotation @ContextConfiguration &#8211; one line is all you need to boot up entire Spring infrastructure!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.yellowfish.biz/2010/spring-unit-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HSQLDB woes</title>
		<link>http://blogs.yellowfish.biz/2010/hsqldb-woes/</link>
		<comments>http://blogs.yellowfish.biz/2010/hsqldb-woes/#comments</comments>
		<pubDate>Wed, 05 May 2010 02:07:18 +0000</pubDate>
		<dc:creator>Praveen Ray</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.yellowfish.biz/?p=349</guid>
		<description><![CDATA[Is it just me or HSQLDB really has issues with BLOBs in general. I tried using it with Jetty and the server would throw random IndexOutOfBound Exceptions. Not the client but HSQLDB server! It would become unresponsive after the exception and nothing short of dropping and recreating the database would work.
Quite disappointing I must say. [...]]]></description>
			<content:encoded><![CDATA[<p>Is it just me or <a href="http://www.hsqldb.org/">HSQLDB</a> really has issues with BLOBs in general. I tried using it with Jetty and the server would throw random IndexOutOfBound Exceptions. Not the client but HSQLDB server! It would become unresponsive after the exception and nothing short of dropping and recreating the database would work.</p>
<p>Quite disappointing I must say. I tried running it with a connection pool of one but still  same issue.</p>
<p>Going back to MySQL . It&#8217;s a shame since HSQL is so much easier to bundle and distribute.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.yellowfish.biz/2010/hsqldb-woes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSV Parsing with Erlang</title>
		<link>http://blogs.yellowfish.biz/2009/csv-parsing-with-erlang/</link>
		<comments>http://blogs.yellowfish.biz/2009/csv-parsing-with-erlang/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 14:00:47 +0000</pubDate>
		<dc:creator>Praveen Ray</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blogs.yellowfish.biz/?p=320</guid>
		<description><![CDATA[CVS Parsing code with Erlang using OTP gen_fsm]]></description>
			<content:encoded><![CDATA[<p>Since <a href="http://www.erlang.org/doc/">OTP</a> doesn&#39;t provide any CSV parsing capabilities, I decided to write my own based upon <a href="http://www.erlang.org/doc/man/gen_fsm.html">gen_fsm</a>. Following the short explanation given in Perl&#39;s <a href="http://search.cpan.org/~hmbrand/Text-CSV_XS-0.69/CSV_XS.pm#SPECIFICATION">Text::CSV_XS</a> module, I implemented a simple state machine. Erlang&#39;s excellent binary processing capabilities and built in gen_fsm behavior make the code compact, and surprisingly easy to implement. You can download the code from <a href="http://www.yellowfish.biz/code/parse_csv.erl">here</a>. A short explanation follows.</p>
<p>The state machine has only following handful of states:</p>
<h4>start_field</h4>
<p>Start reading a CSV field &#8211; it might be double quoted and might have special chars such as \r, \n, comma and double quote. Goto read_field or read_quoted_field, depending upon if a double quote started this field.</p>
<h4>read_field</h4>
<p>Once a field has started, we switch to this state and read binary bytes until and end of field condition is detected. End of Field is marked by either a comma or a newline.&nbsp;</p>
<h4>read_quoted_field</h4>
<p>We&#39;re inside a double quoted field; read everything until another double quote is encountered. A double quote might be end of this field or an embedded double quote marked with two consecutive double quotes. Switch to&nbsp;escaped_double_quote if a double quote is encountered.</p>
<h4>escaped_double_quote</h4>
<p>We come inside this field upon encountering a double quote inside read_quoted_field state. If another double quote is seen, it&#39;s an escaped double quote, else, it&#39;s nothing special. Both these cases go back to read_quoted_field.</p>
<h3>Usage</h3>
<p>Following public methods are exported:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;">parse_csv<span style="color: #009900;">&#40;</span>File_path<span style="color: #009900;">&#41;</span>
parse_csv<span style="color: #009900;">&#40;</span>Binary_blob<span style="color: #009900;">&#41;</span>
parse_csv<span style="color: #009900;">&#40;</span>File_path<span style="color: #339933;">,</span> Options<span style="color: #009900;">&#41;</span>
parse_csv<span style="color: #009900;">&#40;</span>Binary_blob<span style="color: #339933;">,</span> Options<span style="color: #009900;">&#41;</span></pre></div></div>

<p>where Options is:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span>callback_fn<span style="color: #339933;">,</span> Fun<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>callback_state<span style="color: #339933;">,</span> term<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span></pre></div></div>

<p>Fun is a function/2 and gets called with a List of Fields and callback state.</p>
<p>With no Options passed, the return is a list of list of Fields. With callback_fn passed, the Callback is called at the end of each line with a list of Fields.</p>
<h3>Examples:</h3>
<p><br/></p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;">parse_csv<span style="color: #339933;">:</span>parse_csv<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;/tmp/data.csv&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span></pre></div></div>

<p>Returns:</p>
<p>&nbsp;</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">&lt;&lt;</span><span style="color: #ff0000;">&quot;Date&quot;</span><span style="color: #339933;">&gt;&gt;,&lt;&lt;</span><span style="color: #ff0000;">&quot;Source&quot;</span><span style="color: #339933;">&gt;&gt;,&lt;&lt;</span><span style="color: #ff0000;">&quot;Destination&quot;</span><span style="color: #339933;">&gt;&gt;,</span>
  <span style="color: #339933;">&lt;&lt;</span><span style="color: #ff0000;">&quot;Seconds&quot;</span><span style="color: #339933;">&gt;&gt;,&lt;&lt;</span><span style="color: #ff0000;">&quot;CallerID&quot;</span><span style="color: #339933;">&gt;&gt;,&lt;&lt;</span><span style="color: #ff0000;">&quot;Disposition&quot;</span><span style="color: #339933;">&gt;&gt;,&lt;&lt;</span><span style="color: #ff0000;">&quot;Cost&quot;</span><span style="color: #339933;">&gt;&gt;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
 <span style="color: #009900;">&#91;</span><span style="color: #339933;">&lt;&lt;</span><span style="color: #ff0000;">&quot;2009-09-18 09:44:54&quot;</span><span style="color: #339933;">&gt;&gt;,&lt;&lt;</span><span style="color: #ff0000;">&quot;5097213333&quot;</span><span style="color: #339933;">&gt;&gt;,</span>
  <span style="color: #339933;">&lt;&lt;</span><span style="color: #ff0000;">&quot;18667778888&quot;</span><span style="color: #339933;">&gt;&gt;,&lt;&lt;</span><span style="color: #ff0000;">&quot;66&quot;</span><span style="color: #339933;">&gt;&gt;,&lt;&lt;</span><span style="color: #ff0000;">&quot;5098761323&quot;</span><span style="color: #339933;">&gt;&gt;,&lt;&lt;</span><span style="color: #ff0000;">&quot;ANSWERED&quot;</span><span style="color: #339933;">&gt;&gt;,</span>
  <span style="color: #339933;">&lt;&lt;</span><span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #339933;">&gt;&gt;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;">F <span style="color: #339933;">=</span> fun<span style="color: #009900;">&#40;</span>Fields<span style="color: #339933;">,</span> State<span style="color: #009900;">&#41;</span> <span style="color: #339933;">-&gt;</span> <span style="color: #006600;">io</span><span style="color: #339933;">:</span><span style="color: #000066;">format</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;~p~n&quot;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#91;</span>Fields<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> State <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span> end<span style="color: #339933;">.</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;">parse_csv<span style="color: #339933;">:</span>parse_csv<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;/tmp/data.csv&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span>callback_fn<span style="color: #339933;">,</span> F<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span>callback_state<span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span></pre></div></div>

<div>It calls F repeatedly. First with second parameter set to 0, then 1, then2 and so on. Note that your fun must return a modified state which becomes second parameter to callback_fn for the next line.</div>
<div>&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.yellowfish.biz/2009/csv-parsing-with-erlang/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Send Emails without installing SMTP server</title>
		<link>http://blogs.yellowfish.biz/2009/send-emails-without-installing-smtp-server/</link>
		<comments>http://blogs.yellowfish.biz/2009/send-emails-without-installing-smtp-server/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 17:57:52 +0000</pubDate>
		<dc:creator>Praveen Ray</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[google apps]]></category>
		<category><![CDATA[system-administration]]></category>

		<guid isPermaLink="false">http://blogs.yellowfish.biz/?p=298</guid>
		<description><![CDATA[&#160;Sending emails is easy. All you need is access to an SMTP server. Or local Sendmail daemon. Installing and configuring either of the two is a massive task. Even if you get it right, your ISP might not like you running SMTP server. If you are past ISP hurdle, chances are your emails will get [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;Sending emails is easy. All you need is access to an SMTP server. Or local Sendmail daemon. Installing and configuring either of the two is a massive task. Even if you get it right, your ISP might not like you running SMTP server. If you are past ISP hurdle, chances are your emails will get marked as SPAM for lack of Reverse DNS.</p>
<p>This is an easier way and we all know it &#8211; just use Google SMTP server. All you need is a gmail account or Google Apps account &#8211; and who doesn&#8217;t have a google account?</p>
<p>However, sometimes, the third party software you&#8217;re trying to configure to send emails doesn&#8217;t support anything other than localhost. Or it does but wants plain SMTP whereas Google does only TLS. Or simply, connecting to Google&#8217;s SMTP for each email takes few seconds and you want faster response.</p>
<p>Here&#8217;s a simple solution:</p>
<ul>
<li>Install the wonderful Email Relay program from <a href="http://emailrelay.sourceforge.net/">here</a></li>
<li>Create a file :

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;">vi <span style="color: #339933;">/</span>etc<span style="color: #339933;">/</span>google<span style="color: #339933;">.</span>email<span style="color: #339933;">.</span>auth</pre></div></div>

<p>    and add following line:&nbsp;</p>
<ul>
<li>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">login client yourgoogleemailid@gmail.<span style="color:#9900CC;">com</span> yourgooglepassword</pre></div></div>

</li>
</ul>
</li>
<li>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">chown daemon:root <span style="color:#006600; font-weight:bold;">/</span>etc<span style="color:#006600; font-weight:bold;">/</span>google.<span style="color:#9900CC;">email</span>.<span style="color:#9900CC;">auth</span>
chmod <span style="color:#006666;">400</span> <span style="color:#006600; font-weight:bold;">/</span>etc<span style="color:#006600; font-weight:bold;">/</span>google.<span style="color:#9900CC;">email</span>.<span style="color:#9900CC;">auth</span></pre></div></div>

</li>
<li>run emailrelay as: &nbsp;&nbsp;

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">emailrelay <span style="color:#006600; font-weight:bold;">--</span>as<span style="color:#006600; font-weight:bold;">-</span>proxy smtp.<span style="color:#9900CC;">gmail</span>.<span style="color:#9900CC;">com</span>:<span style="color:#006666;">587</span> <span style="color:#006600; font-weight:bold;">--</span>client<span style="color:#006600; font-weight:bold;">-</span>tls <span style="color:#006600; font-weight:bold;">--</span>client<span style="color:#006600; font-weight:bold;">-</span>auth <span style="color:#006600; font-weight:bold;">/</span>etc<span style="color:#006600; font-weight:bold;">/</span>google.<span style="color:#9900CC;">email</span>.<span style="color:#9900CC;">auth</span></pre></div></div>

</li>
<li>Configure your software to use localhost for SMTP server (Port defaulted to 25).</li>
</ul>
<p>Test your Local Emailer. If it doesn&#8217;t work, enable logging in <em>/</em><strong><em>etc/emailrelay.conf</em></strong> by uncommenting<strong> <em>verbose</em></strong> line and look into your syslog file (/var/log/syslog)</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.yellowfish.biz/2009/send-emails-without-installing-smtp-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving your wordpress blogs</title>
		<link>http://blogs.yellowfish.biz/2009/moving-your-wordpress-blogs/</link>
		<comments>http://blogs.yellowfish.biz/2009/moving-your-wordpress-blogs/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 21:58:16 +0000</pubDate>
		<dc:creator>Praveen Ray</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[blogs]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blogs.yellowfish.biz/?p=283</guid>
		<description><![CDATA[Recently I had to create a clone of this blog site so we can apply upgrades and test these out without fear of breaking our actual blogs. Here&#8217;s a list of steps I followed. Hopefully, it&#8217;ll help others.
Assumptions:

&#160;&#160; existing blog URL: http://a.com.
&#160;&#160; New blog URL: http://b.com/wordpress
&#160;&#160; Existing blog is installed in /var/www
&#160;&#160; New blog will [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had to create a clone of this blog site so we can apply upgrades and test these out without fear of breaking our actual blogs. Here&#8217;s a list of steps I followed. Hopefully, it&#8217;ll help others.</p>
<p>Assumptions:</p>
<ul>
<li>&nbsp;&nbsp; existing blog URL: http://a.com.</li>
<li>&nbsp;&nbsp; New blog URL: http://b.com/wordpress</li>
<li>&nbsp;&nbsp; Existing blog is installed in /var/www</li>
<li>&nbsp;&nbsp; New blog will be installed in /var/www/wordpress</li>
<li>&nbsp;&nbsp; The MySQL database for wordpress content is called &#8216;wordpress&#8217;. Username and passwords are also &#8216;wordpress&#8217;</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;">ssh root<span style="color: #0000ff;">@a</span><span style="color: #339933;">.</span>com
 cd <span style="color: #009966; font-style: italic;">/var/</span>
 tar cf wordpress<span style="color: #339933;">.</span>tar www
 bzip2 wordpress<span style="color: #339933;">.</span>tar
 mysqldump <span style="color: #339933;">--</span>add<span style="color: #339933;">-</span>drop<span style="color: #339933;">-</span>table<span style="color: #339933;">-</span>uwordpress <span style="color: #339933;">-</span>pwordpress <span style="color: #339933;">-</span>Dwordpress <span style="color: #339933;">-</span>hlocalhost <span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> db<span style="color: #339933;">.</span>backup
 bzip2 db<span style="color: #339933;">.</span>backup
 scp wordpress<span style="color: #339933;">.</span>tar<span style="color: #339933;">.</span>bz2 db<span style="color: #339933;">.</span>backup<span style="color: #339933;">.</span>bz2 root<span style="color: #0000ff;">@b</span><span style="color: #339933;">.</span>com<span style="color: #339933;">:/</span>var<span style="color: #339933;">/</span>www
ssh root<span style="color: #0000ff;">@b</span><span style="color: #339933;">.</span>com
 cd <span style="color: #339933;">/</span>var
 tar jxf wordpress<span style="color: #339933;">.</span>tar<span style="color: #339933;">.</span>bz2
 mysql <span style="color: #339933;">-</span>uroot <span style="color: #339933;">-</span>p<span style="color: #339933;">&lt;</span>mysql root<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;&quot;</span> pw<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #339933;">&gt;</span>         
 create database wordpress<span style="color: #339933;">;</span>
 GRANT ALL PRIVILEGES ON wordpress<span style="color: #339933;">.*</span> to <span style="color: #ff0000;">'wordpress'</span><span style="color: #339933;">@</span><span style="color: #ff0000;">'localhost'</span> identified by <span style="color: #ff0000;">'wordpress*'</span><span style="color: #339933;">;</span> 
 <span style="color: #000066;">exit</span><span style="color: #339933;">;</span>  
 cd <span style="color: #339933;">/</span>var<span style="color: #339933;">/</span>www  bunzip2 db<span style="color: #339933;">.</span>backup<span style="color: #339933;">.</span>bz2 
 mysql <span style="color: #339933;">-</span>uwordpress <span style="color: #339933;">-</span>p<span style="color: #ff0000;">'wordpress'</span> <span style="color: #339933;">-</span>Dwordpress <span style="color: #339933;">-</span>hlocalhost <span style="color: #339933;">&lt;</span> db<span style="color: #339933;">.</span>backup  
 cd <span style="color: #339933;">/</span>var<span style="color: #339933;">/</span>www
 <span style="color: #000066;">mkdir</span> wordpress 
 cd wordpress 
 mv <span style="color: #339933;">../</span>wordpress<span style="color: #339933;">.</span>tar<span style="color: #339933;">.</span>bz2 <span style="color: #339933;">.</span>   
 tar jxf wordpress<span style="color: #339933;">.</span>tar<span style="color: #339933;">.</span>bz2  
 mv www<span style="color: #339933;">/*</span> <span style="color: #339933;">.</span>  
 rm <span style="color: #339933;">-</span>rfwordpress<span style="color: #339933;">.</span>tar<span style="color: #339933;">.</span>bz2 www     
 cd <span style="color: #339933;">/</span>var<span style="color: #339933;">/</span>www    
 mysql<span style="color: #339933;">-</span>uwordpress <span style="color: #339933;">-</span>p<span style="color: #ff0000;">'wordpress'</span> <span style="color: #339933;">-</span>Dwordpress <span style="color: #339933;">-</span>hlocalhost
    update wp_posts set guid<span style="color: #339933;">=</span>REPLACE<span style="color: #009900;">&#40;</span>guid<span style="color: #339933;">,</span><span style="color: #ff0000;">'http://a.com'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'http://b.com/wordpress'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>         
    update wp_options set option_value<span style="color: #339933;">=</span><span style="color: #ff0000;">'http://b.com/wordpress/'</span> where option_name<span style="color: #339933;">=</span><span style="color: #ff0000;">'siteurl'</span><span style="color: #339933;">;</span>   
    <span style="color: #000066;">exit</span><span style="color: #339933;">;</span></pre></div></div>

<p>You should be able to login as admin at http://b.com/wordpress/wp-admin</p>
<p>Goto Settings/General and change all instances of http://a.com to http://b.com/wordpress</p>
<p>You might also have to goto your currently selected theme and make sure URLs are changed. Some themes have URLs embedded in them.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.yellowfish.biz/2009/moving-your-wordpress-blogs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Simple REST controller for Spring MVC</title>
		<link>http://blogs.yellowfish.biz/2009/a-simple-rest-controller-for-spring-mvc/</link>
		<comments>http://blogs.yellowfish.biz/2009/a-simple-rest-controller-for-spring-mvc/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 18:23:22 +0000</pubDate>
		<dc:creator>Praveen Ray</dc:creator>
				<category><![CDATA[Computer Languages]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[design pattern]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blogs.yellowfish.biz/?p=247</guid>
		<description><![CDATA[RESTful programming is all the rage these days &#8211; at least in Rails world. It&#39;s a simple way to perform request dispatching which is easy to understand and maps database CRUD operations into web requests elegantly. While Rails comes with REST routing built in, there is no such support in Spring MVC. However, Spring&#39;s decoupled [...]]]></description>
			<content:encoded><![CDATA[<p><span style="background-color: #ffffff;">RESTful programming is all the rage these days &#8211; at least in Rails world. It&#39;s a simple way to perform request dispatching which is easy to understand and maps database CRUD operations into web requests elegantly. While Rails comes with REST routing built in, there is no such support in Spring MVC. However, Spring&#39;s decoupled design makes it rather easy to implement. Here&#39;s code I wrote to implement RESTful dispatches using Spring MVC.(Also available as a download <a href="http://www.yellowfish.biz/code/RESTMethodResolver.java">here</a>)</span></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">com.yellowfish.servlets</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.servlet.http.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.apache.log4j.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.springframework.web.servlet.mvc.multiaction.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> RESTMethodResolver <span style="color: #000000; font-weight: bold;">implements</span> MethodNameResolver <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getHandlerMethodName<span style="color: #009900;">&#40;</span>HttpServletRequest req<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> NoSuchRequestHandlingMethodException <span style="color: #009900;">&#123;</span>
&nbsp;
        Logger log <span style="color: #339933;">=</span> Logger.<span style="color: #006633;">getLogger</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;com.yellowfish.servlets&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Resolving method name for the Request&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003399;">String</span> method <span style="color: #339933;">=</span> req.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;_method&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003399;">String</span> id     <span style="color: #339933;">=</span> req.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003399;">String</span> http_method <span style="color: #339933;">=</span> req.<span style="color: #006633;">getMethod</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toUpperCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003399;">String</span> controller_method <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
        log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;method: &quot;</span><span style="color: #339933;">+</span>method<span style="color: #339933;">+</span><span style="color: #0000ff;">&quot; http_method: &quot;</span> <span style="color: #339933;">+</span> http_method <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; id: &quot;</span><span style="color: #339933;">+</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>http_method.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;GET&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
            <span style="color: #003399;">String</span> uri <span style="color: #339933;">=</span> req.<span style="color: #006633;">getRequestURI</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            controller_method <span style="color: #339933;">=</span>  <span style="color: #009900;">&#40;</span>uri.<span style="color: #006633;">endsWith</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/new&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #0000ff;">&quot;_new&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;show&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>controller_method <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;show&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                controller_method <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>id <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #0000ff;">&quot;index&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;show&quot;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>http_method.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;POST&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>method <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                method <span style="color: #339933;">=</span> method.<span style="color: #006633;">toUpperCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>id <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>
&nbsp;
                    <span style="color: #000000; font-weight: bold;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> com.<span style="color: #006633;">yellowfish</span>.<span style="color: #006633;">servlets</span>.<span style="color: #006633;">ServletException</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;id cannot be NULL for PUT and DELETE&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>method.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;PUT&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
&nbsp;
                    controller_method <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;update&quot;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>method.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DELETE&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
&nbsp;
                    controller_method <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;delete&quot;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                controller_method <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;create&quot;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>controller_method <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
            log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;No Controller Method Found&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> NoSuchRequestHandlingMethodException<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">getClass</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span>
&nbsp;
        log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Controller method resolved to :&quot;</span> <span style="color: #339933;">+</span> controller_method<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        req.<span style="color: #006633;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;controller_method_name&quot;</span>, controller_method<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>id <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                req.<span style="color: #006633;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;model-id&quot;</span>, <span style="color: #003399;">Long</span>.<span style="color: #006633;">valueOf</span><span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">NumberFormatException</span> exp<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                log.<span style="color: #006633;">warn</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;id&quot;</span> <span style="color: #339933;">+</span> id <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; is not a Number&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">return</span> controller_method<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><span style="background-color: #ffffff;">Then simply declare this bean in the spring config:</span> <span style="background-color: #ffffff;"> </span></p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>bean class<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;com.yellowfish.servlets.RESTMethodResolver&quot;</span> id<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;rest-method-resolver&quot;</span><span style="color: #339933;">&gt;&lt;/</span>bean<span style="color: #339933;">&gt;</span></pre></div></div>

<p>It resolves incoming URL and Method as per following table:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table cellpadding="1" cellspacing="1" height="300" style="border:1px solid black;" width="550">
<caption>REST Resolver Rules</caption>
<tbody>
<tr>
<th align="center">URI</th>
<th align="center">GET/POST</th>
<th align="center">ID Parameter Present?</th>
<th align="center">_method Parameter Present?</th>
<th align="center">Method Name</th>
</tr>
<tr>
<td align="center">&nbsp;/server</td>
<td align="center">GET&nbsp;</td>
<td align="center">No&nbsp;</td>
<td align="center">N/A</td>
<td align="center">index</td>
</tr>
<tr>
<td align="center">/server/_new</td>
<td align="center">GET</td>
<td align="center">No</td>
<td align="center">N/A</td>
<td align="center">new</td>
</tr>
<tr>
<td align="center">/server?id=100</td>
<td align="center">GET</td>
<td align="center">Yes</td>
<td align="center">N/A</td>
<td align="center">show</td>
</tr>
<tr>
<td align="center">/server</td>
<td align="center">POST</td>
<td align="center">No&nbsp;</td>
<td align="center">No</td>
<td align="center">create&nbsp;</td>
</tr>
<tr>
<td align="center">&nbsp;/server</td>
<td align="center">POST&nbsp;</td>
<td align="center">Yes</td>
<td align="center">PUT</td>
<td align="center">update&nbsp;</td>
</tr>
<tr>
<td align="center">&nbsp;/server</td>
<td align="center">POST&nbsp;</td>
<td align="center">Yes&nbsp;</td>
<td align="center">DELETE</td>
<td align="center">delete&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;To make life simple, the code above assumes all IDs to be numeric and if ID is present in incoming request, it creates a Request attribute called &#39;model-id&#39; .&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.yellowfish.biz/2009/a-simple-rest-controller-for-spring-mvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chicanery on Wall St</title>
		<link>http://blogs.yellowfish.biz/2009/chicanery-on-wall-st/</link>
		<comments>http://blogs.yellowfish.biz/2009/chicanery-on-wall-st/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 16:51:49 +0000</pubDate>
		<dc:creator>Praveen Ray</dc:creator>
				<category><![CDATA[Finance]]></category>
		<category><![CDATA[money]]></category>
		<category><![CDATA[trading]]></category>

		<guid isPermaLink="false">http://blogs.yellowfish.biz/?p=244</guid>
		<description><![CDATA[How Traders invent derivatives and complex financial instruments in an effort to keep the money tree alive]]></description>
			<content:encoded><![CDATA[<p>Reading the book &#8216;<a href="http://www.amazon.com/Traders-Guns-Money-unknowns-derivatives/dp/0273704745/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1255365933&amp;sr=8-1" target="_blank">Traders Guns &amp; Money</a>&#8216;  by Satyajit Das. It&#8217;s an awesome account of greed and &#8216;anything goes&#8217; attitude on Wall St (and financial markets around the globe).  From ultra complex to borderline illegal instruments concocted by Dealers and Investment bankers around the world to make quick killings , everything that unraveled three years after the book was written, is detailed by the author. It&#8217;s interesting, he wrote about these years before the meltdown. But so did Warren Buffet who called these derivatives the financial WMDs!</p>
<p>Some of my favorite quotes from the book:</p>
<p><em>The most intriguing thing about convertible bonds is that everybody seems to be getting a great deal. It&#8217;s a win-win. Markets don&#8217;t work that way. Question is, who is fooling whom?</em></p>
<p><em>Robert Citron, treasurer of Orange County before it went bust, confident Interest rates wouldn&#8217;t rise.: &#8216;I am one of the largest investors in America, I know these things&#8217; </em></p>
<p><em>Same guy testifying during investigations, after Orange county lost 1.5B: &#8216;My brain was unable to audit&#8217; !</em></p>
<p><em>Traders work on the theory that what is mine is mine, and what is yours is also mine.</em></p>
<p><em>The irony of trying to model chaos, the finding of order in complete disorder, is lost on most quants.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.yellowfish.biz/2009/chicanery-on-wall-st/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
