开发者

Expiry Headers for static resources in Java Webapps

is there a way to configure Expires headers for static resources in a Java Webapplication without having to use a servlet/controller to do the job? The reason is, that we have a bunch of static CSS, Images, and JavaScript files that will only rarely change (if at all).

Of course I could just write a Controller for those resources (and I probably will, if there is no alternative), but since this is a recurring problem I wonder if there might already be a solution out there.

PS: Since we use the Spring framework a开发者_如何学Gonyway, a solution from there is ok too.


Yes do it using Filter, configure a filter that will intercept each static resources's request and in response modify header.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜