开发者

Auto refresh of static content in Spring 3

In my Spring 3 web app the users are able to upload images using Springs multipart resolver. The image is save to the folder defined in the apps servlet-context.xml:

<mvc:resources mapping="/resources/**" location="/resources/" />

Th开发者_运维问答e problem is that I need to refresh the resources folder on the server to make the newly images visible to the user.

How can I make Spring/Tomcat auto-refresh the images after each upload?


is this "resources" folder a watched folder in tomcat.. you can make a folder as watched by adding a configuration in server.xml.

also, when dealing with images & other static contents, the server would lookup the file when required & the content is delivered, please check if the browser is caching the result before making any changes in the server.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜