Q:

Specifying form checkbox value with spring message

Can I specify the form:checkbox tag value with spring:message tag? Seems like a silly question, but it seems hard to find the right syntax, if there's any.

A:

Something like this should work:
<fmt:message key="myKey" var="myLabel" />
<form:checkbox path="foo"
id="${commandName.foo}" 
label="${myLabel}"
value="${commandName.foo}" />

where myKey is the key you'd use in <spring:message code="myKey"/>

