This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Bear Bibeault wrote:Well since your code is hiding the exceptions we'll never know.
I'd strongly suggest refactoring your code to handle the exceptions properly.
Hint: See that throws JspException on the method signature? That's there for a reason.
I found the error, Instead of using return EVAL_BODY_INCLUDE , I should have used return EVAL_BODY_BUFFERED in doStart() method.
Then it doesn't give any exception and gives me the desired results. Thanks for replying Mr Bear Bibeault