<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-45591240992495699</id><updated>2012-01-04T03:47:04.463-08:00</updated><category term='mobile'/><category term='iphone'/><category term='adwords'/><category term='web'/><category term='unix'/><category term='spring'/><category term='IT'/><category term='ipad gmail'/><category term='eclipse java'/><category term='j2ee'/><category term='google plus facebook social-network'/><category term='gromor cloud'/><category term='tablets 3g india'/><category term='ssl tomcat godaddy'/><category term='database'/><title type='text'>Web Patrika</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>36</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-8417544650259984208</id><published>2012-01-04T03:41:00.000-08:00</published><updated>2012-01-04T03:41:35.594-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse java'/><title type='text'>Convert eclipse project to java project</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Open .project file located in the project root folder and following lines;&lt;br /&gt;&lt;br /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; display: inline !important; float: none; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&amp;lt;buildSpec&amp;gt;&lt;/span&gt;&lt;br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; display: inline !important; float: none; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&amp;lt;buildCommand&amp;gt;&lt;/span&gt;&lt;br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; display: inline !important; float: none; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&amp;lt;name&amp;gt;org.eclipse.jdt.core.javabuilder&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; display: inline !important; float: none; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&amp;lt;arguments&amp;gt;&lt;/span&gt;&lt;br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; display: inline !important; float: none; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&amp;lt;/arguments&amp;gt;&lt;/span&gt;&lt;br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; display: inline !important; float: none; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&amp;lt;/buildCommand&amp;gt;&lt;/span&gt;&lt;br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; display: inline !important; float: none; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&amp;lt;/buildSpec&amp;gt;&lt;/span&gt;&lt;br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; display: inline !important; float: none; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&amp;lt;natures&amp;gt;&lt;/span&gt;&lt;br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; display: inline !important; float: none; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&amp;lt;nature&amp;gt;org.eclipse.jdt.core.javanature&amp;lt;/nature&amp;gt;&lt;/span&gt;&lt;br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; display: inline !important; float: none; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&amp;lt;/natures&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Save it and refresh the project in eclipse. That's about it. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #555555; display: inline !important; float: none; font-size-adjust: none; font-stretch: normal; font: 12px/17px monospace; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-8417544650259984208?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/8417544650259984208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=8417544650259984208' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/8417544650259984208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/8417544650259984208'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2012/01/convert-eclipse-project-to-java-project.html' title='Convert eclipse project to java project'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-4019726047419435544</id><published>2011-12-25T03:01:00.000-08:00</published><updated>2011-12-25T03:02:51.378-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adwords'/><title type='text'>The Google account already has access to an AdWords account (Customer ID: )</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you&amp;nbsp;are getting this&amp;nbsp;error when accepting a google adwords invite then follow these steps to&amp;nbsp;fix the problem;&lt;br /&gt;&lt;br /&gt;1.&amp;nbsp;Create another dummy google account, say, &lt;a href="mailto:dummy@gmail.com"&gt;dummy@gmail.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. Sign out and&amp;nbsp;sign into&amp;nbsp;google adwords using your primary gmail account, say, &lt;a href="mailto:primary@gmail.com"&gt;primary@gmail.com&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;3.&amp;nbsp;Invite &lt;a href="mailto:dummy@gmail.com"&gt;dummy@gmail.com&lt;/a&gt; and&amp;nbsp;grant&amp;nbsp;an administrator role&lt;br /&gt;&lt;br /&gt;4.&amp;nbsp;Sign into&amp;nbsp;your&amp;nbsp;&lt;a href="mailto:dummy@gmail.com"&gt;dummy@gmail.com&lt;/a&gt; account and accept the invite.&lt;br /&gt;&lt;br /&gt;5.&amp;nbsp;Go back to your&amp;nbsp;&lt;a href="mailto:primary@gmail.com"&gt;primary@gmail.com&lt;/a&gt; adwords account and confirm the acceptance by &lt;a href="mailto:dummy@gmail.com"&gt;dummy@gmail.com&lt;/a&gt; by clicking on Grant button.&lt;br /&gt;&lt;br /&gt;6. Sign out of adowords&amp;nbsp;account and&amp;nbsp;sign in again using &lt;a href="mailto:dummy@gmail.com"&gt;dummy@gmail.com&lt;/a&gt;&amp;nbsp;. Delete &lt;a href="mailto:primary@gmail.com"&gt;primary@gmail.com&lt;/a&gt; from your adwords account. &lt;br /&gt;&lt;br /&gt;7.&amp;nbsp;Go back to your&amp;nbsp;adwords invite&amp;nbsp;and accept using &lt;a href="mailto:primary@gmail.com"&gt;primary@gmail.com&lt;/a&gt; account. This time it&amp;nbsp;should&amp;nbsp;go through without any errors. &lt;br /&gt;&lt;br /&gt;To summarize, you have to transfer the ownership of your current primary gmail account to an alternate (or dummy) gmail account and then&amp;nbsp;delete your primary&amp;nbsp;gmail id from the adwords account. &lt;br /&gt;&lt;br /&gt;Hope this helps you workaround this issue. It worked for me. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-4019726047419435544?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/4019726047419435544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=4019726047419435544' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/4019726047419435544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/4019726047419435544'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2011/12/google-account-already-has-access-to.html' title='The Google account already has access to an AdWords account (Customer ID: )'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-3738197522361862137</id><published>2011-08-28T19:43:00.000-07:00</published><updated>2011-08-28T21:32:27.740-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tablets 3g india'/><title type='text'>Is tablet the next big revolution in India?</title><content type='html'>In spite of growing number of internet users, high talent pool and a big technology outsourcing industry, pc and internet penetration in India has been slow. The slow uptake is often attributed to lack of infrastructure. It is not just rural parts of India that lack infrastructure. For example, whitefield area in bangalore (which is a prime tech hub) still has only one broadband provider - BSNL. Every other provider - Airtel, Reliance, Tata -  has refused to invest in laying cables in this part of bangalore.  This is a very similar situation about 10 years ago when it was extremely difficult to get a landline connection and there were huge backlogs. The introduction of mobile phones at affordable price changed everything and India now boasts world's second largest number of mobile subscribers. Could the &lt;a href="http://www.thehindubusinessline.com/industry-and-economy/info-tech/article2373741.ece?homepage=true"&gt;introduction of affordable tablets&lt;/a&gt; combined with 3G connectivity in India be the next game changer? I believe it could be and in next 10 years it could get 2 -5 times bigger than number of ipads sold today.     &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-3738197522361862137?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/3738197522361862137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=3738197522361862137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3738197522361862137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3738197522361862137'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2011/08/is-tablet-next-big-revolution-in-india.html' title='Is tablet the next big revolution in India?'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-8593685354480105727</id><published>2011-08-26T00:02:00.000-07:00</published><updated>2011-08-26T00:19:56.342-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gromor cloud'/><title type='text'>SMB tech spend to grow 4 fold by 2015</title><content type='html'>According to a &lt;a href="http://goo.gl/NlC0S"&gt;recent article&lt;/a&gt;, TCS has signed up 240 customers for their cloud based offering for SMBs and planning to signup 100 channel partners across India to increase the total number of customers to 1000 in 1 year. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The total tech spend is expected to grow to $48.5 billion by 2015. This presents a huge opportunity for companies offering cloud based solutions in India considering 60% of SMBs do not have any tech infrastructure. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cloud based apps, such as ours (&lt;a href="http://www.gromor.in"&gt;http://www.gromor.in&lt;/a&gt;), offers a great jumpstart for SMBs to benefit from world class technology solution available at affordable pay-per-use model. It reduces upfront investment by as much as 90% and enables SMBs to focus on growing their core business without worrying about managing IT infrastructure. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;   &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-8593685354480105727?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/8593685354480105727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=8593685354480105727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/8593685354480105727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/8593685354480105727'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2011/08/smb-tech-spend-to-grow-4-fold-by-2015.html' title='SMB tech spend to grow 4 fold by 2015'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-7689121594898108375</id><published>2011-08-21T22:36:00.000-07:00</published><updated>2011-08-21T22:47:37.954-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ipad gmail'/><title type='text'>Adding google apps email to ipad</title><content type='html'>I recently tried adding a google apps email account by following steps at http://goo.gl/gvr9W . However, I got an error &lt;i&gt;Username or password for "imap.gmail.com" is incorrect . &lt;/i&gt;I was able to resolve the issue after unlocking captcha as suggested at http://goo.gl/ABDHB . &lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-7689121594898108375?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/7689121594898108375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=7689121594898108375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7689121594898108375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7689121594898108375'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2011/08/adding-google-apps-email-to-ipad.html' title='Adding google apps email to ipad'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-7010167200494818087</id><published>2011-07-03T23:40:00.000-07:00</published><updated>2011-07-04T00:37:21.032-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='google plus facebook social-network'/><title type='text'>who needs another social network?</title><content type='html'>That was my first reaction to Google+. In a matter of 2 days 40 connections were added to my circles. That is when I realized that it could be a serious competitor to facebook. Here's why:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Rebuilding social graph is quick and simple. Everyone I have interacted over email can be found in my gmail which makes it easy to add connections. That's viral.&lt;/li&gt;&lt;li&gt;"Hey, look what my dog did last week!" - yes, one can now have side conversations with a relevant group of people instead of broadcasting to all. That's less noise.&lt;/li&gt;&lt;li&gt;I can call in sick at work and still talk about my day off with my friends without worrying about getting fired from work. That's better privacy.&lt;/li&gt;&lt;li&gt;Sure, I will accept invite from my mom. On facebook, it is awkward to let friends, family and co-workers see everything. It's not a problem on Google+ since not everyone can see all my posts. That's more freedom.&lt;/li&gt;&lt;li&gt;It is all about sharing nearly real-time information. Older conversations are irrelevant. That will make it easy to switchover to Google+ once the social graph gets built.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Lastly, Google has a track record of challenging well established players. Just when people thought "who needs another search engine" or "who needs another email", Google surprised everyone. Can they do it again?  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-7010167200494818087?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/7010167200494818087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=7010167200494818087' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7010167200494818087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7010167200494818087'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2011/07/who-needs-another-social-network.html' title='who needs another social network?'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-7801848982352278532</id><published>2011-04-16T04:33:00.001-07:00</published><updated>2011-04-16T06:32:51.000-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssl tomcat godaddy'/><title type='text'>Installing SSL in tomcat</title><content type='html'>Here are the steps to install SSL in tomcat. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Create a key pair&lt;/div&gt;&lt;div&gt;keytool -keysize 2048 -genkey -alias &amp;lt;pick a name&amp;gt; &lt;pick-a-name&gt; -keyalg RSA -keystore tomcat.keystore&lt;/pick-a-name&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;default password, if not changed, is &lt;i&gt;changeit&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 85, 85); font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; vertical-align: baseline; outline-style: none; outline-width: initial; outline-color: initial; font-size: 12px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; text-decoration: none; font-weight: bold; background-position: initial initial; background-repeat: initial initial; "&gt;First and last name&lt;/strong&gt; - type your website url, for example, www.company.com&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 85, 85); font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; vertical-align: baseline; outline-style: none; outline-width: initial; outline-color: initial; font-size: 12px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; text-decoration: none; font-weight: bold; background-position: initial initial; background-repeat: initial initial; "&gt;Organizational unit&lt;/strong&gt; - for example, engineering, production etc. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 85, 85); font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; vertical-align: baseline; outline-style: none; outline-width: initial; outline-color: initial; font-size: 12px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; text-decoration: none; font-weight: bold; background-position: initial initial; background-repeat: initial initial; "&gt;Organization -  &lt;/strong&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 85, 85); font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; "&gt; full name of your company&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 85, 85); font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; vertical-align: baseline; outline-style: none; outline-width: initial; outline-color: initial; font-size: 12px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; text-decoration: none; font-weight: bold; background-position: initial initial; background-repeat: initial initial; "&gt;City/Locality&lt;/strong&gt; - name of the city&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 85, 85); font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; vertical-align: baseline; outline-style: none; outline-width: initial; outline-color: initial; font-size: 12px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; text-decoration: none; font-weight: bold; background-position: initial initial; background-repeat: initial initial; "&gt;State/Province&lt;/strong&gt; - name of state&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 85, 85); font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; vertical-align: baseline; outline-style: none; outline-width: initial; outline-color: initial; font-size: 12px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; text-decoration: none; font-weight: bold; background-position: initial initial; background-repeat: initial initial; "&gt;Country code&lt;/strong&gt; - two letter country code. refer to &lt;a href="http://www.iso.org/iso/english_country_names_and_code_elements"&gt;this site&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;type yes to confirm and press ENTER&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;when asked for a password for private key, select same password as the keystore otherwise you will run into this &lt;a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=38217"&gt;bug #38217&lt;/a&gt; at the time of installation&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;2. Generate a certificate request (CSR)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;keytool -certreq -keyalg RSA -alias &amp;lt;your alias&amp;gt; -file &amp;lt;your company name&amp;gt;&lt;your file="" name=""&gt;.csr -keystore tomcat.keystore&lt;/your&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Copy/paste the entire content of &lt;your file="" name=""&gt;.csr and follow the steps described by your certificate provider, for example godaddy etc, to submit the csr.&lt;/your&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. Download the issued certificate and install it in your keystore. For example, download a zip file from godaddy, and follow these steps;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana, sans-serif; line-height: 16px; font-size: small; "&gt;&lt;span class="Apple-style-span"&gt;   keytool -import -alias root -trustcacerts -file gd_bundle.crt&lt;br /&gt;keytool -import -alias cross -trustcacerts -file gd_cross_intermediate.crt&lt;br /&gt;keytool -import -alias intermed -trustcacerts -file gd_intermediate.crt&lt;br /&gt;keytool -import -alias &amp;lt;your alias&amp;gt; -trustcacerts -file YourDomain.crt&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5.  Enable SSL in tomcat. Uncomment following connector in &lt;tomcat-install-dir&gt;/conf/server.xml and add keystore details.&lt;/tomcat-install-dir&gt;&lt;/div&gt;&lt;div&gt;&lt;tomcat-install-dir&gt;&amp;lt;Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"&lt;/tomcat-install-dir&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;   &lt;connector port="443" protocol="HTTP/1.1" sslenabled="true" font=""&gt;&lt;/connector&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;               maxThreads="150" scheme="https" secure="true"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;               clientAuth="false" sslProtocol="TLS"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;               keystoreFile=&amp;quot;&amp;lt;path to keystore&amp;gt;/tomcat.keystore&amp;quot; keystorePass=&amp;quot;&amp;lt;keystore password&amp;gt;&amp;quot; keyAlias=&amp;quot;&amp;lt;your alias&amp;gt;&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;6. Append following snippet in WEB-INF/web.xml of your web application. &lt;/span&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;&lt;br /&gt; &amp;lt;security-constraint&amp;gt;&lt;br /&gt;    &amp;lt;display-name&amp;gt;ssl redirect&amp;lt;/display-name&amp;gt;&lt;br /&gt;    &amp;lt;web-resource-collection&amp;gt;&lt;br /&gt;       &amp;lt;web-resource-name&amp;gt;Protected Area&amp;lt;/web-resource-name&amp;gt;&lt;br /&gt;       &amp;lt;!-- Define the context-relative URL(s) to be protected --&amp;gt;&lt;br /&gt;       &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;       &amp;lt;!-- If you list http methods, only those methods are protected --&amp;gt;&lt;br /&gt;    &amp;lt;/web-resource-collection&amp;gt;&lt;br /&gt;    &amp;lt;user-data-constraint&amp;gt;&lt;br /&gt;       &amp;lt;transport-guarantee&amp;gt;CONFIDENTIAL&amp;lt;/transport-guarantee&amp;gt;&lt;br /&gt;    &amp;lt;/user-data-constraint&amp;gt;&lt;br /&gt; &amp;lt;/security-constraint&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;7. Make sure redirect port of the http connector is pointing to correct ssl port&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt; &amp;lt;connector port="80" protocol="HTTP/1.1" font="" connectionTimeout="20000" redirectPort="443" /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;8. stop and start tomcat&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;9. try http://&amp;lt;your-domain&amp;gt; and it should automatically redirect you to https://&amp;lt;your-domain&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-7801848982352278532?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/7801848982352278532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=7801848982352278532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7801848982352278532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7801848982352278532'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2011/04/installing-ssl-in-tomcat.html' title='Installing SSL in tomcat'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-5759848218900333868</id><published>2010-12-04T23:51:00.000-08:00</published><updated>2010-12-04T23:54:53.424-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><title type='text'>Using Spring Bean from Servlet</title><content type='html'>In order to use a Spring bean from Servlet use the following;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;ServletContext context = getServletContext();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;WebApplicationContext applicationContext =&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;WebApplicationContextUtils.getWebApplicationContext(context);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;UserDao userdao = (UserDao) applicationContext.getBean("userDaoBeanName");&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I ran into this issue when I tried using getHibernateTemplate() in servlet code. Unless you use the above code to get the bean, you will see a NullPointerException. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-5759848218900333868?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/5759848218900333868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=5759848218900333868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/5759848218900333868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/5759848218900333868'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2010/12/using-spring-bean-from-servlet.html' title='Using Spring Bean from Servlet'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-4946688418393901824</id><published>2010-10-13T20:41:00.001-07:00</published><updated>2010-10-13T20:47:20.581-07:00</updated><title type='text'>OpenSCManager failed - Access is denied. (0x57)</title><content type='html'>I was trying to install springsource tc developer edition on vista by execting  "&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; line-height: 13px; white-space: pre; "&gt;tcruntime-ctl.bat spring-insight-instance install". &lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; line-height: 13px; white-space: pre; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; line-height: 13px; white-space: pre; "&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; line-height: 13px; white-space: pre; "&gt;I kept getting an error:  OpenSCManager failed - Access is denied. (0x57). &lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; line-height: 13px; white-space: pre; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; line-height: 13px; white-space: pre; "&gt;I was able to resolve it by browsing to start menu, programs, accessories and right &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; line-height: 13px; white-space: pre; "&gt;clicking command prompt and selecting run as administrator. I then tried running the&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; line-height: 13px; white-space: pre; "&gt;above command again. That fixed the problem. &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-4946688418393901824?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/4946688418393901824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=4946688418393901824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/4946688418393901824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/4946688418393901824'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2010/10/openscmanager-failed-access-is-denied.html' title='OpenSCManager failed - Access is denied. (0x57)'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-3022056903023899033</id><published>2010-09-13T20:29:00.000-07:00</published><updated>2010-09-13T20:32:31.797-07:00</updated><title type='text'>setting up daily cron job</title><content type='html'>create a script in /etc/cron.daily . Do remember that the script should not have any suffix otherwise the cron job will not pick it up. I made a mistake of naming the file mysqlbackup.sh and later discovered that the cron job was not executing this script. I had to rename it to mysqlbackup (no .sh suffix)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-3022056903023899033?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/3022056903023899033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=3022056903023899033' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3022056903023899033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3022056903023899033'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2010/09/setting-up-daily-cron-job.html' title='setting up daily cron job'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-1178147590477102619</id><published>2008-05-06T17:50:00.000-07:00</published><updated>2008-12-08T15:34:59.377-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Apple developer site UI</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_WDRZJeXsF8A/SCD-3p2L69I/AAAAAAAAABw/MvODJWqzyKc/s1600-h/developer.apple.com.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5197434202064939986" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_WDRZJeXsF8A/SCD-3p2L69I/AAAAAAAAABw/MvODJWqzyKc/s320/developer.apple.com.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;It was kind of unusual to see apple developer page messed up. I guess we don't expect to see this kind of UI from a company like Apple which sets a very high standard when it comes to usability.&lt;/div&gt;&lt;br /&gt;&lt;a href="http://developer.apple.com/"&gt;http://developer.apple.com/&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/_WDRZJeXsF8A/SCD9o52L67I/AAAAAAAAABg/Y3wBWSVyifE/s1600-h/developer.apple.com.jpg"&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/_WDRZJeXsF8A/SCD9o52L67I/AAAAAAAAABg/Y3wBWSVyifE/s1600-h/developer.apple.com.jpg"&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-1178147590477102619?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/1178147590477102619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=1178147590477102619' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/1178147590477102619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/1178147590477102619'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2008/05/apple-developer-site-ui.html' title='Apple developer site UI'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_WDRZJeXsF8A/SCD-3p2L69I/AAAAAAAAABw/MvODJWqzyKc/s72-c/developer.apple.com.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-783946528909751329</id><published>2008-05-04T10:02:00.000-07:00</published><updated>2008-05-04T10:19:12.926-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IT'/><title type='text'>Yahoo Small Business India hosting - not ready yet</title><content type='html'>One of my relatives was looking for a hosting solution to host a website for a travel agency. Coincidently, I received a call from a Yahoo sales agent in bangalore about their special website hosting plan along with a domain name for Rs. 999 for the first year. So I signed up for the plan and uploaded the website pages, which were all static.&lt;br /&gt;&lt;br /&gt;As I started using the service I discovered that Yahoo small business India is still not ready for anyone planning to do more than just upload static webpages. I could not configure custom IPs for nameservers and there is no imap access to email accounts. They do offer pop mail access for emails but the emails sent from a mail client are not stored in "sent mail" folder in yahoo account. When contacted, the customer care got back to me with a similar response on both occassions that it is not supported today and they do not have a timeframe for it.&lt;br /&gt;&lt;br /&gt;For anyone looking for a hosting solution in India, I would suggest that you go with other service providers until the service from yahoo allows configurable dns settings and imap email solution. I am going to move my domain to another service provider at the end of current contract term.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-783946528909751329?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/783946528909751329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=783946528909751329' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/783946528909751329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/783946528909751329'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2008/05/yahoo-small-business-india-hosting-not.html' title='Yahoo Small Business India hosting - not ready yet'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-2450883948489567159</id><published>2008-04-25T19:59:00.000-07:00</published><updated>2008-04-25T20:15:51.104-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Developing iphone web application</title><content type='html'>I am currently working on an iphone web application. The first thing I looked for is how to create an iphone-like UI. Luckily I came across a UI framework called &lt;a href="http://www.joehewitt.com/blog/introducing_iui.php"&gt;iUI&lt;/a&gt; which provides a template for UI we often see in iphone applications. It provides a css and javascript along with sample examples to show the usage. Once I downloaded the framework I was ready to create UI screens for my web application. However, I wanted to setup a development environment so that I could test the pages quickly in an emulator. Apple has released an sdk for iphone which can be downloaded from &lt;a href="http://developer.apple.com/iphone/program/"&gt;Apple Developer Connection&lt;/a&gt; site. But it only works on Mac at this time. For windows, Aptana has created an &lt;a href="http://www.aptana.com/iphone"&gt;iphone plug-in&lt;/a&gt; for eclipse that can be used during the development as an iphone emulator. It is very helpful as it provides a quick way to see how the page would appear on an iphone. Plus, it has a built-in server that can be used to test the pages on the iphone handset. I enabled wi-fi on iphone and was able to browse the pages from the phone. Now I have the development environment setup and I am ready to develop a cool iphone app.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-2450883948489567159?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/2450883948489567159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=2450883948489567159' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2450883948489567159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2450883948489567159'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2008/04/developing-iphone-web-application.html' title='Developing iphone web application'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-1719987903154762031</id><published>2007-08-06T12:00:00.000-07:00</published><updated>2007-08-06T12:05:23.223-07:00</updated><title type='text'>Postgres database export and import</title><content type='html'>Here's how to export an existing database and import it into another database in postgres.&lt;br /&gt;&lt;br /&gt;1. Login to a database machine as postgres user&lt;br /&gt;2. use following to export database&lt;br /&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;span style="font-size: 10pt; font-family: Arial;"&gt;pg_dump &lt;span style="font-style: italic;"&gt;database-name&lt;/span&gt; &gt; &lt;span style="font-style: italic;"&gt;filename-dump.out&lt;/span&gt;&lt;o:p&gt;&lt;br /&gt;3. Now create a new database in which the data will be imported, if it does not exist.&lt;br /&gt;createdb &lt;span style="font-style: italic;"&gt;new-database-name&lt;br /&gt;&lt;/span&gt;4. Now import the data into new database&lt;br /&gt;psql -f &lt;span style="font-style: italic;"&gt;filename-dump.out&lt;/span&gt; &lt;span style="font-style: italic;"&gt;new-database-name&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-1719987903154762031?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/1719987903154762031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=1719987903154762031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/1719987903154762031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/1719987903154762031'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/08/postgres-database-export-and-import.html' title='Postgres database export and import'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-2530319504248851963</id><published>2007-04-24T22:20:00.000-07:00</published><updated>2007-04-24T22:24:00.342-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Preventing SSH attacks</title><content type='html'>One solution is to run sshd on a non-standard port. Most automated attacks only attempt to connect on port 22 and therefore, this can be an effective way to hide from many attackers. To configure this, just change the Port line in /etc/ssh/sshd_config and restart ssh as follows;&lt;br /&gt;&lt;br /&gt;vi /etc/ssh/sshd_config&lt;br /&gt;Port 922   &amp;lt;-- update port number and uncomment if the setting is commented&lt;br /&gt;&lt;br /&gt;/etc/init.d/sshd restart&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-2530319504248851963?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/2530319504248851963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=2530319504248851963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2530319504248851963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2530319504248851963'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/preventing-ssh-attacks.html' title='Preventing SSH attacks'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-4231687581901548198</id><published>2007-04-22T20:17:00.000-07:00</published><updated>2007-04-22T20:57:14.878-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><title type='text'>passing attributes in nested tiles</title><content type='html'>Tiles is a great framework to organize site content by constructing a page using multiple tiles. It allows reuse and customization of site content. I ran into a problem of making tiles attribute visible to a nested tile. The attributes defined in tiles definitions are defined in tiles scope and hence only available to the tile associated with the definition. In order to make the attribute available to nested tiles, pass the attribute as follows;&lt;br /&gt;&lt;br /&gt;&amp;lt;tiles:insert attribute="header" ignore="true"&amp;gt;&lt;br /&gt;&amp;lt;tiles:put name="title" beanName="title" beanScope="tile"/&amp;gt;&lt;br /&gt;&amp;lt;/tiles:insert&amp;gt;&lt;br /&gt;&lt;br /&gt;If there is a need to access the attribute in struts bean tags or JSTL use &amp;lt;tiles:useAttribute/&amp;gt; or &amp;lt;tiles:importAttribute/&amp;gt; tags in jsp to access the attribute as follows;&lt;br /&gt;&lt;br /&gt;&amp;lt;tiles:useAttribute name="title" /&amp;gt;&lt;br /&gt;&lt;br /&gt;You can now access the value of title attribute using struts bean tag &amp;lt;bean:write name="title" /&amp;gt; or using JSTL as ${title}&lt;br /&gt;&lt;br /&gt;For more detailed explanation look at a sample chapter &lt;a href="http://www.manning-source.com/books/husted/husted_ch11.pdf"&gt;Developing applications with tiles&lt;/a&gt; from the book Struts in Action.&lt;br /&gt;&lt;br /&gt;More advanced tips and tricks for tiles can be found in &lt;a href="http://www.arc-mind.com/downloads_protected/tutorials/struts/advanced-tiles.pdf"&gt;Master the Tiles framework&lt;/a&gt; and &lt;a href="http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf"&gt;The Advanced Fratures&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-4231687581901548198?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/4231687581901548198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=4231687581901548198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/4231687581901548198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/4231687581901548198'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/passing-attributes-in-nested-tiles.html' title='passing attributes in nested tiles'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-3549553879796636379</id><published>2007-04-19T17:25:00.000-07:00</published><updated>2007-04-19T17:31:51.401-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>no pg_hba.conf entry for host xyz</title><content type='html'>If you get this error while connecting to a postgres database, most likely you are missing an entry in pg_hba.conf file to allow users from your machine to access the database. You will normally find the pg_hba.conf file in /var/lib/pgsql/data directory. If you don't find it there, look for PGDATA environment variable by doing a login to postgres server as a postgres user and typing env at command prompt. Then edit the file to add following entry ;&lt;br /&gt;&lt;br /&gt;host      all       all         XYZ   255.255.255.255  trust&lt;br /&gt;&lt;br /&gt;just below the following entry&lt;br /&gt;&lt;br /&gt;host      all       all         127.0.0.1   255.255.255.255  trust&lt;br /&gt;&lt;br /&gt;and restart the postgres process by typing pg_ctl restart . It should now allow all user from your machine to connect to the database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-3549553879796636379?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/3549553879796636379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=3549553879796636379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3549553879796636379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3549553879796636379'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/no-pghbaconf-entry-for-host-xyz.html' title='no pg_hba.conf entry for host xyz'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-2004412099169039755</id><published>2007-04-13T23:22:00.000-07:00</published><updated>2007-04-13T23:29:53.795-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>MySQL Bad handshake error</title><content type='html'>I was trying to use tomcat connection pooling to establish a connection to MySQL database. I ran into "Bad handshake" SQLException. After few minutes on internet, I figured out that it was a problem with the driver. However, when I checked WEB-INF/lib directory I found latest mysql driver already placed in that directory. However, I found another older MySQL driver in &amp;lt;tomcat-dir&amp;gt;/common/lib . So tomcat was loading the old driver from classpath ahead of latest drivers in WEB-INF/lib directory. Once I updated the old driver with the latest version, everything worked fine. Note: removing the driver from &amp;lt;tomcat-dir&amp;gt;/common/lib did not fix the problem since tomcat connection pool needs to load the driver from common library location.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-2004412099169039755?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/2004412099169039755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=2004412099169039755' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2004412099169039755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2004412099169039755'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/mysql-bad-handshake-error.html' title='MySQL Bad handshake error'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-8734086942993668362</id><published>2007-04-11T18:04:00.000-07:00</published><updated>2007-04-11T18:08:46.658-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>setting up cron jobs</title><content type='html'>In order to setup cron jobs for a user other than the root, use the following command which should open a file in vi editor that schedules cron job for that particular user.&lt;br /&gt;&lt;br /&gt;crontab -u &amp;lt;user&amp;gt; -e&lt;br /&gt;&lt;br /&gt;Later, if you wanted to view a list of cron jobs scheduled by a user, use the following command.&lt;br /&gt;&lt;br /&gt;crontab -u &amp;lt;user&amp;gt; -l&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-8734086942993668362?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/8734086942993668362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=8734086942993668362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/8734086942993668362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/8734086942993668362'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/setting-up-cron-jobs.html' title='setting up cron jobs'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-7934071655946081101</id><published>2007-04-08T12:25:00.000-07:00</published><updated>2007-04-13T01:12:35.835-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Hibernate MySql Connection timeout</title><content type='html'>I noticed that a web application deployed on tomcat application server kept throwing JDBC exceptions after every couple of days. So I guessed that it must be a problem with mysql database connection timing out. I did quick search on the issue and found &lt;a href="http://www.michaelstudman.com/fullfathomfive/articles/2004/06/07/mysql-dropping-connections-and-hibernate"&gt;this article&lt;/a&gt; explaining the problem. You need to switch from the default Hibernate connection pooling to one of the production grade database connection pooling technology and set appropriate timeout settings.&lt;br /&gt;&lt;br /&gt;You will also need to create a c3p0.properties file containing following values;&lt;br /&gt;&lt;br /&gt; # a good mysql test query&lt;br /&gt;c3p0.preferredTestQuery=SELECT 1&lt;br /&gt;c3p0.testConnectionOnCheckout=true&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-7934071655946081101?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/7934071655946081101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=7934071655946081101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7934071655946081101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7934071655946081101'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/hibernate-mysql-connection-timeout.html' title='Hibernate MySql Connection timeout'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-9038882677631390389</id><published>2007-04-05T00:50:00.000-07:00</published><updated>2007-04-05T01:02:39.720-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><title type='text'>Password protecting tomcat web application</title><content type='html'>Following configuration in web.xml of a web application is useful for password protecting the web application in tomcat servlet engine.&lt;br /&gt;&lt;br /&gt;&lt;pre style="margin: 0em;"&gt;    &lt;br /&gt;    &amp;lt;security-constraint&amp;gt;&lt;br /&gt;      &amp;lt;web-resource-collection&amp;gt;&lt;br /&gt;        &amp;lt;web-resource-name&amp;gt;portalBase Application&amp;lt;/web-resource-name&amp;gt;&lt;br /&gt;        &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;        &amp;lt;!-- If you list http methods, only those methods are protected --&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;http-method&amp;gt;DELETE&amp;lt;/http-method&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;http-method&amp;gt;GET&amp;lt;/http-method&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;http-method&amp;gt;POST&amp;lt;/http-method&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;http-method&amp;gt;PUT&amp;lt;/http-method&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;/web-resource-collection&amp;gt;&lt;br /&gt;      &amp;lt;auth-constraint&amp;gt;&lt;br /&gt;        &amp;lt;role-name&amp;gt;role1&amp;lt;/role-name&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;/auth-constraint&amp;gt;&lt;br /&gt;    &amp;lt;/security-constraint&amp;gt;&lt;br /&gt;    &amp;lt;login-config&amp;gt;&lt;br /&gt;      &amp;lt;auth-method&amp;gt;BASIC&amp;lt;/auth-method&amp;gt;&lt;br /&gt;      &amp;lt;realm-name&amp;gt;portalBase Application&amp;lt;/realm-name&amp;gt;&lt;br /&gt;    &amp;lt;/login-config&amp;gt;&lt;br /&gt;    &amp;lt;!-- Security roles referenced by this web application --&amp;gt;&lt;br /&gt;    &amp;lt;security-role&amp;gt;&lt;br /&gt;      &amp;lt;role-name&amp;gt;role1&amp;lt;/role-name&amp;gt;&lt;br /&gt;    &amp;lt;/security-role&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;Update tomcat-users.xml in $CATALINA_HOME/conf directory to associate users with the role.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;?xml version='1.0' encoding='utf-8'?&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;tomcat-users&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;role rolename=&amp;quot;tomcat&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;role rolename=&amp;quot;role1&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;role rolename=&amp;quot;manager&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;role rolename=&amp;quot;admin&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;user username=&amp;quot;tomcat&amp;quot; password=&amp;quot;tomcat&amp;quot; roles=&amp;quot;tomcat&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;user username=&amp;quot;role1&amp;quot; password=&amp;quot;tomcat&amp;quot; roles=&amp;quot;role1&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;user username=&amp;quot;admin&amp;quot; password=&amp;quot;password&amp;quot; roles=&amp;quot;admin,manager&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;/tomcat-users&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Restart the tomcat and try the url to web application. It should pop up a username/password dialog box.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-9038882677631390389?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/9038882677631390389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=9038882677631390389' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/9038882677631390389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/9038882677631390389'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/password-protecting-tomcat-web.html' title='Password protecting tomcat web application'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-6210845987439668663</id><published>2007-04-04T19:52:00.000-07:00</published><updated>2007-04-08T09:25:10.061-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Blocking port 8080</title><content type='html'>Linux firewall can be managed using iptables command. I setup tomcat with Apache webserver in front using mod_jk2. But tomcat was still accessbile from port 8080. In order to disable direct access to port 8080 I executed following command.&lt;br /&gt;&lt;br /&gt;iptables -A INPUT -p tcp --dport 8080 -j REJECT&lt;br /&gt;&lt;br /&gt;You can review the above rule and any other existing rules as follows;&lt;br /&gt;&lt;br /&gt;iptables -L -n --line-numbers&lt;br /&gt;&lt;br /&gt;Now, if later you wanted to undo or remove a rule, use the above command to figure out the line number of the rule. A sample output from the previous command looks like below;&lt;br /&gt;&lt;br /&gt;Chain INPUT (policy DROP)&lt;br /&gt;num  target     prot opt source               destination         &lt;br /&gt;1    LOG        tcp  --  0.0.0.0/0            0.0.0.0/0          tcp flags:!0x16/0x02 state NEW LOG flags 0 level 4 prefix `NEW NOT SYN: ' &lt;br /&gt;2    DROP       tcp  --  0.0.0.0/0            0.0.0.0/0          tcp flags:!0x16/0x02 state NEW &lt;br /&gt;3    DROP       tcp  --  207.46.249.190       0.0.0.0/0          tcp &lt;br /&gt;4    DROP       tcp  --  0.0.0.0/0            0.0.0.0/0          tcp dpt:1214 &lt;br /&gt;5    DROP       udp  --  0.0.0.0/0            0.0.0.0/0          udp dpt:1214 &lt;br /&gt;6    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0          &lt;br /&gt;7    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0          udp spt:67 dpt:68 &lt;br /&gt;&lt;br /&gt;Now, let's say you wanted to remove the rule at line number #3. It can be done as following;&lt;br /&gt;&lt;br /&gt;iptables -R INPUT 3&lt;br /&gt;&lt;br /&gt;For more details, look at this quick &lt;a href="http://www.cse.msu.edu/~minutsil/iptables.html"&gt;HowTo&lt;/a&gt; guide.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-6210845987439668663?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/6210845987439668663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=6210845987439668663' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/6210845987439668663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/6210845987439668663'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/blocking-port-8080.html' title='Blocking port 8080'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-6094302044634511960</id><published>2007-04-04T18:35:00.000-07:00</published><updated>2007-04-04T18:39:10.739-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>MySQL GUI tools over ssh</title><content type='html'>I was very comfortable using MySQL query and admin GUI tools to connect to MySQL database. However, recently I had to manage a database that was behind a firewall. I found &lt;a href="http://www.vbmysql.com/articles/security/connecting-the-mysql-gui-tools-to-a-remote-server-through-a-firewall/"&gt;these steps&lt;/a&gt; very useful to enable ssh tunneling (or forwarding) to access MySQL database behind the firewall using GUI tools. It is very easy to setup and only took couple of minutes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-6094302044634511960?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/6094302044634511960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=6094302044634511960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/6094302044634511960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/6094302044634511960'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/mysql-gui-tools-over-ssh.html' title='MySQL GUI tools over ssh'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-4767050579978232830</id><published>2007-04-04T18:31:00.000-07:00</published><updated>2007-04-04T18:34:35.606-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Backup of MySql database</title><content type='html'>Following command can be used to take a dump of an existing MySQL database.&lt;br /&gt;&lt;br /&gt;mysqldump db-name --host=host-name --user=user-id --password=user-pass &amp;gt; init-db.sql&lt;br /&gt;&lt;br /&gt;This will create a file called init-db.sql containing sql queries to reinitialize the database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-4767050579978232830?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/4767050579978232830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=4767050579978232830' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/4767050579978232830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/4767050579978232830'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/backup-of-mysql-database.html' title='Backup of MySql database'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-6137574220861019724</id><published>2007-04-04T15:03:00.000-07:00</published><updated>2007-04-04T15:12:15.030-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Creating no-reply@domain.com account in Postfix</title><content type='html'>If you wanted to send emails to users but did not want to receive any replies to the email, you would need to setup a no-reply@domain.com email account. These kind of email ids are useful when sending emails containing forgotten passwords or activation code. Below are the steps for creating such account in Postfix.&lt;br /&gt;&lt;br /&gt;1. Identify the file containing alias for Postfix&lt;br /&gt;&lt;br /&gt;First, make sure the following line in the ALIAS DATABASE section of the /etc/postfix/main.cf is NOT commented out:&lt;br /&gt;&lt;br /&gt;alias_maps = hash:/etc/aliases&lt;br /&gt;&lt;br /&gt;2. Create an alias that redirects messages to /dev/null&lt;br /&gt;&lt;br /&gt;Edit /etc/aliases and add following entry&lt;br /&gt;&lt;br /&gt;devnull: /dev/null&lt;br /&gt;&lt;br /&gt;3. Create a virtual email id&lt;br /&gt;&lt;br /&gt;Edit /etc/postfix/virtual and add following entry&lt;br /&gt;&lt;br /&gt;no-reply@domain.com devnull&lt;br /&gt;&lt;br /&gt;4. refresh postfix alias and postfix cache&lt;br /&gt;&lt;br /&gt;Execute following commands. (You may require root privileges)&lt;br /&gt;&lt;br /&gt;&gt; newaliases&lt;br /&gt;&lt;br /&gt;&gt; postfix reload&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-6137574220861019724?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/6137574220861019724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=6137574220861019724' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/6137574220861019724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/6137574220861019724'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/creating-no-replydomaincom-account-in.html' title='Creating no-reply@domain.com account in Postfix'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-1492043711550622246</id><published>2007-04-04T11:17:00.000-07:00</published><updated>2007-04-04T11:21:25.012-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><title type='text'>Restrict access to IPs in Tomcat</title><content type='html'>Add following valve to tomcat server.xml to restrict access to the website from limited IPs.&lt;br /&gt;&lt;br /&gt;  &amp;lt;Valve className="org.apache.catalina.valves.RemoteAddrValve"       allow="127.0.0.1,xx.xxx.xxx.xx,xxx.xx.xxx.[6789].,xxx.xx.xx.xx.*,xxx.xx.xx.x[2345].,&lt;br /&gt;xxx.xx.xx.xx[4578]"/&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-1492043711550622246?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/1492043711550622246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=1492043711550622246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/1492043711550622246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/1492043711550622246'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/04/restrict-access-to-ips-in-tomcat.html' title='Restrict access to IPs in Tomcat'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-3951991560159391677</id><published>2007-03-19T17:24:00.000-07:00</published><updated>2007-03-19T17:35:34.749-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><title type='text'>Logging User Session-ID in Tomcat access logs</title><content type='html'>In order to capture session-id of user in tomcat access logs, use the following value for pattern attribute in AccessLogValve.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;pattern="%h %l %u %t &amp;quot;%r&amp;quot; %s %b &amp;quot;%{Referer}i&amp;quot; &amp;quot;%{User-Agent}i&amp;quot; %S" &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;For more information, loook at &lt;a href="http://tomcat.apache.org/tomcat-5.0-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html"&gt;AccessLogValve&lt;/a&gt; API documentation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-3951991560159391677?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/3951991560159391677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=3951991560159391677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3951991560159391677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3951991560159391677'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/03/logging-user-session-id-in-tomcat.html' title='Logging User Session-ID in Tomcat access logs'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-3910511048936920856</id><published>2007-03-19T13:30:00.000-07:00</published><updated>2007-04-04T11:23:04.659-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><title type='text'>Web Application specific Configuration</title><content type='html'>I was looking for a way to easily manage web application specific configuration in separate properties file. In our current version of application, a properties file was included in a war file of web application. However, this was problematic since the properties file had to be updated every time we deployed a new war file. I tried passing the name of the properties file in Tomcat command-line but that did not work well for multiple web applications. Then I came across Environment tags in Tomcat context definition that can be configured for each individual application. So I decided to us the following solution.&lt;br /&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;1. Add Environment entry for name of a properties file in context definition of web application.&lt;br /&gt;&amp;lt;Context path="/app1" docBase="C:/app1/web-dir"&lt;br /&gt;        debug="0" reloadable="true"&amp;gt;&lt;br /&gt;            &amp;lt;Environment name="appconfig" value="WebApp1.properties"&lt;br /&gt;                     type="java.lang.String" override="false"/&amp;gt;&lt;br /&gt;&amp;lt;/Context&amp;gt;&lt;br /&gt;&lt;br /&gt;2. Obtain the name of properties file specified as above using JNDI.&lt;br /&gt;&lt;br /&gt;Context initCtx = new InitialContext();&lt;br /&gt;String filename = (String) initCtx.lookup("java:comp/env/appconfig");  &lt;br /&gt;&lt;br /&gt;3. Put the properties file in a directory that is available on CLASSPATH and access the properties using Jakarta Commons utility.&lt;br /&gt;&lt;br /&gt;Configuration config = new PropertiesConfiguration(filename); &lt;br /&gt;&lt;br /&gt;public String get(String key) {&lt;br /&gt;   return config.getString(key);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;&lt;br /&gt;Now it is easy to create and manage configuration for individual web application by specifying different filename in Context definition of the web application.&lt;br /&gt;&lt;br /&gt;If you need to access the configuration from independent Java code running outside Tomcat, then use JNDI to query tomcat and obtain appropriate web application configuration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-3910511048936920856?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/3910511048936920856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=3910511048936920856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3910511048936920856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3910511048936920856'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/03/web-application-specific-configuration.html' title='Web Application specific Configuration'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-8165613292247194408</id><published>2007-03-17T12:37:00.000-07:00</published><updated>2007-03-17T12:50:31.316-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><title type='text'>Unlocking Nokia Phone</title><content type='html'>I misplaced my Motorola Razr and wanted to use my old Nokia phone in the mean time. So I went to a local operator outlet store and they gave me a new SIM card but refused to unlock the old phone. I also tried calling the customer service but got the same answer. So I did a search on google to see if any third-party could help me unlock the Nokia phone. That is when I came across &lt;a href="http://www.peters1.dk/webtools/nokia/nokiaonline.php?sprog=en"&gt;Free SIM Unlock Nokia online&lt;/a&gt; . I was able to unlock my Nokia phone in a matter of few minutes without any issues. The steps were very precise and simple. I wonder if it is worth the time and money operators have to invest in enforcing this restriction, when the phones can be unlocked so easily. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.peters1.dk/unlock/nokia/online.php?sprog=en"&gt;&lt;img src="http://www.peters1.dk/links/2.gif" style="border:1px solid black" alt="Free SIM Unlock Nokia online" title="Free SIM Unlock Nokia online" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-8165613292247194408?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/8165613292247194408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=8165613292247194408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/8165613292247194408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/8165613292247194408'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/03/unlocking-nokia-phone.html' title='Unlocking Nokia Phone'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-3213042209294277015</id><published>2007-03-12T00:13:00.000-07:00</published><updated>2007-03-12T00:17:42.981-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Taking snapshot Image of Website</title><content type='html'>Recently I came across an article that mentioned &lt;a href="http://pearlcrescent.com/products/pagesaver/"&gt;Pearl Crescent Page Saver&lt;/a&gt; extension for Firefox that allows users to save a snapshot of the website as an image. It is a very handy tool that lets you save either the visible portion of the website or the entire website to an image file. That is very helpful as I remember I had to use Paint tool to manually merge the snapshots of a website that did not fit all in one page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-3213042209294277015?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/3213042209294277015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=3213042209294277015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3213042209294277015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/3213042209294277015'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/03/taking-snapshot-image-of-website.html' title='Taking snapshot Image of Website'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-1963772671497119482</id><published>2007-03-08T13:03:00.000-08:00</published><updated>2007-03-08T13:06:10.937-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Extract a column from text file</title><content type='html'>In order to extract a column values from a text file where each line contains several words separated by space, following can be used;&lt;br /&gt;&lt;br /&gt;cut -d' ' -f6 file.txt &gt; result.txt&lt;br /&gt;&lt;br /&gt;This would extract values from 6th column in a file named file.txt where each line contains words separated by white spaces.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-1963772671497119482?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/1963772671497119482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=1963772671497119482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/1963772671497119482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/1963772671497119482'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/03/extract-column-from-text-file.html' title='Extract a column from text file'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-2781986392587798457</id><published>2007-01-29T13:16:00.000-08:00</published><updated>2007-01-29T17:05:16.056-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Linux: Create New User Account</title><content type='html'>&lt;p&gt;Creating a user account is a two step process.&lt;/p&gt;1. Create a user account.&lt;br /&gt;prompt&gt; useradd &lt;span style="font-style: italic;"&gt;user-name&lt;/span&gt;&lt;user-name&gt;&lt;br /&gt;&lt;br /&gt;2. set a password for the new account.&lt;br /&gt;prompt&gt;passwd &lt;span style="font-style: italic;"&gt;user-name&lt;/span&gt;&lt;user-name&gt;&lt;br /&gt;&lt;br /&gt;This will create a user &lt;user-name&gt; with a home directory /home/&lt;span style="font-style: italic;"&gt;user-name&lt;/span&gt;&lt;user-name&gt; and default shell set to bash.&lt;/user-name&gt;&lt;/user-name&gt;&lt;/user-name&gt;&lt;/user-name&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-2781986392587798457?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/2781986392587798457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=2781986392587798457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2781986392587798457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2781986392587798457'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/01/linux-create-new-user-account.html' title='Linux: Create New User Account'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-7728594045999060394</id><published>2007-01-26T15:30:00.000-08:00</published><updated>2007-01-26T15:38:27.155-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Setting Clock</title><content type='html'>The clock can be set manually and using NTP service.&lt;br /&gt;&lt;br /&gt;1. Manually:&lt;br /&gt;&lt;br /&gt;[root@server /root]# date 012621362007&lt;br /&gt;Fri Jan 26 21:36:26 PST 2007&lt;br /&gt;[root@server /root]# hwclock --utc --systohc&lt;br /&gt;[root@server /root]#&lt;br /&gt;&lt;br /&gt;2. Using NTP service:&lt;br /&gt;&lt;br /&gt;Add the time server to /etc/ntp.conf and to /etc/ntp/step-tickers:&lt;br /&gt;&lt;br /&gt;/etc/ntp.conf:&lt;br /&gt;&lt;br /&gt;server  192.168.0.1&lt;br /&gt;server  192.168.0.2&lt;br /&gt;&lt;br /&gt;/etc/ntp/step-tickers&lt;br /&gt;192.168.0.1&lt;br /&gt;192.168.0.2&lt;br /&gt;&lt;br /&gt;Then make sure that ntp will start at boot time:&lt;br /&gt;chkconfig --level 2345 ntpd on&lt;br /&gt;chkconfig --list ntpd&lt;br /&gt;&lt;br /&gt;And start the service:&lt;br /&gt;service ntpd start&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-7728594045999060394?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/7728594045999060394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=7728594045999060394' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7728594045999060394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7728594045999060394'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/01/setting-clock.html' title='Setting Clock'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-2424201294239061078</id><published>2007-01-26T15:21:00.000-08:00</published><updated>2007-01-26T15:24:37.849-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Postgres Commands</title><content type='html'>&lt;p&gt; To create a database;&lt;br /&gt;createdb [db-name] &lt;/p&gt;&lt;p&gt; To get a psql prompt;&lt;br /&gt;psql [db-name] &lt;/p&gt;&lt;p&gt; To export table data;&lt;br /&gt;pg_dump --data-only --table=table-name db-name &gt; file-name&lt;/p&gt;&lt;p&gt; Following commands can be executed at psql prompt. &lt;/p&gt;&lt;p&gt; list all databases in postgres; \l &lt;/p&gt;&lt;p&gt; list all tables in a database; \d &lt;/p&gt;&lt;p&gt; execute a sql script; \i [sql-script] &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-2424201294239061078?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/2424201294239061078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=2424201294239061078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2424201294239061078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2424201294239061078'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/01/postgres-commands.html' title='Postgres Commands'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-2191003918024651703</id><published>2007-01-26T13:50:00.000-08:00</published><updated>2007-01-26T15:26:04.090-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Search and Replace String</title><content type='html'>&lt;code&gt;&lt;/code&gt;A string consisting of one or more words can be replaced as follows.&lt;br /&gt;&lt;br /&gt;&gt;cat file&lt;br /&gt;&lt;br /&gt;the black cat was chased by the brown dog&lt;br /&gt;&lt;br /&gt;&gt;sed -e 's/black/white/g' file&lt;br /&gt;&lt;br /&gt;the white cat was chased by the brown dog&lt;br /&gt;&lt;br /&gt;A pattern can also be used for search string. For example following will replace entire string starting with 2007 until = symbol in a text.&lt;br /&gt;&lt;br /&gt;sed -e 's/^2007.*=/replacestring/' file&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-2191003918024651703?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/2191003918024651703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=2191003918024651703' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2191003918024651703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/2191003918024651703'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2007/01/search-and-replace-string.html' title='Search and Replace String'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-45591240992495699.post-7096805149674300234</id><published>2006-12-21T16:19:00.000-08:00</published><updated>2006-12-22T11:41:23.366-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Installing PostgreSQL on Linux</title><content type='html'>Recently I had to install postgresql on a linux machine. I ended up referring to more than one article on the web. So here's an attempt to capture all in one document.&lt;br /&gt;&lt;br /&gt;1. Download latest postgresql-XXX.tar.gz (where XXX is a release number) distribution of postgres database. At the time of writing this document 8.2 is the latest release. &lt;p&gt; 2. Due to built-in security reasons, postgres cannot run as a root user. Therefore, become a superuser and create a postgres group. Then add a user postgres to the group as follows; &lt;/p&gt;&lt;p&gt; sudo su - root        (become a superuser) &lt;/p&gt;&lt;p&gt; groupadd postgres     (create a postgres group) &lt;/p&gt;&lt;p&gt; useradd postgres –g postgres   (create a postgres user) &lt;/p&gt;&lt;p&gt; 3. Extract the tar file into /usr/local directory. This should create a postgresql-XXX subdirectory in /usr/local. &lt;/p&gt;&lt;p&gt; cd /usr/local &lt;/p&gt;&lt;p&gt; gunzip -c /path-to-file/postgresql-XXX.tar.gz | tar xvf - &lt;/p&gt;&lt;p&gt; 4. create a /usr/local/pgsql directory where postgres database will be installed. &lt;/p&gt;&lt;p&gt; mkdir /usr/local/pgsql &lt;/p&gt;&lt;p&gt; 5. Assign ownership of directories created above to postgres user. &lt;/p&gt;&lt;p&gt; chown -R postgres.postgres /usr/local/pgsql &lt;/p&gt;&lt;p&gt; chown -R postgres.postgres /usr/local/postgresql-XXX &lt;/p&gt;&lt;p&gt; 6. Switch to postgres user from superuser. &lt;/p&gt;&lt;p&gt; su - postgres &lt;/p&gt;&lt;p&gt; 7. Configure and prepare postgres for installation. &lt;/p&gt;&lt;p&gt; ./configure &lt;/p&gt;&lt;p&gt; gmake &lt;/p&gt;&lt;p&gt; If successful, the last line displayed should be as below. &lt;/p&gt;&lt;p&gt; "All of &lt;noop&gt;PostgreSQL&lt;/noop&gt; is successfully made. Ready to install." &lt;/p&gt;&lt;p&gt; 8. start installation &lt;/p&gt;&lt;p&gt; gmake install &lt;/p&gt;&lt;p&gt; 9. Set environment variables. Add following to .bashrc in home directory of postgres user. For example, /home/postgres &lt;/p&gt;&lt;p&gt; LD_LIBRARY_PATH=/usr/local/pgsql/lib &lt;/p&gt;&lt;p&gt; export LD_LIBRARY_PATH &lt;/p&gt;&lt;p&gt; PATH=/usr/local/pgsql/bin:$PATH &lt;/p&gt;&lt;p&gt; export PATH &lt;/p&gt;&lt;p&gt; MANPATH=/usr/local/pgsql/man:$MANPATH &lt;/p&gt;&lt;p&gt; export MANPATH &lt;/p&gt;&lt;p&gt;10. Link runtime libraries for faster access. (you need to be a superuser to execute this command. Type exit, run the command and then type "su - postgres" to log back in as postgres user). &lt;/p&gt;&lt;p&gt; /sbin/ldconfig /usr/local/pgsql/lib &lt;/p&gt;&lt;p&gt; 11. Create a directory for storing database data files. &lt;/p&gt;&lt;p&gt; mkdir /usr/local/pgsql/data &lt;/p&gt;&lt;p&gt; 12. Start postgres process. &lt;/p&gt;&lt;p&gt; cd /usr/local/pgsql/bin &lt;/p&gt;&lt;p&gt; postgres -D /usr/local/pgsql/data &gt;logfile 2&gt;&amp;1 &amp;amp; &lt;/p&gt;&lt;p&gt; 13. Add following to /etc/rc.d/rc.local script so that postgres is restarted upon reboot. &lt;/p&gt;&lt;p&gt; /usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgsql/data&lt;/p&gt;This completes the Postgres installation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/45591240992495699-7096805149674300234?l=webpatrika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webpatrika.blogspot.com/feeds/7096805149674300234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=45591240992495699&amp;postID=7096805149674300234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7096805149674300234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/45591240992495699/posts/default/7096805149674300234'/><link rel='alternate' type='text/html' href='http://webpatrika.blogspot.com/2006/12/installing-postgres-on-linux.html' title='Installing PostgreSQL on Linux'/><author><name>Manish shah</name><uri>https://profiles.google.com/117534185496212277923</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-WS9aHSHVxBE/AAAAAAAAAAI/AAAAAAAABBc/RhHb7Bwx5Ss/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
