Chunkbot
Chunkbot

Reputation: 41

Spring servlet for serving static content?

I'm wondering what's the Spring way of serving static files. It should support:

Something like the following, but using the idioms of Spring 3...

Upvotes: 4

Views: 1083

Answers (1)

Bozho
Bozho

Reputation: 597096

You can make a @Controller with @RequestMapping("/static/{resourceName} and use the same logic as in BalusC's Servlet

As for gzip - use Tomcat's or Apache's configuration options.

Upvotes: 1

Related Questions