【问题标题】:Read properties file without using Key不使用 Key 读取属性文件
【发布时间】:2016-06-22 11:59:10
【问题描述】:

我有一个没有 Key 并且只有内容的属性文件,我想在转义 html 标记后在 jsp 页面中显示属性文件的内容。如何做到这一点?

属性文件:

Here is an example of content, messages. <p>

<b>approach<b> <br>
<a href="www.google.com">Find out more about our website</a>
</p>

如何使用spring在jsp页面中显示这个?有什么帮助吗?

【问题讨论】:

标签: spring jsp properties-file


【解决方案1】:

message.properties 通常用于国际化。通常属性文件一般用于小值和纯文本。

对于您的情况,我只需创建一个单独的 jsp 文件并将其包含在您的 jsp 中。

&lt;%@ include file="aboutus.jsp" %&gt;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-02-10
    • 2016-09-08
    • 2015-03-25
    • 2012-10-25
    • 2019-12-09
    • 1970-01-01
    相关资源
    最近更新 更多