Skip to main content


Showing posts from October, 2009

Hosting Multiple Domains In Tomcat

Tomcat allows us to host multiple domains in one instance, using multiple 'Host' tags. In this article I will explain how to do it on Tomcat. This is very simple configuration using 'Host' tags in your server.xml. A novice can also understand this configuration very easily.
Before going into the details of the configuration first lets have a look at the 'Host' tag, 'Context' tag and 'Alias' tags first.
<Host name="domain1" appBase="[application base]" autoDeploy="[true/false]" unpackWARs="[true/false]"> <Alias>...</Alias> <Context path="" docBase="" reloadable="[true/false]"/> </Host> First lets have a look at 'Alias' tag. This tag is used to provide aliases for your actual domain. For example you have a domain called '', and you want to run the same application for '' also…

String manipulation in Java

One topic most of the developers in early days of their career overlook while programming is STRING MANIPULATION. This article will throw some light on this topic, so that one can make habit of some efficient coding. I am going to give some insight into Java string manipulation and some better ways to do string manipulation.
In Java String objects are immutable, what it means is once you create a String object in Java, it can not be changed/modified. For example look at the following code.
String a = "A String Object"; a = "Second String Object"; In the above code, we created a String object 'a' at line#1 with the value "A String Object", and in line#2 we tried to change the value of the object 'a' to "Second String Object". As I mentioned little earlier, when you create a String object in Java, it can not be changed. In line#2 when you try to change the value of object 'a', JVM [Java Virtual Machine] will create…

Simple Accordion using Java Script and CSS

Well you can find many online, but it's difficult to find one with out any dependent API. Most of the available accordions use other APIs for animation and other stuff. For those who just want accordion with out any other stuff, this one is the perfect one. It's very simple and you don't have to be a geek to understand it. Basic knowledge of Java script and CSS will do to understand how this works. In this article I'll take you through the steps of developing an accordion. Couple of minutes you are ready to write your own. Well then let's start developing one.

Layout of the HTML block looks something like the one below
Lets look at the CSS first which is very simple.
/** container styles **/ .ra-p, .ra-cp { padding: 0 0 0.1em; } /**** heading styles ****/ .ra-p h2, .ra-cp h2 { margin: 0px; padding: 0.2em; cursor: pointer; color: #fff; background-color: #3d80b0; } /**** collapsed heading styles ****/ .ra-cp h2 { …

About Rakesh.A

As the URL and other parts of this blog says, I am Rakesh.A, a techie form Hyderabad, India. I am working for coMakeIT, Hyderabad as a Sr. Software Engineer, that's about me in short.
How I ended up in this profession? - Well when I was doing my schooling I never thought I'll be into this profession, infact I wasn't that interested in Information Technology/Software Development, so never concentrated on it even after my parents stressed to get into it. After couple of years, I saw myself doing the same. And now I can't even think of myself being in a different profession. Anything I can do with whole heart, that's only PROGRAMMING/DEVELOPMENT.
As every student who got into this profession, I felt my FIRST LOVE with 'C language', and I love coding in C. Then I started learning Object Oriented Programming and got attracted to 'C++ language', but it was 'JAVA' in which I saw my soul mate. That's it I got married to it and settled. I've…