Announcement Announcement Module
Collapse
No announcement yet.
No CDN during dev; CDN in prod Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 11:58 AM.

  • #2
    There is nothing like an URL tag which might help you. One thing that might help is the use of Themes, you could have a theme for dev and one for prod. Then define the URLs in a property file and have the spring theme tag take care of things. But that is more or less a work-around.

    Comment

    Working...
    X