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.
First of all, note that it's horrible practice to have large chunks of code in a JSP. Good practice would have no code, but static methods are even worse. It makes debugging and maintenance very difficult.
In this particular case, the whole thing should be a servlet and there should be no JSP. After all, if you have a PDF, you shouldn't have HTML too. What would the browser do wit that?
Try copying that large method into a servlet and printing the result to the output.
Thank you for your reply. I am very new to the Jasper Report and I would really appreciate, if i can get a real help of the code, which can able to export to pdf from jasper report.
This is really very urgent.