Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Interest »

Re: Serving files dynamically

Damon Hart-Davis

2003-08-04

Replies:

Hi,

Well, it sounds to me like you want a fairly vanilla chunk of cache code,
possibly at the servlet/JSP level!

There is some code you *may* be able to use (anyway, it's documented and up
on the Web) for my Gallery at http://gallery.hd.org/ where I have 4GB+ of
images, etc, plus thumbnails that are expensive to (re)generate, so caching
at the WAR level in the guaranteed-private temporary file area that the WAR
supplies does the job for me.

(Docs at: http://gallery.hd.org/_javadoc/index.html and code at
http://gallery.hd.org/src.snapshot.tar.gz )

But you may also find that the O'Reilly Servlet JAR
http://www.servlets.com/cos/index.html (class CacheHttpServlet) does quite a
lot of what you want with some tweaking...

Anyway, you probably want something like the size-limited and LRU cache I
use and fall back to regenerating the reports when something isn't present,
since that's no worse than you are now.

Rgds

Damon



----- Original Message -----
From: "Justin Wesbrooks" <wesbrooksj@(protected)>
To: <J2EE-INTEREST@(protected)>
Sent: Monday, August 04, 2003 3:59 PM
Subject: Serving files dynamically


> I currently have a site that allows customers to come view reports for
some
> information we keep. The requirement is to keep a 2 year history on these
> reports. Currently, the reports are generated dynamically every time
(even
> for the 1 year old reports). I want to make a modification to the site to
> archive the reports (excel spreadsheets) that are X weeks old and serve
the
> customer the archived report rather than generate it. The report is
> generated on large amounts of data and takes a while to generate. Has
> anyone done this or is there a best practice for something like this?
> Also, the report will be different for each customer that comes to the
> page, with the maximum number of customers being around 30.
>
>
===========================================================================
> To unsubscribe, send email to listserv@(protected)
body
> of the message "signoff J2EE-INTEREST". For general help, send email to
> listserv@(protected)".
>

===========================================================================
To unsubscribe, send email to listserv@(protected)
of the message "signoff J2EE-INTEREST". For general help, send email to
listserv@(protected)".


©2008 junlu.com - Jax Systems, LLC, U.S.A.