dev@glassfish.java.net

Re: expires-header valve

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 09 Jan 2008 14:31:45 -0500

Hi,

w.rittmeyer wrote:
> Hello,
>
> given the recommendations of Yahoo's Steve Sourders on website
> performance I've been looking for a way to add expires headers to images
> and css-files that are delivered by glassfish.
>
> Since I haven't been able to find anything I think a Valve might be the
> way to go. Attribute would provide information about the amount of time
> to add to the current time and about which content-type elements to
> consider.
>
> Any thought about that?

A Valve will works, but have you think about a Filter defined in
${glassfish.home}/domains/domain1/config/default-web.xml, which will be
injected to any web application deployed under GlassFish. This way you
can reuse your filter in other app server (hopefully not, but just in
case).

But for sure a Valve will works fine :-)

Thanks

--Jeanfrancois


>
>
> Thanks,
>
> Wolfram Rittmeyer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>