<?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-6608757157566231856</id><updated>2012-01-07T11:05:03.036+05:30</updated><category term='spring 3 mvc'/><category term='Scripting'/><category term='Update query'/><category term='Technical'/><category term='Prepared Statement'/><category term='MySQL'/><category term='HttpSession'/><category term='spring hibernate integration'/><category term='JSP?Servlet'/><category term='Select query'/><category term='DataType'/><category term='Hardware'/><category term='Session'/><category term='Interview Questions'/><category term='Java'/><category term='Insert query'/><category term='JSP Pagination AJAX Paging'/><title type='text'>Rajkumar P B</title><subtitle type='html'>...Listen to music...


                                                       It surely makes your Life Beautiful</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-7737576303983290842</id><published>2010-03-30T16:36:00.001+05:30</published><updated>2010-03-30T16:36:40.263+05:30</updated><title type='text'>Think eggs, think nightmares.</title><content type='html'>This post is for testing purpose only. &lt;br /&gt;Think eggs, think nightmares.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-7737576303983290842?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/7737576303983290842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=7737576303983290842' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/7737576303983290842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/7737576303983290842'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2010/03/think-eggs-think-nightmares.html' title='Think eggs, think nightmares.'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-841396497871540233</id><published>2010-03-29T16:04:00.002+05:30</published><updated>2010-03-29T16:07:49.258+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='spring hibernate integration'/><category scheme='http://www.blogger.com/atom/ns#' term='spring 3 mvc'/><title type='text'>Spring MVC 3.0 + Hibernate Simplified with Annotations - Tutorial</title><content type='html'>I've started working with Spring and i've found Spring 3.0 much easier than 2.5. Also the Annotations just decrease our work of configuring everything in XML file. So i decided to give a starter tutorial on how to integrate Spring MVC with Hibernate using Annotations. Here's the link. Since i've moved to wordpress from now on all my posting will be there. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://pbrajkumar.wordpress.com/2010/03/24/spring-3-0-mvc-hibernate-simplified-with-annotations-tutorial/"&gt;Wordpress link &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Please comment me on this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-841396497871540233?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/841396497871540233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=841396497871540233' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/841396497871540233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/841396497871540233'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2010/03/spring-mvc-30-hibernate-simplified-with.html' title='Spring MVC 3.0 + Hibernate Simplified with Annotations - Tutorial'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-7781329595066457609</id><published>2009-10-27T00:00:00.005+05:30</published><updated>2009-10-27T00:12:15.116+05:30</updated><title type='text'>File Spliiting utility in PHP</title><content type='html'>I surf for around a week to get it work, as i am not much in PHP or C either. I just want to split a large text file into a chunk of small files, and finally got it worked the way i think.&lt;br /&gt;&lt;br /&gt;Here the filesplitter class &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;class filesplit{&lt;br /&gt;    function filesplit(){}   &lt;br /&gt;    var $_source = 'file_to-split.txt';   &lt;br /&gt;    function Getsource()&lt;br /&gt;    {&lt;br /&gt;        return $this-&gt;_source;&lt;br /&gt;    }&lt;br /&gt;    function Setsource($newValue)&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;_source = $newValue;&lt;br /&gt;    }   &lt;br /&gt;    var $_lines = 250;&lt;br /&gt;    function Getlines()&lt;br /&gt;    {&lt;br /&gt;        return $this-&gt;_lines;&lt;br /&gt;    }&lt;br /&gt;    function Setlines($newValue)&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;_lines = $newValue;&lt;br /&gt;    }&lt;br /&gt;    var $_path = 'secure/';   &lt;br /&gt;&lt;br /&gt;    function Getpath()&lt;br /&gt;    {&lt;br /&gt;        return $this-&gt;_path;&lt;br /&gt;    }&lt;br /&gt;    function Setpath($newValue)&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;_path = $newValue;&lt;br /&gt;    }&lt;br /&gt;    function configure($source = "",$path = "",$lines = "")&lt;br /&gt;    {&lt;br /&gt;        if ($source != "") {&lt;br /&gt;            $this-&gt;Setsource($source);&lt;br /&gt;        }&lt;br /&gt;        if ($path!="") {&lt;br /&gt;            $this-&gt;Setpath($path);&lt;br /&gt;        }&lt;br /&gt;        if ($lines!="") {&lt;br /&gt;            $this-&gt;Setlines($lines);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;   &lt;br /&gt;    // Main function that must be called to split the file &lt;br /&gt;&lt;br /&gt;    function run()&lt;br /&gt;    {&lt;br /&gt;        $i=0;&lt;br /&gt;        $j=1;&lt;br /&gt;        $date = date("m-d-y");&lt;br /&gt;        unset($buffer);&lt;br /&gt;       &lt;br /&gt;        $handle = @fopen ($this-&gt;Getsource(), "r");&lt;br /&gt;        while (!feof ($handle)) &lt;br /&gt;        {&lt;br /&gt;          $buffer .= @fgets($handle, 4096);&lt;br /&gt;          $i++;&lt;br /&gt;              //if ($i &gt;= $split) &lt;br /&gt;        if ($i &gt;= $this-&gt;_lines || feof($handle))&lt;br /&gt;              {&lt;br /&gt;              $fname = $this-&gt;Getpath()."part.$date".time()."$j.txt";&lt;br /&gt;               if (!$fhandle = @fopen($fname, 'w')) &lt;br /&gt;               {&lt;br /&gt;                    print "Cannot open file ($fname)";&lt;br /&gt;                    exit;&lt;br /&gt;               }&lt;br /&gt;           &lt;br /&gt;               if (!@fwrite($fhandle, $buffer)) &lt;br /&gt;               {&lt;br /&gt;                   print "Cannot write to file ($fname)";&lt;br /&gt;                   exit;&lt;br /&gt;               }&lt;br /&gt;               fclose($fhandle);&lt;br /&gt;               $j++;&lt;br /&gt;               unset($buffer,$i);&lt;br /&gt;              }&lt;br /&gt;        }&lt;br /&gt;        fclose ($handle);&lt;br /&gt;    } &lt;br /&gt;    } ?&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Example page to call the function&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;  $allowedExtensions = array("txt"); /* I dont want user to upload &lt;br /&gt;                                        any file other than text file */&lt;br /&gt;  foreach ($_FILES as $file) {&lt;br /&gt;    if ($file['tmp_name'] &gt; '') {&lt;br /&gt;      if (!in_array(end(explode(".",strtolower($file['name']))),$allowedExtensions)) {&lt;br /&gt;       die($file['name'].' is an invalid file type!&lt;br/&gt;'.&lt;br /&gt;        '&lt;a href="javascript:history.go(-1);"&gt;'.&lt;br /&gt;        '&amp;lt;&amp;lt Go Back&lt;/a&gt;');&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;require_once("filesplit.class.php");&lt;br /&gt;/**&lt;br /&gt;* Sample usage of the filesplit class&lt;br /&gt;**/&lt;br /&gt;$s = new filesplit;&lt;br /&gt;$filename = basename( $_FILES['uploaded']['name']) ;&lt;br /&gt;&lt;br /&gt;$s-&gt;configure($filename, "secure/", 250);&lt;br /&gt;$s-&gt;run();&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Hope this will save someones valuable time instead of searching in google...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-7781329595066457609?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/7781329595066457609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=7781329595066457609' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/7781329595066457609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/7781329595066457609'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2009/10/file-spliiting-utility-in-php.html' title='File Spliiting utility in PHP'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-8630903116484180049</id><published>2008-11-29T15:38:00.006+05:30</published><updated>2008-12-06T17:33:59.122+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP Pagination AJAX Paging'/><title type='text'>Pagination using AJAX and JSP</title><content type='html'>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Those who felt very tired of searching a good Pagination script using AJAX and a server-side script, i got a good news for you.I too face the same problem a month ago and really get frustrated by googling a lot and find nothing useful for me.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Finally i decide to get my hands on it, and decide to do that with AJAX and , i choose JSP as my client-side script for act as back end for my ajax program. After a good approach and hard work i come with a superb script that ease the work of programmer in pagination part as most of them struggle with that.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;That code which i developed is easy to use and available online.If you want to do Pagination in much simpler way, download the file and start using it.You'll never get disappointed.The URL for my code is :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=6205&amp;amp;lngWId=2"&gt;http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=6205&amp;amp;lngWId=2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hurrah! My Pagination using AJAX code i upload in the above URL, awarded as the best code of the month..God, this boosts me to post more codes which will help me and other too...&lt;br /&gt;&lt;br /&gt;Kindly comment here if you have any doubts or queries regarding that....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-8630903116484180049?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/8630903116484180049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=8630903116484180049' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/8630903116484180049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/8630903116484180049'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2008/11/pagination-using-ajax.html' title='Pagination using AJAX and JSP'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-8255586946868612569</id><published>2008-07-02T18:46:00.008+05:30</published><updated>2008-08-23T18:00:08.380+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Technical'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Session'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP?Servlet'/><category scheme='http://www.blogger.com/atom/ns#' term='HttpSession'/><title type='text'>Session Problems? Dont hesitate!!</title><content type='html'>The most difficult and typical part in the coding phase for any web developer(Hiya! for beginners)is absolutely the Session part... i let you know how we get this done easily.Step by Step....&lt;br /&gt;&lt;br /&gt;First we need to create a table with session name, session id and ip address as the fields...&lt;br /&gt;Here is&lt;br /&gt;CREATE TABLE session_tracker(SESSION_NAME VARCHAR(15),SESSION_ID VARCHAR(20),IP_ADDR VARCHAR(20));&lt;br /&gt;&lt;br /&gt;For IP Address and Session ID varchar is more than enough...So dont worry about that...&lt;br /&gt;&lt;br /&gt;Then next step is, when the user logs in just add the username as session value and add the above three fields mentioned in DB into the session_tracker table.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Note: How this helps?&lt;br /&gt;If user closes the browser accidentally the DB checks for the IP address and it allows the user to re-login without creating new session.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Then use the same session_name all over the project... And if user try to log out then just check the session name, session id and ipaddr of the page with the data's in DB. If all of them matches(leave session_id coz it changes if the user closes the browser accidentally).. then delete the entry in DB..&lt;br /&gt;That's it.. all our headache is gone.... Hope this helps......&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-8255586946868612569?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/8255586946868612569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=8255586946868612569' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/8255586946868612569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/8255586946868612569'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2008/07/session-problems-dont-hesitate.html' title='Session Problems? Dont hesitate!!'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-5968715041050678743</id><published>2008-07-01T11:37:00.004+05:30</published><updated>2008-07-01T11:44:18.123+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='DataType'/><title type='text'>Java MySQL Data Types</title><content type='html'>Most of the beginners struggle to put the correct data type in order to retrieve the data from MySQL Database.Even i too.So here i give you the details that i fetched from some other resource,and hope it would help you,that for me.&lt;br/&gt;&lt;br /&gt;MySQL Type----------------Java Type&lt;br/&gt;&lt;br /&gt;CHAR  ------------------String&lt;br/&gt;&lt;br /&gt;VARCHAR ------------------String&lt;br/&gt;&lt;br /&gt;LONGVARCHAR---------------String&lt;br/&gt;&lt;br /&gt;NUMERIC-------------------java.math.BigDecimal&lt;br/&gt;&lt;br /&gt;DECIMAL-------------------java.math.BigDecimal&lt;br/&gt;&lt;br /&gt;BIT-----------------------boolean&lt;br/&gt;&lt;br /&gt;TINYINT-------------------byte&lt;br/&gt;&lt;br /&gt;SMALLINT------------------short&lt;br/&gt;&lt;br /&gt;INTEGER-------------------int&lt;br/&gt;&lt;br /&gt;BIGINT--------------------long&lt;br/&gt;&lt;br /&gt;REAL----------------------float&lt;br/&gt;&lt;br /&gt;FLOAT---------------------double&lt;br/&gt;&lt;br /&gt;DOUBLE--------------------double&lt;br/&gt;&lt;br /&gt;BINARY--------------------byte []&lt;br/&gt;&lt;br /&gt;VARBINARY-----------------byte []&lt;br/&gt;&lt;br /&gt;LONGVARBINARY-------------byte []&lt;br/&gt;&lt;br /&gt;DATE----------------------java.sql.Date&lt;br/&gt;&lt;br /&gt;TIME----------------------java.sql.Time&lt;br/&gt;&lt;br /&gt;TIMESTAMP-----------------java.sql.Tiimestamp&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;Hopes u all get some stuff here...&lt;br /&gt;:-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-5968715041050678743?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/5968715041050678743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=5968715041050678743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/5968715041050678743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/5968715041050678743'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2008/07/java-mysql-data-types.html' title='Java MySQL Data Types'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-7491689158609761925</id><published>2008-06-28T15:37:00.003+05:30</published><updated>2008-06-28T15:40:18.867+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technical'/><category scheme='http://www.blogger.com/atom/ns#' term='Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP?Servlet'/><title type='text'>Difference between Forward and sendRedirect</title><content type='html'>&lt;span style="font-weight:bold;"&gt;FORWARD&lt;/span&gt;&lt;br /&gt;Control can be forward to resources available within the server from where the call is made. This transfer of control is done by the container internally and browser / client is not involved. This is the major difference between forward and sendRedirect. When the forward is done, the original request and response objects are transfered along with additional parameters if needed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;REDIRECT&lt;/span&gt;&lt;br /&gt;Control can be redirect to resources to different servers or domains. This transfer of control task is delegated to the browser by the container. That is, the redirect sends a header back to the browser / client. This header contains the resource url to be redirected by the browser. Then the browser initiates a new request to the given url. Since it is a new request, the old request and response object is lost.&lt;br /&gt;&lt;br /&gt;For example, sendRedirect can transfer control from http://www.somewebsite.com to http://anydomain.com but forward cannot do this.&lt;br /&gt;&lt;br /&gt;’session’ is not lost in both forward and redirect.&lt;br /&gt;&lt;br /&gt;To feel the difference between forward and sendRedirect visually see the address bar of your browser,&lt;br /&gt;in forward, you will not see the forwarded address (since the browser is not involved)&lt;br /&gt;in redirect, you can see the redirected address.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When can we use forward and when can we use sendRedirect?&lt;/span&gt;&lt;br /&gt;Technical scenario:&lt;br /&gt;redirect should be used&lt;br /&gt;1) If you need to transfer control to different domain&lt;br /&gt;2) To achieve separation of task. For example,&lt;br /&gt;Database update and data display can be separated by redirect. Do the PaymentProcess and then redirect to displayPaymentInfo. If the client refreshes the browser only the displayPaymentInfo will be done again and PyamenProcess will not be repeated. But if you use forward in this scenario, both PaymentProcess and displayPaymentInfo will be re-executed sequentially, which may result in incosistent data.&lt;br /&gt;&lt;br /&gt;For other than the above two scenarios, forward is efficient to use since it is faster than sendRedirect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-7491689158609761925?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/7491689158609761925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=7491689158609761925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/7491689158609761925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/7491689158609761925'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2008/06/difference-between-forward-and.html' title='Difference between Forward and sendRedirect'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-4771786565296446202</id><published>2008-06-26T10:44:00.009+05:30</published><updated>2008-07-11T13:07:18.480+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Prepared Statement'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Update query'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Select query'/><category scheme='http://www.blogger.com/atom/ns#' term='Insert query'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP?Servlet'/><title type='text'>SQL Where i my head cracked</title><content type='html'>Hi to all,&lt;br /&gt;             I have been so relax when i write this post. But not when i do the work that is the topic of the post. Yes, SQL really sucks while i'm in my project. I'm feel like an alien when i was getting involved with SQL queries. Eventually god helped me in the name of forum... I really thank my friends for their help towards making me a literate person in SQL.. Especially in Java Database Connectivity.. So i here to post the fucking code that makes me mad for a day or two.. It shows you the usage of Prepared Statement in INSERT,UPDATE and SELECT Queries.... If i gotta more then i surely add it in my post... Until keep smiling with the code...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;For INSERT&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;String SQL="INSERT INTO tbl_rmadetails(date,rma_no,customer_id,item_id,customer_inv_no,&lt;br /&gt;customer_inv_date,customer_inv_amount,serial_no,fault_desc,&lt;br /&gt;replaced_serial_no,status,vendor_id,vendor_inv_no,&lt;br /&gt;vendor_inv_date,vendor_rma_ref,remarks)&lt;br /&gt;VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";&lt;br /&gt;&lt;br /&gt;ps = con.prepareStatement(SQL);&lt;br /&gt;ps.setDate(1,da);&lt;br /&gt;ps.setInt(2,rm1);&lt;br /&gt;ps.setString(3,customer);&lt;br /&gt;ps.setString(4,item);&lt;br /&gt;ps.setInt(5,in1);&lt;br /&gt;ps.setDate(6,date1);&lt;br /&gt;ps.setNull(7,11);&lt;br /&gt;ps.setNull(8,11);&lt;br /&gt;ps.setString(9,fdesc);&lt;br /&gt;ps.setNull(10,11);&lt;br /&gt;ps.setString(11,status);&lt;br /&gt;ps.setString(12,vend);&lt;br /&gt;ps.setNull(13,11);&lt;br /&gt;ps.setNull(14,11);&lt;br /&gt;ps.setNull(15,21);&lt;br /&gt;ps.setNull(16,21);&lt;br /&gt;&lt;br /&gt;f = ps.executeUpdate();&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;For UPDATE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;String SQL2="UPDATE tbl_rmadetails SET serial_no=?, replaced_serial_no=?, status=?, customer_id=?, item_id=? WHERE customer_id=? AND item_id=?";&lt;br /&gt; &lt;br /&gt;ps=con.prepareStatement(SQL2);&lt;br /&gt;&lt;br /&gt;ps.setInt(1,serial_no);   &lt;br /&gt;ps.setInt(2,replaced_serial_no);&lt;br /&gt;ps.setString(3,status);&lt;br /&gt;ps.setString(4,custo);&lt;br /&gt;ps.setString(5,ite);&lt;br /&gt;ps.setString(6,custo);&lt;br /&gt;ps.setString(7,ite);&lt;br /&gt;   &lt;br /&gt;x=ps.executeUpdate();&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;For SELECT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I look so many people to mess the whole JDBC thing with JSP which is a better practice if you are a beginner. But, i am not suggest you to use it, and a best alternate is to use MVC structure..But some of us still learning from JSP and here is the messy thing of code for them..It works like a charm for me when i am in college...&lt;br /&gt;&lt;br /&gt;I post this code to use in JSP page as most of beginners need this kinda solution...&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;SQL="select * from rma where rma_no="+rmano;//where rmano is the value of textbox that we got from previous JSP page&lt;br /&gt;rs=st.executeQuery(SQL);&lt;br /&gt;while(rs.next())&lt;br /&gt;{&lt;br /&gt;%&gt;//You can print it wherever you want......&lt;br /&gt;&lt;%=rs.getString("rma_name")%&gt;&lt;br /&gt;&lt;%=rs.getString("rma_date")%&gt;&lt;br /&gt;&lt;%=rs.getString("rma_amount")%&gt;&lt;br /&gt;&lt;% }&lt;/blockquote&gt;&lt;br /&gt;and goes on....&lt;br /&gt;&lt;br /&gt;Here i use various methods like setNull(), setDate(0.etc.. that were not been able to understand until u came across it in ur project.. So if u need help regards that stop here and comment.. I'll surely help u...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-4771786565296446202?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/4771786565296446202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=4771786565296446202' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/4771786565296446202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/4771786565296446202'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2008/06/sql-where-i-my-head-cracked.html' title='SQL Where i my head cracked'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-4274931005053026002</id><published>2008-06-25T13:50:00.003+05:30</published><updated>2008-06-25T14:09:02.005+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hardware'/><title type='text'>GeForce GTX series 200 - Gaming made pleasure</title><content type='html'>&lt;span style="font-weight:bold;"&gt;GeForce GTX series 200&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The product we review today is the GeForce GTX 280, a raw beast of a processor for sure.&lt;br /&gt;&lt;br /&gt;The new GTX series 200 GPUs amounts up-to 1400 million transistors. It's the biggest goblin that NVIDIA has ever built, seriously, 1400 transistors means it's a freak on a leash. Think about that for a minute guys, and keep in mind that the GeForce 8800 'only' had roughly 700 Million processors. That's roughly doubling up the previous transistor count. Interestingly enough, that would also double up the die-size of the processor and so you'd expect NVIDIA to move to a smaller fabrication process for this graphics processor. They did not as the new architecture is still based on a 65nm fabrication size. The chip is being made at TSMC and according to them ... the biggest one they've ever made.&lt;br /&gt;&lt;br /&gt;Unconfirmed info states that NVIDIA has come up with a huge die measuring 24 x 24 mm. And not many chips will actually fit on a 300 mm wafer, since , resulting in a die area size of 576 mm2. We measured and it's indeed easily 5.5 cm. I have no clue how a chip this big really yields, but this certainly is one expensive graphics processor to make. We expect NVIDIA to move to a smaller fab process (55nm) pretty soon.&lt;br /&gt;&lt;br /&gt;Let's walk through some of the main features (you need to stamp into your head) of this new beast:&lt;br /&gt;&lt;br /&gt;    * 1.4 billion transistors&lt;br /&gt;    * 993 GigaFLOP processing power&lt;br /&gt;    * 240 processing (shader) cores (GTX 280)&lt;br /&gt;    * 192 processing (shader) cores (GTX 260)&lt;br /&gt;    * DirectX 10&lt;br /&gt;    * New power management enhancements&lt;br /&gt;    * CUDA parallel processing&lt;br /&gt;    * GeForce PhysX&lt;br /&gt;&lt;br /&gt;So the thing you'll wonder about is, where are all these transistors going? Obviously a big chunk of the transistors are being utilized for the shader cores. And shader cores the product surely has, 240 of them on the GeForce GTX 280. The new shader architecture have some cool new features. Sitting in-between them now is a integration of local cache memory (16k software managed cache). It is sitting in-between a block with 8 shader cores. So simply put, what helps here is that the data / instruction doesn't have to leave the GPU anymore to crunch it's data (normally in the regular framebuffer memory. This is a very significant improvement in the architecture.&lt;br /&gt;&lt;br /&gt;Let me show you some building blocks on that information. Light green, the shader cores, yellow the new 16k shared memory cache, brown texture filtering. As you can see the shaders are clustered in three blocks of eight shader processors. Then there are ten clusters totaling up towards the 240 shader units for the GeForce GTX 280. And if you do the math with me real quick then the GeForce GTX 260 has to have 8 shader clusters with a total of 192 shader processors.&lt;br /&gt;&lt;br /&gt;Okay then people, it's time to get a little deeper under the hood and inside that thing we like to call the GPU. As you noticed, NVIDIA is actually released two products.&lt;br /&gt;&lt;br /&gt;    * GeForce GTX 280: 602MHz GPU, 240 shaders, 1296MHz shader processors, 1107MHz memory, 1GB memory, 512-bit memory bus, 141.7GB/s memory bandwidth, 48.2 billion/s texture fill rate&lt;br /&gt;    * GeForce GTX 260: 576MHz, 192 shaders, 1242MHz shader processors, 999MHz memory, 896MB memory, 448-bit memory bus, 111.9GB/s memory bandwidth, 36.9 billion/sec texture fill rate.&lt;br /&gt;&lt;br /&gt;The cheaper GeForce GTX 260 will be priced at an interesting $449 and inevitably will fight with ATI's upcoming Radeon RV770/4870. The GeForce GTX 280 will be about 25 per cent faster than the 260, yet cost more with a steep $649 sales price.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;BFG GeForce GTX 280 OC edition&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The GeForce GTX 280 has a pretty amazing 240 stream processors and runs at a core clock frequency of 602MHz. There are more clocked domains inside that GPU though, the shader processor run at 1296MHz and the memory is at 1107MHz (effective 2214 MHz). All-in-all we feel the clocks are a little bit on the conservative side. The GTX 280 has eight 64-bit memory controllers, 8x 64-bit = 512 Bit.&lt;br /&gt;&lt;br /&gt;This high-end part has 1GB of GDDR3 memory which has a 512-bit memory bus that binds to 8 memory controllers inside the GPU. At the end of the pipeline we run into an improved ROP (Raster Operation) engine, and the 280 has 30 of them.&lt;br /&gt;&lt;br /&gt;All that brute transistor power results into roughly 933 GFLOPS of performance .A tad unexpected is to see that this card needs both a 6-pin and 8-pin power connector to get enough juice. NVIDIA claims a TDP (peak wattage) of roughly 235 Watts, which in all honesty is not even that bad considering the GeForce 8800 Ultra isn't that far off from that number either. And trust me when I say .. this puppy is roughly twice as fast.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;GeForce  GTX 260 &lt;/span&gt; &lt;br /&gt;Stream (Shader) Processors-- 192            &lt;br /&gt;Core Clock (MHz)------------ 576            &lt;br /&gt;Shader Clock (MHz)---------- 1242            &lt;br /&gt;Memory Clock (MHz) x2------- 999            &lt;br /&gt;Memory amount--------------- 896 MB            &lt;br /&gt;Memory Interface------------ 448-bit    &lt;br /&gt;HDCP------------------------ Yes            &lt;br /&gt;Two Dual link DVI----------- Yes               &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Geforce GTX 280&lt;/span&gt;&lt;br /&gt;Stream (Shader) Processors-- 240&lt;br /&gt;Core Clock (MHz)------------ 602&lt;br /&gt;Shader Clock (MHz)---------- 1296&lt;br /&gt;Memory Clock (MHz) x2------- 1053&lt;br /&gt;Memory amount--------------- 1024 MB&lt;br /&gt;Memory Interface------------ 512-bit&lt;br /&gt;HDCP------------------------ Yes&lt;br /&gt;Two Dual link DVI----------- Yes&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If u wanna buy a new Graphics card now just go for the GTX 2XX series.. It might be a perfect choice for gamers and pro's..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-4274931005053026002?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/4274931005053026002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=4274931005053026002' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/4274931005053026002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/4274931005053026002'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2008/06/geforce-gtx-series-200-gaming-made.html' title='GeForce GTX series 200 - Gaming made pleasure'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-2542558439233998699</id><published>2008-06-24T15:35:00.008+05:30</published><updated>2008-06-24T15:56:58.003+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scripting'/><title type='text'>Multiple Submit buttons using JavaScript</title><content type='html'>Hi friends,&lt;br /&gt;    I gotta this problem when i did my first project in the company. Yes i do have multiple submit buttons and each one perform as like the submit value function. I gotta lil' bit confused with it. Then i roam around the net and find many solutions and finally i got a strike and implement it in code... Its working... So i post it for ur convenience. here is my way&lt;br /&gt;*************************************************************************************&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;function submitFunction(i) {&lt;br /&gt;if (i==1)&lt;br /&gt; document.form2.action="administratorhome.jsp";&lt;br /&gt;if (i==2)&lt;br /&gt; document.form2.action="index.html";&lt;br /&gt;document.form2.submit()&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;form name="form2"&amp;gt;&lt;br /&gt;&amp;lt;input value="Submit1" onclick="submitFunction(1)" type="button"&amp;gt;&lt;br /&gt;&amp;lt;input value="Submit2" onclick="submitFunction(2)" type="button"&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;*************************************************************************************&lt;br /&gt;&lt;br /&gt;Then i find a much simpler way in the net.. here i post that too.&lt;br /&gt;*************************************************************************************&lt;br /&gt;&lt;br /&gt;&amp;lt;form&amp;gt;&lt;br /&gt;&amp;lt;input name="AddRecord" value="Add Record" onclick="this.form.action='record_add.asp';" type="submit"&amp;gt;&lt;br /&gt;&amp;lt;input name="DeleteRecord" value="Delete Record" onclick="this.form.action='record_delete.asp';" type="submit"&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;*************************************************************************************&lt;br /&gt;&lt;br /&gt;Enjoy using that code...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-2542558439233998699?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/2542558439233998699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=2542558439233998699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/2542558439233998699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/2542558439233998699'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2008/06/multiple-submit-buttons-using.html' title='Multiple Submit buttons using JavaScript'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-1913338137886234764</id><published>2008-06-21T10:01:00.008+05:30</published><updated>2008-08-23T17:50:46.438+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scripting'/><title type='text'>JavaScript Validation</title><content type='html'>        When i start my career as a Web Developer i face some problems regarding VALIDATION.  Even though i had lots of scripts in hand i can't able to write my own at that time.But for now the time changes. I had a JavaScript file with me and use it whenever i need it in my project. Yes of course it is not written by me, i love to use that code snippet in my projects. Because of its powerful coding. I learned a lot from that coding, even some logics too. So i decided now to share my script to all who is in need of a good Validation in JavaScript(Ofcourse email validation too). You can modify the code as you need. Use the script and tell me how it is. Because i need your valuable comments.&lt;br /&gt;Here is the code snippet&lt;br /&gt;------------------------&lt;br /&gt;function Validator(frmname){&lt;br /&gt;this.formobj=document.forms[frmname];&lt;br /&gt;if(!this.formobj) {   alert("BUG: couldnot get Form object "+frmname);&lt;br /&gt;return; }&lt;br /&gt;if(this.formobj.onsubmit) {&lt;br /&gt;this.formobj.old_onsubmit = this.formobj.onsubmit;&lt;br /&gt; this.formobj.onsubmit=null; }&lt;br /&gt;else {  this.formobj.old_onsubmit=null; }&lt;br /&gt;this.formobj.onsubmit=form_submit_handler; this.addValidation = add_validation;&lt;br /&gt;this.setAddnlValidationFunction=set_addnl_vfunction;&lt;br /&gt;this.clearAllValidations = clear_all_validations;}&lt;br /&gt;function set_addnl_vfunction(functionname){&lt;br /&gt;this.formobj.addnlvalidation = functionname;}&lt;br /&gt;function clear_all_validations(){&lt;br /&gt;for(var itr=0;itr &lt; validationset =" null;" itr="0;itr" str =" var ret = " itemobj =" this.formobj[itemname];" validationset =" new" desc="desc;" error="error;" itemobj =" inputitem;" validate="vdesc_validate;}" vset="new" add=" add_validationdesc;" validate=" vset_validate;" itemobj =" inputitem;}" itr="0;itr&lt;this.vset.length;itr++)" return="" function="" a="" very="" simple="" validation="" you="" can="" add="" more="" complex="" email="" checking="" if="" it="" helps="" length=""&gt;&lt;= 0) {   return true; }    var splitted = email.match("^(.+)@(.+)$");    if(splitted == null) return false;    if(splitted[1] != null )    {      var regexp_user=/^\"?[\w-_\.]*\"?$/;      if(splitted[1].match(regexp_user) == null) return false;    }    if(splitted[2] != null)    {      var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;      if(splitted[2].match(regexp_domain) == null)       {     var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;     if(splitted[2].match(regexp_ip) == null) return false;      }// if      return true;    }return false;} function V2validateData(strValidateStr,objValue,strError) {     var epos = strValidateStr.search("=");     var  command  = "";     var  cmdvalue = "";     if(epos &gt;= 0)     { &lt;br /&gt;  command  = strValidateStr.substring(0,epos);&lt;br /&gt;    cmdvalue = strValidateStr.substr(epos+1);     }&lt;br /&gt;  else     { &lt;br /&gt;  command = strValidateStr;     }&lt;br /&gt;  switch(command)     {&lt;br /&gt;       case "req": &lt;br /&gt;     case "required":    &lt;br /&gt;   {            if(eval(objValue.value.length) == 0)  &lt;br /&gt;       {               if(!strError  strError.length ==0)      &lt;br /&gt;      {                 strError = objValue.name + " : Required Field";               }//if&lt;br /&gt;             alert(strError);               return false;            }//if     &lt;br /&gt;    break;                      }//case required      &lt;br /&gt;case "maxlength":     &lt;br /&gt; case "maxlen":         &lt;br /&gt;{              if(eval(objValue.value.length) &gt;  eval(cmdvalue))       &lt;br /&gt;    {                if(!strError  strError.length ==0)      &lt;br /&gt;       {                  strError = objValue.name + " : "+cmdvalue+" characters maximum ";                }//if           &lt;br /&gt;  alert(strError );            &lt;br /&gt; return false;              }//if         &lt;br /&gt;  break;           }//case maxlen      &lt;br /&gt;case "minlength":       &lt;br /&gt;case "minlen":         &lt;br /&gt;{              if(eval(objValue.value.length) &lt; length ="="0)" strerror =" objValue.name" charpos =" objValue.value.search("&gt; 0 &amp;amp;&amp;amp;  charpos &gt;= 0) &lt;br /&gt;           {  &lt;br /&gt;           if(!strError  strError.length ==0)  &lt;br /&gt;            {                   strError = objValue.name+": Only alpha-numeric characters allowed ";                 }//if &lt;br /&gt;             alert(strError + "\n [Error character position " + eval(charpos+1)+"]");&lt;br /&gt;              return false;               }//if          &lt;br /&gt;  break;            }//case alphanumeric&lt;br /&gt;       case "num":  &lt;br /&gt;    case "numeric": &lt;br /&gt;        {               var charpos = objValue.value.search("[^0-9]");  &lt;br /&gt;          if(objValue.value.length &gt; 0 &amp;amp;&amp;amp;  charpos &gt;= 0)   &lt;br /&gt;         {   &lt;br /&gt;           if(!strError  strError.length ==0)   &lt;br /&gt;           {          &lt;br /&gt;      strError = objValue.name+": Only digits allowed ";                 }//if &lt;br /&gt;                           alert(strError);        &lt;br /&gt;      return false;               }//if        &lt;br /&gt;    break;                          }//numeric&lt;br /&gt;      case "alphabetic":  &lt;br /&gt;    case "alpha":    &lt;br /&gt;     {          &lt;br /&gt;  var charpos = objValue.value.search("[^A-Za-z]");   &lt;br /&gt;         if(objValue.value.length &gt; 0 &amp;amp;&amp;amp;  charpos &gt;= 0)   &lt;br /&gt;         {           &lt;br /&gt;     if(!strError  strError.length ==0)       &lt;br /&gt;       {             &lt;br /&gt;   strError = objValue.name+": Only alphabetic characters allowed ";                 }//if&lt;br /&gt;                                           alert(strError);     &lt;br /&gt;         return false;               }//if &lt;br /&gt;           break;            }//alpha&lt;br /&gt;case "alnumhyphen":&lt;br /&gt;{              var charpos = objValue.value.search("[^A-Za-z0-9\-_]");&lt;br /&gt;              if(objValue.value.length &gt; 0 &amp;amp;&amp;amp;  charpos &gt;= 0)&lt;br /&gt;             {         &lt;br /&gt;       if(!strError  strError.length ==0)  &lt;br /&gt;            {                   strError = objValue.name+": characters allowed are A-Z,a-z,0-9,- and _";                 }//if       &lt;br /&gt;                                   alert(strError + "\n [Error character position " + eval(charpos+1)+"]");                 return false;               }//if  &lt;br /&gt;  break;   }   &lt;br /&gt;  case "email":  &lt;br /&gt;      {                if(!validateEmailv2(objValue.value))     &lt;br /&gt;        {                  if(!strError  strError.length ==0)      &lt;br /&gt;         {                     strError = objValue.name+": Enter a valid Email address ";                  }//if   &lt;br /&gt;                                                          alert(strError);     &lt;br /&gt;          return false;          &lt;br /&gt;   }//if          &lt;br /&gt;break;           }//case email      &lt;br /&gt;case "lt":  &lt;br /&gt;    case "lessthan":  &lt;br /&gt;     {             if(isNaN(objValue.value))         &lt;br /&gt; {               alert(objValue.name+": Should be a number ");        &lt;br /&gt;    return false;             }//if    &lt;br /&gt;      if(eval(objValue.value) &gt;=  eval(cmdvalue))       &lt;br /&gt;   {               if(!strError  strError.length ==0)     &lt;br /&gt;       {                 strError = objValue.name + " : value should be less than "+ cmdvalue;               }//if              &lt;br /&gt;            alert(strError);     &lt;br /&gt;       return false;                              }//if              &lt;br /&gt;        break;          }//case lessthan      &lt;br /&gt;case "gt":&lt;br /&gt;      case "greaterthan":   &lt;br /&gt;    {             if(isNaN(objValue.value))        &lt;br /&gt;  {               alert(objValue.name+": Should be a number ");       &lt;br /&gt;     return false;             }//if         &lt;br /&gt;  if(eval(objValue.value) &lt;=  eval(cmdvalue))              {                if(!strError  strError.length ==0)                {                  strError = objValue.name + " : value should be greater than "+ cmdvalue;                }//if                              alert(strError);                return false;                              }//if                         break;          }//case greaterthan         case "regexp":          {     if(objValue.value.length &gt; 0)&lt;br /&gt;  {             if(!objValue.value.match(cmdvalue))&lt;br /&gt;           {                if(!strError  strError.length ==0)      &lt;br /&gt;       {                  strError = objValue.name+": Invalid characters found ";                }//if       &lt;br /&gt;                                                                    alert(strError);                return false;                                }//if  &lt;br /&gt;}           break;          }//case regexp      &lt;br /&gt;case "dontselect":&lt;br /&gt;       {             if(objValue.selectedIndex == null)  &lt;br /&gt;        {               alert("BUG: dontselect command for non-select Item");               return false;             }             if(objValue.selectedIndex == eval(cmdvalue))       &lt;br /&gt;   {              if(!strError  strError.length ==0)     &lt;br /&gt;       {               strError = objValue.name+": Please Select one option ";               }//if                    &lt;br /&gt;                                                      alert(strError);  &lt;br /&gt;          return false;                                                }              break;          }//case dontselect     }//switch&lt;br /&gt;  return true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;To use this in ur HTML or JSP or whatever page just add the below code juz above the closing form tag....thats it...&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;script language="javascript"&lt;br /&gt;var frmvalidator  = new Validator("formname");&lt;br /&gt;frmvalidator.EnableOnPageErrorDisplaySingleBox();//use a div with form2_errorloc as id inorfer to display the error in same page...&lt;br /&gt;frmvalidator.EnableMsgsTogether();&lt;br /&gt;frmvalidator.addValidation("serialnumber/*This the components name*/","req/*This is the criteria name*/","Please enter the Serial Number");&lt;br /&gt;frmvalidator.addValidation("serialnumber","alphanumeric","Please enter User Name in proper format");&lt;br /&gt;frmvalidator.addValidation("status","req");&lt;br /&gt;frmvalidator.addValidation("status","dontselect=0");&lt;br /&gt;likewise one can use the following criterias...&lt;br /&gt;minlength="value"&lt;br /&gt;maxlength="value"&lt;br /&gt;numeric   &lt;br /&gt;alpha&lt;br /&gt;email&lt;br /&gt;lessthan&lt;br /&gt;greaterthan&lt;br /&gt;regexp&lt;br /&gt;dontselectchk&lt;br /&gt;shouldselectchk&lt;br /&gt;selone_radio&lt;br /&gt;***********&lt;br /&gt;/script&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Enjoy with the code.....&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-1913338137886234764?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/1913338137886234764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=1913338137886234764' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/1913338137886234764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/1913338137886234764'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2008/06/javascript-validation.html' title='JavaScript Validation'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-3008458520133790652</id><published>2008-06-20T14:47:00.003+05:30</published><updated>2008-06-20T15:06:22.397+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP?Servlet'/><title type='text'>Paging like Gooooooooooooogle</title><content type='html'>Just visit the site i mentioned below to get the paging like the Goooooooooooogle. It may help you to fetch the records in DB by batching system.&lt;br /&gt;&lt;br /&gt;http://www.servletsuite.com/servlets/pagertag.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-3008458520133790652?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/3008458520133790652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=3008458520133790652' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/3008458520133790652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/3008458520133790652'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2008/06/paging-like-gooooooooooooogle.html' title='Paging like Gooooooooooooogle'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6608757157566231856.post-1910802676431774734</id><published>2008-06-20T13:23:00.000+05:30</published><updated>2008-06-20T13:28:52.486+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP?Servlet'/><title type='text'>Confused With Session in JSP/Servlets</title><content type='html'>Hi friends,&lt;br /&gt;            I am working as a Web Developer in India. Where i joined before three months. Now i am getting involved with the project. The project mainly deals with session like User login  like that kinda. So i can do some homeworks regarding this. Anyhow i got stuck with these session concepts. I am here to ask you people help me by give me some useful tips on Login and logout by maintaining the user session properly.&lt;br /&gt;&lt;br /&gt;Any comments would be welcome!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6608757157566231856-1910802676431774734?l=rajkumarpb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rajkumarpb.blogspot.com/feeds/1910802676431774734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6608757157566231856&amp;postID=1910802676431774734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/1910802676431774734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6608757157566231856/posts/default/1910802676431774734'/><link rel='alternate' type='text/html' href='http://rajkumarpb.blogspot.com/2008/06/confused-with-session-in-jspservlets.html' title='Confused With Session in JSP/Servlets'/><author><name>Rajkumar P B</name><uri>http://www.blogger.com/profile/14448663957692616817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Wc3NbAnf7SI/SQ7QVpPCFHI/AAAAAAAAAA4/O1AfIEwo8aA/S220/DSC00281.JPG'/></author><thr:total>0</thr:total></entry></feed>
