-
Couldn't load subscription status.
- Fork 38.8k
Description
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:
- Binding in Velocity templates using EL accessors ([, ]) for collections produces non xhtml strict compliant output [SPR-5172] #9845 Binding in Velocity templates using EL accessors ([, ]) for collections produces non xhtml strict compliant output