No CDN during dev; CDN in prod
Hi all,
This is not necessarily a Spring question per se, but I have a feeling that either Spring has a trick up its sleeve that I haven't learned yet, or else the Spring community has a trick up its sleeve...
Throughout my application, anywhere that I reference static content, I'm in the habit of using JSTL's <c:url/> tag.
I'm now interested, however, in using a content distribution network- but I don't want to use that when I'm working locally. So basically, during development, I want static content resolved from within my workspace the way it is today, but when deploying to production, I'd like to use my CDN (which is on a different domain).
Anybody have any nice tricks?
Note, I did see there is a Spring <s:url/> tag similar to JSTLs and it has a context attribute that "Specifies a remote application context path. The default is the current application context path." But I haven not seen a practical example of how this might solve the problem.
Any help is appreciated!
EDIT: I should add that it's obviously a pretty light lift to write my own URL tag that can accomodate this, but if there's an existing, common solution to this problem, I have a strong preference for using that instead.
Last edited by krancour; Jun 27th, 2012 at 11:58 AM.
Kent Rancourt
DevOps Engineer