title: How to display a formatted DateTime in Spring MVC 3.0?
body: <p>I have a Joda-DateTime field in my model and want to display it formatted in a JSP view. I have annotated it with the new @DateTimeFormat annotation:</p>
  
  <pre><code>public class Customer {
     private DateTime dateOfBirth;
  
     @DateTimeFormat(style="M-")
     public DateTime getDateOfBirth() {
        return dateOfBirth;
     }
  }
  </code></pre>
  
  <p>Now I want to display the dateOfBirth in my JSP:</p>
  
  <pre><code>Date of birth: ${customer.dateOfBirth}
  </code></pre>
  
  <p>But the result is unformatted:</p>
  
  <pre><code>Date of birth: 2010-08-11T11:23:30.148+02:00
  </code></pre>
  
  <p>After some research I found out, that I have to use the spring:bind-tag:</p>
  
  <pre><code>&lt;spring:bind path="customer.dateOfBirth"&gt;
     Date of birth: ${status.value}
  &lt;/spring:bind&gt;
  </code></pre>
  
  <p>With this it works. But it seems too complicated for this simple task. And using this method on lists is even more complicated since you have to integrate the list-index into the binding-path.</p>
  
  <p>So my question is: Is there a simpler way to display a formatted value using the spring formatting-annotations?</p>