开发者社区 问答 正文

spring mvc + freemarker如何获得当前应用的路径

jsp文件中可以使用request.getContextPath()获得当前应用的根目录路径, 而对于freemark的ftl文件该如何获得呢? 难道需要在后台的action层把路径放入request.setAttribute?

展开
收起
a123456678 2016-03-13 14:17:10 2338 分享 版权
1 条回答
写回答
取消 提交回答
  • ${template_path}

    ${template_name}

    2019-07-17 19:02:32
    赞同 展开评论