lukastymo
lukastymo

Reputation: 26819

Separate project for only images - need refactoring?

I have webapp project (tomcat + jsp + spring)

I want all images move to different project. It'll give me possible to change images by redeploy only one war.

The biggest problem which I have is when I'll move images to new project I need change all paths in jsp, css files. Is there any solution without big refactoring? (maybe Filter which mapping all calling /images/* to /ProjectWithImages/images/*? Is performance good for this solution?)

Upvotes: 0

Views: 65

Answers (1)

Bozho
Bozho

Reputation: 597114

Map a Servlet to /images/* and from there - get the target file as stream, and copy it to the output stream, setting all necessary headers.

Upvotes: 3

Related Questions