Category: Learn

  • JavaScript Timer function for session time out.

    <script language=”javascript” type=”text/javascript”> document.onkeypress= resetTimer document.onmousemove= resetTimer document.onmousedown= resetTimer document.Onfocus= resetTimer var timerId; timerId = window.setTimeout(“timeOut()”,7200000); function resetTimer() { window.clearTimeout(timerId); timerId = window.setTimeout(“timeOut()”,7200000); } function timeOut(){ // do something here alert(“Your session is times out. You will not be able to continue. Please login again “); var x=1; if(x==1){ //do something here } } </script>

  • Found the solution for Tomcat Start up Issue.

    At last, I cracked it! Here is the story: Sometime back when I deploy my web application( named: myApp) in Tomcat 5.5.23 installed on JDK 1.5 Update 14, I used to stuck with the following issue and I was not able to access my application. Tomcat log will show something like below: INFO: validateJarFile(C:\Program Files\Apache […]

  • weird naming convention of substring() method of java.lang.String class

    The substring() method of java.lang.class is not inline with the Java naming conventions for methods. As per Java naming conventions, all the methods will be in camelCase.But this does not bother substring() method. To get sub string of any string in Java, we should use substring() NOT subString(). PS: I remember there are some other […]

  • The following Error related to JBoss Drools frustrated me because of Java Version mismatch. The version of Drools we are using runs properly only with JDK 1.5 where as we are trying hard to make it run on JDK1.6 and ended up with the following issue. java.lang.ClassNotFoundException: [Lorg.drools.rule.Declaration; at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa at […]

  • MS SQL Server 2K and Win XP

    MS SQL Server 2000 Enterprise Edition Server componentscan not be installed on Windows XP. Only client components can be installed. I am exploring how to install Personal Edition on Win XP.I thought I will post it after I successfully do it.But we again did not use it and got the work done with Enterprise Edition.So […]

  • Javascript replace() method.

    Useful JavaScript replace() method for string manipulation is here

  • Java’s Checked and Unchecked Exceptions- demystified

    Until recently, I had hard time remembering what is the difference between checked and unchecked exceptions. Finally Head First Java gave me the prompt explanation. Here it goes: Checked Exceptions: Arise due to the reasons which are beyond control of programmer so complier mandates them to handle or declare. Unchecked Exceptions: Arises due to logic […]

  • JScrollPane for JTextBox

    I was creating a GUI using Java Swings. I decided to add a text box with vertical scroll bar to it. I also have few more other components to be added and my text box with scroll bar comes after some of them. So I started adding one by one, panel.add(dateLabel);panel.add(dateTextbox);….. //now the turn of […]

  • Tricky RESET

    In HTML, reset is used to well reset the form.This means the form will be reverted to the way it was as soon as it got loaded. Here are 2 important cases. [1] You loaded an empty form which has some fields like text boxes, check boxes, combos etc.So when you hit on reset, as […]

  • Starting a new blog to share my Technology learnings.

    Starting this blog today to pen down all my tech learnings. I am going to use this blog to document my learnings, findings, resources etc about the technologies I come across in my day to day life. So here I am, seeking your best wishes in this journey through Technology hinterland. -ChaitanyaSave as Draft