【问题标题】:Reading problems from property file (Spaces)从属性文件(空格)中读取问题
【发布时间】:2012-06-23 19:32:10
【问题描述】:

我在我的网络应用程序中使用 i18n。从 .properties 中读取它。 一切正常,但是当我阅读按钮 (type="submit") 的文本时,它只在第一个空格之前阅读。

jsp文件中的代码:

<input type="submit" value=<fmt:message key="button.ok" /> style="width:100"/>

.properties 文件中的代码:

button.ok=Sign in

但是,当我从属性读取文本到其他文本字段(不是按钮)时 - 一切正常。 例如。

<fmt:message key="login.password" />

并且 login.password=输入您的密码:

附:对不起我的英语:)

【问题讨论】:

    标签: java html jsp internationalization struts


    【解决方案1】:

    像这样读

    <input type="submit" value="<fmt:message key='button.ok'/>" style="width:100"/>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-14
      • 1970-01-01
      • 1970-01-01
      • 2020-11-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多