Skip to main content


Showing posts from April, 2013

A trip to Meluha alongside Shiva

I never comment about his attitude or his grin face very ill tempered guy… no one wants to mess with him. He was breathing heavy probably he just battled out someone near our lake’s bank or was he resting after his regular practice. Why does the blood stains are still there in his sword probably he just put few life to end, just before I could ask him to wash them we heard some announcement deep from Manasarowar. Couple of strangers were using some bizarre tools to shout, actually they are inviting us to their town. I wanted to warn of letting strangers inside village but Shiva had other ideas, he was sure they are not part of local barbaric tribes. May be our ancestors mustn’t have allowed other tribes to fetch water from the holy lake, their thirst was for blood not water. I thought he can discuss about foreigners to him but he was so depressed about next barbaric attack from local tribes. Before dusk another attack we were not able to prevent the murder of kids and women. Ruthless…

How to: Write a file inside webapp directory of Tomcat with Struts2 or JSP & Servlet

Hi! This time its for struts break for database, ever felt you wanna store files temporarly inside your server directory? then this post is to help you out if you are new to java and you have interest in learning, this is good to know! trust me even big folks won’t know this I’m going to tell for Struts2 framework.


Using ServletContext & ServletActionContext in Struts2

import javax.servlet.ServletContext;

import org.apache.struts2.ServletActionContext;


public String execute() {

try {

String path = “/folder1/file1.txt” ;

System.out.println(“where it might write ”

+ System.getProperty(“user.dir”));

ServletContext context = ServletActionContext.getServletContext(); //Line No.6

path = context.getRealPath(path);

File file = new File(path);

// if file doesnt exists, then create it

if (!file.exists()) {

System.out.println(“trying to creat new file at ” + path);

// Getting parent directory then crea…


First sight frightens most, big creepy eyes, kinda weird skin color, strong built. Anyone who comes to my home can’t dare step in unless he accepts them else its gonna be a freak show! Very short tempered yet kind and loving if you are ready to take that one step close to him which either break into complete chaos or builds new relationship. He was very ferocious when I was the only one to raise him till the age of 5 but then my sister took care he became kinda soft, loving idiot playful fool! Now a days he is addicted to scratch, sometimes shows his mighty teeth to make sure you don’t take your hands of his head or sometimes sweet as “cat’s purr”. He’ll turn 11 this September many sweet moments to count on :) Combai is his breed is not pure though; Combai are ancient breed they are bear hounds used for hunting. Interesting superior in power and intellligence than most talked Indian breed Rajapalayam you can read more about this on Combai-wiki. He is old now but his attitude is getti…