<?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-1369999777585308932</id><updated>2011-05-18T12:38:03.355+08:00</updated><category term='compilation error'/><category term='ibatis'/><category term='mail'/><category term='port 80'/><category term='Intro'/><category term='Template'/><category term='temp'/><category term='javascript'/><category term='java'/><category term='php'/><category term='lol'/><category term='cricket'/><category term='fileupload'/><category term='jsp'/><category term='Film'/><category term='Oracle'/><category term='blog'/><category term='ie'/><category term='JDBC'/><category term='encryption'/><category term='sql'/><category term='software'/><category term='spring'/><category term='HTML'/><category term='keyboard'/><category term='video'/><category term='portal'/><category term='servlet'/><category term='Memory'/><category term='unicode'/><category term='AIX'/><category term='gmail'/><category term='db'/><category term='Excel'/><title type='text'>Tech-lona</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-7010359700792772441</id><published>2009-04-13T18:30:00.000+08:00</published><updated>2009-04-13T18:31:30.014+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Inserting &amp; in oracle</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt;If there are any  &lt;b&gt;&lt;span style="font-weight: bold;"&gt;&amp;amp;&lt;/span&gt;&lt;/b&gt; symbol in your sql insert  query value, replace it with &lt;/span&gt;&lt;/span&gt;&lt;tt&gt;&lt;b&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-weight: bold; font-size: 10pt;"&gt;&amp;amp;'||'&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/tt&gt;&lt;tt&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;. (In case if the query  fails to run)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt;The &lt;b&gt;&lt;span style="font-weight: bold;"&gt;&amp;amp; &lt;/span&gt;&lt;/b&gt;will be considered as beginning of  variable name in Oracle SQL.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt;Note: This is only if  the &lt;b&gt;&lt;span style="font-weight: bold;"&gt;&amp;amp; &lt;/span&gt;&lt;/b&gt;symbol is inside  quotes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt;Eg:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt;Insert into temp  values(2.’me&amp;amp;u’); &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Wingdings;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Wingdings;"&gt;è&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;color:navy;"&gt;&lt;span style="font-size: 10pt; color: navy; font-family: Arial;"&gt; Insert into temp  values(2.’me&amp;amp;’||’u’);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-7010359700792772441?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/7010359700792772441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=7010359700792772441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7010359700792772441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7010359700792772441'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2009/04/inserting-in-oracle.html' title='Inserting &amp; in oracle'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-9026096903325532020</id><published>2009-03-31T19:00:00.004+08:00</published><updated>2009-04-21T17:00:43.424+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Searching inside the Oracle Functions/Packages/Procedures</title><content type='html'>To search a text inside a oracle database function or package, We can use this query&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;select * from USER_SOURCE where upper(TEXT) like '%search text%'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;USER_SOURCE describes the text source of the stored objects owned by the current user. Its columns (except for OWNER) are the same as those in "ALL_SOURCE".&lt;/span&gt;&lt;br /&gt; - &lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4436.htm"&gt;http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4436.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-9026096903325532020?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/9026096903325532020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=9026096903325532020' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/9026096903325532020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/9026096903325532020'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2009/03/searching-inside-oracle.html' title='Searching inside the Oracle Functions/Packages/Procedures'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-9120733942602051023</id><published>2008-11-10T11:14:00.001+08:00</published><updated>2008-11-10T11:18:15.691+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='keyboard'/><title type='text'>@ and " are swapped?</title><content type='html'>Oh God. This is a terrible problem i had.&lt;div&gt;Whenever i pressed @ key in laptop, " came as output. and vice versa.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But the Solution was damn simple.&lt;/div&gt;&lt;div&gt;Someone changed the Keyboard country setting to UK, Just change it to US. Thats all.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-9120733942602051023?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/9120733942602051023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=9120733942602051023' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/9120733942602051023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/9120733942602051023'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/11/and-are-swapped.html' title='@ and &quot; are swapped?'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-1942239428236750121</id><published>2008-11-04T10:48:00.002+08:00</published><updated>2008-11-04T10:50:17.457+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Number restriction in textbox using javascript</title><content type='html'>I have a developed this simple javascript to allow user to key in only numerics and dot(for decimals).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;function verify(e)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    var zero=48;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    var nine=57;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    var dot=46;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    if((e.keyCode==dot)||(e.keyCode&gt;=zero &amp;amp;&amp;amp; e.keyCode&lt;=nine)){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        return true;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    return false;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;input type="text" onkeypress="return verify(event)" name="txt" id="txt"&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/1369999777585308932-1942239428236750121?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/1942239428236750121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=1942239428236750121' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/1942239428236750121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/1942239428236750121'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/11/number-restriction-in-textbox-using.html' title='Number restriction in textbox using javascript'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-6823191477605630756</id><published>2008-10-31T16:51:00.001+08:00</published><updated>2008-10-31T16:53:07.666+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='mail'/><title type='text'>Best example for Javamail</title><content type='html'>I have found a wonderful sample of javamail in here &lt;a href="http://www.rgagnon.com/javadetails/java-0321.html"&gt;http://www.rgagnon.com/javadetails/java-0321.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-6823191477605630756?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/6823191477605630756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=6823191477605630756' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/6823191477605630756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/6823191477605630756'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/10/best-example-for-javamail.html' title='Best example for Javamail'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-7291102017617509372</id><published>2008-10-30T12:05:00.002+08:00</published><updated>2008-10-30T12:12:02.901+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='port 80'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Apache Service not running in port 80</title><content type='html'>I have been trying to learn php and MySQL stuff for hosting my own website. I will write a separate post on how to configure and initial settings.&lt;br /&gt;&lt;br /&gt;But main problem all will encounter will be the port 80 already running.&lt;br /&gt;&lt;br /&gt;If any other service runs in port 80, then the apache server service wont start. It will keep begging you to clean port or change port.&lt;br /&gt;&lt;br /&gt;The one simple solution is to change the listen port in the httpd.conf&lt;br /&gt;Change &lt;span style="font-family: courier new;"&gt;Listen 80&lt;/span&gt; to &lt;span style="font-family: courier new;"&gt;Listen 90&lt;/span&gt;. Here the port 90 can be anyother free port.&lt;br /&gt;&lt;br /&gt;If not and you desperately wanted to change the port, then you need to scan all your ports. Check which process is using port 80 and kill it.&lt;br /&gt;&lt;br /&gt;The one of the best freeware command prompt port scanner i use is &lt;span style="font-weight: bold;"&gt;fport&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Use it to find the port, and stop the process. Continue with your port 80. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-7291102017617509372?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/7291102017617509372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=7291102017617509372' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7291102017617509372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7291102017617509372'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/10/apache-service-not-running-in-port-80.html' title='Apache Service not running in port 80'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-3855069688107430883</id><published>2008-10-17T11:16:00.005+08:00</published><updated>2008-10-17T11:48:58.981+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fileupload'/><category scheme='http://www.blogger.com/atom/ns#' term='jsp'/><title type='text'>FileUpload in JSP</title><content type='html'>Its been so long since i last blogged.&lt;br /&gt;This time i am coming up with how to upload files in jsp.&lt;br /&gt;&lt;br /&gt;The first and formost thing before doing this is to have the necessary framework to do this uploading.&lt;br /&gt;&lt;br /&gt;You can use &lt;a href="http://commons.apache.org/fileupload/"&gt;Apache Common FileUpload&lt;/a&gt; or &lt;a href="http://www.servlets.com/cos/index.html"&gt;com.oreilly.servlet&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here i have used the second one.&lt;br /&gt;&lt;br /&gt;In the jsp, the form should have the multipart encoding. To do this, please follow the following HTML snippet.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;form action="../AddCandidateServlet" method="post" enctype="multipart/form-data"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But if you do this, then the normail request.getParameter(str) will not be capable of reading the file or other input values from the particular form, so in order to do that specific task, we need to use the external frameworks.&lt;br /&gt;&lt;br /&gt;The following example doPost method, reads all parameters and values. Also it stores the file in the specified location.&lt;br /&gt;&lt;br /&gt;The following code is not my code, its been extracted from the site.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; * DemoParserUploadServlet.java&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; * Example servlet to handle file uploads using MultipartParser for&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; * decoding the incoming multipart/form-data stream&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import javax.servlet.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import javax.servlet.http.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import java.io.*;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import com.oreilly.servlet.multipart.*;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public class DemoParserUploadServlet extends HttpServlet {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  private File dir;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  public void init(ServletConfig config) throws ServletException {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    super.init(config);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    // Read the uploadDir from the servlet parameters&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    String dirName; //= config.getInitParameter("uploadDir");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    dirName="C:\\Program Files\\Apache Group\\Tomcat 4.1\\webapps\\examples\\WEB-INF\\classes\\cal";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    //if (dirName == null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    //  throw new ServletException("Please supply uploadDir parameter");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    //}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    dir = new File(dirName);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    if (! dir.isDirectory()) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      throw new ServletException("Supplied uploadDir " + dirName +&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                                 " is invalid");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  public void doPost(HttpServletRequest request, HttpServletResponse response)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      throws ServletException, IOException&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;     {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    PrintWriter out = response.getWriter();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    response.setContentType("text/plain");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    out.println("Demo Parser Upload Servlet");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    if(false)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        try {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          MultipartParser mp = new MultipartParser(request, 1*1024*1024); // 10MB&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          Part part;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          while ((part = mp.readNextPart()) != null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            String name = part.getName();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            if (part.isParam()) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              // it's a parameter part&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              ParamPart paramPart = (ParamPart) part;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              String value = paramPart.getStringValue();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              out.println("param; name=" + name + ", value=" + value);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            else if (part.isFile()) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              // it's a file part&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              FilePart filePart = (FilePart) part;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              String fileName = filePart.getFileName();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              if (fileName != null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                // the part actually contained a file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                long size = filePart.writeTo(dir);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                out.println("file; name=" + name + "; filename=" + fileName +&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                  ", filePath=" + filePart.getFilePath() +&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                  ", content type=" + filePart.getContentType() +&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                  ", size=" + size);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              else {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                // the field did not contain a file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                out.println("file; name=" + name + "; EMPTY");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;              out.flush();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        catch (IOException lEx) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;          this.getServletContext().log(lEx, "error reading or saving file");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &lt;br /&gt;   // If the next two lines are giving errors, you can comment it. But you will not be able to some other works with it.&lt;br /&gt;   CommandProcessor cp=new CommandProcessor();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    cp.process(request,response);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    HttpSession session=request.getSession();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    String fname=(String)session.getAttribute("FILENAME");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    out.println("returned from cp"+fname);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-3855069688107430883?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/3855069688107430883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=3855069688107430883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/3855069688107430883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/3855069688107430883'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/10/fileupload-in-jsp.html' title='FileUpload in JSP'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-1889740975161083684</id><published>2008-08-27T19:14:00.000+08:00</published><updated>2008-08-27T19:15:11.767+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='servlet'/><title type='text'>A Servlet Filter for authentication</title><content type='html'>&lt;span style="font-family: courier new;"&gt;import java.io.IOException;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import java.util.ArrayList;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.servlet.Filter;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.servlet.FilterChain;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.servlet.FilterConfig;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.servlet.ServletException;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.servlet.ServletRequest;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.servlet.ServletResponse;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.servlet.http.HttpServletRequest;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.servlet.http.HttpServletResponse;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import javax.servlet.http.HttpSession;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import my.com.lhdn.cms.security.base.Globals;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import my.com.lhdn.cms.security.base.util.UserLevelBean;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import org.apache.commons.lang.exception.ExceptionUtils;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import org.apache.commons.logging.Log;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;import org.apache.commons.logging.LogFactory;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;public class AuthenticationFilter implements Filter {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    private static Log log = LogFactory.getLog(AuthenticationFilter.class);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    private FilterConfig filterConfig = null;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    private static ArrayList bypassURLs = null;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    public AuthenticationFilter() {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        System.out.println("--AuthenticationFilter--");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    /**&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     * Called by the web container to indicate to a filter that it is being&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     * placed into service.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    public void init(FilterConfig filterConfig) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        this.filterConfig = filterConfig;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        log.info("AuthenticationFilter init, now monitoring each request.");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    /**&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     * The doFilter method of the Filter is called by the container each time a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     * request/response pair is passed through the chain due to a client request&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     * for a resource at the end of the chain.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    public void doFilter(ServletRequest request, ServletResponse response,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            FilterChain chain) throws IOException, ServletException {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        HttpServletRequest httpRequest = null;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        HttpServletResponse httpResponse = null;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        try {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            if (request instanceof HttpServletRequest&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    &amp;amp;&amp;amp; response instanceof HttpServletResponse) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                httpRequest = ((HttpServletRequest) request);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                httpResponse = (HttpServletResponse) response;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                System.err.println("Entering into " + httpRequest.getRequestURI().toString());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                HttpSession session = httpRequest.getSession(false);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                String tmpurl = null;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                if (session != null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                        if (session.getAttribute(Globals.SESSION_USER) != null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                            if (VALID_USER) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                                return;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                            } &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                        } else {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                            session.invalidate();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                            httpResponse.sendRedirect(httpRequest.getContextPath()+"/login.do");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                            //GO TO LOGIN PAGE SINCE NOT AUTHENTICATED&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                            return;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                } else {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    //GO TO LOGIN PAGE SINCE NO SESSION INITIATED &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    httpResponse.sendRedirect(httpRequest.getContextPath()+"/login.do");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    return;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                chain.doFilter(request, response);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                return;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        } catch (Exception ex) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            if (log.isErrorEnabled())&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                log.error(ex);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            throw new ServletException(ex);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        } finally {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            System.err.println("Leaving " + httpRequest.getRequestURI().toString());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    /**&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     * Called by the web container to indicate to a filter that it is being&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     * taken out of service.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    public void destroy() {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        filterConfig = null;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-1889740975161083684?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/1889740975161083684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=1889740975161083684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/1889740975161083684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/1889740975161083684'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/08/servlet-filter-for-authentication.html' title='A Servlet Filter for authentication'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-4844545917634566088</id><published>2008-08-27T19:07:00.000+08:00</published><updated>2008-08-27T19:09:36.212+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='encryption'/><title type='text'>A Password oneway encryption utility</title><content type='html'>import java.io.IOException;&lt;br /&gt;import java.io.UnsupportedEncodingException;&lt;br /&gt;import java.security.MessageDigest;&lt;br /&gt;import java.security.NoSuchAlgorithmException;&lt;br /&gt;&lt;br /&gt;import org.w3c.tools.codec.Base64FormatException;&lt;br /&gt;&lt;br /&gt;import sun.misc.BASE64Decoder;&lt;br /&gt;import sun.misc.BASE64Encoder;&lt;br /&gt;&lt;br /&gt;public class PasswordUtil {&lt;br /&gt;    private static PasswordUtil instance = null;&lt;br /&gt;&lt;br /&gt;    public static PasswordUtil getInstance() {&lt;br /&gt;        if (instance == null) {&lt;br /&gt;            instance = new PasswordUtil();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return instance;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public synchronized String encrypt(String password) {&lt;br /&gt;        MessageDigest messageDigest = null;&lt;br /&gt;&lt;br /&gt;        try {&lt;br /&gt;            messageDigest = MessageDigest.getInstance("SHA-1");&lt;br /&gt;        } catch (NoSuchAlgorithmException e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        try {&lt;br /&gt;            messageDigest.update(password.getBytes("UTF-8"));&lt;br /&gt;        } catch (UnsupportedEncodingException e1) {&lt;br /&gt;            e1.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        byte raw[] = messageDigest.digest();&lt;br /&gt;        String hash = (new BASE64Encoder()).encode(raw);&lt;br /&gt;        return hash;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public boolean verifyPassword(String passwordBytes, String passwordHash)&lt;br /&gt;            throws NoSuchAlgorithmException {&lt;br /&gt;        return encrypt(passwordBytes).equals(passwordHash);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-4844545917634566088?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/4844545917634566088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=4844545917634566088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/4844545917634566088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/4844545917634566088'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/08/password-oneway-encryption-utility.html' title='A Password oneway encryption utility'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-4028796285832561986</id><published>2008-08-27T18:59:00.002+08:00</published><updated>2008-08-27T19:07:13.903+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jsp'/><category scheme='http://www.blogger.com/atom/ns#' term='unicode'/><title type='text'>Unicode in jsp</title><content type='html'>Using unicode in jsp or java files under influence of any IDE like RAD can be easier.&lt;br /&gt;&lt;br /&gt;Before pasting your unicode data into the jsp,java or data file in RAD, make the file encoding into utf-8. You can do this by&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Select file in package explorer&lt;/li&gt;&lt;li&gt;Right click and choose Properties&lt;/li&gt;&lt;li&gt;Choose the Other option in the Text-Encoding.&lt;/li&gt;&lt;li&gt;From the list choose UTF-8&lt;/li&gt;&lt;/ol&gt;Even though you specify the metadata content type tag as UTF-8, you still need to do the same thing using&lt;br /&gt;&lt;br /&gt;&lt;%@ page language="java" contentType="text/html; charset=UTF-8" %&gt;&lt;br /&gt;&lt;br /&gt;And here you go, your யூனிகோட்(Unicode) displays fine in the screen :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-4028796285832561986?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/4028796285832561986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=4028796285832561986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/4028796285832561986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/4028796285832561986'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/08/unicode-in-jsp.html' title='Unicode in jsp'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-234775061553232659</id><published>2008-08-27T18:54:00.003+08:00</published><updated>2008-08-27T18:58:23.121+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='db'/><title type='text'>DB2 - SCHEMA - Query</title><content type='html'>In DB2, normal select query like the one below, may not work properly&lt;br /&gt;&lt;br /&gt;          &lt;span style="font-family: courier new;"&gt; SELECT * FROM table;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In that cases, We need to specify the schema name to query the table.&lt;br /&gt;&lt;br /&gt;          &lt;span style="font-family: courier new;"&gt;SELECT * FROM schema.table;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Alternatively, for a query session, we can set the schema beforehand using,&lt;br /&gt;&lt;br /&gt;          &lt;span style="font-family: courier new;"&gt;SET SCHEMA schema_name;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now this query will work fine :)&lt;br /&gt;&lt;br /&gt;         &lt;span style="font-family: courier new;"&gt; SELECT * FROM table;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-234775061553232659?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/234775061553232659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=234775061553232659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/234775061553232659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/234775061553232659'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/08/db2-schema-query.html' title='DB2 - SCHEMA - Query'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-2877632203938934388</id><published>2008-07-23T18:36:00.001+08:00</published><updated>2008-07-23T18:43:31.871+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Excel'/><category scheme='http://www.blogger.com/atom/ns#' term='JDBC'/><title type='text'>JDBC connection from Excel sheet</title><content type='html'>This code snippet converts the Excel file into a virtual database with the sheets as tables. No need to create and DSN in the system is the plus of this snippet.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;String driver = "sun.jdbc.odbc.JdbcOdbcDriver";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Class.forName(driver);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Connection connection = DriverManager.getConnection(&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        "jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=F:\\Kishore\\exam.xls; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;         DriverID=22;READONLY=false","", "");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can use the following query to get the values from the sheets.&lt;br /&gt;          &lt;span style="font-family: courier new;"&gt;select * from [Sheet1$]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first row is considered as the column as usual. Here the empty columns will not be considered.&lt;br /&gt;&lt;br /&gt;But there is a disadvantage in this. If you encounter let me know, i will give the solution :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-2877632203938934388?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/2877632203938934388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=2877632203938934388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/2877632203938934388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/2877632203938934388'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/07/jdbc-connection-from-excel-sheet.html' title='JDBC connection from Excel sheet'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-1875770119662506134</id><published>2008-07-23T15:34:00.004+08:00</published><updated>2008-07-23T15:40:11.060+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Select in HTML</title><content type='html'>This is an example to have option group and different styles inside a select box.&lt;br /&gt;Check out. Enjoy&lt;br /&gt;&lt;br /&gt;&lt;select&gt;    &lt;option selected="selected"&gt;&lt;/option&gt;    &lt;optgroup label="Rate..."&gt;&lt;/optgroup&gt;        &lt;option&gt;★ (worst)&lt;/option&gt;        &lt;option&gt;★★&lt;/option&gt;        &lt;option&gt;★★★&lt;/option&gt;        &lt;option style="color: rgb(196, 113, 0);"&gt;★★★★&lt;/option&gt;        &lt;option&gt;★★★★★ (best)&lt;/option&gt;    &lt;optgroup label="Select..."&gt;&lt;/optgroup&gt;        &lt;option style="color: rgb(65, 159, 9); font-weight: bold;"&gt;An item ✓&lt;/option&gt;        &lt;option&gt;Another item&lt;/option&gt;  &lt;/select&gt;&lt;br /&gt;&lt;br /&gt;Check out the view source.&lt;br /&gt;&lt;br /&gt;&lt;pre id="line11"&gt;&lt;&lt;span class="start-tag"&gt;select&lt;/span&gt;&gt;&lt;br /&gt; &lt;&lt;span class="start-tag"&gt;option&lt;/span&gt;&lt;span class="attribute-name"&gt; selected&lt;/span&gt;=&lt;span class="attribute-value"&gt;"selected"&lt;/span&gt;&gt;&lt;!--&lt;span class="end-tag"&gt;option&gt;&lt;br /&gt; &lt;&lt;span class="start-tag"&gt;optgroup&lt;/span&gt;&lt;span class="attribute-name"&gt; label&lt;/span&gt;=&lt;span class="attribute-value"&gt;"Rate..."&lt;/span&gt;&gt;&lt;br /&gt;     &lt;&lt;span class="start-tag"&gt;option&lt;/span&gt;&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt; (worst)&lt;!--&lt;span class="end-tag"&gt;option&gt;&lt;br /&gt;     &lt;&lt;span class="start-tag"&gt;option&lt;/span&gt;&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&lt;!--&lt;span class="end-tag"&gt;option&gt;&lt;br /&gt;     &lt;&lt;span class="start-tag"&gt;option&lt;/span&gt;&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&lt;!--&lt;span class="end-tag"&gt;option&gt;&lt;br /&gt;     &lt;&lt;span class="start-tag"&gt;option&lt;/span&gt;&lt;span class="attribute-name"&gt; style&lt;/span&gt;=&lt;span class="attribute-value"&gt;"color: rgb(196,113,0)"&lt;/span&gt;&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&lt;!--&lt;span class="end-tag"&gt;option&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre id="line21"&gt;        &lt;&lt;span class="start-tag"&gt;option&lt;/span&gt;&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt;&amp;amp;&lt;span class="entity"&gt;#9733;&lt;/span&gt; (best)&lt;!--&lt;span class="end-tag"&gt;option&gt;&lt;br /&gt;&lt;!--&lt;span class="end-tag"&gt;optgroup&gt;&lt;br /&gt;&lt;&lt;span class="start-tag"&gt;optgroup&lt;/span&gt;&lt;span class="attribute-name"&gt; label&lt;/span&gt;=&lt;span class="attribute-value"&gt;"Select..."&lt;/span&gt;&gt;&lt;br /&gt;     &lt;&lt;span class="start-tag"&gt;option&lt;/span&gt;&lt;span class="attribute-name"&gt; style&lt;/span&gt;=&lt;span class="attribute-value"&gt;"color: rgb(65,159,9); font-weight: bold"&lt;/span&gt;&gt;An item &amp;amp;&lt;span class="entity"&gt;#10003;&lt;/span&gt;&lt;!--&lt;span class="end-tag"&gt;option&gt;&lt;br /&gt;     &lt;&lt;span class="start-tag"&gt;option&lt;/span&gt;&gt;Another item&lt;!--&lt;span class="end-tag"&gt;option&gt;&lt;br /&gt;&lt;!--&lt;!--&lt;span class="end-tag"&gt;optgroup&gt;&lt;br /&gt;&lt;!--&lt;span class="end-tag"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-1875770119662506134?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/1875770119662506134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=1875770119662506134' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/1875770119662506134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/1875770119662506134'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/07/this-is-example-to-have-option-group.html' title='Select in HTML'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-5372664044755400486</id><published>2008-07-08T17:19:00.002+08:00</published><updated>2008-07-08T17:24:01.837+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='portal'/><title type='text'>How to create link to a portlet?</title><content type='html'>urlGeneration is used here for generating the link on the header.&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;portal:urlGeneration contentNode="customUniqueName" portletWindowState="Maximized" layoutNode="7_2_6HD" portletMode="view"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;portal:urlParam name="view" value="customize" type="render"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;a href="&amp;lt;% wpsURL.write(out); %&amp;gt;"&amp;gt;Link&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;/portal:urlGeneration&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Attributes of urlGeneration&lt;br /&gt;---------------------------&lt;br /&gt;contentNode - The custom unique name of the page where the portlet resides&lt;br /&gt;layoutNode - The portle ID. This can be easily taken from the generated html source, after the portlet is added to the page. Usually this will be within anchor tags like this &lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;a name="7_2_6HD"&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/span&gt;. Each portlet will have a different ID. We have to choose the right ID of our portlet.&lt;br /&gt;&lt;br /&gt;Attributes of urlParam&lt;br /&gt;----------------------&lt;br /&gt;name - parameter name&lt;br /&gt;value - value for this parameter&lt;br /&gt;type - how this parameter will be accessed in the portlet like render parameter or action parameter&lt;br /&gt;&lt;br /&gt;Once this parameter is available inside the portlet, use it to decide the flow(which page to include).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-5372664044755400486?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/5372664044755400486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=5372664044755400486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/5372664044755400486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/5372664044755400486'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/07/how-to-create-link-to-portlet.html' title='How to create link to a portlet?'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-4875777169972371902</id><published>2008-06-18T11:21:00.002+08:00</published><updated>2008-06-18T11:29:18.026+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='encryption'/><title type='text'>Encryption</title><content type='html'>The basic thing to follow while handling the sensitive information like password and credit card number, is to keep them encrypted everywhere in the program.&lt;br /&gt;&lt;br /&gt;So here are some methods which gives proper encryption and decryption methods.&lt;br /&gt;&lt;br /&gt;    public static String encrypt(String msg) {&lt;br /&gt;        String ns = "2131232132132324234";&lt;br /&gt;        String es = "2132123213321321341241";&lt;br /&gt;        BigInteger n = new BigInteger(ns);&lt;br /&gt;        BigInteger e = new BigInteger(es);&lt;br /&gt;        BigInteger bi = new BigInteger(msg.getBytes());&lt;br /&gt;        BigInteger x = bi.modPow(e, n);&lt;br /&gt;        return (x.toString());&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;Do you really need a decryption method? I guess you may not. You can use the same for the reverse also. If still unclear, ask me...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-4875777169972371902?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/4875777169972371902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=4875777169972371902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/4875777169972371902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/4875777169972371902'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/06/encryption.html' title='Encryption'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-7960799106878156111</id><published>2008-06-16T13:17:00.002+08:00</published><updated>2008-06-16T13:22:53.586+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='portal'/><title type='text'>HttpServletRequest and PortletRequest</title><content type='html'>We spent a long time in the confusion between &lt;span style="font-weight: bold;"&gt;HttpServletRequest &lt;/span&gt;and &lt;span style="font-weight: bold;"&gt;PortletRequest.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;We get values from HttpServletRequest in backend. When we set it, we set it in the same request's session. But when we were trying to get it from front end session variable we could not find that variabls&lt;br /&gt;&lt;br /&gt;Finally we found a solution. Its,&lt;br /&gt;Set in &lt;span style="font-weight: bold;"&gt;HttpServletRequest &lt;/span&gt;session and obtain in fronend from &lt;span style="font-weight: bold;"&gt;PortletRequest &lt;/span&gt;session.&lt;br /&gt;&lt;br /&gt;I will analyse this scenario and come up with more conclusions on this, once my works got over.&lt;br /&gt;Very hectic here.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&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/1369999777585308932-7960799106878156111?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/7960799106878156111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=7960799106878156111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7960799106878156111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7960799106878156111'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/06/httpservletrequest-and-portletrequest.html' title='HttpServletRequest and PortletRequest'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-3011889435831962684</id><published>2008-06-02T01:14:00.003+08:00</published><updated>2008-06-02T01:26:14.798+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Javascript scroll to top of the page</title><content type='html'>If you are in the bottom of the html page and if you want to go to the top of the page, You can use the following java script.&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;window.scrollBy(-document.body.clientWidth,-document.body.clientHeight);&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;Otherwise if you wanna goto top... yes you are right, remove the minuses.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;If you want to scroll inside any dom elements, you can use this javascript method to determine the height or width of that element.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;document.documentElement.­clientHeight/Width&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-3011889435831962684?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/3011889435831962684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=3011889435831962684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/3011889435831962684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/3011889435831962684'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/06/javascript-scroll-to-top-of-page.html' title='Javascript scroll to top of the page'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-7390130995432803758</id><published>2008-05-30T10:45:00.004+08:00</published><updated>2008-05-30T11:00:01.030+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='db'/><title type='text'>Oracle SQL Limit</title><content type='html'>Oracle SQL does not support anything like LIMIT in MySQL. You can just limit the&lt;br /&gt;number of rows returned with rownum. So if you only want the first ten&lt;br /&gt;records use:&lt;br /&gt;&lt;br /&gt;SELECT * FROM table WHERE ROWNUM&lt;10;&gt;90 AND ROWNUM&lt;100;&lt;br /&gt;&lt;br /&gt;This is because Oracle checks for the first row and the condition is false,&lt;br /&gt;as the rownum would be 1. So this row is not returned, thus the rownum is&lt;br /&gt;still 0. So the rownum will never get to 90.&lt;br /&gt;&lt;br /&gt;You can try :&lt;br /&gt;&lt;br /&gt;SELECT * FROM table WHERE ROWNUM&lt;101;&lt;br /&gt;minus&lt;br /&gt;SELECT * FROM table WHERE ROWNUM&lt;91;&lt;br /&gt;&lt;br /&gt;Alternate method:&lt;br /&gt;select * from (select a, b, c, rownum as limit from mytable where conditions order by whatiwant) where limit&amp;gt;x and limit &amp;lt;y;&lt;br /&gt;&lt;br /&gt;From http://www.weberdev.com/get_example-1445.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-7390130995432803758?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/7390130995432803758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=7390130995432803758' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7390130995432803758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7390130995432803758'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/05/oracle-sql-limit.html' title='Oracle SQL Limit'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-2186018582567562492</id><published>2008-05-20T12:33:00.002+08:00</published><updated>2008-05-20T12:36:19.230+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ie'/><category scheme='http://www.blogger.com/atom/ns#' term='gmail'/><title type='text'>IE 8 Beta and Gmail</title><content type='html'>I recently installed the IE 8 beta 1.&lt;br /&gt;Which is nearly replicating the existing(ancient) things in firefox.&lt;br /&gt;Which has an "Emulate 7" button, which immediately converts the page in the way it behaved in IE 7.&lt;br /&gt;&lt;br /&gt;When i opened gmail, it really sucks. It cant even read the Ajax things proper.&lt;br /&gt;Which results in javascript error.&lt;br /&gt;It is my first report after using it.&lt;br /&gt;I will check out the XMLHttp object settings and update the things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-2186018582567562492?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/2186018582567562492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=2186018582567562492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/2186018582567562492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/2186018582567562492'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/05/ie-8-beta-and-gmail.html' title='IE 8 Beta and Gmail'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-7161569729054252562</id><published>2008-05-20T12:31:00.002+08:00</published><updated>2008-05-20T12:33:15.793+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Memory'/><category scheme='http://www.blogger.com/atom/ns#' term='AIX'/><title type='text'>AIX: Checking memory for a process</title><content type='html'>In AIX,&lt;br /&gt;We can find the memory consumed by a paritular process using the following command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ps -ef | grep &lt;process&gt;&lt;process&gt;&lt;/process&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ps v &lt;process&gt;&lt;pid&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;To list out the top 15 memory consuming processes, this command can be used.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;svmon -Pt15 | perl -e 'while(&lt;&gt;){print if($.==2||$&amp;amp;&amp;amp;&amp;amp;!$s++);$.=0 if(/^-+$/)}'&lt;/span&gt;&lt;/span&gt;&lt;/pid&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-7161569729054252562?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/7161569729054252562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=7161569729054252562' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7161569729054252562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7161569729054252562'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/05/aix-checking-memory-for-process.html' title='AIX: Checking memory for a process'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-7642637059086070739</id><published>2008-05-15T17:09:00.001+08:00</published><updated>2008-05-20T13:22:18.993+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jsp'/><category scheme='http://www.blogger.com/atom/ns#' term='AIX'/><category scheme='http://www.blogger.com/atom/ns#' term='portal'/><category scheme='http://www.blogger.com/atom/ns#' term='compilation error'/><title type='text'>Too many files open - jsp compilation error</title><content type='html'>I was frequently getting too many files open compilation error in jsp in one of my portlet factory project.&lt;br /&gt;OS: AIX&lt;br /&gt;The server i used was Webphere Application Server 6.0.19, Websphere Portal Server 6.0.1.1&lt;br /&gt;&lt;br /&gt;The problem was occuring in a totally weird manner.&lt;br /&gt;When the first user accesses the application, it works completely fine.&lt;br /&gt;The problem starts when the second user also logs in.&lt;br /&gt;It gave "too many files open".&lt;br /&gt;&lt;br /&gt;We tried hard to find a clue on this. Since this is totally abnormal behaviour of a web application server.&lt;br /&gt;&lt;br /&gt;The mistake we did was not reading the stacktrace properly.&lt;br /&gt;In the stack trace it clearly mentioned that it occured in &lt;span style="color: rgb(255, 0, 0);"&gt;Clone_Portal&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Bingo, we found atlast.&lt;br /&gt;The problem is, when the application runs for the first time, all jsp files are loaded properly.&lt;br /&gt;When the second user logs in, the server search for the files in the Clone portal, but the application is installed in the normal portal.&lt;br /&gt;&lt;br /&gt;So we stopped the clone portal.&lt;br /&gt;And it started workign fine.&lt;br /&gt;&lt;br /&gt;Conclusion:&lt;br /&gt;It is a problem in the clustered environment when the clone portal is running.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-7642637059086070739?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/7642637059086070739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=7642637059086070739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7642637059086070739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7642637059086070739'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/05/too-many-files-open-jsp-compilation.html' title='Too many files open - jsp compilation error'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-760969725741094734</id><published>2008-05-15T17:04:00.003+08:00</published><updated>2009-04-21T17:03:05.414+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Alternative way to disable the select box</title><content type='html'>In some browsers, disabling select box in HTML is not allowed.&lt;br /&gt;So we can alternatively write the following on the select box.&lt;br /&gt;&lt;br /&gt;It may need to be finetuned a bit to accommodate to double clicks.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; onfocus="this.blur()"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;select onfocus="this.blur()"&gt;&lt;option&gt;Lorem&lt;/option&gt;&lt;option&gt;Lorem&lt;/option&gt;&lt;option&gt;Lorem&lt;/option&gt;&lt;option&gt;Lorem&lt;/option&gt;&lt;/select&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-760969725741094734?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/760969725741094734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=760969725741094734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/760969725741094734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/760969725741094734'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/05/alternative-way-to-disable-select-box.html' title='Alternative way to disable the select box'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-6514353925252177101</id><published>2008-04-02T11:04:00.002+08:00</published><updated>2008-04-02T11:09:28.150+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cricket'/><title type='text'>Dravid is Dravid part 2</title><content type='html'>That dead pitch test match is over. Which is drawn.&lt;br /&gt;&lt;br /&gt;But even in that, so many records have been created. Sehwag had a remarkable 3le century and Dravid crossed his 10000 test runs.&lt;br /&gt;&lt;br /&gt;At last Dravid's score in the first innings was 111 of 291 balls with a strike rate of just in late 30s.&lt;br /&gt;&lt;br /&gt;Such a bad match, even in the last day of play, SA failed to declare the score and put some efforts to see some result. ;-( but nope.&lt;br /&gt;&lt;br /&gt;Anyways, we will catch the excitements from the next match. (Please get some result in that atleast)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-6514353925252177101?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/6514353925252177101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=6514353925252177101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/6514353925252177101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/6514353925252177101'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/04/dravid-is-dravid-part-2.html' title='Dravid is Dravid part 2'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-3297983438298860691</id><published>2008-03-28T16:14:00.004+08:00</published><updated>2008-03-28T16:32:00.098+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Stopping a Java thread</title><content type='html'>I came across a question of how to stop a Java thread. I suddenly felt about the stop and other methods in the Thread class. Then i slowly remembered that they are no longer available and they are deprecated.&lt;br /&gt;&lt;br /&gt;Then i started searching in net. Then i found a solution(i was not known that time that it was an ancient technique). It said we have to keep a volatile flag variable and we can check the status in the run(). It sounded good to me.&lt;br /&gt;&lt;br /&gt;But when i was reading till end of the document, i came across how to stop a thread in non-running situations (wait or sleep implemented thread, I/O blocked thread i.e. thread reading or writing files). In those situations we can use interrupt method to do it efectively. &lt;br /&gt;&lt;br /&gt;Hmmm its been so long since i used threads in my application. I used thread last when i was developing my network file transfer application. The application came very well than i expected. It doesnt even needed any file/directory access permission. I used a special mechanism in it. In that i was using multithreaded server. That was the last time i used effectively. Sounds like i have to brush up core java a bit.&lt;br /&gt;&lt;br /&gt;I came across concurrent package when reading about this interrupt method. Hope to write about it soon.&lt;br /&gt;&lt;br /&gt;I noted many people getting confused with volatile and transient variables in java.&lt;br /&gt;&lt;br /&gt;volatile variable is a kind of static variable which shares its value among the threads. To be precise, the value of a volatile variable can be shared among threads and can be simulataneusly accessed or modified.&lt;br /&gt;&lt;br /&gt;transient variable is a used to restrict a field from being serialized.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-3297983438298860691?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/3297983438298860691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=3297983438298860691' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/3297983438298860691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/3297983438298860691'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/03/stopping-java-thread.html' title='Stopping a Java thread'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-2618939499214838401</id><published>2008-03-28T16:11:00.002+08:00</published><updated>2008-03-28T16:14:13.178+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cricket'/><title type='text'>Dravid is always dravid</title><content type='html'>India vs S.Africa first test is going on in Chennai.&lt;br /&gt;S.A had huge score in the flat track. &lt;br /&gt;Sehwag scoring like a T20 and notout(so far) at 169 with an strike rate of 90+.&lt;br /&gt;&lt;br /&gt;But our Dravid is always so cool like cucumber. He has been dropped from the ODI squad and though he dont seem to lose his normal way of play.&lt;br /&gt;&lt;br /&gt;Now he is 5 runs not out of 32 balls.&lt;br /&gt;&lt;br /&gt;I am so curious to see his final score. ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-2618939499214838401?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/2618939499214838401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=2618939499214838401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/2618939499214838401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/2618939499214838401'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/03/dravid-is-always-dravid.html' title='Dravid is always dravid'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-6274883323997515593</id><published>2008-03-26T14:22:00.002+08:00</published><updated>2008-03-26T15:27:21.121+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Frameworks in Java projects</title><content type='html'>When i see some java people and asking about a framework, they say struts, hibernate or spring etc. Noone is keen to create a custom framework of their own.&lt;br /&gt;&lt;br /&gt;When i was working in my first project, i underwent a training for ten days to understand the framework they developed. It was such a huge project and they had a solid framework.&lt;br /&gt;&lt;br /&gt;Which never failed till the end. It was a portal project but we used the whole project in a single portlet so no much of portlet stuff. But they customized everything that they almost created their own methods and classes to do almost all the things. Since we used JSF, we created a lot of custom components also(Till now i was saying as they, but now its WE. Since i was working in that part and i WAS a specialist in that area)&lt;br /&gt;&lt;br /&gt;Enough of the older stories. First lets see what does a framework mean.&lt;br /&gt;&lt;br /&gt;Dont need to go for dictionary since the meaning of Framework is evident to all. So for a project, the skeleton is framework. So once the skeleton is framed properly, we can go ahead with filling the skeleton with flesh. Oops, going like a horror movie. So here, if the application has many modules, each module will use almost same(some may need sub framework) the framework. Each module will have its own track in a good framework. So it will make the process of recovery after a damage easy.&lt;br /&gt;&lt;br /&gt;For example all projects in java handles with database searching, insertion of new data and updating or deleting data. But they will have different business process or rules.&lt;br /&gt;&lt;br /&gt;So here one thing is same, contacting the DB. So the major aim of the framework will be this. Then insertion and updation are same part so they will use a track in the framework(If needed some sub framework may be used for business rules). Searching and deleting(which normally not good to use. Instead we can move to a temp DB and delete contents in intervals) will take their own tracks.&lt;br /&gt;&lt;br /&gt;If its a web project then, its good no no must to use a tiered architecture. Majorly 3 tier. Its M..U..S..T.. must to follow this rule. Otherwise its so hard to maintenance and also it will make the whole project rubbish. No intro for 3 tier architecture. Its like teaching a,b,c.. again. &lt;br /&gt;&lt;br /&gt;May be these are some of the advatage of using a own framework in JAVA.&lt;br /&gt;&lt;br /&gt;The major problems in java are Exception handling and memory management(Though there are strong garbage collection mechanisms, a single coding error will lead to a total mess, which will take days to figure out) and some object pass between classes.&lt;br /&gt;&lt;br /&gt;Its good to extend every class from our own custom super class. For example in struts. Instead of extending all action classes from Action. Extend a CustomAction class from Action and the rest can be extended from CustomAction. So it gives a clear control over the Action class. so we can do whatever changes before it finally reaches to the original Action class. For example in the topmost action class, we can have exception catching and handling mechanism so that it will surely make process easy.&lt;br /&gt;&lt;br /&gt;Hope i confused u. But i am sure that you should have got an idea about frameworks. Any doubts or scolds, pls do it in comments. lol..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-6274883323997515593?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/6274883323997515593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=6274883323997515593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/6274883323997515593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/6274883323997515593'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/03/frameworks-in-java-projects.html' title='Frameworks in Java projects'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-7638522213750140675</id><published>2008-03-23T13:59:00.002+08:00</published><updated>2008-03-23T14:03:30.855+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Film'/><title type='text'>My experience with a short film.</title><content type='html'>Its very hard and difficult when it comes to creativity. That too for movie things, it needs many things from us. &lt;br /&gt;&lt;br /&gt;Recently i was working with my friend who was in a process to shoot a short movie, we found its damn difficult to write dialogs which are very much natural.&lt;br /&gt;&lt;br /&gt;We speak for hours but when it comes to writing, something gets stuck up and nothing comes out sadly. But he struggled so hard to furnish the dialgos in the way he wanted.&lt;br /&gt;&lt;br /&gt;I write so long for hours without a break. But when it comes to natural dialogs, its really a tough task.&lt;br /&gt;&lt;br /&gt;May be i should get used to these things.&lt;br /&gt;&lt;br /&gt;The casting is on the way. Once its done, i will post the review and the video if possible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-7638522213750140675?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/7638522213750140675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=7638522213750140675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7638522213750140675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/7638522213750140675'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/03/my-experience-with-short-film.html' title='My experience with a short film.'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-8059231053269942517</id><published>2008-03-23T13:52:00.001+08:00</published><updated>2008-03-23T13:52:37.092+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='temp'/><title type='text'>For technorati</title><content type='html'>This post is for enabling technorati &lt;a href="http://technorati.com/claim/xpv9gy9fn" rel="me"&gt;Technorati Profile&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-8059231053269942517?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/8059231053269942517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=8059231053269942517' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/8059231053269942517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/8059231053269942517'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/03/for-technorati.html' title='For technorati'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-1637955991940283464</id><published>2008-03-23T13:11:00.002+08:00</published><updated>2008-03-23T13:49:58.768+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><category scheme='http://www.blogger.com/atom/ns#' term='Film'/><title type='text'>Aamir blogging</title><content type='html'>Have you ever talked to a film personality?&lt;br /&gt;&lt;br /&gt;If not try aamir's &lt;a href="http://aamirkhan.com/blog.htm"&gt;blog.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;He writes from his heart to our heart. He is such a down to earth person and remembers many persons who comments to his posts. Really good one.&lt;br /&gt;&lt;br /&gt;Meet Aamir there...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-1637955991940283464?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/1637955991940283464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=1637955991940283464' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/1637955991940283464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/1637955991940283464'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/03/aamir-blogging.html' title='Aamir blogging'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-2613806139950611192</id><published>2008-03-23T00:25:00.002+08:00</published><updated>2008-03-23T13:00:48.633+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Template'/><title type='text'>My new Template</title><content type='html'>After a long search and some modifications in the time format and scripts, atlast i arrived at this classic template.&lt;br /&gt;&lt;br /&gt;Really nice one and i like it so much. Thanks to the team developed this Aspire blogger XML template. You can get this template from the link at the bottom. Enjoy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-2613806139950611192?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/2613806139950611192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=2613806139950611192' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/2613806139950611192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/2613806139950611192'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/03/test-for-new-template.html' title='My new Template'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-6204709714242137011</id><published>2008-03-20T17:23:00.000+08:00</published><updated>2008-03-20T17:29:05.664+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lol'/><title type='text'>Techlona - etymology</title><content type='html'>Techlona might sound so ridiculous to you and some might think its a some other language jargon or something.&lt;br /&gt;&lt;br /&gt;But its a simple term used in a tamil movie and many tamil people aware of this term in this way "dickylona". It was used by Veteran Actor(!) Senthil in the infamous movie "Gentleman" by Shankar.&lt;br /&gt;&lt;br /&gt;So i adopted that particular term from there and using it here "Tech-lona". Sounds great, doesn't it?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-6204709714242137011?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/6204709714242137011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=6204709714242137011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/6204709714242137011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/6204709714242137011'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/03/techlona-etymology.html' title='Techlona - etymology'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-3544514417665282494</id><published>2008-03-20T12:51:00.001+08:00</published><updated>2008-03-23T13:02:51.161+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>i play in VLC Player</title><content type='html'>Its been a long time i stopped using microsoft products(Except the OS lol..). So after quitting windows media player, i used real player for some time. It was also not so good except the audeo codecs.&lt;br /&gt;&lt;br /&gt;       Then i started using VLC player. Which is a really awesome and simple player with lot of features. The main attraction is its subtitle management. It doesn't bother about the format stuff. Whatever you name it, it plays it. It needs only the file name of the subtitle should match with the file name of the video file. Thats it. As simple as that.&lt;br /&gt;&lt;br /&gt;       It plays almost any type of video, mostly everything. It plays dvd files, avi files, divx files, mainly flv files etc.&lt;br /&gt;&lt;br /&gt;       Another major advantage is, ITS PORTABLE. You dont need to be an Administrator to install it. Just keep it in a USB drive and play from it wherever you go.&lt;br /&gt;&lt;br /&gt;       When comes to disadvantage, it doesnt have a quality UI, so its like a old junk. Also the video quality really sucks some times.&lt;br /&gt;&lt;br /&gt;       But among all these, its still rocking for its simple and extraordinary performance. You can get VLC player from &lt;a href="http://www.videolan.org/vlc/download-windows.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-3544514417665282494?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/3544514417665282494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=3544514417665282494' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/3544514417665282494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/3544514417665282494'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/03/i-play-in-vlc-player.html' title='i play in VLC Player'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-715304892170198449</id><published>2008-03-20T12:36:00.000+08:00</published><updated>2008-03-20T12:45:01.475+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ibatis'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><title type='text'>iBatis UnCategorizedSQLException</title><content type='html'>When i was using Apache iBatis and Spring together, i got some weird exception for a long time.&lt;br /&gt;It was,&lt;br /&gt;&lt;br /&gt;"UnCategorizedSQLException" without any information in its SQL code or SQL state. That is SQL code is -999 and SQL state is null i think. I am not so sure of what i got. But this is the scenario.&lt;br /&gt;&lt;br /&gt;I tried so many ways to fix it, i tried tuning my multi threads and changed the library jar files. But nothing helped me to sort out the problem.&lt;br /&gt;&lt;br /&gt;After a long googling, my friend told me that frequent calling of select queries in iBatis makes it difficult run further queries. Its a known issue with iBatis with its caching mechanism.&lt;br /&gt;&lt;br /&gt;So people facing these kind of problems, please try to reduce the number of frequent calling of select queries.  Hope it will solve the issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-715304892170198449?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/715304892170198449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=715304892170198449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/715304892170198449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/715304892170198449'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/03/ibatis-uncategorizedsqlexception.html' title='iBatis UnCategorizedSQLException'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1369999777585308932.post-6546038285697641291</id><published>2008-03-20T12:22:00.000+08:00</published><updated>2008-03-20T12:30:48.815+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Intro'/><title type='text'>Introduction</title><content type='html'>Hi Friends,&lt;br /&gt;In this blog i am planning to update some technical information i come across. Since i am from Java. I am planning to update some of my struggles and the way i come out of it in java.&lt;br /&gt;&lt;br /&gt;Everyone knew any new information than the others. So lets share buddies&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1369999777585308932-6546038285697641291?l=techlona.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techlona.blogspot.com/feeds/6546038285697641291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1369999777585308932&amp;postID=6546038285697641291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/6546038285697641291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1369999777585308932/posts/default/6546038285697641291'/><link rel='alternate' type='text/html' href='http://techlona.blogspot.com/2008/03/introduction.html' title='Introduction'/><author><name>Kishore</name><uri>http://www.blogger.com/profile/09586414611881572376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
