Friday, December 20, 2013

Writing a simple tomcat valve and listener

Tomcat valves act as  preprocessors of each request for webapps. If we want to hook up our custom processing logic for requests, we can write a valve and register it globally for all webapps or locally for a webapp. 

To register it locally for a webapp, in the Context.xml of the webapp register it as;

 <Valve className="org.test.valve.MessageRecoveryTomcatValve"/>

To define the valve  globally, register it in the catalina-server.xml file

< Engine>
      <Valve className="org.test.valve.MessageRecoveryTomcatValve"/>

Tomcat listeners get notifications when there is any lifecycle state change occurs in a webapp.

This can be registered in the Context.xml of the webapp.

<Listener className="org.test.MyListener" context="GenericJavaBeanResource"/>

Saturday, December 14, 2013

The Desert Flower ! - Waris

A Somalian girl's  incredible journey.

I just pray that one day no woman will have to experience this pain and that it becomes a thing of the past. That's what I'm working toward. -Waris

Some stories are too terrible to tell, but happen. Waris tells her story  to Marie Claire,  reporter- fashion magazine. 

 Could not simply say hats off to Waris. Story tells the truth of the painful lifes of the Somalian women. Terribly speechless !!! 

Tuesday, December 3, 2013

Everlasting songs..

Stress relieve music..