users@glassfish.java.net

Re: Enable Browser Cache for JSP?

From: emiddio-frontier <emiddio_at_frontier.com>
Date: Mon, 04 Jul 2011 10:32:55 -0700

sounds like you page scope is not Session --

you would also need to have logic that knows the database has been read
so it does
not do it again.

if you set a break point at your database read code -- and that code is
being
called more than once -- then its not related to cache -- its your logic.


gary


On 7/4/2011 8:54 AM, forums_at_java.net wrote:
> I have a jsp file that reads from a database to generate a page for the
> user.
>
> The read is complex and slow, the is result large, so I don't want to
> keep
> generating and trasmitting the page back to the user.
>
> The page stays the same throughout the user's logon session, so it
> doesn't
> need regenerating anayway until the logouts/back on.
>
> How can I get the browser to cache the page and read from the cache
> when the
> user clicks on a link to that page?
>
> I have tried setting the Cache-Cotrol header to public with a max-age,
> but
> this hasnot helped.
>
> Any ideas? Thanks.
>
>
> --
>
> [Message sent by forum member 'abenz']
>
> View Post: http://forums.java.net/node/818691
>
>
>