Saturday, October 13, 2007

inspiring story 2


A man found a cocoon of a butterfly. One day a small opening appeared. He sat and watched the butterfly for several hours as it struggled to force its body through that little hole. Then it seemed to stop making any progress. It appeared as if it had gotten as far as it could, and it could go no further.

So the man decided to help the butterfly. He took a pair of scissors and snipped off the remaining bit of the cocoon.

The butterfly then emerged easily. But it had a swollen body and small, shriveled wings.

The man continued to watch the butterfly because he expected that, at any moment, the wings would enlarge and expand to be able to support the body, which would contract in time.

Neither happened! In fact, the butterfly spent the rest of its life crawling around with a swollen body and shriveled wings. It never was able to fly.

What the man, in his kindness and haste, did not understand was that the restricting cocoon and the struggle required for the butterfly to get through the tiny opening were God's way of forcing fluid from the body of the butterfly into its wings so that it would be ready for flight once it achieved its freedom from the cocoon.

Sometimes struggles are exactly what we need in our lives. If God allowed us to go through our lives without any obstacles, it would cripple us.

We would not be as strong as what we could have been. We could never fly!

Inspirational story

i discovered something good when surfing the net. its a story:

A story is told about a soldier who was finally coming home after having fought in Vietnam. He called his parents from San Francisco.

"Mom and Dad, I'm coming home, but I've a favor to ask. I have a friend I'd like to bring home with me."

"Sure," they replied, "we'd love to meet him."

"There's something you should know the son continued, "he was hurt pretty badly in the fighting. He stepped on a land mind and lost an arm and a leg. He has nowhere else to go, and I want him to come live with us."

"I'm sorry to hear that, son. Maybe we can help him find somewhere to live."

"No, Mom and Dad, I want him to live with us."

"Son," said the father, "you don't know what you're asking. Someone with such a handicap would be a terrible burden on us. We have our own lives to live, and we can't let something like this interfere with our lives. I think you should just come home and forget about this guy. He'll find a way to live on his own."

At that point, the son hung up the phone. The parents heard nothing more from him. A few days later, however, they received a call from the San Francisco police. Their son had died after falling from a building, they were told. The police believed it was suicide. The grief-stricken parents flew to San Francisco and were taken to the city morgue to identify the body of their son. They recognized him, but to their horror they also discovered something they didn't know, their son had only one arm and one leg.

The parents in this story are like many of us. We find it easy to love those who are good-looking or fun to have around, but we don't like people who inconvenience us or make us feel uncomfortable. We would rather stay away from people who aren't as healthy, beautiful, or smart as we are. Thankfully, there's someone who won't treat us that way. Someone who loves us with an unconditional love that welcomes us into the forever family, regardless of how messed up we are.

Tonight, before you tuck yourself in for the night, say a little prayer that God will give you the strength you need to accept people as they are, and to help us all be more understanding of those who are different from us!!!

good one right!

Saturday, September 22, 2007

team outing

yesterday we had a team outing at pragati resorts. There were good number of events there, cricket, paintball, etc etc... in fact i wanted to be with paint ball game, but swimming kept me so busy that i forgot the time in it.

water is exiting & with friends it magnifies! we played water volleyball etc. i relearn t to swim. in the morning i was for 3 hrs and at the evening one more round. The great thing is that it was raining and too chilly @ abt 4:00 pm and i went for the 2nd swim. The day was great.

Wednesday, September 12, 2007

tooth ache + homeo


one of my close person had a bad tooth ache. The gum actually swelled of so much that she could not even chew the food. Simle solution: Sanguineria 200 (8Rs only) of homeopathy helped! with in 48 hrs the swelling is reduced by more than 2/3 and now theres very little pain in the gum.

I actually herd tha homeopathy, if taken the right medicine for a given disease, would cure it very very quickly. I think the same had happed here.

imageine if there were no homeo! we go to the general physition, she takes consultaion and re-direst us to a dentist. Now this fellow: 2 hrs waiting and then you stay with open mouth for 30mn or 1 hr + antibiotics + vitamins + bed rest and all this would have costed us so much of strain. And to the end of the story she -patient would end up having a dinner of tablets! :o

*** agn my observation only; not a substitute to doctors advice! ***


my mother suffered and is still suffering (less) from rheumatic arthritis. We consulted Dr. (at JNTU masabtank, in adjacent lane to mahavir hospital, Hyderabad) He really bot the issue into quick control and with in a month or so, my mother could hold things, walk (with difficulties though)

Later we tried with many parallel medications at home (no doctor) We bought the homeopathy book -'in tintaa homeo' a thin book; may be some 100 pages and not more. It had instructions of what medicine (each would cost, today, 8Rs and not more) for a particular pain. THis book was a boon to us. We got abt 15/ 20 such madicines and tried them all.

Homeo is one good medication where in the medicine goes as a waste (iff its not related ot heart and brain -a doctor said) This point gave us some encouragement. We cant say if this alone had helped us out. We used to do Allam-murabba ( some thing made out of jagerry + ginger (allam) )

We read books that said Allam (ginger) Sonthi (dried up ginger) and vellullipai (garlic i think: its white small, and we need to peel thin layres of .. to get the real things in it. Generally used in masala cookings :) ) these 3 of them are general ingrediants of indian food, but the point is that we made an explicit usage of it, i.e. spl made the paste and used to have them 1/ 2 times a day.

now she is well. At least i would say that 90% of the arthrites pain is now gone. She is able to do her work and move around.

*** The information in this post is some thing that worked for us and what we did with our limited understanding of things. i cannot guarantee that this would work atleaset the same way to you (in case u are trying it out) in case i remember few more things i shall post it here. Keep watching this space***

icefaces performance issue

i had never thought that we would face such a difficulty. I had read all the dev manual, posted this preformance issue on forums but surprisingly got no solution. the pages are still taking abt 7mb per page per person. this is bad. At first i thought that this is some config issue but it seems like even some body other is also having the same issue.

what i dont understand is that how are the big cmpanies able to use the product?? dont they get any issues???

Sunday, September 2, 2007

puzzle: game


was surfing the net and found a site that deviced a game in flash. The rules are simple ; its a cube that has to be inserted into a hole. i could go till the 7th stage... passcode:189493, URL:

Its really nice game and keeps u absorbed into it. i love it! :)

Saturday, August 18, 2007


I was greatly impressed by the icons presented at the site:

I was just surfing and found an open source product that can generate the same kind.. just downloaded .. shd see what it can do

Monday, July 23, 2007

Hey got the soln


Got the solution. Initially i was not getting any exceptions and later i fine tuned the now i see exceptions in logs. After couple of trial and errors and fine tuning i see that ... <..include file="" > does not work at all!

There is another approach to include the jspx files into each other; using facelets; i configured them and included all the files. now the JSTL works!

# logging icefaces
# Configure the logger to output info level messages into a rolling log file.
log4j.rootLogger=WARN, A1
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
# To see server side updates being sent to the browser

facelets.level = FINEST
facelets.compiler.level = WARN
facelets.tag.component.level = INFO
facelets.viewhandler.level = WARN

& in JSPX:

Wednesday, July 18, 2007

ICE Faces

we are now looking into the icefaces (ajax framework for JSF... looks hi-fi but simple one!) At first things were great... the custom components given by the site are really good... but as the things are goin by we see difficulties -as with any other open source product.

The first major once was with the file upload component. The component uploads all files to the same directory not allowing the user to choose which directory to upload. Hardly you have any freedom to customize the target location to save the file. Well, we could manage it with a workaround.

When observing the src code of icefaces, found that the upload component is being rendered in iframe, its calling a jsp page for which we write mapppings in jspx file. so the soln; wrote a filter which would intercept the url and push the file into the session. Later by another event in the jsp page we get the file from the session and stream it to the custom folder...

well this was simple 'cos we know how java works.... and by observation we can recognize the association btw files..... but the issue comes when the things are with configurations like installing JSTL into icefaces!

Going by manual, doing all entries dont help.. theres no error or stack trace which can give some clue... u need ot be sharlok homes.. trying to detect.... i have good knowledge abt the listeners filters, mappings but it does not seem to help :(

finally forums.... have to wait too long time to get a reply.. dont know what difficultites they have there :(

any how now we are stuck up with intalling JSTL into icefaces.... and i personally think having JSTL would add a lot of flexibility to the work that we do.

thats for now.. lets c how we fix the issue....!

Sunday, May 6, 2007


the appraisal season came and went off.... leaving us with little hike.... i was not happy at alll... went to the head and talked abt it to him... he was seeing at the% hike and i was seeing at the final figure... man it was bad...

i was terribly disappointed and shaken with the pay i am finally getting... then thought that i will do great this time... thought i shall study etc etc... but at the bottom i was feeling that i m making some fundamental mistakes...

i started observing all through and now finally feel that i need to change... at small things i m getting flared up.... loosing control... started some initiatives.... they seem to work //./ but they need to work more... i m loosing control and to the end i realize that i flared up! the good thing is that i m at least realizing... previously even this didn't happen...

things seem improving but they need to really improve more... this week i m thinking to remain silent.. thinking to observe more... know how others are behaving ... reacting... may be i get some interesting ways to mitigate my problem form them...

may god bless me :)

Friday, March 2, 2007

Configuring GWT as a Eclipse web-project


I didn't find how to install GWT into eclipse. Finally I find a possible approach which i docmented as follows. May b its helpful, if not , feel free to get in touch with me.In this example i would create an application which finally makes an async call to server and fetches the time from there.

To the end we should be able to debug inline with eclipse editor. Here i use my-eclipse i think it works even with eclipse editor also. Its a simple applicatoin.

By the way, whats GWT? and documentation etc, i leave it to the home site of gwt.

now by project creator,

create a web project, uncheck the default location, as below, and locate the sourece folder.

u should see the following in the navigator of eclipse

now the scene starts, when u run the gwt, in standalone mode, it creates www, bin folders and does the processings, but now need to make it create WebRoot and WebRoot/classes and use them instead. This requires editing of cmd files and here we go!

open compile cmd file as follows

@java -cp "%~dp0\src;%~dp0\bin;D:/r/work/UI/gwt-windows-1.3.3/gwt-user.jar;D:/r/work/UI/gwt-windows-1.3.3/gwt-dev-windows.jar" -out "%~dp0\www" %* com.ui.clock

is what u see, now change

bin -> WebRoot\WEB-INF\classes
www -> WebRoot

To check if rpc is also working proceesd as follows:

create a new class as

create the following interface

package com.ui.client;

public interface ClockInt extends RemoteService{

String getDate();


create the async interface as follows

package com.ui.client;

public interface ClockIntAsync {


The IDE may throw errors, for it u need to import the 3 jar files in gwt.xip that you have downloaded from the GWT home page and include them in eclipse properties (how? right click on project select properties, click on java build path, click on libraries tab, add external jars, and navigate to the gwt-windows 1.3.3 -could be found when u unzip the gwt-windows 1.3.3 zip file from gwt home page. Select all the three jar files.)

The errors now disappear, if still not refresh the project.

Create the server side implimentation to the ClockInt as follows:

1. create the folder server at this results in com.ui.server package.

write the folloing code in the package

package com.ui.server;
import java.util.Date;
import com.ui.client.ClockInt;

public class ClassImpl extends RemoteServiceServlet implements ClockInt {
public String getDate() {
Date today =
new Date();
return today.toLocaleString();

update the clock.gwt.xml file as follows

<inherits name=''/>

<entry-point class='com.ui.client.clock'/>
<servlet path="/Clock.rpc" class="com.ui.server.ClockImpl" />

Hey! dont worry, we are to the end.

public class clock implements EntryPoint {

public void onModuleLoad() {
final Button button = new Button("Click me again");
final Label label = new Label();
ClockIntAsync clockAsync = (ClockIntAsync) GWT.create(ClockInt.
ServiceDefTarget endPoint = (ServiceDefTarget) clockAsync;

AsyncCallback asyncCallBack =
new AsyncCallback() {
public void onSuccess(Object result) {
new HTML(result.toString()));

public void onFailure(Throwable ex) {
new HTML(ex.toString()));

button.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
if (label.getText().equals(""))
"Hello World!");

Test the configuration in stand alone mode. Click on clock-compile.bat and then on clock-shell.bat successively. You should see the clock displayd to the bottom of page.

To deploy to webservr:

Make these entries:









Things are ready and deolpy the project onto tomcat server as exploed archive. Start the server, and try with this url:
URL: http://localhost:8080/Clock/com.ui.clock/clock.html

u should see the same clock as u saw in stand alone mode. Thats it.


Sunday, February 11, 2007

Apache Tomcat Clustering

Apache Tomcat is a web-server, meaning it complies to JSP and Java-servlets spec given by Java. It is possible to cluster such servers and do load balancing on them. When i tried to do it, i hardly found any relevant help on it, now that i could get the clustering done, i thought thought that i would share this so that a new person can save a lot of time.

In discovering this approach the zip file provided by erricson @
was very helpful. I rec0mmend you get the download. It would speak about clustering all the tomcats under one umbrella of apache.

scenario 1:

But what if you want multiple clusters under one apache. For this you will have to proceed as follows.
1. Under /apache2.0/conf/workers.prop file: retain only the 'load balancer' parameter.
2. Say you have 4 workers (i.e. 4 tomcats, machine1.. machine 4) and you want machine1, machine2 into cluster a, and machine 3 & machine4 into cluster B then make the following changes in the workers.prop file
a. enter: worker.machine1.domain=A

Scenario 2:

Supposing that you need the request to be always server to the same server which served the first request from the browzer then:
../conf/ : make worker.loadbalancer.sticky_session=true

With scenario 1 + scenario2 done, you have achieved fail save mechanism. i.e. if the server of a cluster fails, then the neighboring servers of the same cluster take care of the request.

my state:
Right now i could make 1-cluster & a stand-alone tomcat servers, under one apache HTTP server. I shall update the site in-case i get any issues & how to rectify them.