title: Using spring:message to define form tag attribute in Spring web application
body: <p>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. </p>
  
  <pre><code>&lt;input type="submit" name="login" value="login" /&gt;
  </code></pre>
  
  <p>So instead of the hardcoded value "login" I need to the value of</p>
  
  <p><code>&lt;spring:message code="general.submit" /&gt;</code> as the value attribute of that input tag. As the pages are all xml, it's no option to nest tags like</p>
  
  <pre><code>&lt;input type="submit" name="login" value="&lt;spring:message code="general.submit" /&gt;" /&gt;
  </code></pre>
  
  <p>as it does not compile. I could, of course, read the value in the Java controller and use a JSTL variable to display the value, but I think it would be too hackish and complicated, especially for pages with large amount of submit buttons. Is there some kind of elegant way of accomplishing what I want to do?</p>