Hi firoza,
If i undestood by your explanation / stack, you're using this JADE framework and when accessing through an resource your code works well while accessing by other resource this doesn't.
Given your explanation i can't really know what's wrong but i can try, if i would look for something in there i'll look for a resource that would not been properly initialized as the Kumar said in the last reply or if this resource that you're calling doesn't pass through an filter that the other pass ..
Maybe some initialization code occurs at runtime using a url-pattern and this new url-pattern of this resource doesn't match with the filter
pattern, or maybe you're not extending a class that extract data to create and execute this resouces .. the biggest problems of work with frameworks is this .. if you don't understand how it works you've to guess .. anyway .. try something in this line and check what the /jsp/index.jsp and your servlet have in uncommon (like
jsp have session initialized by default, while servlet has to call getSession() or getSession(true), if it call getSession(false).get....(foobar) .. it will throw an NPE)
Feel free to keep asking until you solve this problem!