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.
Hey Venkatesh, i would still suggest that it is not a good practice for having so much java code in jsp. However also see the following points in ur code: which is why it is printing only a single month: 1.what is the need for this loop
2. You are creating only one instance of calendar and then using the same in the for loop
check this out:i have made some major changes to your code and this will work: