Jump to content
Changes to the Jaspersoft community edition download ×

HTML Cache Problem

Recommended Posts

By: Suraj Amin - tg_wisecrack

HTML Cache Problem

2002-11-27 02:41



I modified certain jsp's (compile.jsp, viewer.jsp) in the webapp (provided with Jasper distro) to accept my report.

It displays fine but the browser caches the result. The report has 2 pages. When I go to the 2nd page it still displays the contents of the 1st page. Only when I do a Shift + Refresh does it show the 2nd page.

I've tried several tricks to avoid caching like:





/* response header so that pages are not cached */

response.setHeader("Cache-Control", "no-cache, must-revalidate");

response.setHeader("Pragma", "no-cache");

response.setHeader("Expires", "Tue, 04 Dec 1993 21:29:02 GMT");




<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<META HTTP-EQUIV="Expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">




<td><a href="viewer.jsp?page=<%=pageIndex + 1%>&cache=<%= System.currentTimeMillis() %>">Next</a></td>

<td><a href="viewer.jsp?page=<%=lastPageIndex%>&cache=<%= System.currentTimeMillis() %>">Last</a></td>




But none of them worked. My mozilla is set to Compare the page in the cache Every time I view teh page.

Tried it with IE too with no luck.


How do I solve the problem.




Suraj Amin.






By: Teodor Danciu - teodord

RE: HTML Cache Problem

2002-11-29 04:39




I don't think it is quite a cache problem.

If I remember well, it seems like there is a little

bug in the "page by page" viewer.

Sometimes, the page index gets to be -1 and if

you click on Next, you'll still be on the first page.



If this is the case, then you can easily fix it yourself

or I'll do it in the next version.


Thank you,


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...