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

<channel>
	<title>A Small Mailman In The World Of Programming</title>
	<atom:link href="http://smallmailman.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://smallmailman.wordpress.com</link>
	<description>A technical blog - targets-&#62; newbies ;)</description>
	<lastBuildDate>Tue, 08 Nov 2011 09:34:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='smallmailman.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>A Small Mailman In The World Of Programming</title>
		<link>http://smallmailman.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://smallmailman.wordpress.com/osd.xml" title="A Small Mailman In The World Of Programming" />
	<atom:link rel='hub' href='http://smallmailman.wordpress.com/?pushpress=hub'/>
		<item>
		<title>jQuery in selenium</title>
		<link>http://smallmailman.wordpress.com/2011/07/29/jquery-in-selenium/</link>
		<comments>http://smallmailman.wordpress.com/2011/07/29/jquery-in-selenium/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 07:13:56 +0000</pubDate>
		<dc:creator>Senthil Kumar</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[Testing tools]]></category>
		<category><![CDATA[addlocationstrategy jquery]]></category>
		<category><![CDATA[jquery locators]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[selenium remote control]]></category>

		<guid isPermaLink="false">http://smallmailman.wordpress.com/?p=89</guid>
		<description><![CDATA[we all love jQuery. so why not use jQuery in selenium? after all it locates elements. jQuery will make it easy, we just have to add a location strategy that uses jQuery to find elements. These two links helped me get started. http://stackoverflow.com/questions/2814007/how-do-i-add-a-jquery-locators-to-selenium-remote-control http://stackoverflow.com/questions/4185640/get-element-with-jquery-and-selenium-ide-1-0-8 Here are the steps i followed. I used selenium-server-standalone-2.2.0.jar downloaded from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=89&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>we all love jQuery. so why not use jQuery in selenium? after all it locates elements. jQuery will make it easy, we just have to add a location strategy that uses jQuery to find elements. These two links helped me get started.</p>
<p><a href="http://stackoverflow.com/questions/2814007/how-do-i-add-a-jquery-locators-to-selenium-remote-control" title="http://stackoverflow.com/questions/2814007/how-do-i-add-a-jquery-locators-to-selenium-remote-control" target="_blank">http://stackoverflow.com/questions/2814007/how-do-i-add-a-jquery-locators-to-selenium-remote-control</a></p>
<p><a href="http://stackoverflow.com/questions/4185640/get-element-with-jquery-and-selenium-ide-1-0-8" title="http://stackoverflow.com/questions/4185640/get-element-with-jquery-and-selenium-ide-1-0-8" target="_blank">http://stackoverflow.com/questions/4185640/get-element-with-jquery-and-selenium-ide-1-0-8</a></p>
<p>Here are the steps i followed. I used selenium-server-standalone-2.2.0.jar downloaded from <a title="here" href="http://seleniumhq.org/download/" target="_blank">here</a>.</p>
<p><strong>Step 1</strong>:</p>
<p>Extract the jar. I used 7zip to extract.</p>
<p><strong>Step 2</strong>:</p>
<p>Edit TestRunner.html inside the core folder.<br />
Add the following as said in SO.</p>
<pre><code>&lt;script language="JavaScript" type="text/javascript" src="jquery.min.js"&gt;&lt;/script&gt; &lt;script language="JavaScript" type="text/javascript"&gt; function openDomViewer() { var autFrame = document.getElementById('selenium_myiframe');         var autFrameDocument = new SeleniumFrame(autFrame).getDocument();         this.rootDocument = autFrameDocument;         var domViewer = window.open(getDocumentBase(document) + 'domviewer/domviewer.html');         return false; } &lt;/script&gt;</code></pre>
<p>And add the jquery-min.js in core folder.</p>
<p><strong>Step 3</strong>:</p>
<p>Then add the location strategy to your selenium object as follows.</p>
<p><code>mySelenium.addLocationStrategy("jquery",<br />
"var loc = locator; " +<br />
"var attr = null; " +<br />
"var isattr = false; " +<br />
"var inx = locator.lastIndexOf('@'); " +</code><br />
<code><br />
"if (inx != -1){ " +<br />
"   loc = locator.substring(0, inx); " +<br />
"   attr = locator.substring(inx + 1); " +<br />
"   isattr = true; " +<br />
"} " +</code><br />
<code><br />
"var found = jQuery(inDocument).find(loc); " +<br />
"if (found.length &gt;= 1) { " +<br />
"   if (isattr) { " +<br />
"       return found[0].getAttribute(attr); " +<br />
"   } else { " +<br />
"       return found[0]; " +<br />
"   } " +<br />
"} else { " +<br />
"   return null; " +<br />
"}"<br />
);<br />
</code><br />
Note that this is java code.</p>
<p><strong>Step 4</strong>:</p>
<p>Add the following function to user-extensions.js in core/scripts folder.</p>
<p><code>function jQuery (selector)<br />
{<br />
return selenium.browserbot.getUserWindow().jQuery(selector);<br />
}<br />
</code></p>
<p><strong>Step 5</strong>:</p>
<p>Now we need to update the jar file. To do that do something like this.<br />
<code>jar -uf selenium-server-standalone-2.2.0.jar core\TestRunner.html<br />
jar -uf selenium-server-standalone-2.2.0.jar core\jquery.min.js<br />
jar -uf selenium-server-standalone-2.2.0.jar core\scripts\user-extensions.js<br />
</code></p>
<p><strong>Step 6</strong>:</p>
<p>That&#8217;s it. Just start the server as usual using java -jar selenium-server-standalone-2.2.0</p>
<p><strong>Step 7</strong>:</p>
<p>To use jquery to select elements, use something like this.<br />
<code>myselenium.click("jquery=#some_id")</code></p>
<p>hope it helps.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smallmailman.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smallmailman.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smallmailman.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smallmailman.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/smallmailman.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/smallmailman.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/smallmailman.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/smallmailman.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smallmailman.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smallmailman.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smallmailman.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smallmailman.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smallmailman.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smallmailman.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=89&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://smallmailman.wordpress.com/2011/07/29/jquery-in-selenium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8fcae3db0cf1ceca8f6882948a7fad8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Senthil Kumar</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;No such file to load &#8212; application&#8221; on Passenger and Rails 3</title>
		<link>http://smallmailman.wordpress.com/2011/02/12/no-such-file-to-load-application-on-passenger-and-rails-3/</link>
		<comments>http://smallmailman.wordpress.com/2011/02/12/no-such-file-to-load-application-on-passenger-and-rails-3/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 16:41:21 +0000</pubDate>
		<dc:creator>Senthil Kumar</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[No such file to load -- application]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[rails 3]]></category>

		<guid isPermaLink="false">http://smallmailman.wordpress.com/?p=85</guid>
		<description><![CDATA[I got this error when i was deploying a rails 3 app in railsplayground. I was using http://wiki.railsplayground.com/railsplayground/show/How+To+use+Phusion+Passenger as a reference. The error was somewhat familiar, as application controller was renamed to application_controller in 2.2 or 2.3 (not very sure when). Then i came across this post, http://groups.google.com/group/phusion-passenger/browse_thread/thread/676a73280221c93f. Which pointed out, we should use RackBaseURI [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=85&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I got this error when i was deploying a rails 3 app in <a href="http://railsplayground.com/">railsplayground</a>. I was using <a href="http://wiki.railsplayground.com/railsplayground/show/How+To+use+Phusion+Passenger">http://wiki.railsplayground.com/railsplayground/show/How+To+use+Phusion+Passenger</a> as a reference. The error was somewhat familiar, as application controller was renamed to application_controller in 2.2 or 2.3 (not very sure when). Then i came across this post, http://groups.google.com/group/phusion-passenger/browse_thread/thread/676a73280221c93f. Which pointed out, we should use RackBaseURI instead of RailsBaseURI. Yep, the solution is, use </p>
<p><code>RackBaseURI /</code></p>
<p>instead of <code>RailsBaseURI /</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smallmailman.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smallmailman.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smallmailman.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smallmailman.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/smallmailman.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/smallmailman.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/smallmailman.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/smallmailman.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smallmailman.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smallmailman.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smallmailman.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smallmailman.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smallmailman.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smallmailman.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=85&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://smallmailman.wordpress.com/2011/02/12/no-such-file-to-load-application-on-passenger-and-rails-3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8fcae3db0cf1ceca8f6882948a7fad8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Senthil Kumar</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby on rails &#8211; Beginning</title>
		<link>http://smallmailman.wordpress.com/2010/10/30/ruby-on-rails-beginning/</link>
		<comments>http://smallmailman.wordpress.com/2010/10/30/ruby-on-rails-beginning/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 06:12:22 +0000</pubDate>
		<dc:creator>Senthil Kumar</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[default root]]></category>
		<category><![CDATA[map.root]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[routes]]></category>

		<guid isPermaLink="false">http://smallmailman.wordpress.com/?p=80</guid>
		<description><![CDATA[I&#8217;ve started learning ruby on rails. Will share some useful stuffs on that too. To start with, here&#8217;s one. To specify the root of your rails app, you might specify a default root in routes.rb file. Like, map.root = :controller =&#62; &#8216;some_controller&#8217;, :action =&#62; &#8220;index&#8221; But still you don&#8217;t see what you wanted to see?? [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=80&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started learning ruby on rails. Will share some useful stuffs on that too. To start with, here&#8217;s one.</p>
<p>To specify the root of your rails app, you might specify a default root in routes.rb file. Like,</p>
<p>map.root = :controller =&gt; &#8216;some_controller&#8217;, :action =&gt; &#8220;index&#8221;</p>
<p>But still you don&#8217;t see what you wanted to see?? Still seeing the Welcome aboard page??</p>
<p>Do not forget to remove the index.html file in public directory. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smallmailman.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smallmailman.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smallmailman.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smallmailman.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/smallmailman.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/smallmailman.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/smallmailman.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/smallmailman.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smallmailman.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smallmailman.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smallmailman.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smallmailman.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smallmailman.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smallmailman.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=80&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://smallmailman.wordpress.com/2010/10/30/ruby-on-rails-beginning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8fcae3db0cf1ceca8f6882948a7fad8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Senthil Kumar</media:title>
		</media:content>
	</item>
		<item>
		<title>Apply style to all the child elements of a parent &#8211; CSS</title>
		<link>http://smallmailman.wordpress.com/2010/07/20/apply-style-to-all-the-child-elements-of-a-parent-css/</link>
		<comments>http://smallmailman.wordpress.com/2010/07/20/apply-style-to-all-the-child-elements-of-a-parent-css/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 09:07:30 +0000</pubDate>
		<dc:creator>Senthil Kumar</dc:creator>
				<category><![CDATA[UI]]></category>
		<category><![CDATA[child elements]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://smallmailman.wordpress.com/?p=63</guid>
		<description><![CDATA[If you want to apply style to all &#60;p&#62; inside &#60;body&#62;, you would write something like this, body &#62; p { background-color : #00f; } Let&#8217;s say you have a div element and it contains various other elements. And you would like to apply some common style to all the elements. Believe me, there could [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=63&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you want to apply style to all &lt;p&gt; inside &lt;body&gt;, you would write something like this,<br />
<code><br />
body &gt; p { background-color : #00f; }<br />
</code><br />
Let&#8217;s say you have a div element and it contains various other elements. And you would like to apply some common style to all the elements. Believe me, there could be reasons for this!</p>
<p>We can&#8217;t go and pick all the elements inside &lt;div&gt;. We could just write,<br />
<code><br />
#id_of_div *<br />
{<br />
//some style<br />
}<br />
</code><br />
So this will apply style to all the child elements of &lt;div&gt; with id  &#8216;id_of_div&#8217;. You can overwrite some style for child elements by picking them specifically like this,<br />
<code><br />
#id_of_div #id_of_some_other_element<br />
{<br />
// some style that will override the style given by *<br />
}<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smallmailman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smallmailman.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smallmailman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smallmailman.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/smallmailman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/smallmailman.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/smallmailman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/smallmailman.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smallmailman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smallmailman.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smallmailman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smallmailman.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smallmailman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smallmailman.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=63&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://smallmailman.wordpress.com/2010/07/20/apply-style-to-all-the-child-elements-of-a-parent-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8fcae3db0cf1ceca8f6882948a7fad8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Senthil Kumar</media:title>
		</media:content>
	</item>
		<item>
		<title>insert single quotes &#8211; mssql</title>
		<link>http://smallmailman.wordpress.com/2010/07/17/insert-single-quotes-mssql/</link>
		<comments>http://smallmailman.wordpress.com/2010/07/17/insert-single-quotes-mssql/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 12:15:19 +0000</pubDate>
		<dc:creator>Senthil Kumar</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[single quotes]]></category>

		<guid isPermaLink="false">http://smallmailman.wordpress.com/?p=60</guid>
		<description><![CDATA[You enclose strings in single quotes when you are inserting strings in a table on a mssql server. But when the string contains &#8216; (single quotes) and you are not using something like a prepared statement(let&#8217;s say you wanna make a manual insertion) how would you do it? Simple. Use the single quotes twice. i.e [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=60&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You enclose strings in single quotes when you are inserting strings in a table on a mssql server. But when the string contains &#8216; (single quotes) and you are not using something like a prepared statement(let&#8217;s say you wanna make a manual insertion) how would you do it? Simple. Use the single quotes twice. i.e<br />
<code><br />
insert into table_name(string_column) values ('how're you?')<br />
</code><br />
would become<br />
<code><br />
insert into table_name(string_column) values ('how''re you?')<br />
</code><br />
Cheers. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smallmailman.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smallmailman.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smallmailman.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smallmailman.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/smallmailman.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/smallmailman.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/smallmailman.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/smallmailman.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smallmailman.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smallmailman.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smallmailman.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smallmailman.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smallmailman.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smallmailman.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=60&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://smallmailman.wordpress.com/2010/07/17/insert-single-quotes-mssql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8fcae3db0cf1ceca8f6882948a7fad8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Senthil Kumar</media:title>
		</media:content>
	</item>
		<item>
		<title>Fix for &#8211; E: Could not get lock /var/cache/apt/archives/lock &#8211; open (11: Resource temporarily unavailable)</title>
		<link>http://smallmailman.wordpress.com/2010/07/11/fix-for-e-could-not-get-lock-varcacheaptarchiveslock-open-11-resource-temporarily-unavailable/</link>
		<comments>http://smallmailman.wordpress.com/2010/07/11/fix-for-e-could-not-get-lock-varcacheaptarchiveslock-open-11-resource-temporarily-unavailable/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 15:40:14 +0000</pubDate>
		<dc:creator>Senthil Kumar</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://smallmailman.wordpress.com/?p=24</guid>
		<description><![CDATA[E: Could not get lock /var/cache/apt/archives/lock &#8211; open (11: Resource temporarily unavailable) E: Unable to lock the download directory to fix these errors, see if any packet manager is running or any update is going on. if u didnt start any of these and have no idea what to do, just do the following sudo [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=24&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>E: Could not get lock /var/cache/apt/archives/lock &#8211; open (11: Resource temporarily unavailable)<br />
E: Unable to lock the download directory</p>
<p>to fix these errors, see if any packet manager is running or any update is going on. if u didnt start any of these and have no idea what to do, just do the following<br />
<code><br />
sudo killall apt-get<br />
</code><br />
hope that solves your prob.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smallmailman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smallmailman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smallmailman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smallmailman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/smallmailman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/smallmailman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/smallmailman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/smallmailman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smallmailman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smallmailman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smallmailman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smallmailman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smallmailman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smallmailman.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=24&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://smallmailman.wordpress.com/2010/07/11/fix-for-e-could-not-get-lock-varcacheaptarchiveslock-open-11-resource-temporarily-unavailable/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8fcae3db0cf1ceca8f6882948a7fad8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Senthil Kumar</media:title>
		</media:content>
	</item>
		<item>
		<title>Bootable Flash Drive</title>
		<link>http://smallmailman.wordpress.com/2010/07/08/bootable-flash-drive/</link>
		<comments>http://smallmailman.wordpress.com/2010/07/08/bootable-flash-drive/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 10:07:56 +0000</pubDate>
		<dc:creator>Senthil Kumar</dc:creator>
				<category><![CDATA[Hardwares]]></category>
		<category><![CDATA[bootable]]></category>
		<category><![CDATA[bootable flash drive]]></category>
		<category><![CDATA[flash drive]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[thumb drive]]></category>

		<guid isPermaLink="false">http://smallmailman.wordpress.com/?p=50</guid>
		<description><![CDATA[How to write an iso into a usb  flash drive so that you can boot from it? Best Solution: use UNetbootin it is available for both linux and windows. Cheers<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=50&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to write an iso into a usb  flash drive so that you can boot from it?</p>
<p>Best Solution: use <a href="http://unetbootin.sourceforge.net/" target="_blank">UNetbootin</a></p>
<p>it is available for both linux and windows.</p>
<p>Cheers <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smallmailman.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smallmailman.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smallmailman.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smallmailman.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/smallmailman.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/smallmailman.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/smallmailman.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/smallmailman.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smallmailman.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smallmailman.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smallmailman.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smallmailman.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smallmailman.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smallmailman.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=50&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://smallmailman.wordpress.com/2010/07/08/bootable-flash-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8fcae3db0cf1ceca8f6882948a7fad8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Senthil Kumar</media:title>
		</media:content>
	</item>
		<item>
		<title>XML to HTML using XSLT</title>
		<link>http://smallmailman.wordpress.com/2010/07/07/32/</link>
		<comments>http://smallmailman.wordpress.com/2010/07/07/32/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 11:28:24 +0000</pubDate>
		<dc:creator>Senthil Kumar</dc:creator>
				<category><![CDATA[Programming Language Tips]]></category>
		<category><![CDATA[disable output escaping]]></category>
		<category><![CDATA[escape output]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSL]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://smallmailman.wordpress.com/?p=32</guid>
		<description><![CDATA[As you all know, XSLT stands for XSL Transformations. Okay, so you are converting XML to HTML using XSL Sometimes XML data might contain some HTML tags and you would want them to reflect in your HTML document. But by default this won&#8217;t happen. For example, if your XML file had a line this &#60;data&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=32&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As you all know, XSLT stands for XSL Transformations. Okay, so you are converting XML to HTML using XSL Sometimes XML data might contain some HTML tags and you would want them to reflect in your HTML document. But by default this won&#8217;t happen.</p>
<p>For example,</p>
<p>if your XML file had a line this<br />
<code><br />
&lt;data&gt;<br />
&lt;b&gt; bold text &lt;/b&gt;<br />
&lt;/data&gt;<br />
</code><br />
When you extract the value of &lt;data&gt; tag in XSL, you would use something of this sort<br />
<code><br />
&lt;xsl:value-of select = "data" /&gt;<br />
</code><br />
But in the resultant HTML doc, you will see<br />
<code><br />
&lt;b&gt;bold text &lt;/b&gt;<br />
</code><br />
This is because, the tags are escaped i.e. &lt;b&gt; is treated as &amp;lt;b&amp;gt;</p>
<p>if you do not want this to happen,</p>
<p>add the following attribute in the xsl tag.<br />
<code><br />
disable-output-escaping="yes"<br />
</code><br />
now xsl line would look like this<br />
<code><br />
&lt;xsl:value-of select = "data" disable-output-escaping="yes"/&gt;<br />
</code><br />
and in the HTML file you will see</p>
<p><strong>bold text</strong><br />
This will come in handy when you want to display units and stuff. Like cm<sup>2</sup></p>
<p>There you go <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smallmailman.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smallmailman.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smallmailman.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smallmailman.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/smallmailman.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/smallmailman.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/smallmailman.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/smallmailman.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smallmailman.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smallmailman.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smallmailman.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smallmailman.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smallmailman.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smallmailman.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=32&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://smallmailman.wordpress.com/2010/07/07/32/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8fcae3db0cf1ceca8f6882948a7fad8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Senthil Kumar</media:title>
		</media:content>
	</item>
		<item>
		<title>File operations (read, write, etc..) in JAVA</title>
		<link>http://smallmailman.wordpress.com/2010/07/07/file-operations-read-write-etc-in-java/</link>
		<comments>http://smallmailman.wordpress.com/2010/07/07/file-operations-read-write-etc-in-java/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 11:05:50 +0000</pubDate>
		<dc:creator>Senthil Kumar</dc:creator>
				<category><![CDATA[Programming Language Tips]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apache commons]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://smallmailman.wordpress.com/?p=27</guid>
		<description><![CDATA[For Java newbies &#38; not-so-experienced guys, To read or write files, you do not have to go to BufferedReader or any other stream readers and waste time writing your own code. Use Apache Commons IO. This comes with various pre-written functions and all IO operations are made simple. Dealing with folders are also easy!! Makes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=27&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For Java newbies &amp; not-so-experienced guys,</p>
<p>To read or write files, you do not have to go to BufferedReader or any other stream readers and waste time writing your own code. Use<a href="http://commons.apache.org/io/" target="_blank"> Apache Commons IO</a>. This comes with various pre-written functions and all IO operations are made simple. Dealing with folders are also easy!! Makes our job real easy. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smallmailman.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smallmailman.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smallmailman.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smallmailman.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/smallmailman.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/smallmailman.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/smallmailman.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/smallmailman.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smallmailman.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smallmailman.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smallmailman.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smallmailman.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smallmailman.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smallmailman.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=27&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://smallmailman.wordpress.com/2010/07/07/file-operations-read-write-etc-in-java/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8fcae3db0cf1ceca8f6882948a7fad8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Senthil Kumar</media:title>
		</media:content>
	</item>
		<item>
		<title>How to run tomcats under Apache 2.2</title>
		<link>http://smallmailman.wordpress.com/2009/11/12/how-to-run-tomcats-under-apache-2-2/</link>
		<comments>http://smallmailman.wordpress.com/2009/11/12/how-to-run-tomcats-under-apache-2-2/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 17:57:44 +0000</pubDate>
		<dc:creator>Senthil Kumar</dc:creator>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[tomcat apache integration]]></category>

		<guid isPermaLink="false">http://smallmailman.wordpress.com/?p=18</guid>
		<description><![CDATA[We can run multiple tomcats under one apache server.  Refer this to install apache 2.2 and setup virtual hosting. Let&#8217;s say you wanna run two tomcats under apache 2.2. Download and extract latest version of tomcat. Configure ports for tomcats and test if both the tomcats can run at same time. (To avoid port conflicts.) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=18&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We can run multiple tomcats under one apache server.  Refer <a href="http://smallmailman.wordpress.com/2009/11/08/installing-apache-2-2-and-virtual-hosting/">this</a> to install apache 2.2 and setup virtual hosting.</p>
<p>Let&#8217;s say you wanna run two tomcats under apache 2.2. Download and extract latest version of <a href="http://tomcat.apache.org/download-60.cgi"> tomcat. </a><br />
Configure ports for tomcats and test if both the tomcats can run at same time. (To avoid port conflicts.)<br />
Make sure the line similar to this is not commented.</p>
<p>&lt;Connector port=&#8221;8009&#8243; protocol=&#8221;AJP/1.3&#8243; redirectPort=&#8221;8443&#8243;/&gt;<br />
Give different ajp ports for the tomcats. let&#8217;s say 8009 for tomcat1 and 7009 for tomcat2.<br />
set jvm route in tomcat1 server.xml. Find the tag  and add <code>jvmRoute="tomcat1"</code></p>
<p><code>&lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1"&gt;</code></p>
<p>set jvm route in tomcat2 server.xml</p>
<p><code>&lt;Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat2"&gt;</code></p>
<p>Install mod_jk module. Run,</p>
<p><code><br />
sudo apt-get install libapache2-mod-jk<br />
</code></p>
<p>Append the following in /etc/apache2/mods-available/jk.load</p>
<div>JkWorkersFile /etc/apache2/workers.properties</div>
<div>JkLogFile /var/log/apache2/mod_jk.log</div>
<div>JkLogLevel debug</div>
<div>JkLogStampFormat &#8220;[%a %b %d %H:%M:%S %Y]&#8220;</div>
<p>Enable mod_jk by,<br />
<code><br />
sudo a2enmod jk<br />
</code><br />
Create a file called workers.properties in apache 2.2 conf directory. Paste the following lines and save it.<br />
<code><br />
worker.list = loadbalancer,tomcat1,tomcat2</code></p>
<p>worker.tomcat1.port=8009<br />
worker.tomcat1.host=localhost<br />
worker.tomcat1.type=ajp13<br />
worker.tomcat1.lbfactor=1<br />
worker.tomcat1.connection_pool_timeout=600<br />
worker.tomcat1.socket_timeout=600</p>
<p>worker.tomcat2.port=7009<br />
worker.tomcat2.host=localhost<br />
worker.tomcat2.type=ajp13<br />
worker.tomcat2.lbfactor=1<br />
worker.tomcat2.connection_pool_timeout=600<br />
worker.tomcat2.socket_timeout=600</p>
<p>worker.loadbalancer.type = lb<br />
worker.loadbalancer.balanced_workers = tomcat1,tomcat2<br />
worker.loadbalancer.sticky_session = 1<br />
#worker.loadbalancer.sticky_session_force = False</p>
<p>Please note that we have enabled sticky sessions.<br />
Now we should tell apache when to forward requests to tomcat. Choose a virtualhost file.<br />
In the place of DocumentRoot</p>
<p>add <code>JkMount /* loadbalancer</code></p>
<p>this will tell apache to forward all request to the loadbalancer.<br />
The virtual host file will look like this.</p>
<p><span style="font-family:Courier New;">NameVirtualHost 127.0.0.1:80<br />
&lt;VirtualHost 127.0.0.1:80&gt;<br />
ServerAdmin webmaster@localhost1<br />
ServerName localhost1<br />
JkMount /* loadbalancer<br />
&lt;/VirtualHost&gt;</span></p>
<p>so now&#8230; all the requests that come to localhost1 will be forwarded to the loadbalancer. tht&#8217;s it. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/smallmailman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/smallmailman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/smallmailman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/smallmailman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/smallmailman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/smallmailman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/smallmailman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/smallmailman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/smallmailman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/smallmailman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/smallmailman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/smallmailman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/smallmailman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/smallmailman.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=smallmailman.wordpress.com&amp;blog=10328446&amp;post=18&amp;subd=smallmailman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://smallmailman.wordpress.com/2009/11/12/how-to-run-tomcats-under-apache-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8fcae3db0cf1ceca8f6882948a7fad8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Senthil Kumar</media:title>
		</media:content>
	</item>
	</channel>
</rss>
