java - Serve static resources from within a compressed file using Spring -


is possible serve static resources within compressed file using spring mvc? this.

i have data packaged individual json files (e.g. 123.json, 1634.json, etc.) , and serving them via

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

the files under .../resources/datafiles/. user can go http://mywebsite.com/resources/datafiles/123.json retrieve data entity 123.

however, have ~10,000 json files. great if compress them under 1 file (.../resources/datafiles/entities.zip) , tell spring serve individual json files within compressed file.

so user still go http://mywebsite.com/resources/datafiles/123.json file under .../resources/datafiles/ entities.zip.

i'm using tomcat 7.0 if question outside scope of mvc framework.

i'm not sure if there's spring out-of-the-box component that, can create independent servlet handle incoming requests static resources, servlet parse file name, , dynamically read zipped file correct zip entry , return content outputstream of response. take at:

sample code


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -