Hi Bilal,
I am using Jasper report in my struts project and creating some line graph as a report,
exported as HTML file and then included in a JSP file,
For first time report is visible ,
But the next time when i create another report and goes to the same page,
The image from previous report is there instead of new image for new Report,
After refreshing the page it shows exact correct output,
i thought its problem of repeatedly same request is send,
so I have appended some random number along with the request,
but it wont work,
This is how i included the file,
what may be the reason? please help.
Thank you in advance,
And best luck for your Book, i m looking forward to learn more about jasper report.
You are including HTML representation of the jasper report directly into your jsp file. The HTML file in turn always uses images. I guess the problem is due to the cache either on the browser or on the Web server. That’s because two things (the HTML file and accompanying images) are being cached.
So try to fetch the actual HTML code from JasperReprots library and dynamically embed that code instead of including the HTML file. In addition, you may have to develop JSP logic to include some random number in the names of image files.
You are including HTML representation of the jasper report directly into your JSP file. The HTML file in turn always uses images. I guess the problem is due to the cache either on the browser or on the Web server. That’s because two things (the HTML file and accompanying images) are being cached.
So try to fetch the actual HTML code from JasperReprots library and dynamically embed that code instead of including the HTML file. In addition, you may have to develop JSP logic to include some random number in the names of image files.
Thank you for your response sir,
but before you could answer the question,
I have made that problem solved by changing HTML page path, by adding report in some separate folder that contains timestamp,
Thus forming unique path each request and browser wont cache it,
and also try and remove caching by response.setHeader("Cache-Control","no-cache");
Its working fine,
and delivered also.
I respond to thread after problem solving, because some other person on the earth could find the solution for the same problem
Your idea of including some random number in the names of image files can also serve the purpose,
Thank you very much for your reply once again,
and i am looking forward to learn more from your new Book.
Have a Great Time here.