Brian Clozel opened SPR-14027 and commented
Spring provides ways to rewrite resource URLs using the ResourceUrlEncodingFilter and ResourceUrlProvider. By using the HttpServletResponse.encodeUrl method, supported template engines can trigger that mechanism to rewrite the resource URL.
The dedicated Velocity macros provided by Spring, springUrl only prepends the URL with the context, instead of calling the actual method RequestContext.getContextUrl; this is actually done for the Freemarker equivalent.
In the meantime, developers who want this feature should override Spring's macro or declare their own like this:
#macro( springResourceUrl $relativeUrl )$springMacroRequestContext.getContextUrl(${relativeUrl})#end
Affects: 4.2.5
Reference URL: http://stackoverflow.com/questions/35844482/how-to-use-spring-resourceurlencodingfilter-with-velocity-template
Issue Links:
Referenced from: commits 0a56667, f76b38c
Brian Clozel opened SPR-14027 and commented
Spring provides ways to rewrite resource URLs using the
ResourceUrlEncodingFilterandResourceUrlProvider. By using theHttpServletResponse.encodeUrlmethod, supported template engines can trigger that mechanism to rewrite the resource URL.The dedicated Velocity macros provided by Spring,
springUrlonly prepends the URL with the context, instead of calling the actual methodRequestContext.getContextUrl; this is actually done for the Freemarker equivalent.In the meantime, developers who want this feature should override Spring's macro or declare their own like this:
Affects: 4.2.5
Reference URL: http://stackoverflow.com/questions/35844482/how-to-use-spring-resourceurlencodingfilter-with-velocity-template
Issue Links:
Referenced from: commits 0a56667, f76b38c