I am newbie to Freemarker & am pretty sure there would be an easy way to do this开发者_如何学Go. Essentially in my jsp page I have something like this,
<c:url var="myURL" value="/amount">
<c:param name="currency" value="dollars"/>
</c:url>
I am porting this to .ftl now. So I wanted to know is there a way to do it in ftl? I dont want to pass the url from the servlet. There are way too many.
I don't know of a direct translation for that into FreeMarker, but you could write a custom directive to handle that easily. FreeMarker has built ins for URL escaping as well.
精彩评论