The issue of where and how to manage your static assets for you ATG application is one that comes up in every application and every deployment. This is my recommendation based on 13 years of ATG experience both on the development and ATG hosting sides of the house:
“Application Assets” go in the EAR in your store’s WAR. Application Assets include CSS, JS, and all the images used for the application look and feel: logo, navigation images, css images, and so on. These files typically only change in conjunction with a code/JSP release, and they need to be easy for the developers to manage on their local development instances. Keeping everything needed to build, run, and browse the application in SVN and built into the EAR makes it easy to run developer instances and be sure you have the correct versions of the assets, etc… It also allows you to leverage things like pack:tag which I discuss in my post about Secondary Asset Loading Time. My only complaint is that ATG doesn’t have a built-in mechanism for handling versioning of static assets, which allows you to set long expiration dates in the caching headers without the issue of stale browser caches corrupting the view of your site after a deployment.
Obviously you don’t want your JBoss instances handling every request for every static asset in production, but by utilizing cache headers, transparent caching on your web servers, or a CDN solution, this is easily avoided while still keeping all of the benefits of managing the Application Assets within the EAR.
“Catalog and Marketing Assets” get deployed to the web servers. These assets typically include product and category images, promotional images, white papers, PDFs, etc… These files are changed frequently by the marketing team or by data feeds from an internal catalog management system on a schedule independent of code/JSP releases. The files also tend to be larger. The assets are often managed via SFTP, or ATG Publishing deploying to a Web Publishing Agent, or a combination of the two.
By managing your files in this way you get the most benefits with the least downsides.