Using spring:message to define form tag attribute in Spring web application

后端 未结 1 1896
渐次进展
渐次进展 2021-02-05 19:46

I\'m developing a Java/Spring web application. The problem I\'m currently facing is that I\'d like to have message from message.resources shown as an attribute in an HTML.

相关标签:
1条回答
  • 2021-02-05 20:17

    Use <spring:message> to store the value in a var, then reference that var using EL, e.g.

    <spring:message code="general.submit" var="submitText"/>
    <input type="submit" name="login" value="${submitText}" />
    
    0 讨论(0)
提交回复
热议问题