0

In an existing struts2 project, images are stored in /public/images, js and css are stored in /js/* and /css/* respectively. Currently they are all loaded correctly by the url http://testdomain.com/js/test.js. However, a "Cache-Control: private" is always added to it.

After my research online, seems like the only way to serve static content is to put them in /struts or /static. Is there anyway I can change that? Struts2 version that is being used is 2.2.1. I also know that perhaps a custom filter can be used but I do not seem to be able to find some more details on it.

AbSoLution8
  • 1,203
  • 1
  • 18
  • 27
  • are you using Apache as your web-server or only tomcat? static content you are talking about are related to the css/images and js files being used by framework itself – Umesh Awasthi Sep 17 '13 at 03:14
  • I do the same and "Cache-Control: private" is not added to any of my static content so we'll need more information. Web server are you using? – Quaternion Sep 17 '13 at 04:06
  • 1
    Have you read the docs ? http://struts.apache.org/development/2.x/docs/static-content.html – Lukasz Lenart Sep 17 '13 at 06:09

0 Answers0