【问题标题】:thymeleaf url syntax for absolute url绝对网址的百里香网址语法
【发布时间】:2018-05-22 17:33:14
【问题描述】:

我想用th:href 制作thymeleaf url 来生成这个url(用于我的birt 报告)

http://localhost:8081/birt/frameset?__report=report/bordereau_emission.rptdesign&__title=BordereauEmission&__locale=fr_FR&__format=html&__masterpage=true&IdBE=23

其中 &__paramName=value 是 birt 报告 url 中的 param=value。

我在下面尝试过,但它给了我解析异常:

<td><a href="listebebrouillons.html" th:href="@{http://localhost:8081/birt/frameset?__report=report/bordereau_emission.rptdesign&__title=Bordereau Emission&__locale=fr_FR&__format=html&__masterpage=true&IdBE=${bordereauEmission.idBe}}">Visualiser</a></td>

【问题讨论】:

    标签: thymeleaf birt


    【解决方案1】:

    这应该可行:

    <a th:href="@{http://localhost:8081/birt/frameset(
      '\_\_report'='report/bordereau_emission.rptdesign',
      '\_\_title'='Bordereau Emission',
      '\_\_locale'='fr_FR',
      '\_\_format'='html',
      '\_\_masterpage'='true',
      IdBE=${bordereauEmission.idBe}
    )}">Visualiser</a>
    

    __ 在百里香中有特殊含义。它表示Thymeleaf preprocessing expression

    【讨论】:

    • 感谢您的帮助。它工作正常。我不知道__在百里香中有特殊含义。
    猜你喜欢
    • 1970-01-01
    • 2010-10-28
    • 2016-06-17
    • 2019-06-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-19
    • 2018-04-09
    相关资源
    最近更新 更多