This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
when jsp is called first time its compile and load the .class file in memory.. like a simple java file. first time its found the null value in your request.getAttribute() so we must check the null value first to prevent throwing NPE.
"Vishal", My request that you change your display name to adhere to JavaRanch standards was not a suggestion. Valid display names are mandatory for participation on the Ranch. Please change your display name as instructed prior to your next post.
Be aware that accounts with invalid display names are removed.