I am working both in the Ruby and Java worlds. I have been inspired somewhat by the merb-assets project, which provides various functionality to make it easy to reference assets (images, CSS, etc.) located on a subdomain (or CDN).
I want to do the same in Java:
- in development and testing, I want to use either JSTL's
<c:url>
or Struts 2's<s:url value=""/>
tags to reference assets. - but in production, I want to move most of these assets out to a separate subdomain (or CDN).
Are there any taglibs (or other methodologies) out there that can help with this? I don't particular want to litter my views with <c:if
and tests for localhost
, everytime I insert an <img>
or <link>
tag.
I am using Struts 2 + JSP.